-
Notifications
You must be signed in to change notification settings - Fork 10
CustomControl
mdavisprog edited this page Apr 5, 2023
·
1 revision
This class allows for creating custom controls without needing to create a sub-class of control.
Name | Description |
---|---|
OnPaint | This is called for all controls of a given Window when a repaint request is issued. This can come from another control or from outside the library such as an event fired from the frontend. BrushThe object to add painting commands to. |
Update | Notifies the control that it's layout is complete within a given container. |
OnFocused | A control may receive focus within a Window if its OnMousePressed function returns true. This tells the frontend that a focus request has occurred. A specific control can also be requested through the Window::SetFocus function. |
OnUnfocused | Notifies the control that is losing focus. |
OnLoad | A Window may have its controls defined within a JSON stream. The Window will parse the stream into a hierarchy of JSON objects and is passed to each control to give them an opportunity to load any properties that define the control. The stream can come from a list of places such as a disk, memory, or network stream. RootThe Json object containing the properties to load for this control. |
OnSave | This may be called from any number of places which may wish to get information about controls. This JSON object can then be used to serialize the information to disk or be displayed in some other output device. RootThe Json object to write properties of this control into. |