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

Dock layout model for IDE-style tools. More...

#include <RADAppKit.h>

+ Inheritance diagram for RADUi::DockLayoutModel:
+ Collaboration diagram for RADUi::DockLayoutModel:

Public Member Functions

const std::vector< DockPanel > & panels () const
 Returns panel descriptors. More...
 
void setPanels (std::vector< DockPanel > panels)
 Replaces panel descriptors. More...
 
void addPanel (DockPanel panel)
 Adds one panel. More...
 
bool setVisible (const std::string &id, bool visible)
 Shows or hides panel by id. More...
 
bool select (const std::string &id)
 Selects panel by id and deselects siblings in the same area. More...
 
bool setSize (const std::string &id, double size)
 Sets preferred panel size by id. More...
 
RADCore::RADJsonValue toJson () const
 Serializes panel layout. More...
 
void fromJson (const RADCore::RADJsonValue &value)
 Restores panel layout. 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 panel state changes. More...
 

Detailed Description

Dock layout model for IDE-style tools.

Member Function Documentation

◆ addPanel()

void RADUi::DockLayoutModel::addPanel ( DockPanel  panel)

Adds one panel.

◆ fromJson()

void RADUi::DockLayoutModel::fromJson ( const RADCore::RADJsonValue value)

Restores panel layout.

◆ panels()

const std::vector<DockPanel>& RADUi::DockLayoutModel::panels ( ) const

Returns panel descriptors.

◆ select()

bool RADUi::DockLayoutModel::select ( const std::string &  id)

Selects panel by id and deselects siblings in the same area.

◆ setPanels()

void RADUi::DockLayoutModel::setPanels ( std::vector< DockPanel panels)

Replaces panel descriptors.

◆ setSize()

bool RADUi::DockLayoutModel::setSize ( const std::string &  id,
double  size 
)

Sets preferred panel size by id.

◆ setVisible()

bool RADUi::DockLayoutModel::setVisible ( const std::string &  id,
bool  visible 
)

Shows or hides panel by id.

◆ toJson()

RADCore::RADJsonValue RADUi::DockLayoutModel::toJson ( ) const

Serializes panel layout.

Member Data Documentation

◆ changed

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

Raised when panel state changes.


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