Skip to content

Commit

Permalink
More audio_form docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
trypsynth committed Jul 18, 2024
1 parent 0c794be commit 36c01b8
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# get_cancel_button
Get the control index of the cancel button (e.g. the button activated when pressing escape anywhere on an audio form).

`int audio_form::get_cancel_button();`

## Returns:
int: the control index of the cancel button.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# get_caption
Get the caption of a control.

`string audio_form::get_caption(int control_index);`

## Arguments:
* int control_index: the index of the control to query.

## Returns:
string: the caption of the control.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# get_default_button
Get the control index of the default button (e.g. the button activated when pressing enter anywhere on an audio form).

`int audio_form::get_default_button();`

## Returns:
int: the control index of the default button.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# get_list_index_by_id
Get the index of a list item by its ID.

`int audio_form::get_list_index_by_id(int control_index, string id);`

## Arguments:
* int control_index: the index of the list.
* string id: the ID of the item to query.

## Returns:
int: the index of the item, -1 on error.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# get_list_item
Get the text of a particular list item.

`string audio_form::get_list_item(int control_index, int list_index);`

## Arguments:
* int control_index: the index of the list.
* int list_index: the index of the item to get.

## Returns:
string: the text of the item.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# get_list_item_id
Get the ID of a particular list item.

`string audio_form::get_list_item_id(int control_index, int list_index);`

## Arguments:
* int control_index: the index of the list.
* int list_index: the index of the item to get.

## Returns:
string: the ID of the item.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# set_caption
Sets the caption of a control.

`bool audio_form::set_caption(int control_index, string caption);`

## Arguments:
* int control_index: the index of the control.
* string caption: the caption to set on the control (see remarks for more infromation).

## Returns:
bool: true if the caption was successfully set, false otherwise.

## Remarks:
The caption is read every time a user focuses this particular control.

It is possible to associate hotkeys with controls by putting an "&" symbol in the caption. For example, setting the caption of a button to "E&xit" would assign the hotkey alt+x to focus it.

0 comments on commit 36c01b8

Please sign in to comment.