ACC SHELL
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>
Configuration of mail
</title>
<style type="text/css">body { background-color: #c8c8c8 }
h1 { color: #e00000 }
table { width: 100%/ border: none }
img { border: 0px }
.sigbox { background-color: #ffc080; border: solid thin #f96500 }
.sig { font: larger monospace }
.padtbl { background-color: #ffc080; padding: 10px; margin: 10px }
/* arrow */
.a { color: #606060 }
/* type, parameter */
.t, .p { color: #c05000 }
.pbox { width: 20% }
.descbox { }
.right { align: right }
.header {}
.footer { clear: both}
.menu { width: 10%; float: left }
.main { width: 90%; float: left }
</style>
</head>
<body>
<div class="header">
<i>YaST2 Developers Documentation:</i>
<a href="index.html">
<b>
Configuration of mail
</b>
</a>
<img class="right" alt="" src="/usr/share/doc/packages/yast2-devtools/images/yast2-mini.png" />
<hr />
</div>
<div class="menu">
<img alt="YaST" src="/usr/share/doc/packages/yast2-devtools/images/yast2-half.png" />
<br />
<br />
<a href="index.html">functions</a>
<br />
<a href="files.html">files</a>
<br />
<a href="intro.html">intro</a>
</div>
<div class="main">
<div class="sigbox">
<table class="padtbl">
<tr>
<td>
<h1>
Configuration of mail
</h1>
</td>
<td class="filecell">
include/mail/wj.ycp
</td>
</tr>
<tr>
<td>
Widget Juggler. One of the predecessors of CWM.
</td>
</tr>
<tr>
<td>
<ul>
<li> Martin Vidner <mvidner@suse.cz></li>
</ul>
</td>
</tr>
<tr>
<td>
<p>This module has an unstable interface.</p>
</td>
</tr>
</table>
<table class="padtbl">
<tr>
<td>
<ol>
<li> Widget functions to make moving widgets between dialogs easier.
<li> Table editing helpers
</ol>
<h1>Includes</h1>
<ul>
<li>mail/widgets.ycp</li>
</ul>
<h1>Structures</h1>
<ul>
<li>
<a href="#widget_def">widget_def</a>
</li>
</ul>
<h1>Local Functions</h1>
<ul>
<li>
<a href="#EditTable">EditTable (symbol action, list<map> data, list<string> keys)</a>
</li>
<li>
<a href="#RadioButtonVBox">RadioButtonVBox (symbol g_id, list<term> rbs)</a>
</li>
<li>
<a href="#WJ_GetWidget">WJ_GetWidget (symbol id)</a>
</li>
<li>
<a href="#WJ_MakeHelp">WJ_MakeHelp (list items)</a>
</li>
<li>
<a href="#WJ_MakeWidget">WJ_MakeWidget (symbol id)</a>
</li>
<li>
<a href="#WJ_Set">WJ_Set (list widgets)</a>
</li>
<li>
<a href="#WJ_Set_Missing">WJ_Set_Missing (symbol id)</a>
</li>
<li>
<a href="#WJ_Validate">WJ_Validate (list widgets)</a>
</li>
<li>
<a href="#WJ_Validate_True">WJ_Validate_True (symbol id)</a>
</li>
<li>
<a href="#evaluate_fp">evaluate_fp (any fp)</a>
</li>
<li>
<a href="#makeItems">makeItems (list<map> data, list<string> keys)</a>
</li>
</ul>
</td>
</tr>
</table>
</div>
<p />
<div class="sigbox">
<span class="sig" id="makeItems">local
<b>makeItems (list<map> data, list<string> keys)
<span class="a"> -> </span>
<span class="t">list<term></span>
</b>
</span>
</div>
<p></p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">data</span>
</td>
<td class="descbox">a list of structs</td>
</tr>
<tr>
<td class="pbox">
<span class="p">keys</span>
</td>
<td class="descbox">which members to put in the table</td>
</tr>
</table>
</dd>
</dl>
<dl>
<dt>
<b>Return value:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="t" />
</td>
<td class="descbox">an item list</td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="EditTable">local
<b>EditTable (symbol action, list<map> data, list<string> keys)
<span class="a"> -> </span>
<span class="t">list<map></span>
</b>
</span>
</div>
<p>
A generic handler for editing tables.
The current item of table_widget
makeItems (new_data, keys) is used to fill table_widget</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">action</span>
</td>
<td class="descbox">`add, `edit or `delete</td>
</tr>
<tr>
<td class="pbox">
<span class="p">data</span>
</td>
<td class="descbox">the data edited using the table</td>
</tr>
<tr>
<td class="pbox">
<span class="p">keys</span>
</td>
<td class="descbox">keys of respective columns</td>
</tr>
</table>
</dd>
</dl>
<dl>
<dt>
<b>Return value:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="t" />
</td>
<td class="descbox">the edited data</td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="evaluate_fp">local
<b>evaluate_fp (any fp)
<span class="a"> -> </span>
<span class="t">any</span>
</b>
</span>
</div>
<p>
Evaluate a function pointer, working around interpreter limitations</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">fp</span>
</td>
<td class="descbox">pointer to a functin without parameters returning
boolean string symbol or list</td>
</tr>
</table>
</dd>
</dl>
<dl>
<dt>
<b>Return value:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="t" />
</td>
<td class="descbox">its return value as any</td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="WJ_MakeWidget">local
<b>WJ_MakeWidget (symbol id)
<span class="a"> -> </span>
<span class="t">term</span>
</b>
</span>
</div>
<p>
Constructs a widget term.
Uses a global Widgets map.
Keys are symbols (ids), values are</p>
<p>Structure
<b>
<a id="widget_def">widget_def</a>
</b>
</p>
<pre>
`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": _("&lt;p&gt;Foo!&lt;/p&gt;"), // 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
],</pre>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">id</span>
</td>
<td class="descbox">which widget</td>
</tr>
</table>
</dd>
</dl>
<dl>
<dt>
<b>Return value:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="t" />
</td>
<td class="descbox">a widget term</td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="WJ_GetWidget">local
<b>WJ_GetWidget (symbol id)
<span class="a"> -> </span>
<span class="t">void</span>
</b>
</span>
</div>
<p>
Changes widget value using "get" (useful for widgets with choices).
Uses a global Widgets map. <a href="#widget_def">widget_def</a></p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">id</span>
</td>
<td class="descbox">which widget</td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="WJ_MakeHelp">local
<b>WJ_MakeHelp (list items)
<span class="a"> -> </span>
<span class="t">string</span>
</b>
</span>
</div>
<p>
Make a help string by concatenating
individual widget helps and other strings.
Uses a global Widgets map. <a href="#widget_def">widget_def</a></p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">items</span>
</td>
<td class="descbox">an item is<br>
either a string - use it<br>
or a symbol - lookup its help string in Widgets</td>
</tr>
</table>
</dd>
</dl>
<dl>
<dt>
<b>Return value:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="t" />
</td>
<td class="descbox">concatenated strings</td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="WJ_Validate_True">local
<b>WJ_Validate_True (symbol id)
<span class="a"> -> </span>
<span class="t">boolean</span>
</b>
</span>
</div>
<p>
A helper for WJ_Validate.</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">id</span>
</td>
<td class="descbox">a widget id</td>
</tr>
</table>
</dd>
</dl>
<dl>
<dt>
<b>Return value:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="t" />
</td>
<td class="descbox">always true</td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="WJ_Validate">local
<b>WJ_Validate (list widgets)
<span class="a"> -> </span>
<span class="t">boolean</span>
</b>
</span>
</div>
<p>
Call the validation functions for a list of widgets.
Widgets with an unspecified function are assumed to be valid.
Uses a global Widgets map. <a href="#widget_def">widget_def</a></p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">widgets</span>
</td>
<td class="descbox">which widgets to validate</td>
</tr>
</table>
</dd>
</dl>
<dl>
<dt>
<b>Return value:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="t" />
</td>
<td class="descbox">true if all widgets are ok</td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="WJ_Set_Missing">local
<b>WJ_Set_Missing (symbol id)
<span class="a"> -> </span>
<span class="t">void</span>
</b>
</span>
</div>
<p>
Set a variable acording to widget value
This is an error reporting fallback if the real function was not defined</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">id</span>
</td>
<td class="descbox">widget id</td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="WJ_Set">local
<b>WJ_Set (list widgets)
<span class="a"> -> </span>
<span class="t">void</span>
</b>
</span>
</div>
<p>
Call the "set" functions for a list of widgets
to commit the UI values to a module.
Uses a global Widgets map. <a href="#widget_def">widget_def</a></p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">widgets</span>
</td>
<td class="descbox">which widgets to commit</td>
</tr>
</table>
</dd>
</dl>
<div class="sigbox">
<span class="sig" id="RadioButtonVBox">local
<b>RadioButtonVBox (symbol g_id, list<term> rbs)
<span class="a"> -> </span>
<span class="t">term</span>
</b>
</span>
</div>
<p>
Make a RadioButtonGroup containing Left aligned widgets
in a VBox that has VSpacing (0.2) as top/bottom padding.</p>
<dl>
<dt>
<b>Parameters:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="p">g_id</span>
</td>
<td class="descbox">group id</td>
</tr>
<tr>
<td class="pbox">
<span class="p">rbs</span>
</td>
<td class="descbox">a list of widgets, usually RadioButtons</td>
</tr>
</table>
</dd>
</dl>
<dl>
<dt>
<b>Return value:</b>
</dt>
<dd>
<table>
<tr>
<td class="pbox">
<span class="t" />
</td>
<td class="descbox">widget</td>
</tr>
</table>
</dd>
</dl>
</div>
<div class="footer">
<hr />
<i>YaST2 Developers Documentation</i>
<img class="right" alt="" src="/usr/share/doc/packages/yast2-devtools/images/yast2-mini.png" />
</div>
</body>
</html>
ACC SHELL 2018