KUIML
Blue Cat's User Interface Programming Language
Attributes Common to Widgets

Inherited Attributes

All widgets are CELL elements, so they inherit all CELL attributes.

Widgets Attributes

The following attributes are specific to widgets:

Name Value Type Default Value Description Comment V. Exp.

opacity

percentage

100%

Opacity of the widget.

0% is totally transparent, 100% is opaque

1.1

1.2

visible

boolean

true

Show/hide the widget, does not impact the layout, as opposed to the cell's display attribute.


1.6

1.6

enabled

boolean

true

Enable/disable the widget. When disabled, the widget does not react to mouse or keyboard events. it is displayed but inactive.


1.6

1.6

cursor

cursor

System Default

Cursor to display when the mouse is over the active part of the widget.

This property works only for mouse sensitive (aka non-passive) widgets.

1.0

No

mouse_sensitive

boolean

Depending on widget

Enables or disables mouse control on widgets.

Warning: for advanced users only.

Do not use this property that is set according to widget type, except if you really want to force mouse sensitivity (to enable cursor change etc.)

1.0

No

auto_focus

boolean

Depending on widget, usually 'true' for mouse_sensitive widgets

Enables or disables auto focus

When enabled, a widget gets focus when the mouse is over it (you do not need to click on it). When a widget has focus it receives the keyboard events.

auto_focus works for mouse_sensitive widgets.

1.0

No

handled_keys

list of keys, separated by ;

Empty

List of keys handled by the widget, which will trigger key_pressed and key_released events.

(Experimental) Use the character correponding to the selected key or 'all' for all keys, or one of the following for system keys: F1-F20, Enter, Space, Tab, Esc, Shift, Alt, Cmd, Ctrl, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, PgUp, PgDn, Insert, Delete, BackSpace.

2.7

No

default_keys_enabled

boolean

true

Enable or disable the default keys handled natively by the widget.

(Experimental) you can disable the default keyboard behavior for any widget if you want to write your own.

2.7.1

Yes

accept_focus

boolean

true

When set to false, the widget wil not accept keyboard focus (ignored).

(Experimental)

2.7.3

No

Deprecated Attributes

anti_flicker

boolean

Depends on widget

Enables or disables anti-flicker.

Warning: for advanced users only. System widgets only.

You can use this value if your skin contains multiple overlapped widgets which do not use anti_flicker by default (typically image_group_box). You may also want to disable anti_flicker to reduce memory consumption.

1.0

No

offscreen_type

'none','memory' or 'card'

Depends on widget

Chooses offscreen type for double buffering.

Warning: for advanced users only. System widgets and Windows only (not available on Mac).

1.3

No

Drag and Drop Attributes

KUIML supports drag and drop operations. It operates directly on the data model: define your drag sources and drop targets on widgets for each supported applicative type. Dropping files is also supported.

Name Value Type Default Value Description Comment V. Exp.

drag_source_ids

list of identifiers, separated by ';'

empty

List of objects to use as drag sources for drag and drop operations (each one may have a different applicative type)

.

2.6

No

drag_applicative_types

list of applicative types, separated by ';'

empty

List of applicative types to use for each drag source defined by the drag_source_ids list

Experimental since 2.7: use the system::text applicative type to drag the content of a parameter or string as system text (can be dropped into any application that supports drag and drop of text content).

.

2.6

No

drag_operations

list of drag operations separated by ';'

empty

List of drag operations allowed. 'copy' or 'move' operations are currently supported.

.

2.6

No

drag_context

string

Empty.

Optional string to define the serialization context used for the drag operation.

2.6

No

drag_enabled

boolean

true

Enable drag operations on the widget.

2.6

2.6

drop_target_ids

list of identifiers, separated by ';'

empty

List of objects to use as drop targets for drag and drop operations (each one may have a different applicative type)

.

2.6

No

drop_applicative_types

list of applicative types, separated by ';'

empty

List of applicative types to use for each drop target defined by the drop_target_ids list.

Experimental since 2.7: use the system::text applicative type to drop text directly into a parameter or string.

.

2.6

No

drop_file_types

list of file types wildcards, separated by ';'

empty

List of supported file types to use for each drop target defined by the drop_target_ids list. Each wild card may contain several extensions, separated by ','. For example, with "*.*;*.doc,*.txt", the first drop target will accept all files, and the second one will accept only .doc and .txt files.

.

2.6

No

dropped_file_path_string_ids

list of string object identifiers types, separated by ';'

empty

List of string objects than can receive the path of a file that was dropped, for each drop target defined by the drop_target_ids list.

.

2.6

No

drop_context

string

Empty.

Optional string to define the deserialization context used for the drop operation.

2.6

No

drop_enabled

boolean

true

Enable drop operations on the widget.

2.6

2.6

A widget with a valid drag_source_ids list will expose the following parameters: dragging (boolean), drag_operation (enumeration reporting the current state of the drag operation: 0: None, 1: Copy; 2:Move).

A widget with a valid drop_target_ids list will expose the following parameters: dropping (boolean), drop_operation (enumeration reporting the current state of the drag operation: 0: None, 1: Copy; 2:Move).

Exposed Attributes And Events

KUIML widgets expose read only attributes and events to customize user interactions or trigger actions on particular events.

Name Value Type Default Value Description Comment V. Exp.

mouse_over

boolean

false

Set to true when the mouse is over the active area of the widget.

2.6

2.6

mouse_down

integer

0

Bit field containing the state of mouse buttons: first bit is left button, second is right and third is mid button. When no button is pushed, the value of mouse_down is zero.

Experimental.

2.7

2.7

mouse_position.x

integer

Horizontal position of the mouse in the widget (relative to the upper left corner of the widget).

The value is valid only when the mouse is over the widget or being dragged out of it (experimental).

2.7

2.7

mouse_position.y

integer

Vertical position of the mouse in the widget (relative to the upper left corner of the widget).

The value is valid only when the mouse is over the widget or being dragged out of it (experimental).

2.7

2.7

mouse_screen_position.x

integer

Absolute horizontal position of the mouse on the screen.

The value is valid only when the mouse is over the widget or being dragged out of it (experimental).

2.7

2.7

mouse_screen_position.y

integer

Absolute vertical position of the mouse on the screen.

The value is valid only when the mouse is over the widget or being dragged out of it (experimental).

2.7

2.7

focus

boolean

false

Set to true when the widget has keyboard focus and receives keyboard events.

2.7

2.7

key_pressed

event

Event fired when a key (filtered by the handled_key list) is pressed.

Experimental.

2.7

2.7

key_pressed.key

enum

last virtual key that was pressed.

Experimental: enum values are subject to change, check the displayed value (text).

2.7

2.7

key_pressed.characters

string

Character(s) corresponding to the last pressed key, if it was a character key (key_pressed.key=0).

Experimental.

2.7

2.7

key_released

event

Event fired when a key (filtered by the handled_key list) is released.

2.7

2.7

key_released.key

enum

last virtual key that was released.

Experimental: enum values are subject to change, check the displayed value (text).

2.7

2.7

key_released.character

string

Character(s) corresponding to the last released key, if it was a character key (key_released.key=0).

Experimental.

2.7

2.7

dragging

boolean

false

Set to true when a dragging operation is in progress for this widget.

2.6

2.6

drag_operation

boolean

enumeration

type of the current drag operation (None, Copy, Move).

Experimental: enum values are subject to change.

2.6

2.6

dropping

boolean

false

Set to true when a dropping operation is in progress for this widget.

2.6

2.6

drop_operation

boolean

enumeration

type of the current drop operation (None, Copy, Move).

Experimental: enum values are subject to change.

2.6

2.6