|
RADLib
RADical C++ application framework
|
Document workspace model for tabbed editors and browsers. More...
#include <RADAppKit.h>
Inheritance diagram for RADUi::DocumentWorkspaceModel:
Collaboration diagram for RADUi::DocumentWorkspaceModel:Public Member Functions | |
| const std::vector< DocumentTab > & | tabs () const |
| Returns all tabs. More... | |
| const std::string & | activeId () const |
| Returns active tab id. More... | |
| void | upsertTab (DocumentTab tab) |
| Adds or replaces a tab. More... | |
| bool | setActive (std::string id) |
| Sets active tab id. More... | |
| bool | removeTab (const std::string &id) |
| Removes tab by id. More... | |
| bool | setModified (const std::string &id, bool modified) |
| Marks a tab modified or clean. More... | |
| bool | requestClose (const std::string &id) |
| Emits closeRequested for a closeable tab. More... | |
| bool | hasModifiedTabs () const |
| Returns true when any tab is modified. More... | |
| void | clear () |
| Clears all tabs. 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... | |
| EventLoop * | associatedEventLoop () 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 tabs or active tab changes. More... | |
| RADCore::Event< void(std::string) > | closeRequested |
| Raised when a tab close is requested. More... | |
Document workspace model for tabbed editors and browsers.
| const std::string& RADUi::DocumentWorkspaceModel::activeId | ( | ) | const |
Returns active tab id.
| void RADUi::DocumentWorkspaceModel::clear | ( | ) |
Clears all tabs.
| bool RADUi::DocumentWorkspaceModel::hasModifiedTabs | ( | ) | const |
Returns true when any tab is modified.
| bool RADUi::DocumentWorkspaceModel::removeTab | ( | const std::string & | id | ) |
Removes tab by id.
| bool RADUi::DocumentWorkspaceModel::requestClose | ( | const std::string & | id | ) |
Emits closeRequested for a closeable tab.
| bool RADUi::DocumentWorkspaceModel::setActive | ( | std::string | id | ) |
Sets active tab id.
| bool RADUi::DocumentWorkspaceModel::setModified | ( | const std::string & | id, |
| bool | modified | ||
| ) |
Marks a tab modified or clean.
| const std::vector<DocumentTab>& RADUi::DocumentWorkspaceModel::tabs | ( | ) | const |
Returns all tabs.
| void RADUi::DocumentWorkspaceModel::upsertTab | ( | DocumentTab | tab | ) |
Adds or replaces a tab.
| RADCore::Event<void () > RADUi::DocumentWorkspaceModel::changed |
Raised when tabs or active tab changes.
| RADCore::Event<void (std::string) > RADUi::DocumentWorkspaceModel::closeRequested |
Raised when a tab close is requested.