GuiWindowCtrl¶
A window with a title bar and an optional set of buttons.
- Inherit:
- GuiContainer
Description¶
The GuiWindowCtrl class implements windows that can be freely placed within the render window. Additionally, the windows can be resized and maximized/minimized.
Example:
newGuiWindowCtrl( 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.
};
Methods¶
-
static void
GuiWindowCtrl::attach(GuiWindowCtrl bottomWindow, GuiWindowCtrl topWindow)¶ Attach bottomWindow to so that bottomWindow moves along with topWindow when it is dragged.
Parameters: - 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.
Fields¶
-
bool
GuiWindowCtrl::canClose¶ Whether the window has a close button.
-
bool
GuiWindowCtrl::canCollapse¶ Whether the window can be collapsed by clicking its title bar.
-
bool
GuiWindowCtrl::canMaximize¶ Whether the window has a maximize button.
-
bool
GuiWindowCtrl::canMinimize¶ Whether the window has a minimize button.
-
bool
GuiWindowCtrl::canMove¶ Whether the window can be moved by dragging its titlebar.
-
string
GuiWindowCtrl::closeCommand¶ Script code to execute when the window is closed.
-
bool
GuiWindowCtrl::edgeSnap¶ If true, the window will snap to the edges of other windows when moved close to them.
-
bool
GuiWindowCtrl::resizeHeight¶ Whether the window can be resized vertically.
-
bool
GuiWindowCtrl::resizeWidth¶ Whether the window can be resized horizontally.
-
string
GuiWindowCtrl::text¶ Text label to display in titlebar.