#include <cascade/widgets/CascadeButtonWidget.h>
Inheritance diagram for CascadeButtonWidget:
CascadeLabelWidget is a widget that implements a button.
|
Callback function for notification of button state changes Clients may provide an optional StateChangeCallback to the RegisterStateChangeCallback() function. Your custom StateChangeCallback will get called back whenever the button state changes.
|
|
|
|
represents a button state State is used by the GetState() and the SetState() functions.
|
|
used to specify horizontal alignment for optional button text TextHAlign is used by the SetTextAlignment() function. It is used to specify horizontal alignment of optional button text.
|
|
used to specify vertical alignment for optional button text TextVAlign is used by the SetTextAlignment() function. It is used to specify vertical alignment of optional button text.
|
|
The CascadeButtonWidget constructor - lightweight. This constructor is lightweight. |
|
Destructor. The destructor. |
|
gets the state of the button call GetState() to get the state of the button.
|
|
key down handler for CascadeButtonWidget The default OnKeyDown handler toggles the state of the button widget when CK_SELECT is received. Override this function in your derived classes to provide custom key down handling functionality.
Reimplemented from CascadeWindow. Reimplemented in CascadeDirBrowser::BrowserButton. |
|
paint handler for CascadeButtonWidget The default implementation renders the button using the appropriate bitmap if it is set, or with line-drawing and rect fills to render the button in the standard widget ui scheme colors. If the button has text set, the text is rendered according to the text alignment settings.
Reimplemented from CascadeWindow. Reimplemented in CascadeDirBrowser::BrowserButton. |
|
notifies when the button state has changed OnStateChange() is called whenever the state is changed. The default behavior is to do nothing. Override this method in CascadeButtonWidget derived classes to be notified of button state changes.
|
|
registers an optional state change callback call RegisterStateChangeCallback() to register an optional callback function which will be called whenever the state changes. Alternatively, you can override OnStateChange() in your CascadeButtonWidget derived classes.
|
|
sets the bitmap to use for the kOn state SetBitmapDown() may be used to set an optional bitmap for the down (kOn) button state. If, during the default OnPaint(), the required bitmap is not set (set to NULL) then the button is rendered in a 3d style using the ui scheme colors for widgets.
|
|
sets the bitmap to use for the kOff state SetBitmapUp() may be used to set an optional bitmap for the up (kOff) button state. If, during the default OnPaint(), the required bitmap is not set (set to NULL) then the button is rendered in a 3d style using the ui scheme colors for widgets.
|
|
sets the state of the button call SetState() to set the state of the button.
|
|
sets optional text for the button SetText() may be used to set optional text for the button to render.
|
|
sets the text alignment for optional text SetTextAlignment sets the horizontal and vertical text alignment for optional text.
|
|
gets the state of the button call GetState() to get the state of the button.
|
|
the array of bitmaps to use for rendering the kOn state m_pBitmapsDown is an array of pointers to bitmaps to use for rendering the kOn state, zero or all of which may be NULL |
|
the array of bitmaps to use for rendering the kOff state m_pBitmapsUp is an array of pointers to bitmaps to use for rendering the kOff state, zero or all of which may be NULL |
|
the state change callback function, if any m_pCallback stores the state change callback function, or NULL if no callback function has been registered |
|
the state change callback clientdata, if any m_pClientData stores the state change callback client data, or NULL if no clientdata has been registered |
|
the current button state m_state stores the current button state |
|
the button text m_text stores the button text, if any |
|
the current text horizontal alignment m_textHAlign stores the horizontal alignment for text rendering |
|
the current text vertical alignment m_textHAlign stores the vertical alignment for text rendering |