class EditorWindowTabGroup

A GUI object that contains one or multiple dockable editor windows.

Each window is represented by a single tab and can be activated, deactivated, moved or dragged off.

Public

Constructors

EditorWindowTabGroup

EditorWindowTabGroup(GUIWidget *parent, EditorRenderWindow *parentWindow)

Methods

~EditorWindowTabGroup

virtual ~EditorWindowTabGroup()

Add

void Add(DockableEditorWindow &window)

Adds a new window to the container, adding a new tab to the end of the tab bar.

Remove

void Remove(DockableEditorWindow &window)

Removes a window from the container.

Insert

void Insert(u32 index, DockableEditorWindow &window)

Inserts a window at the specified index, adding a new tab at that position.

index
Sequential index where to insert the window.
window
Window to insert.

Contains

bool Contains(DockableEditorWindow &window) const

Checks if the container already contains the provided window.

SetSize

void SetSize(const GUIPhysicalSize &size)

Sets the size of the container in pixels.

This also modifies the size of all docked windows.

SetPosition

void SetPosition(const GUIPhysicalPoint &point)

Sets the position of the container, relative to the parent GUI widget.

This also modifies the position of all docked windows.

SetActiveWindow

void SetActiveWindow(u32 windowId)

Changes the currently active window to the one at the specified index.

Making the window active means it will be visible in the container.

windowId
Unique window ID (not sequential).

GetDockedWindowCount

u32 GetDockedWindowCount() const

Returns the number of windows currently docked in this container.

GetWindow

DockableEditorWindow *GetWindow(u32 index) const

Returns a window at the specified sequential index.

GetActiveWindow

DockableEditorWindow *GetActiveWindow() const

Returns a window that is currently visible (its tab is active).

GetParentGUIWidget

GUIWidget &GetParentGUIWidget() const

Returns the parent GUI widget the container is using to render the GUI on.

GetParentWindow

EditorRenderWindow *GetParentWindow() const

Returns the parent key editor window the container is docked in.

GetContentBounds

GUIPhysicalArea GetContentBounds() const

Returns bounds not including the tabbed title bar.

These are the bounds available to docked window GUI elements.

GetDraggableAreas

Vector<GUIPhysicalArea> GetDraggableAreas() const

Returns a list of areas that can be dragged off.

These are normally areas represented by tab buttons.

Update

void Update()

Called once per frame.

Calls update on all docked windows.

RefreshWindowNames

void RefreshWindowNames()

Updates the tabbed title bar by refreshing the names of all docked windows.

NotifyDockedWindowWillBeDestroyed

void NotifyDockedWindowWillBeDestroyed(DockableEditorWindow *window)

Triggers when a docked window is about to be destroyed.

TabGroupToWindowContentSize

GUIPhysicalSize TabGroupToWindowContentSize(const GUIPhysicalSize &tabGroupSize) const

Returns the size of a docked window's content area, if the tab group is the specified size.

Tab group and docked window content sizes are different due to the title bar and potentially other window-specific GUI elements.

WindowContentSizeToTabGroupSize

GUIPhysicalSize WindowContentSizeToTabGroupSize(const GUIPhysicalSize &dockedWindowContentSize) const

Returns the required size of the tab group if the docked window has the provided content area size.

Tab group and docked window content sizes are different due to the title bar and potentially other window-specific GUI elements.

Fields

OnWindowWasDocked

Event<void ()> OnWindowWasDocked

Triggered whenever a new widget is added to this container.

OnWindowWasUndocked

Event<void ()> OnWindowWasUndocked

Triggered whenever a widget docked in this container is closed.

OnMaximized

Event<void ()> OnMaximized

Triggered when the maximize button is clicked.

Private

Methods

RemoveInternal

void RemoveInternal(DockableEditorWindow &window)

Removes a window without triggering a window closed event.

DoOnTabActivated

void DoOnTabActivated(u32 tabId)

Triggered when a user clicks on a tab in the tabbed title bar.

DoOnTabClosed

void DoOnTabClosed(u32 tabId)

Triggered when a user closes a tab in the tabbed title bar.

DoOnTabMaximized

void DoOnTabMaximized(u32 tabId)

Triggered when a user clicks the maximize button on the title bar.

DoOnTabDraggedOff

void DoOnTabDraggedOff(u32 tabId)

Triggered when a user drags a tab off the tabbed title bar.

DoOnTabDraggedOn

void DoOnTabDraggedOn(u32 sequentialIndex)

Triggered when a user drags a tab on the tabbed title bar.

staticDoOnTabDropped

static void DoOnTabDropped(bool wasDragProcessed)

Triggered when the window drag and drop operation finishes.

wasDragProcessed
Signals whether any object handled the drop.

Fields

mParentWindow

EditorRenderWindow * mParentWindow

mTitleBar

GUITabbedTitleBar * mTitleBar

mTitleBarPanel

GUIPanel * mTitleBarPanel

mParentGUIWidget

GUIWidget * mParentGUIWidget

mPosition

GUIPhysicalPoint mPosition

mSize

GUIPhysicalSize mSize

mDockedWindows

UnorderedMap<u32, DockableEditorWindow *> mDockedWindows

mActiveWindowTabId

u32 mActiveWindowTabId