package-summary.html

来自「维信SDK文档。源码要求为至少5个C或Java源码」· HTML 代码 · 共 653 行 · 第 1/2 页

HTML
653
字号
<TD WIDTH="15%"><B><A HREF="../../widsets/api/Store.html" title="class in ">Store</A></B></TD><TD>This class is a Widget specific persistent storage.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../widsets/api/String.html" title="class in ">String</A></B></TD><TD>The <code>String</code> class represents character strings.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../widsets/api/Style.html" title="class in ">Style</A></B></TD><TD>This class represents the look and feel of Component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../widsets/api/Text.html" title="class in ">Text</A></B></TD><TD>Text component shows multiple lines of text.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../widsets/api/Ticker.html" title="class in ">Ticker</A></B></TD><TD>Implements a "ticker-tape", a piece of text that runs  continuously across the component area.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../widsets/api/Timer.html" title="class in ">Timer</A></B></TD><TD>Handle to scheduled execution.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../widsets/api/TimeZone.html" title="class in ">TimeZone</A></B></TD><TD>TimeZone represents a time zone offset, and also figures out daylight savings.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../widsets/api/Value.html" title="class in ">Value</A></B></TD><TD>Value is a general composite type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../widsets/api/View.html" title="class in ">View</A></B></TD><TD>View provides programmable access to UI elements normally created with &lt;view&gt; elements on widget XML specification.</TD></TR></TABLE>&nbsp;<P><A NAME="package_description"><!-- --></A><H2>Package  Description</H2><P><p>  Widsets Scripting </p>  <p>  This API specifies the facilities available for WidSets   scripting language, called <b>Helium</b>.    Helium contains facilities that cannot be represented in  terms of standard javadoc; here's reading instructions for those:    <ul>    <li>    <b>Methods that end with a dollar sign ($)</b>    <p>      Dollar sign indicates that function or method can take variable number of arguments.      One such function is <a href="API.html#printf$(String)">printf$</a>.    </p>    <li>    <b>      <a name="callback"/>      <code>interface <i>...Callback</i></code>    </b>    <p>      Specifies a protype of function pointer. Whenever a API method expects      one of the Callback interfaces a function may be passed with a matching      signature to the sole method defined on the interface:    </p>    <pre>/* Function matches <a href="PaintCallback.html">PaintCallback</a> */void my_paint(Component c, Graphics g, Style style, int w, int h) {  g.setColor(0xffffff);  g.fillRect(0, 0, w, h);  g.setColor(0xff0000);  int x = w/4;  int y = h/4;  g.fillRect(x, y, w-2*x, h-2*y);}Canvas c = new <a href="Canvas.html">Canvas</a>(getStyle("myCanvasStyle"), my_paint);    </pre>    <p>      Here the function <code>my_paint</code> is passed to the       constructor of Canvas. Instead of the default callback       <a href="Script.html#paint(Component, Graphics, Style, int, int)">Script.paint(Component, Graphics, Style, int, int)</a>      the function <code>my_paint</code> will be called when painting       of the Canvas is needed.    </p>    <p>      All other callback functions work in the same fashion.    </p>          <li>    <b>      <a name="multireturn"/>      <code>Multiple return values</code></b>    <p>      Certain methods can return multiple, typed values, called tuples.      All of the elements in tuple must be either assigned to variables      or passed to another function:    </p>    <pre>int w, int h = getScreenSize(); // See <a href="API.html#getScreenSize()">description</a>setSize(getScreenSize());function setSize(int w, int h) {   ... }    </pre>      <li>  <a name="operators"/>  <b>Operators</b>  <p>    There are several operators in Helium that can not be found in Java. The operators    <b>get</b>, <b>set</b>, <b>array</b> and <b>append</b> are used to     manipulate data structures such as <a href="Value.html">Value</a> and     <a href="List">List</a> using brackets. These    operators work in a similar way as when dealing with arrays.  </p>  <p>  The operators <b>bind</b> and <b>append</b> are used to create   <a href="Value.html">Value</a> bindings which are simply key-value pairs  of Values.  </p>  <p>  The operator <b>cast</b> is used to cast object types from one to another.   The notation looks like a function call. The benefits of this kind of notation  is reduced number of parentheses in real programming situations such as  when operations are <a href="#operator_cast_chaining">chained</a>.  </p>    <ul>  <li>    <h4><a name="operator_get"/>get</h4>    <b><code>&lt;R&gt; &lt;C&gt;.operator_get(&lt;K&gt; key)</code></b>    <p>    Get a value from container:    <pre>&lt;C&gt; obj = ...;&lt;K&gt; key = ...;&lt;R&gt; val = obj[key];    </pre>    </p>    <p>    example:    <pre>List list = new List();list.add("one");list.add("two");list.add("three");list.add("four");String fourth = String(list[3]);    </pre>    </p>  <li>    <h4><a name="operator_set"/>set</h4>    <b><code>&lt;V&gt; &lt;C&gt;.operator_set(&lt;K&gt; key, &lt;V&gt; value)</code></b>    <p>    Set a value to container:    <pre>&lt;C&gt; obj = ...;&lt;K&gt; key = ...;&lt;V&gt; val = ...;obj[key] = val;    </pre>    </p>    <p>    example:    <pre>Map map = new Map();map["message"] = "hello";        </pre>    <i>OR</i> a dot notation can be used:    <pre>Map map = new Map();map.message = "hello";    </pre>    </p>      <li>    <h4><a name="operator_array"/>array</h4>    <b><code>&lt;A&gt; operator_array()</code></b>    <p>    Creates an array which is composite class <A HREF="../../widsets/api/Value.html" title="class in "><CODE>Value</CODE></A>:    <pre>// create an empty arrayValue arr = [];    </pre>    </p>  <li>    <h4><a name="operator_bind"/>bind</h4>    <b><code>&lt;A&gt; operator_bind(...)</code></b>        <p>    Creates a key-to-value binding that is only used with     <A HREF="../../widsets/api/Value.html" title="class in "><CODE>Value</CODE></A>:    <pre>Value bind = "key"=>"value";    </pre>    </p>  <li>    <h4><a name="operator_append"/>append</h4>    <b><code>void &lt;C&gt;.operator_append(&lt;E&gt; elem)</code></b>    <p>    Initializes elements in a container. This may only be used with    <code><a href="#operator_array">operator_array()</a></code>, and therefore only <A HREF="../../widsets/api/Value.html" title="class in "><CODE>Value</CODE></A> supports    this:    <pre>Value v = ["key"=>"value", "key2"=>"value2"];    </pre>    </p>  <li>    <h4><a name="operator_cast"/>cast</h4>    <b><code>&lt;T&gt; operator_cast_&lt;T&gt;(&lt;S&gt; source)</code></b>    <p>    Cast from one type to another:    <pre>&lt;S&gt; src = ...;&lt;T&gt; trg = &lt;T&gt;(src);    </pre>    </p>    <p>    <a name="operator_cast_chaining"/>    example of chaining:    <pre>Object msg = map["message"];int length = String(msg).length();    </pre>    </p>      <li>    <h4><a name="operator_start_next"/>start ... next</h4>    <b><code>operator_start(&lt;T&gt;, ...) and operator_next(&lt;T&gt;, ...)</code></b>    <p>      This classes enable <code>foreach</code> statement support for       implementing class &lt;T&gt;:    </p>    <pre>List list = new List();list.add("a");    list.add("b");    list.add("c");    foreach(String x: list) {  printf("%s", x);}     </pre>  </ul>       </ul></p><P><P><DL></DL><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../widsets/api/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV PACKAGE&nbsp;&nbsp;NEXT PACKAGE</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html?widsets/api/package-summary.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?