Configuration of mail |
include/mail/wj.ycp |
Widget Juggler. One of the predecessors of CWM. | |
|
|
This module has an unstable interface. |
Includes
StructuresLocal Functions
|
- Parameters:
-
data a list of structs keys which members to put in the table
- Return value:
-
an item list
A generic handler for editing tables. The current item of table_widget makeItems (new_data, keys) is used to fill table_widget
- Parameters:
-
action `add, `edit or `delete data the data edited using the table keys keys of respective columns
- Return value:
-
the edited data
Evaluate a function pointer, working around interpreter limitations
- Parameters:
-
fp pointer to a functin without parameters returning boolean string symbol or list
- Return value:
-
its return value as any
Constructs a widget term. Uses a global Widgets map. Keys are symbols (ids), values are
Structure widget_def
`foo: $[ "widget": `TextEntry (), "opt": `opt (`notify), // optional "label": "&Foo", // if there are choices, they are used to construct the widget, // otherwise get is used "choices": Choices_foo // list () "help": _("<p>Foo!</p>"), // used by WJ_MakeHelp, optional "get": Get_foo, // gets value from module to widget "set": Set_foo, // sets value from widget to module // popups an error and returns false if invalid "validate": ``(Validate_foo ()),// optional ],
- Parameters:
-
id which widget
- Return value:
-
a widget term
Changes widget value using "get" (useful for widgets with choices). Uses a global Widgets map. widget_def
- Parameters:
-
id which widget
Make a help string by concatenating individual widget helps and other strings. Uses a global Widgets map. widget_def
- Parameters:
-
items an item is
either a string - use it
or a symbol - lookup its help string in Widgets
- Return value:
-
concatenated strings
A helper for WJ_Validate.
- Parameters:
-
id a widget id
- Return value:
-
always true
Call the validation functions for a list of widgets. Widgets with an unspecified function are assumed to be valid. Uses a global Widgets map. widget_def
- Parameters:
-
widgets which widgets to validate
- Return value:
-
true if all widgets are ok
Set a variable acording to widget value This is an error reporting fallback if the real function was not defined
- Parameters:
-
id widget id
Call the "set" functions for a list of widgets to commit the UI values to a module. Uses a global Widgets map. widget_def
- Parameters:
-
widgets which widgets to commit
Make a RadioButtonGroup containing Left aligned widgets in a VBox that has VSpacing (0.2) as top/bottom padding.
- Parameters:
-
g_id group id rbs a list of widgets, usually RadioButtons
- Return value:
-
widget