ACC SHELL

Path : /usr/share/doc/packages/yast2-security/autodocs/
File Upload :
Current File : //usr/share/doc/packages/yast2-security/autodocs/widgets.html

<?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>
Security configuration</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>
Security configuration</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>
Security configuration</h1>
      </td>
      <td class="filecell">include/security/widgets.ycp</td>
     </tr>
     <tr>
      <td>Security widgets definitions</td>
     </tr>
     <tr>
      <td>
       <ul>
        <li>Michal Svec <msvec@suse.cz></li>
       </ul>
      </td>
     </tr>
     <tr>
      <td>
       <p>This module has an unstable interface.</p>
      </td>
     </tr>
    </table>
    <table class="padtbl">
     <tr>
      <td>

 This file contains the definitions of all widgets used by the
 security module. They are all in one map (function) called
 WIDGETS.

<pre>

The WIDGETS format:
-------------------

map WIDGETS = $[
    "Item unique ID" : $[
	"Widget" : "ComboBox",
	"Label" : "Item Label",
	"Options" : [ "option1", "option2", ... ],
	"Value" : "option2"
    ],
  ...
];

The "Value" is the current value of this option and one from "Options".

Particular "Options" can be either <string> or [ <string>, <string> ]. In the
latter case, the first string is used as ID and the second is displayed. For
example: [ "option1", ["option2",_("Option2 translation")], ... ].

Possible "Widget" values so far: "ComboBox, CheckBox, TextEntry".

Implementation:
---------------

map2widget("ID")
- look up the "ID" in the "WIDGETS" map
- create the widget

widget2value("ID")
- query UI for the widget with `id(ID)
- return its current value

updatewidget("ID")
- look up the "ID" and change its "Value" to the "val"
- updates the WIDGETS map
- called after start and after each subdialog [OK]
- must check if the value is in "Options"! (TODO)

processinput()
- return true (OK) or false (abort, back, nil, help!, ...)

</pre>



       <h1>Local Variables</h1>
       <ul>
        <li>
         <a href="#WIDGETS">WIDGETS</a>
        </li>
       </ul>
      </td>
     </tr>
    </table>
   </div>
   <p />
   <div class="sigbox">Info:</div>
   <p></p>
   <dl>
    <dt>
     <b>Return value:</b>
    </dt>
    <dd>
     <table>
      <tr>
       <td class="pbox">
        <span class="t" />
       </td>
       <td class="descbox">all widgets</td>
      </tr>
     </table>
    </dd>
   </dl>
   <div class="sigbox">
    <span class="sig" id="WIDGETS">local
     <b>WIDGETS
      <span class="a"> -&gt; </span>
      <span class="t">map</span>
     </b>
    </span>
   </div>
   <p>
 All widgets are here</p>
  </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