KUIML
Blue Cat's User Interface Programming Language
WINDOW

Description

System window that can be used as a container for other widgets. The window's parent is the window of the current widget when the WINDOW elemetn is instantiated.

Inherited Attributes

The WINDOW element inherits most of the Attributes Common to Widgets for its content widget (the window has a root widget element that contains all children widgets).

However, the following widget attributes are used for the window itself, not for its content widget: display, visible, opacity, h_position, v_position, enabled. All other attributes are used by the content widget, which identifier for exposure is the identifier of the window with the .content suffix.

Example: window is is myWindow, the attributes exposed by the widget are myWindow.content.text_color, myWindow.content.width, myWindow.content.height etc.

Also, the mouse_sensitive attribute is ignored and always set to true.

It should be noted that the window's h_position and v_position are absolute to the system's "virtual screen" rather than relative to its parent window. Also the width and height attributes refer to the container widget, not the window's frame size.

By default, if the position attributes are not set, the window will be centered upon first open (when the visible attribute is set to true).

Note: A WINDOW element resets the text properties to default (default system font and color), regardless of its parent widget settings.

Specific Attributes

In addition to the inherited attributes such as h_position and v_position, a WINDOW has the following properties:

Name Value Type Default Value Description Comment V. Exp.

enable_close

boolean

true

Display a close button in the window title bar.

2.7.3

No

enable_minimize

boolean

true

Display a minimize button in the window title bar.

2.7.3

No

enable_minimize

boolean

true

Display a minimize button in the window title bar.

2.7.3

No

enable_maximize

boolean

true

Display a minimize button in the window title bar.

2.7.3

No

enable_titlebar

boolean

true

Enable the title bar.

2.7.3

No

enable_resize

boolean

false

Enable the user to resize the window.

If set to false, the window can still be resized by code. It is just not user-resizable (usually by grabbing the corner).

2.7.3

No

borderless

boolean

false

Do not display the borders around the window.

2.7.3

No

floating

boolean

false

Floating window style

Usually with a smaller titlebar compared to regular windows

2.7.3

No

enable_sys_menu

boolean

false

Enable System menu.

On Windows, enables the system menu for the window.

2.7.3

No

modal

boolean

false

Modal window.

A modal window blocks user interaction with parent windows (like a message box for example). Tip: do not abuse of modal windows.

2.7.3

2.7.3

reset_position_on_close

boolean

false

Reset the position of the window upon close.

By default a window will retain its position when closed then re-opened. Setting this attribute to true resets the position of the window, so that next time it is opened, it will be centered automatically.

2.7.3

No

title

string

empty

Title of the window.

2.7.3

2.7.3