Vertical box layout (top to bottom). More...
#include <layout.h>


Public Member Functions | |
| TuiVBoxLayout (ObjectBase *parent=nullptr) | |
Public Member Functions inherited from TuiBoxLayout | |
| TuiBoxLayout (TuiBoxDirection direction, ObjectBase *parent=nullptr) | |
| Constructs a TuiBoxLayout. | |
| TuiBoxDirection | direction () const |
| Returns the direction. | |
| void | addWidget (TuiWidget *widget) override |
| Adds a widget to the ordered item list. | |
| void | addLayout (TuiLayout *layout) override |
| Adds a sub-layout to the ordered item list. | |
| void | addStretch (int factor=1) |
| Adds a stretch item with the given factor. | |
| void | setStretch (int index, int factor) |
| Sets the stretch factor for the item at the given index. | |
| void | calculateLayout (const Rect2Di32 &available) override |
| Calculates and applies the layout. | |
| Size2Di32 | sizeHint () const override |
| Returns the preferred size based on children and direction. | |
Public Member Functions inherited from TuiLayout | |
| TuiLayout (ObjectBase *parent=nullptr) | |
| void | removeWidget (TuiWidget *widget) |
| Removes a widget from this layout. | |
| void | setMargins (int top, int right, int bottom, int left) |
| Sets the margins (top, right, bottom, left). | |
| void | setMargins (int margin) |
| Sets uniform margins. | |
| void | setSpacing (int spacing) |
| Sets the spacing between items. | |
| int | spacing () const |
| Returns the spacing. | |
| void | margins (int &top, int &right, int &bottom, int &left) const |
| Returns the margins. | |
| const List< TuiWidget * > & | widgets () const |
| Returns the list of managed widgets. | |
| const List< TuiLayout * > & | layouts () const |
| Returns the list of sub-layouts. | |
Public Member Functions inherited from ObjectBase | |
| ObjectBase (ObjectBase *p=nullptr) | |
| Default ObjectBase constructor. | |
| virtual | ~ObjectBase () |
| Destructor. Emits aboutToDestroy, detaches from parent, and destroys children. | |
| ObjectBase * | parent () const |
| Returns the parent object, if one. nullptr if none. | |
| void | setParent (ObjectBase *p) |
| Sets the parent of this object. If the object already has a parent, it will be removed as a child from the old parent and added as a child to the new one. | |
| const ObjectBaseList & | childList () const |
| Returns a list of children of this object. | |
| template<typename... Args> | |
| int | registerSlot (Slot< Args... > *slot) |
| Registers a slot with this object and assigns it an ID. | |
| EventLoop * | eventLoop () const |
| Returns the EventLoop this object is affiliated with. | |
| void | moveToThread (EventLoop *loop) |
| Changes the EventLoop affinity of this object. | |
| int | startTimer (unsigned int intervalMs, bool singleShot=false) |
| Starts a timer on this object's EventLoop. | |
| void | stopTimer (int timerId) |
| Stops a timer previously started with startTimer(). | |
| template<typename... Args> | |
| PROMEKI_NAMESPACE_BEGIN void | connect (Signal< Args... > *signal, Slot< Args... > *slot) |
Additional Inherited Members | |
Public Types inherited from ObjectBase | |
| using | SlotVariantFunc = std::function< void(const VariantList &)> |
| Function type for invoking a slot with a list of Variants. | |
Static Public Member Functions inherited from ObjectBase | |
| static const MetaInfo & | metaInfo () |
| Returns the MetaInfo for the ObjectBase class. | |
| template<typename... Args> | |
| static void | connect (Signal< Args... > *signal, Slot< Args... > *slot) |
| connects a signal and slot together. This function assumes both the signal and slot exist in a ObjectBase or derived object | |
Public Attributes inherited from ObjectBase | |
| Signal< ObjectBase * > | aboutToDestroySignal = Signal< ObjectBase * >(this, aboutToDestroySignalName) |
Static Public Attributes inherited from ObjectBase | |
| static constexpr const char * | aboutToDestroySignalName = PROMEKI_STRINGIFY( aboutToDestroy ) "(" PROMEKI_STRINGIFY_ARGS( ObjectBase * ) ")" |
| static SignalMeta | aboutToDestroySignalMeta = SignalMeta(metaInfo(), aboutToDestroySignalName) |
Protected Member Functions inherited from TuiLayout | |
| Rect2Di32 | contentRect (const Rect2Di32 &available) const |
| Returns the content rect after subtracting margins. | |
Protected Member Functions inherited from ObjectBase | |
| ObjectBase * | signalSender () |
| Returns the ObjectBase that emitted the signal currently being handled. | |
| virtual void | event (Event *e) |
| Called by EventLoop to deliver events to this object. | |
| virtual void | timerEvent (TimerEvent *e) |
| Called when a timer fires for this object. | |
Protected Attributes inherited from TuiLayout | |
| List< TuiWidget * > | _widgets |
| List< TuiLayout * > | _layouts |
Vertical box layout (top to bottom).