KUIML
Blue Cat's User Interface Programming Language
FILE_SELECT_MENU

Description

Creates a menu composed of selectable file names from a list of directories and subdirectories. Can be instantiated alone or within a POPUP_MENU or MENU_ITEM. The menu can store the selected file path and name into a string, and also exposes a read/write index parameter to set or get the selected item number in the flattened files list.

If the file path is set programmatically, the corresponding menu item is automatically selected (if found) and the index parameter is updated.

Inherited Attributes

See the POPUP_MENU when used as a popup menu, or the MENU_ITEM when used inside another menu (without the action_id attribute).

Specific Attributes

Name Value Type Default Value Description Comment V. Exp.

directories

string

empty

List of directories to scan for files, separated by ';'.

2.5

No

file_types

string

empty

List of file extensions in wildcard syntax, separated by ';'.

Example: *.txt;*.wav

2.5

No

scan_on_load

boolean

true

When true, the menu is filled when created.

Set this attribute to false if you want to avoid the engine to scan the file system when loading the skin.

2.5

No

root_path

string

empty

List of root directories that can be used to store relative file paths, separated by ';'.

If the directories are located within one of the root paths, corresponding file paths will be stored relatively to one of the root paths. This is useful when the root location of the files may change (Mac vs Windows, or username dependent paths etc.).

2.5

No

file_path_string_id

string id

Empty

Identifier of the target string to store the selected file path (optional).

The stored file path is releative to on of the paths specified in the root_path attribute.

2.5

No

file_name_string_id

string id

Empty

Identifier of the target string to store the selected file name for display purposes (optional).

2.5

No

Exposed Objects

Popup

action

Menu pops up at the current mouse location.

Exposed only if the menu is instantiated outside of an existing menu.

2.5

2.5

Refresh

action

Refresh the content of the menu by re-scanning the file system.

2.5

2.5

selected_file_index

integer param

The index of the selected item in the flattened files list (-1 if not available).

2.5

2.5

item_selected

event

Fired when the user selects an item in the menu.

2.5

2.5