![]() |
Clapkit
|
Defines the base of all UI Controls. More...
#include <ckControl.h>
Public Member Functions | |
CKControl (const CKControlInitParams ¶ms, CKControlType type=CKControlType::Unknown) | |
virtual | ~CKControl () |
virtual void | AddedToWindow (CKWindow *window) |
virtual void | RemovedFromWindow () |
virtual void | MarkAsDirty () |
virtual void | RaisePropertyChange (const char *propertyName) |
![]() | |
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 Attributes | |
CKProperty< CKWindow * > | owner = nullptr |
CKProperty< CKRect > | rect |
CKProperty< bool > | enabled = true |
CKProperty< bool > | visible |
Protected Member Functions | |
virtual void | Redraw () |
Friends | |
class | CKWindow |
Additional Inherited Members | |
![]() | |
std::map< CKEventType, CKEventHandlerFunc > | __handlers |
CKPropertyObserverFunc | propertyObserverCB = nullptr |
Defines the base of all UI Controls.
CKControl::CKControl | ( | const CKControlInitParams & | params, |
CKControlType | type = CKControlType::Unknown |
||
) |
|
virtual |
|
virtual |
Called by CKApp when the control has been added to a window.
Reimplemented in CKControlToolbox, CKDropdown, and CKLabel.
|
virtual |
Once changes are made to the control, we need to mark it or its area as dirty so it can it can be redrawn later. This function does this - call once you make changes.
|
virtual |
Reimplemented from CKObject.
Reimplemented in CKControlToolbox, CKDropdown, CKLabel, and CKTextArea.
|
protectedvirtual |
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 in CKButton, CKCanvas, CKControlToolbox, CKLabel, CKTextArea, and CKTextField.
|
virtual |
|
friend |
CKProperty<bool> CKControl::enabled = true |
CKProperty<CKWindow*> CKControl::owner = nullptr |
CKProperty<CKRect> CKControl::rect |
CKProperty<bool> CKControl::visible |