
functions
files
intro
|
|
Sound
|
options.ycp
|
Module for setting options passed to the module
String corrections by Christian Steinruecken , 2001/08/01
|
|
|
parameters: 1st: parameter list
Imports
Includes
- sound/routines.ycp
- sound/ui.ycp
Local Functions
|
|
|
local check_value (string value, string type, list<string> poss) -> string
|
|
checks whether param #1 is if type of param #2
- Parameters:
value |
value |
type |
expected type. one of {int, string} |
poss |
if poss is nonempty, checks if value is one of them
returns error message, empty string if ok |
- Return value:
local create_table (list lm, list lk) -> list<term>
|
|
creates itemized table entries,
- Parameters:
lm |
list of maps to take keys from |
lk |
list of keys to look for in 1st param |
- Return value:
local parse_bracket (string input) -> list
|
|
parses string (eg. '{{0,2},{0,100,20}}') to a list
(in this case [0,1,2,0,20,40,60,80,100])
- Parameters:
- Return value:
local string2vallist (string input) -> list<string>
|
|
gets an 'modules.generic_string' like options description string
and returns a list of possible values
- Parameters:
- Return value:
local defWidget () -> term
|
|
default widget when there are no known values
- Return value:
local gen_list (list<string> vals, string default) -> term
|
|
widget for choosing one value from list
- Parameters:
vals |
string with values eg. "12,3,4,6" |
default |
string default value (preselected in combo) |
- Return value:
local updatePossibleValues (string values, string default) -> void
|
|
when the selected option in table is changed, we need to update
combo with values
- Parameters:
values |
list of values |
default |
item |
local getDescr (any arg) -> string
|
|
Returns description of card module option
- Parameters:
arg |
type of arg can be string or list |
- Return value:
local OptionsCon (string cardlabel, list itemized_descriptions, string current_option_name, string current_option_value) -> term
|
|
UI controls for options setting dialog
- Parameters:
cardlabel |
card model string |
itemized_descriptions |
option list (preformated using
'create_table' with tripples: description, name, value) |
current_option_name |
initially selected item name |
current_option_value |
value of current option |
- Return value:
- See:
-
local OptionsDialog (string cardlabel, map opts) -> map
|
|
displays dialog with card options
- Parameters:
cardlabel |
string label for the card |
opts |
list. list where each item is map
with keys: name, value, type, default, description.
values in map are strings |
- Return value:
local sound_options (map save_entry) -> map
|
|
just calls options dialog
- Parameters:
save_entry |
map with card configuration |
- Return value:
|