Skip to content

Container

mdavisprog edited this page Apr 5, 2023 · 2 revisions

Container

Containers are responsible for layouts of Control objects. This includes positioning and sizing each control within the bounds of this Container. The base Container class will place all controls and their defined position and size. Containers can also contain sub-containers which can perform it's own layout logic.

Functions

Name Description
SetWindow This function is defined to be virtual as some controls may need to perform additional logic when the owning window has changed.

InWindowThe new owning Window object for this control.
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.
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.
Clone this wiki locally