TImageButton Class Reference

A pushbutton control with configurable images for each value. More...

#include <TImageButton.h>

Inheritance diagram for TImageButton:

Inheritance graph
[legend]
Collaboration diagram for TImageButton:

Collaboration graph
[legend]
List of all members.

Protected Member Functions

 TImageButton (HIViewRef inControl)
virtual ~TImageButton ()
virtual ControlKind GetKind ()
virtual OSStatus Initialize (TCarbonEvent &inEvent)
virtual void CompatibleDraw (RgnHandle inLimitRgn, CGContextRef inContext, bool inCompositing)
 The fun part of the control.
virtual OSStatus ControlHit (ControlPartCode inPart, UInt32 inModifiers)
virtual OSStatus Track (TCarbonEvent &inEvent, ControlPartCode *outPart)
 Will automatically call SetUpTracking() if the result of UseNonblockingTracking() is true.
virtual OSStatus HiliteChanged (ControlPartCode inOriginalPart, ControlPartCode inCurrentPart, RgnHandle inInvalRgn)
virtual void TitleChanged ()
virtual void ValueChanged ()
virtual UInt32 GetBehaviors ()
virtual OSStatus SetData (OSType inTag, ControlPartCode inPart, Size inSize, const void *inPtr)
virtual OSStatus GetData (OSType inTag, ControlPartCode inPart, Size inSize, Size *outSize, void *inPtr)
 Get some data about the view Only 'TVew' is supported.

Detailed Description

A pushbutton control with configurable images for each value.

This HIView control subclass works like a standard pushbutton, but supports the use of any image or images for its various states. In addition, it supports drawing a text string over the image for a title.

Because the control's actual title is used to configure the image file names, the text to be drawn as the visible title must be set using SetControlData with the data tag kControlEditTextCFStringTag or kControlStaticTextCFStringTag.

The text will be drawn in the small system font by default. You can change the text style by setting the kControlFontStyleTag data, a structure of type ControlFontStyleRec.


Constructor & Destructor Documentation

TImageButton::TImageButton HIViewRef  inControl  )  [protected]
 

TImageButton::~TImageButton  )  [protected, virtual]
 


Member Function Documentation

void TImageButton::CompatibleDraw RgnHandle  inLimitRgn,
CGContextRef  inContext,
bool  inCompositing
[protected, virtual]
 

The fun part of the control.

Implements TViewNoCompositingCompatible.

OSStatus TImageButton::ControlHit ControlPartCode  inPart,
UInt32  inModifiers
[protected, virtual]
 

Reimplemented from TViewNoCompositingCompatible.

virtual UInt32 TImageButton::GetBehaviors  )  [inline, protected, virtual]
 

GetBehaviors

Reimplemented from TViewNoCompositingCompatible.

OSStatus TImageButton::GetData OSType  inTag,
ControlPartCode  inPart,
Size  inSize,
Size *  outSize,
void *  inPtr
[protected, virtual]
 

Get some data about the view Only 'TVew' is supported.

It is returning the C++ object.

Reimplemented from TViewNoCompositingCompatible.

ControlKind TImageButton::GetKind  )  [protected, virtual]
 

OSStatus TImageButton::HiliteChanged ControlPartCode  inOriginalPart,
ControlPartCode  inCurrentPart,
RgnHandle  inInvalRgn
[protected, virtual]
 

OSStatus TImageButton::Initialize TCarbonEvent &  inEvent  )  [protected, virtual]
 

OSStatus TImageButton::SetData OSType  inTag,
ControlPartCode  inPart,
Size  inSize,
const void *  inPtr
[protected, virtual]
 

void TImageButton::TitleChanged  )  [protected, virtual]
 

OSStatus TImageButton::Track TCarbonEvent &  inEvent,
ControlPartCode *  outPart
[protected, virtual]
 

Will automatically call SetUpTracking() if the result of UseNonblockingTracking() is true.

If false, this method will return the eventNotHandledErr error code to invoke default mouse tracking.

Reimplemented from TViewNoCompositingCompatible.

void TImageButton::ValueChanged  )  [protected, virtual]
 


The documentation for this class was generated from the following files:




Generated on Sat Jul 8 13:09:17 2006 for AUGUI Framework by doxygen1.4.6

hosted on SourceForge.net Logo