|
wavelength 1.0.0
|
Component that shows a line of text. More...
#include <uilabel.h>


Public Member Functions | |
| UILabel (DataArray *pData, const char *pszPanel) | |
| Construct a label from its script description. | |
| ~UILabel () override | |
| Destroy the label. | |
| void | SetShowing (bool bShowing) override |
| Show or hide the label and its text object. | |
| const char * | Text () const override |
| Report the text of the text object. | |
| void | SetText (const char *pszText) override |
| Replace the text of the text object. | |
| void | SetState (int nState, bool bForce) override |
| Change the state and give the text object the font the style lists for it. | |
| void | Print (PrnStream &stream) override |
| Write the name, the visibility, and the name of the text object. | |
| void | SetStyle (UIStyle *pStyle) |
| Replace the style and give the text object the font of the current state. | |
| RndText * | GetText () const |
| Public Member Functions inherited from UIComponent | |
| UIComponent (DataArray *pData) | |
| Construct a showing component in the normal state. | |
| bool | Dispatch (Message *pMsg) override |
| Offer a message to the focused panel of the current screen, then handle it here. | |
| bool | DispatchPriv (Message *pMsg) override |
| Handle a message sent to the component. | |
| virtual bool | IsShowing () const |
| Report whether the component is showing. | |
| virtual int | GetState () const |
| Report the state the component shows. | |
| virtual void | Focus () |
| React to the panel giving the component the focus. | |
| virtual void | Unfocus () |
| React to the panel taking the focus away. | |
| virtual void | Poll (float fTime) |
| Advance the component to a time. | |
| const char * | GetName () const |
| int | GetShowing () const |
| Public Member Functions inherited from MsgSink | |
| void * | operator new (size_t nSize) |
| Allocate a sink from the pool heaps under the tag "MsgSink". | |
| void | operator delete (void *pBlock) |
| Return a sink to the pool heaps. | |
| virtual | ~MsgSink () |
| void * | operator new (size_t size) |
| Allocate from the main heap under the name MsgSink. | |
| void | operator delete (void *mem) |
| Return memory to its heap. | |
| virtual | ~MsgSink () |
| Destroy the sink. | |
Static Public Member Functions | |
| static UIComponent * | New (DataArray *pData, const char *pszPanel) |
| Create a label from its script description. | |
| Static Public Member Functions inherited from UIComponent | |
| static void | Init (DataArray *pConfig) |
| Read the parameters of the flash a button shows when it is chosen. | |
Additional Inherited Members | |
| Public Types inherited from UIComponent | |
| enum | State { kStateNormal = 0 , kStateSelected = 1 , kStateDisabled = 2 } |
| The state a component shows, the values of mState and the index UIStyle selects with. More... | |
| Protected Attributes inherited from UIComponent | |
| const char * | mName |
| int | mShowing |
| int | mState |
| Static Protected Attributes inherited from UIComponent | |
| static int | sNumFlashes |
| Number of times a chosen button flashes before it reports the choice. | |
| static float | sSelectedMs |
| Milliseconds of each flash a chosen button spends in the selected state. | |
| static float | sNormalMs |
| Milliseconds of each flash a chosen button spends in the normal state. | |
Component that shows a line of text.
The RTTI records the class as deriving from UIComponent. The object is 0x18 bytes and its vtable is at 0x003d2410. The panel description provides the name at index 1, optionally the base of the text object's name at index 2, and optionally a style at index 3. The text object is <panel>_<base>.txt, with the name standing in for a missing base. The style selects the font of each state.
| UILabel::UILabel | ( | DataArray * | pData, |
| const char * | pszPanel ) |
Construct a label from its script description.
| pData | The script description. |
| pszPanel | The name of the panel the label belongs to. |
|
inlineoverride |
Destroy the label.
|
inlinestatic |
Create a label from its script description.
UIManager::Init() registers the routine for the component type label_comp.
| pData | The script description. |
| pszPanel | The name of the panel the label belongs to. |
|
overridevirtual |
Show or hide the label and its text object.
The text object must exist.
| bShowing | Whether the label shows. |
Reimplemented from UIComponent.
|
overridevirtual |
Report the text of the text object.
The text object must exist.
Reimplemented from UIComponent.
|
overridevirtual |
Replace the text of the text object.
The text object must exist.
| pszText | The text. |
Reimplemented from UIComponent.
|
overridevirtual |
Change the state and give the text object the font the style lists for it.
The style must exist when the text object does.
| nState | One of UIComponent::State. |
| bForce | Apply the state even when it does not change. |
Reimplemented from UIComponent.
|
overridevirtual |
Write the name, the visibility, and the name of the text object.
| stream | The stream to write to. |
Implements UIComponent.
| void UILabel::SetStyle | ( | UIStyle * | pStyle | ) |
Replace the style and give the text object the font of the current state.
| pStyle | The style. |
|
inline |