1#ifndef TOYMAKERBUILTINS_UICONTAINER_H
2#define TOYMAKERBUILTINS_UICONTAINER_H
93 static std::shared_ptr<BaseSimObjectAspect>
create(
const nlohmann::json& jsonAspectProperties);
100 std::shared_ptr<BaseSimObjectAspect>
clone()
const override;
127 *
this,
"onViewportResized", [
this](
const auto& renderConfiguration) {
Interface for a single UI element.
Definition ui_container.hpp:18
virtual glm::vec3 getOffsets() const =0
Returns the offsets relative to the container reference coordinates used to position this element's a...
virtual glm::vec2 getReferenceCoordinate() const =0
Returns the reference coordinate on the container relative to which this element's offsets are define...
virtual bool allowsDescendantControl() const =0
Whether the container is permitted to reposition this element's children.
A SignalObserver object, which can subscribe to Signals matching its data signature and receive signa...
Definition signals.hpp:415
An object containing closely related methods and data, and exposing object lifecycle and application ...
Definition sim_system.hpp:956
glm::vec2 mContentSize
The total dimensions spanned by this container.
Definition ui_container.hpp:120
std::shared_ptr< BaseSimObjectAspect > clone() const override
Constructs a new UIContainer instance using this one as a blueprint.
Definition ui_container.cpp:12
SignalObserver< ViewportNode::RenderConfiguration > mObservedViewportResized
Observer for viewport resize events, which calls onViewportResized.
Definition ui_container.hpp:126
void onViewportResized(const ViewportNode::RenderConfiguration &renderConfiguration)
Procedure for when the owning viewport is resized, where the container is scaled to the viewport's di...
Definition ui_container.cpp:24
void onActivated() override
Subscribes to viewport resizing signals, and adjusts positions of child UI elements.
Definition ui_container.cpp:17
static std::shared_ptr< BaseSimObjectAspect > create(const nlohmann::json &jsonAspectProperties)
Constructs a new UIContainer instance based on its JSON description.
Definition ui_container.cpp:7
static std::string getSimObjectAspectTypeName()
Gets the aspect type string associated with this class.
Definition ui_container.hpp:83
UIContainer()
Constructs a new UIContainer aspect.
Definition ui_container.hpp:75
Namespace containing all class definitions and functions related to the ToyMaker engine.
Definition application.hpp:26
Classes and structs relating to the SimSystem, the system responsible for providing some level of gen...
A collection of data that specifies the behaviour and properties of the RenderSystem and target textu...
Definition scene_system.hpp:849