GuiWindowCtrl

consoledoc.h

A window with a title bar and an optional set of buttons.

More...

Window

string

Text label to display in titlebar.

bool

Whether the window can be resized horizontally.

bool

Whether the window can be resized vertically.

bool

Whether the window can be moved by dragging its titlebar.

bool

Whether the window has a close button.

bool

Whether the window has a minimize button.

bool

Whether the window has a maximize button.

bool

Whether the window can be collapsed by clicking its title bar.

string

Script code to execute when the window is closed.

bool

If true, the window will snap to the edges of other windows when moved close to them.

Callbacks

void

Called when the close button has been pressed.

void

Called when the window has been minimized.

void

Called when the window has been maximized.

void

Called when the window is collapsed by clicking its title bar.

void

Called when the window is restored from minimized, maximized, or collapsed state.

Public Functions

void
void

Bring the window to the front.

void
setCollapseGroup(bool state)

Set the window's collapsing state.

void

Toggle the window collapsing.

Public Static Functions

void
attach(GuiWindowCtrl bottomWindow, GuiWindowCtrl topWindow)

Attach bottomWindow to @topWindow so that bottomWindow moves along with topWindow when it is dragged.

Detailed Description

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.
};

Window

string text 

Text label to display in titlebar.

bool resizeWidth 

Whether the window can be resized horizontally.

bool resizeHeight 

Whether the window can be resized vertically.

bool canMove 

Whether the window can be moved by dragging its titlebar.

bool canClose 

Whether the window has a close button.

bool canMinimize 

Whether the window has a minimize button.

bool canMaximize 

Whether the window has a maximize button.

bool canCollapse 

Whether the window can be collapsed by clicking its title bar.

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.

Callbacks

onClose()

Called when the close button has been pressed.

onMinimize()

Called when the window has been minimized.

onMaximize()

Called when the window has been maximized.

onCollapse()

Called when the window is collapsed by clicking its title bar.

onRestore()

Called when the window is restored from minimized, maximized, or collapsed state.

Public Functions

attachTo(GuiWindowCtrl window)

selectWindow()

Bring the window to the front.

setCollapseGroup(bool state)

Set the window's collapsing state.

toggleCollapseGroup()

Toggle the window collapsing.

Public Static Functions

attach(GuiWindowCtrl bottomWindow, GuiWindowCtrl topWindow)

Attach bottomWindow to @topWindow so that bottomWindow moves along with topWindow when it is dragged.

Parameters:

bottomWindow

topWindow