Base for planes.
Each plane instance contains widgets on the same Z index and consists of layers from which the widgets are made of. The order of layers denotes the drawing order, first layer is drawn first.
The user interface has a concept of active planes. Only one plane can be active at a time. If a plane is active, it's receiving user input and is displayed in front of all other inactive planes. Initially the UI has no planes, meaning that BasicUserInterface::
nullptr. Adding first plane to an UI will make it active. If there already is an active plane, adding more planes to the UI will not change the active plane and the newly added planes are added as hidden. Calling hide() on a currently active plane will make the previous plane active (if there is any) and the plane is hidden. Calling activate() on an inactive plane will bring it to the front, make it receive input events and show it in case it was hidden.
Destroying a plane that's currently currently active makes the previous plane active, otherwise it's just removed from the plane hierarchy.
- class AbstractPlane
- Non-templated base for planes.
- auto ui() -> BasicUserInterface<Layers...>&
- User interface this plane is part of.
- auto ui() const -> const BasicUserInterface<Layers...>&
- auto previousActivePlane() -> BasicPlane<Layers...>*
- Previous active plane.
- auto previousActivePlane() const -> const BasicPlane<Layers...>*
- auto nextActivePlane() -> BasicPlane<Layers...>*
- Next active plane.
- auto nextActivePlane() const -> const BasicPlane<Layers...>*
- void update()
- Update a plane.
Ui:: BasicPlane<Layers>:: BasicPlane(BasicUserInterface<Layers...>& ui,
const Anchor& anchor,
const Range2D& padding,
const Vector2& margin,
Layers&... layers) explicit
|ui||User interface this plane is part of|
|padding||Padding for widgets inside|
|margin||Margin between the widgets inside|
|layers||Layers the widgets on this plane are made of|
ui doesn't have any active plane yet, this plane is set as active. Otherwise the active plane is unchanged and this plane is added as hidden.
Ui:: BasicPlane<Layers>:: update()
Update a plane.