RADLib
RADical C++ application framework
RADUi::LayoutModel Class Reference

Simple grid layout descriptor model. More...

#include <RADWidgets.h>

+ Inheritance diagram for RADUi::LayoutModel:
+ Collaboration diagram for RADUi::LayoutModel:

Public Member Functions

const std::vector< LayoutItem > & items () const
 Returns layout items. More...
 
void setItems (std::vector< LayoutItem > items)
 Replaces layout items. More...
 
void clear ()
 Removes all layout items. More...
 
- Public Member Functions inherited from RADCore::RADObject
 RADObject ()
 Creates a RADObject bound to the current thread. More...
 
virtual ~RADObject ()
 Disconnects tracked event links and releases lifetime token. More...
 
void registerLink (const ConnectionRecord &record)
 Registers a connection for cleanup when this object is destroyed. More...
 
std::thread::id threadId () const
 Returns the thread id this object is currently associated with. More...
 
EventLoopassociatedEventLoop () const
 Returns the associated event loop, if any. More...
 
ThreadAffinity threadAffinity () const
 Returns both thread id and associated loop atomically. More...
 
std::weak_ptr< void > lifetimeToken () const
 Returns a weak token used to drop queued callbacks after destruction. More...
 
void moveToThread (std::thread::id tId, EventLoop *loop=nullptr)
 Moves the object's affinity to tId and optional loop. More...
 

Public Attributes

RADCore::Event< void() > changed
 Raised when layout items change. More...
 

Detailed Description

Simple grid layout descriptor model.

Member Function Documentation

◆ clear()

void RADUi::LayoutModel::clear ( )

Removes all layout items.

◆ items()

const std::vector<LayoutItem>& RADUi::LayoutModel::items ( ) const

Returns layout items.

◆ setItems()

void RADUi::LayoutModel::setItems ( std::vector< LayoutItem items)

Replaces layout items.

Member Data Documentation

◆ changed

RADCore::Event<void () > RADUi::LayoutModel::changed

Raised when layout items change.


The documentation for this class was generated from the following file: