![]() |
Clapkit
|
Defines a text label. More...
#include <ckLabel.h>
Public Member Functions | |
| CKLabel (const CKControlInitParams ¶ms) | |
| virtual | ~CKLabel () |
| virtual void | AddedToWindow (CKWindow *window) |
| virtual void | RemovedFromWindow () |
| virtual void | PrepareForDraw () |
| virtual void | Redraw () |
| virtual void | SetText (const char *text) |
| virtual const char * | GetText () |
| void | AutoHeight (int maxHeight=0) |
| Increase the height until it fits. | |
| void | SetFont (short fontId) |
| short | GetFont () |
| void | DoTEIdle () |
| virtual void | RaisePropertyChange (const char *propertyName) |
Public Member Functions inherited from CKControl | |
| CKControl (const CKControlInitParams ¶ms, CKControlType type=CKControlType::Unknown) | |
| virtual | ~CKControl () |
| virtual void | MarkAsDirty () |
Public Member Functions inherited from CKObject | |
| CKObject () | |
| virtual | ~CKObject () |
| virtual void | AddHandler (CKEventType type, CKEventHandlerFunc cb) |
| virtual void | RemoveHandler (CKEventType type) |
| virtual bool | HasHandler (CKEventType type) const |
| virtual bool | HandleEvent (const CKEvent &evt) |
| virtual void | SetPropertyObserver (CKPropertyObserverFunc cb) |
| virtual void | UnsetPropertyObserver () |
Public Member Functions inherited from CKTextableControl | |
| CKTextableControl () | |
| virtual | ~CKTextableControl () |
Public Attributes | |
| CKProperty< bool > | bold = false |
| CKProperty< bool > | italic = false |
| CKProperty< bool > | underline = false |
| CKProperty< bool > | multiline = false |
| CKProperty< CKColor > | color |
| CKProperty< int > | fontSize |
| CKProperty< CKTextJustification > | justification |
Public Attributes inherited from CKControl | |
| CKProperty< CKWindow * > | owner = nullptr |
| CKProperty< CKRect > | rect |
| CKProperty< bool > | enabled = true |
| CKProperty< bool > | visible |
Protected Member Functions | |
| virtual void | TECreated () |
| virtual void | ResizeTE () |
Protected Attributes | |
| short | __fontNumber |
| TEHandle | __teHandle = nullptr |
| char * | __tempTextStorage = nullptr |
| bool | __needsPreparing = true |
Protected Attributes inherited from CKObject | |
| std::map< CKEventType, CKEventHandlerFunc > | __handlers |
| CKPropertyObserverFunc | propertyObserverCB = nullptr |
Protected Attributes inherited from CKTextableControl | |
| char * | __text |
Defines a text label.
| CKLabel::CKLabel | ( | const CKControlInitParams & | params | ) |
|
virtual |
|
virtual |
| void CKLabel::AutoHeight | ( | int | maxHeight = 0 | ) |
Increase the height until it fits.
| maxHeight | If set to non-zero value, will limit maximum height. |
|
inline |
| short CKLabel::GetFont | ( | ) |
|
virtual |
Reimplemented from CKTextableControl.
|
virtual |
Reimplemented in CKTextArea, and CKTextField.
|
virtual |
Reimplemented from CKControl.
Reimplemented in CKTextArea.
|
virtual |
Called by CKApp when the control needs to (re-)draw itself, usually due to an event like mouseDown or updateEvt.
YOU MOST LIKELY DO NOT NEED TO CALL THIS. USE MarkAsDirty!
Reimplemented from CKControl.
Reimplemented in CKTextArea, and CKTextField.
|
virtual |
|
protectedvirtual |
Reimplemented in CKTextArea.
| void CKLabel::SetFont | ( | short | fontId | ) |
|
virtual |
Reimplemented from CKTextableControl.
|
protectedvirtual |
Reimplemented in CKTextArea, and CKTextField.
|
protected |
|
protected |
|
protected |
|
protected |
| CKProperty<bool> CKLabel::bold = false |
| CKProperty<CKColor> CKLabel::color |
| CKProperty<int> CKLabel::fontSize |
| CKProperty<bool> CKLabel::italic = false |
| CKProperty<CKTextJustification> CKLabel::justification |
| CKProperty<bool> CKLabel::multiline = false |
| CKProperty<bool> CKLabel::underline = false |