class
GUITabbedTitleBar
Tabbed title bar to be used in editor windows.
Displays tabs that can be activated, reordered by dragging, or dragged off and on to/on other title bars.
Public
Methods
staticGetGuiTypeName
Returns type name of the GUI element used for finding GUI element styles.
staticCreate
Creates a new tabbed title bar GUI element.
- options
- Options that allow you to control how is the element positioned and sized. This will override any similar options set by style.
AddTab
Adds a new tab to the end of the tab list.
- name
- Title to display on the tab button.
Returns: A unique ID (not sequential) that you may use for later identifying the tab.
InsertTab
Inserts a new tab button at the specified position.
- position
- Sequential index to insert the tab button in. This will be clamped to a valid range.
- name
- Title to display on the tab button.
Returns: A unique ID (not sequential) that you may use for later identifying the tab.
RemoveTab
Removes the tab button with the specified ID.
SetActive
Activates the tab button with the specified ID.
GetTabId
Finds the unique tab ID from the provided sequential tab position.
GetTabCount
Returns the total number of display tab buttons.
UpdateTabName
Changes the displayed title for a tab with the specified index.
CalculateDraggableAreas
Calculates areas between the tab buttons and other GUI elements on the title bar.
These areas are normally used for setting up valid areas the user can click on and drag the window the title bar belongs to.
Fields
OnTabActivated
Triggered when the active tab changes.
Provided parameter is the unique ID of the activated tab.
OnTabClosed
Triggered when a tab is closed.
Provided parameter is the unique ID of the closed tab.
OnTabMaximized
Triggered when a tab maximize button is clicked.
Provided parameter is the unique ID of the maximized/restored tab.
OnTabDraggedOff
Triggered when a tab gets dragged off the title bar.
Provided parameter is the unique ID of the activated tab.
OnTabDraggedOn
Triggered when a new tab gets dragged on the title bar.
Provided parameter is the sequential index of the activated tab.
Protected
Constructors
GUITabbedTitleBar
Methods
~GUITabbedTitleBar
CalculateUnconstrainedOptimalSize
Calculates the optimal size for the GUI element, ignoring size constraints.
UpdateLayoutForChildren
Calculates sizes and relative positions for all child elements.
Should be preceded with a call to UpdateOptimalLayoutSizes().
UpdateAbsoluteCoordinatesForChildren
Calls UpdateAbsoluteCoordinates() on all child elements.
DoOnMouseEvent
Called when a mouse event is received on any GUI element the mouse is interacting with.
Return true if you have processed the event and don't want other elements to process it.
StartDrag
Starts the internal drag and drop operation.
- sequentialIndex
- Sequential index of the dragged tab.
- startDragPosition
- Pointer position of where the drag originated, relative to parent widget.
TabToggled
Triggered when a tab button is toggled on or off.
- tabId
- Unique ID of the tab.
- toggledOn
- Whether the tab was activated or deactivated.
TabClosed
Triggered when the close button is pressed.
TabMaximize
Triggered when the maximize button is pressed.
TabDragged
Triggered every frame while a tab button is being dragged.
- tabId
- Unique ID of the dragged tab.
- dragPosition
- Position of the pointer, relative to parent widget.
TabDragEnd
Triggered when a drag operation on a tab button ends.
- tabId
- Unique index of the dragged tab.
- dragPosition
- Position of the pointer, relative to parent widget.
TabIdToSequentialIndex
Converts unique tab ID to a sequential index corresponding to the tab's position in the title bar.