|
A window with a title bar and an optional set of buttons. More...
Public Member Functions | |
void | attachTo (GuiWindowCtrl window) |
void | selectWindow () |
Bring the window to the front. | |
void | setCollapseGroup (bool state) |
Set the window's collapsing state. | |
void | toggleCollapseGroup () |
Toggle the window collapsing. | |
Callbacks | |
void | onClose () |
Called when the close button has been pressed. | |
void | onCollapse () |
Called when the window is collapsed by clicking its title bar. | |
void | onMaximize () |
Called when the window has been maximized. | |
void | onMinimize () |
Called when the window has been minimized. | |
void | onRestore () |
Called when the window is restored from minimized, maximized, or collapsed state. | |
Static Public Member Functions | |
static void | attach (GuiWindowCtrl bottomWindow, GuiWindowCtrl topWindow) |
Attach bottomWindow to so that bottomWindow moves along with topWindow when it is dragged. | |
Public Attributes | |
Window | |
bool | canClose |
Whether the window has a close button. | |
bool | canCollapse |
Whether the window can be collapsed by clicking its title bar. | |
bool | canMaximize |
Whether the window has a maximize button. | |
bool | canMinimize |
Whether the window has a minimize button. | |
bool | canMove |
Whether the window can be moved by dragging its titlebar. | |
string | closeCommand |
Script code to execute when the window is closed. | |
bool | edgeSnap |
If true, the window will snap to the edges of other windows when moved close to them. | |
bool | resizeHeight |
Whether the window can be resized vertically. | |
bool | resizeWidth |
Whether the window can be resized horizontally. | |
string | text |
Text label to display in titlebar. |
A window with a title bar and an optional set of buttons.
The GuiWindowCtrl class implements windows that can be freely placed within the render window. Additionally, the windows can be resized and maximized/minimized.
new GuiWindowCtrl( MyWindow ) { text = "My Window"; // The text that is displayed on the title bar. resizeWidth = true; // Allow horizontal resizing by user via mouse. resizeHeight = true; // Allow vertical resizing by user via mouse. canClose = true; // Display a close button in the title bar. canMinimize = true; // Display a minimize button in the title bar. canMaximize = true; // Display a maximize button in the title bar. };
static void GuiWindowCtrl::attach | ( | GuiWindowCtrl | bottomWindow, | |
GuiWindowCtrl | topWindow | |||
) | [static] |
Attach bottomWindow to so that bottomWindow moves along with topWindow when it is dragged.
bottomWindow | ||
topWindow |
void GuiWindowCtrl::attachTo | ( | GuiWindowCtrl | window | ) |
void GuiWindowCtrl::onClose | ( | ) |
Called when the close button has been pressed.
void GuiWindowCtrl::onCollapse | ( | ) |
Called when the window is collapsed by clicking its title bar.
void GuiWindowCtrl::onMaximize | ( | ) |
Called when the window has been maximized.
void GuiWindowCtrl::onMinimize | ( | ) |
Called when the window has been minimized.
void GuiWindowCtrl::onRestore | ( | ) |
Called when the window is restored from minimized, maximized, or collapsed state.
void GuiWindowCtrl::selectWindow | ( | ) |
Bring the window to the front.
void GuiWindowCtrl::setCollapseGroup | ( | bool | state | ) |
Set the window's collapsing state.
void GuiWindowCtrl::toggleCollapseGroup | ( | ) |
Toggle the window collapsing.
Whether the window has a close button.
Whether the window can be collapsed by clicking its title bar.
Whether the window has a maximize button.
Whether the window has a minimize button.
Whether the window can be moved by dragging its titlebar.
string GuiWindowCtrl::closeCommand |
Script code to execute when the window is closed.
If true, the window will snap to the edges of other windows when moved close to them.
Whether the window can be resized vertically.
Whether the window can be resized horizontally.
string GuiWindowCtrl::text |
Text label to display in titlebar.