LTextButton is a PowerPlant class that is used for managing buttons that have text instead of graphics in them. There is no standard Mac OS item that matches this class.
Methods :
The methods in this class are:
Data Members:
The data members in this class are:
Operation:
Clicking an LTextButton toggles the button's state between on and off, like a radio button. The different state is represented visually by a change in the text style. The button style may become underline, bold, italic, outline, shadow, condensed, extended, or any combination of these style options.
When the user clicks the button, a message is sent to all the button's Listeners. In a typical scenario, you want some action to occur immediately when the user clicks a text button. You should specify a value message that uniquely identifies the button to any Listener.
Source files:
Ancestors:
The ancestors for this class are:
Purpose:
The constructors create objects from the passed-in parameters.
Access:
Prototype:
LTextButton();
LTextButton( LStream* inStream );Parameters:
The stream constructor has the following parameter:
Purpose:
The destructor destroys the object.
Access:
Prototype:
virtual ~LTextButton();
Purpose:
Draw this text in with appropriate text style for the selected status. This is an override of DrawSelf() in LPane.
Purpose:
Return the text of the button. This is an override of GetDescriptor() in LPane.
Purpose:
Toggle between highlighted and plain states, depending on mouse location. This is an override of HotSpotAction() in LControl.
Purpose:
Update the value of the control and send a message to the Listeners. This is an override of HotSpotResult() in LControl.
Purpose:
Reset the title and update region of the button. This is an override of SetDescriptor() in LPane.
Purpose:
Reset button value, update region, and send message. This is an override of SetValue() in LControl.
Purpose:
This data member contains the text that is drawn in the button.
Access:
Prototype:
LStr255 mText;
Purpose:
This data member contains the resource ID of the resource that contains the text traits information.
Access:
Prototype:
ResIDT mTextTraitsID;
Purpose:
This data member contains the information that determines the style the button text will be drawn with.
Access:
Prototype:
SInt16 mSelectedStyle;