iv::Align Class Reference
Container providing special behaviors related to relative alignment of its child. More...
#include <Align.hpp>
Public Attributes | |
ClientMarker | cm |
DirtyAttr< bool > | attr_dontExpand |
DirtyAttr< bool > | attr_keepAspect |
DirtyAttr< bool > | attr_resizeScales |
DirtyAttr< float3 > | attr_innerAnchor |
Public Attributes inherited from iv::OneChildElem< SlotChild > | |
ClientMarker | cm |
Public Attributes inherited from iv::Elem | |
ClientMarker | cm |
DirtyAttr< bool > | attr_enabled |
DirtyAttr< float4x4 > | modelTransform |
DirtyAttr< ShaderScissor > | scissor |
Public Attributes inherited from iv::InputNode | |
ClientMarker | cm |
Public Attributes inherited from iv::SlotChild | |
ClientMarker | cm |
DirtyAttr< float3 > | expectedSize |
DirtyAttr< float3 > | preferredSize |
DirtyAttr< float3 > | size |
Public Attributes inherited from iv::Pickable | |
ClientMarker | cm |
Protected Member Functions | |
virtual void | first_pass_impl (ElementRenderer *) override |
virtual void | second_pass_impl (ElementRenderer *) override |
Protected Member Functions inherited from iv::OneChildElem< SlotChild > | |
virtual void | elem_eachChild (std::function< void(Elem *) > const &) override |
virtual void | elem_childDisconnect (Elem *) override |
virtual void | input_eachChild (std::function< void(InputNode *) > const &f) override |
virtual void | input_childDisconnect (InputNode *child) override |
Protected Member Functions inherited from iv::InputNode | |
virtual bool | input_trigger_process (InputRoot *root, Input::DeviceKey key) |
virtual void | input_process (InputRoot *root, Input::DeviceKey key, bool &press, bool &real, bool &offspace) |
Additional Inherited Members | |
Protected Attributes inherited from iv::OneChildElem< SlotChild > | |
DirtyAttr< SlotChild * > | child |
Detailed Description
Container providing special behaviors related to relative alignment of its child.
Use of Align::Border is encouraged for simple positioning tasks over Align (not because performance, but because it covers more usual use cases).
Typical core use cases:
- Simple alignment - Align::dontExpand is set to true - Child retains its preferred size if possible and is positioned relatively inside according to Align::innerAnchor size.
- Keep aspect ratio - Align::keepAspect is set to true - Child can be shrinked or expanded according to size of its parent, but it will always retain its aspect ration by reducing its size along some axes. Align::innerAnchor determines relative positioning along those reduced axes.
- Simple alignment and keep aspect ratio - Both Align::dontExpand and Align::keepAspect are set to true - Child does not expand above its preferred size and when it shrinks due to small parent container, it retains its preferred size.
- Scale child instead of resizing - Align::resizeScales is set to true - Child always gets its preferred size (on the inside), but is then scaled in order to fit into available space. This can be combined with the above use cases but it can also be used on its own.
Constructor & Destructor Documentation
◆ Align()
Member Function Documentation
◆ status()
void iv::Align::status | ( | iv::TableDebugView * | view | ) |
◆ enabled()
◆ dontExpand()
◆ keepAspect()
◆ resizeScales()
◆ innerAnchor()
◆ first_pass_impl()
|
overrideprotectedvirtual |
◆ second_pass_impl()
|
overrideprotectedvirtual |
◆ instance()
Member Data Documentation
◆ cm
ClientMarker iv::Align::cm |
◆ attr_dontExpand
◆ attr_keepAspect
◆ attr_resizeScales
◆ attr_innerAnchor
The documentation for this class was generated from the following files: