#include <cascade/widgets/CascadeSpinnerWidget.h>
Inheritance diagram for CascadeSpinnerWidget:
Public Types | |
typedef void() | ChoiceChangeCallback (const CascadeSpinnerWidget *pSpinner, const u32 &newChoice, void *pClientData) |
Public Member Functions | |
CascadeSpinnerWidget () | |
virtual | ~CascadeSpinnerWidget () |
void | SetBitmapHighlight (CascadeBitmap *pBitmap) |
void | SetBitmapNormal (CascadeBitmap *pBitmap) |
void | SetTextOptions (const CascadeString *inStringList, u32 nCount) |
void | RegisterChoiceChangeCallback (ChoiceChangeCallback *pCallback, void *pClientData) |
void | SetSpinOnSelect (bool bSpinOnSelect) |
bool | GetSpinOnSelect () |
u32 | GetCurrentChoiceIndex () const |
bool | SetCurrentChoiceIndex (u32 inNewChoiceIndex) |
bool | SetCurrentChoiceString (const CascadeString &inNewChoiceString) |
Protected Member Functions | |
virtual bool | OnKeyDown (u32 nKey) |
virtual void | OnPaint (CascadeBitmap &bitmap) |
OnNavKey(). | |
virtual bool | OnNavKey (u32 nKey, CascadeWindow *&pProposedNewFocusWnd) |
Protected Attributes | |
const CascadeString * | m_textChoices |
pProposedNewFocusWnd the proposed window to receive focus | |
u32 | m_nNumChoices |
u32 | m_nCurrentChoice |
CascadeBitmap * | m_pBitmapHighlight |
CascadeBitmap * | m_pBitmapNormal |
ChoiceChangeCallback * | m_pCallback |
void * | m_pClientData |
bool | m_bSpinOnSelect |
CascadeSpinnerWidget is a widget that implements a spinner. It allows the user to choose between multiple text options.
|
Callback function for notification of changes to the selected text choice. Clients may provide an optional ChoiceChangeCallback io the RegisterChoiceChangeCallbacl() function. Your custom ChoiceChangeCallback will get called whenver the text choice changes.
|
|
The CascadeSpinnerWidget constructor - lightweight. |
|
Destructor. |
|
Gets the index into the string array of the currently-displayed text choice call GetCurrentChoiceIndex() to get the index into the string array of the currently-displayed string.
|
|
determines whether or not the spinner should spin when the select key is pressed call GetSpinOnSelect() to determine whether or not the spinner is set to spin when the select button is pressed. return whether or not the spinner will spin on select
|
|
key down handler for CascadeSpinnerWidget The default OnKeyDown handler advances to the next choice in the Reimplemented from CascadeWindow. |
|
Navigation key handler for CascadeSpinnerWidget The default implementation proceeds forwards through the list of strings Reimplemented from CascadeWindow. |
|
paint handler for CascadeSpinnerWidget The default implementation renders the spinner using the appropriate bitmap if it is set, and renders the string in the list that correcponds to the current choice.
Reimplemented from CascadeWindow. |
|
registers an optional choice change callback call RegisterChoiceChangeCallback() to register an optional callback function which will be called whenever the text choice changes.
|
|
Set the bitmap to be used when the spinner is selected call SetBitmapHighlight() to set the bitmap to be used when the spinner has focus.
|
|
Set the bitmap to be used when the spinner is not selected |
|
Sets the displayed string to the one at the index inNewChoiceIndex in the array call SetCurrentChoiceIndex() to set the index into the string array of the currently-displayed string.
|
|
Sets the displayed string to the one in the list that matches inNewChoiceString call SetCurrentChoiceString to set the visible string to inNewChoice string if that string is in the list of strings
|
|
sets whether or not the spinner should spin when the select key is pressed call SetSpinOnSelect() to set whether or not the spinner should spin when the select button is pressed. The default behavior for SpinnerWidgets is that they do spin on select.
|
|
Set the value through which the user can scroll |
|
whether or not the spinner will spin when CK_SELECT is pressed m_bSpinOnSelect is set to true if the spinner should spin on select |
|
the index of the string that is current. |
|
the number of items in m_textChoices[] m_nNumChoices is a count of the number of strings in m_textChoices |
|
the CascadeBitmap that will be rendered when the CascadeSpinnerWidget has focus m_pBitmapHighlight is a client-owned bitmap that is rendered whenever the CascadeSpinnerWidget has focus. |
|
the CascadeBitmap that will be rendered when the CascadeSpinnerWidget does not have focus m_pBitmapNormal is a client-owned bitmap that is rendered whenever the CascadeSpinnerWidget does not have focus. |
|
the callback that is called whenever m_nCurrentChoice changes m_pCallback is a client-supplied callback that gets called whenever m_nCurrentChoice changes |
|
the client-supplied data for m_pCallback m_pClientData is passed to m_pCallback whenever it is called. |
|
pProposedNewFocusWnd the proposed window to receive focus the list of strings that the CascadeSpinnerWidget can display m_textChoices is a client-maintained list of text choices. |