|
TachyonUI 0.1.0
High-performance UI for building tools.
|
The documents one main window shows, in tab order, and which one is active. More...
#include <gui_controls/gui_docking_types.h>
Classes | |
| struct | Internal |
| Kept by the documents; not part of the API. More... | |
Public Member Functions | |
| Document * | Active () |
| The shown document; null when there are none. | |
| const Document * | Active () const |
Public Attributes | |
| std::vector< std::unique_ptr< Document > > | documents |
| Boxed, so a document's layout keeps its address (torn-off panels refer to it). | |
| int | active = 0 |
| index of the shown document | |
| std::function< void()> | onNew |
| The "+" after the last tab; none when unset. | |
| std::function< bool(Document &)> | onClose |
| Asked before a document is closed from its tab: false keeps it open (to ask about unsaved changes first, then CloseDocument). | |
| std::function< void(std::unique_ptr< Document >, tachyon::int2)> | onTearOff |
| A tab dropped outside every document bar: the document, taken out of the set, for a new main window (its own DocumentSet) at the screen position the tab was dropped at. | |
| struct tachyon::DocumentSet::Internal | internal |
| not part of the API | |
The documents one main window shows, in tab order, and which one is active.
Document& forest = CreateDocument(documents, "Forest", ".level", "level", levelIcon);
CreatePanel(forest.layout.panels, ...); forest.layout.root = MakeLeaf({ ... });
// In OnGUI, under the title bar:
Documents(documentsID, documents);
|
inline |
The shown document; null when there are none.
|
inline |
| std::vector<std::unique_ptr<Document> > tachyon::DocumentSet::documents |
Boxed, so a document's layout keeps its address (torn-off panels refer to it).
| int tachyon::DocumentSet::active = 0 |
index of the shown document
| std::function<void()> tachyon::DocumentSet::onNew |
The "+" after the last tab; none when unset.
| std::function<bool(Document&)> tachyon::DocumentSet::onClose |
Asked before a document is closed from its tab: false keeps it open (to ask about unsaved changes first, then CloseDocument).
Unset: it closes.
| std::function<void(std::unique_ptr<Document>, tachyon::int2)> tachyon::DocumentSet::onTearOff |
A tab dropped outside every document bar: the document, taken out of the set, for a new main window (its own DocumentSet) at the screen position the tab was dropped at.
Unset: the tab goes back.
| struct tachyon::DocumentSet::Internal tachyon::DocumentSet::internal |
not part of the API