mirror of
https://github.com/taigrr/arduinolibs
synced 2025-01-18 04:33:12 -08:00
420 lines
34 KiB
HTML
420 lines
34 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
|
<title>ArduinoLibs: ListField Class Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
|
</script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td style="padding-left: 0.5em;">
|
|
<div id="projectname">ArduinoLibs
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.6 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></li>
|
|
<li>
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="classes.html"><span>Class Index</span></a></li>
|
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Pages</a></div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="classListField-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">ListField Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p><a class="el" href="classField.html" title="Manages a single data input/output field within a Form. ">Field</a> that manages selection from a static list of items.
|
|
<a href="classListField.html#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="ListField_8h_source.html">ListField.h</a>></code></p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for ListField:</div>
|
|
<div class="dyncontent">
|
|
<div class="center">
|
|
<img src="classListField.png" usemap="#ListField_map" alt=""/>
|
|
<map id="ListField_map" name="ListField_map">
|
|
<area href="classField.html" title="Manages a single data input/output field within a Form. " alt="Field" shape="rect" coords="0,0,59,24"/>
|
|
</map>
|
|
</div></div>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a118501da7edb0b0bc6b493734975b4e9"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classListField.html#a118501da7edb0b0bc6b493734975b4e9">ListField</a> (const String &<a class="el" href="classField.html#aaa861ef917130c989a955bc75c683afe">label</a>)</td></tr>
|
|
<tr class="memdesc:a118501da7edb0b0bc6b493734975b4e9"><td class="mdescLeft"> </td><td class="mdescRight">Constructs a new list field with a specific <em>label</em>. <a href="#a118501da7edb0b0bc6b493734975b4e9">More...</a><br/></td></tr>
|
|
<tr class="separator:a118501da7edb0b0bc6b493734975b4e9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa303898a1f74b52c1c4982653de488b7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa303898a1f74b52c1c4982653de488b7"></a>
|
|
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classListField.html#aa303898a1f74b52c1c4982653de488b7">ListField</a> (<a class="el" href="classForm.html">Form</a> &<a class="el" href="classField.html#a27427319be1cc92db3128637d8884ee5">form</a>, const String &<a class="el" href="classField.html#aaa861ef917130c989a955bc75c683afe">label</a>, ListItems <a class="el" href="classListField.html#a4dbbdeebd386551eb8f245b42b45ccf0">items</a>, int <a class="el" href="classListField.html#aab8477757cd89bacd242c85bac2dccb1">value</a>=0)</td></tr>
|
|
<tr class="memdesc:aa303898a1f74b52c1c4982653de488b7"><td class="mdescLeft"> </td><td class="mdescRight">Constructs a new list field with a specific <em>label</em>, list of <em>items</em>, and <em>value</em>, and attaches it to a <em>form</em>. <br/></td></tr>
|
|
<tr class="separator:aa303898a1f74b52c1c4982653de488b7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5d752bd561cde735b175bcdfda55832a"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classListField.html#a5d752bd561cde735b175bcdfda55832a">dispatch</a> (int event)</td></tr>
|
|
<tr class="memdesc:a5d752bd561cde735b175bcdfda55832a"><td class="mdescLeft"> </td><td class="mdescRight">Dispatches <em>event</em> via this field. <a href="#a5d752bd561cde735b175bcdfda55832a">More...</a><br/></td></tr>
|
|
<tr class="separator:a5d752bd561cde735b175bcdfda55832a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a191b79b460e45cf48e04b04eface2888"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classListField.html#a191b79b460e45cf48e04b04eface2888">enterField</a> (bool reverse)</td></tr>
|
|
<tr class="memdesc:a191b79b460e45cf48e04b04eface2888"><td class="mdescLeft"> </td><td class="mdescRight">Enters the field due to form navigation. <a href="#a191b79b460e45cf48e04b04eface2888">More...</a><br/></td></tr>
|
|
<tr class="separator:a191b79b460e45cf48e04b04eface2888"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4dbbdeebd386551eb8f245b42b45ccf0"><td class="memItemLeft" align="right" valign="top">ListItems </td><td class="memItemRight" valign="bottom"><a class="el" href="classListField.html#a4dbbdeebd386551eb8f245b42b45ccf0">items</a> () const </td></tr>
|
|
<tr class="memdesc:a4dbbdeebd386551eb8f245b42b45ccf0"><td class="mdescLeft"> </td><td class="mdescRight">Returns the array of items in this list. <a href="#a4dbbdeebd386551eb8f245b42b45ccf0">More...</a><br/></td></tr>
|
|
<tr class="separator:a4dbbdeebd386551eb8f245b42b45ccf0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae6709bce9355451b651893691456704e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classListField.html#ae6709bce9355451b651893691456704e">setItems</a> (ListItems <a class="el" href="classListField.html#a4dbbdeebd386551eb8f245b42b45ccf0">items</a>)</td></tr>
|
|
<tr class="memdesc:ae6709bce9355451b651893691456704e"><td class="mdescLeft"> </td><td class="mdescRight">Sets the array of <em>items</em> for this list. <a href="#ae6709bce9355451b651893691456704e">More...</a><br/></td></tr>
|
|
<tr class="separator:ae6709bce9355451b651893691456704e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aab8477757cd89bacd242c85bac2dccb1"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classListField.html#aab8477757cd89bacd242c85bac2dccb1">value</a> () const </td></tr>
|
|
<tr class="memdesc:aab8477757cd89bacd242c85bac2dccb1"><td class="mdescLeft"> </td><td class="mdescRight">Returns the value of this list; i.e. the index within <a class="el" href="classListField.html#a4dbbdeebd386551eb8f245b42b45ccf0" title="Returns the array of items in this list. ">items()</a> of the selected item. <a href="#aab8477757cd89bacd242c85bac2dccb1">More...</a><br/></td></tr>
|
|
<tr class="separator:aab8477757cd89bacd242c85bac2dccb1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a266193631e897fb0b46e1270b1d0eb24"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classListField.html#a266193631e897fb0b46e1270b1d0eb24">setValue</a> (int <a class="el" href="classListField.html#aab8477757cd89bacd242c85bac2dccb1">value</a>)</td></tr>
|
|
<tr class="memdesc:a266193631e897fb0b46e1270b1d0eb24"><td class="mdescLeft"> </td><td class="mdescRight">Sets the <em>value</em> of this list; i.e. the index within <a class="el" href="classListField.html#a4dbbdeebd386551eb8f245b42b45ccf0" title="Returns the array of items in this list. ">items()</a> of the selected item. <a href="#a266193631e897fb0b46e1270b1d0eb24">More...</a><br/></td></tr>
|
|
<tr class="separator:a266193631e897fb0b46e1270b1d0eb24"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="inherit_header pub_methods_classField"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classField')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classField.html">Field</a></td></tr>
|
|
<tr class="memitem:ac4ea0d104376233c3f0bfc080ec8564e inherit pub_methods_classField"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classField.html#ac4ea0d104376233c3f0bfc080ec8564e">Field</a> (const String &<a class="el" href="classField.html#aaa861ef917130c989a955bc75c683afe">label</a>)</td></tr>
|
|
<tr class="memdesc:ac4ea0d104376233c3f0bfc080ec8564e inherit pub_methods_classField"><td class="mdescLeft"> </td><td class="mdescRight">Constructs a new field with a specific <em>label</em>. <a href="#ac4ea0d104376233c3f0bfc080ec8564e">More...</a><br/></td></tr>
|
|
<tr class="separator:ac4ea0d104376233c3f0bfc080ec8564e inherit pub_methods_classField"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7e2bdb203ddfd9219696f263c1731fe7 inherit pub_methods_classField"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7e2bdb203ddfd9219696f263c1731fe7"></a>
|
|
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classField.html#a7e2bdb203ddfd9219696f263c1731fe7">Field</a> (<a class="el" href="classForm.html">Form</a> &<a class="el" href="classField.html#a27427319be1cc92db3128637d8884ee5">form</a>, const String &<a class="el" href="classField.html#aaa861ef917130c989a955bc75c683afe">label</a>)</td></tr>
|
|
<tr class="memdesc:a7e2bdb203ddfd9219696f263c1731fe7 inherit pub_methods_classField"><td class="mdescLeft"> </td><td class="mdescRight">Constructs a new field with a specific <em>label</em> and attaches it to a <em>form</em>. <br/></td></tr>
|
|
<tr class="separator:a7e2bdb203ddfd9219696f263c1731fe7 inherit pub_methods_classField"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a45d6e6d09b8f8e46de62b40119d62c60 inherit pub_methods_classField"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classField.html#a45d6e6d09b8f8e46de62b40119d62c60">~Field</a> ()</td></tr>
|
|
<tr class="memdesc:a45d6e6d09b8f8e46de62b40119d62c60 inherit pub_methods_classField"><td class="mdescLeft"> </td><td class="mdescRight">Destroys this field and removes it from its owning <a class="el" href="classForm.html" title="Manager for a form containing data input/output fields. ">Form</a>. <a href="#a45d6e6d09b8f8e46de62b40119d62c60">More...</a><br/></td></tr>
|
|
<tr class="separator:a45d6e6d09b8f8e46de62b40119d62c60 inherit pub_methods_classField"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a27427319be1cc92db3128637d8884ee5 inherit pub_methods_classField"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a27427319be1cc92db3128637d8884ee5"></a>
|
|
<a class="el" href="classForm.html">Form</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classField.html#a27427319be1cc92db3128637d8884ee5">form</a> () const </td></tr>
|
|
<tr class="memdesc:a27427319be1cc92db3128637d8884ee5 inherit pub_methods_classField"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <a class="el" href="classForm.html" title="Manager for a form containing data input/output fields. ">Form</a> that owns this field; null if not associated with a <a class="el" href="classForm.html" title="Manager for a form containing data input/output fields. ">Form</a>. <br/></td></tr>
|
|
<tr class="separator:a27427319be1cc92db3128637d8884ee5 inherit pub_methods_classField"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad6805c75ee1e62f8cd8bd550c4530c07 inherit pub_methods_classField"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classField.html#ad6805c75ee1e62f8cd8bd550c4530c07">exitField</a> ()</td></tr>
|
|
<tr class="memdesc:ad6805c75ee1e62f8cd8bd550c4530c07 inherit pub_methods_classField"><td class="mdescLeft"> </td><td class="mdescRight">Exits the field due to form navigation. <a href="#ad6805c75ee1e62f8cd8bd550c4530c07">More...</a><br/></td></tr>
|
|
<tr class="separator:ad6805c75ee1e62f8cd8bd550c4530c07 inherit pub_methods_classField"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aaa861ef917130c989a955bc75c683afe inherit pub_methods_classField"><td class="memItemLeft" align="right" valign="top">const String & </td><td class="memItemRight" valign="bottom"><a class="el" href="classField.html#aaa861ef917130c989a955bc75c683afe">label</a> () const </td></tr>
|
|
<tr class="memdesc:aaa861ef917130c989a955bc75c683afe inherit pub_methods_classField"><td class="mdescLeft"> </td><td class="mdescRight">Returns the label to display in the first line of this field. <a href="#aaa861ef917130c989a955bc75c683afe">More...</a><br/></td></tr>
|
|
<tr class="separator:aaa861ef917130c989a955bc75c683afe inherit pub_methods_classField"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad4ea63599d780c35b296cf2840b69f7b inherit pub_methods_classField"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classField.html#ad4ea63599d780c35b296cf2840b69f7b">setLabel</a> (const String &<a class="el" href="classField.html#aaa861ef917130c989a955bc75c683afe">label</a>)</td></tr>
|
|
<tr class="memdesc:ad4ea63599d780c35b296cf2840b69f7b inherit pub_methods_classField"><td class="mdescLeft"> </td><td class="mdescRight">Sets the <em>label</em> to display in the first line of this field. <a href="#ad4ea63599d780c35b296cf2840b69f7b">More...</a><br/></td></tr>
|
|
<tr class="separator:ad4ea63599d780c35b296cf2840b69f7b inherit pub_methods_classField"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a25d86a67b321e8c642edf75a10a35f72 inherit pub_methods_classField"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classField.html#a25d86a67b321e8c642edf75a10a35f72">isCurrent</a> () const </td></tr>
|
|
<tr class="memdesc:a25d86a67b321e8c642edf75a10a35f72 inherit pub_methods_classField"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if this field is the currently-displayed field in its owning form; false otherwise. <a href="#a25d86a67b321e8c642edf75a10a35f72">More...</a><br/></td></tr>
|
|
<tr class="separator:a25d86a67b321e8c642edf75a10a35f72 inherit pub_methods_classField"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
|
|
Additional Inherited Members</h2></td></tr>
|
|
<tr class="inherit_header pro_methods_classField"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classField')"><img src="closed.png" alt="-"/> Protected Member Functions inherited from <a class="el" href="classField.html">Field</a></td></tr>
|
|
<tr class="memitem:a5cf21bf958a71e51feac9e1bf9f599d1 inherit pro_methods_classField"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5cf21bf958a71e51feac9e1bf9f599d1"></a>
|
|
LiquidCrystal * </td><td class="memItemRight" valign="bottom"><a class="el" href="classField.html#a5cf21bf958a71e51feac9e1bf9f599d1">lcd</a> () const </td></tr>
|
|
<tr class="memdesc:a5cf21bf958a71e51feac9e1bf9f599d1 inherit pro_methods_classField"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <a class="el" href="classLCD.html" title="Enhanced library for Freetronics 16x2 LCD shields. ">LCD</a> that this field is being drawn on. <br/></td></tr>
|
|
<tr class="separator:a5cf21bf958a71e51feac9e1bf9f599d1 inherit pro_methods_classField"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:afc612378167be0e7f8a6f8395b3537bd inherit pro_methods_classField"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classField.html#afc612378167be0e7f8a6f8395b3537bd">updateCursor</a> ()</td></tr>
|
|
<tr class="memdesc:afc612378167be0e7f8a6f8395b3537bd inherit pro_methods_classField"><td class="mdescLeft"> </td><td class="mdescRight">Updates the cursor position after the label has been drawn by <a class="el" href="classField.html#ad4ea63599d780c35b296cf2840b69f7b" title="Sets the label to display in the first line of this field. ">setLabel()</a>. <a href="#afc612378167be0e7f8a6f8395b3537bd">More...</a><br/></td></tr>
|
|
<tr class="separator:afc612378167be0e7f8a6f8395b3537bd inherit pro_methods_classField"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p><a class="el" href="classField.html" title="Manages a single data input/output field within a Form. ">Field</a> that manages selection from a static list of items. </p>
|
|
<p><a class="el" href="classListField.html" title="Field that manages selection from a static list of items. ">ListField</a> is intended for selecting an element from a list of items. Each items is represented by a string within program memory, with the list terminated by null. For example:</p>
|
|
<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span> item_Eggs[] PROGMEM = <span class="stringliteral">"Eggs"</span>;</div>
|
|
<div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span> item_Cheese[] PROGMEM = <span class="stringliteral">"Cheese"</span>;</div>
|
|
<div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span> item_Pumpkin[] PROGMEM = <span class="stringliteral">"Pumpkin"</span>;</div>
|
|
<div class="line">ListItem <span class="keyword">const</span> ingredients[] PROGMEM = {</div>
|
|
<div class="line"> item_Eggs,</div>
|
|
<div class="line"> item_Cheese,</div>
|
|
<div class="line"> item_Pumpkin,</div>
|
|
<div class="line"> 0</div>
|
|
<div class="line">};</div>
|
|
<div class="line"></div>
|
|
<div class="line"><a class="code" href="classForm.html">Form</a> mainForm(lcd);</div>
|
|
<div class="line"><a class="code" href="classListField.html">ListField</a> ingredient(mainForm, <span class="stringliteral">"Select ingredient"</span>, ingredients);</div>
|
|
</div><!-- fragment --><p>If there are only two items in the list, then <a class="el" href="classBoolField.html" title="Field that manages the input of a boolean value. ">BoolField</a> can be used instead.</p>
|
|
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classField.html" title="Manages a single data input/output field within a Form. ">Field</a>, <a class="el" href="classBoolField.html" title="Field that manages the input of a boolean value. ">BoolField</a> </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="ListField_8h_source.html#l00032">32</a> of file <a class="el" href="ListField_8h_source.html">ListField.h</a>.</p>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a class="anchor" id="a118501da7edb0b0bc6b493734975b4e9"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ListField::ListField </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const String & </td>
|
|
<td class="paramname"><em>label</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Constructs a new list field with a specific <em>label</em>. </p>
|
|
<p>The field is initially not associated with a <a class="el" href="classForm.html" title="Manager for a form containing data input/output fields. ">Form</a>. The field can be added to a form later using <a class="el" href="classForm.html#a5cb056ace428e75e321610555bfecac7" title="Adds field to this form. ">Form::addField()</a>.</p>
|
|
<p>Initially, <a class="el" href="classListField.html#a4dbbdeebd386551eb8f245b42b45ccf0" title="Returns the array of items in this list. ">items()</a> is null and <a class="el" href="classListField.html#aab8477757cd89bacd242c85bac2dccb1" title="Returns the value of this list; i.e. the index within items() of the selected item. ">value()</a> is -1.</p>
|
|
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classForm.html#a5cb056ace428e75e321610555bfecac7" title="Adds field to this form. ">Form::addField()</a> </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="ListField_8cpp_source.html#l00064">64</a> of file <a class="el" href="ListField_8cpp_source.html">ListField.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a class="anchor" id="a5d752bd561cde735b175bcdfda55832a"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int ListField::dispatch </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>event</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Dispatches <em>event</em> via this field. </p>
|
|
<p>The <em>event</em> is usually obtained from <a class="el" href="classLCD.html#ac1e80e2603bd1cf0276c36092c416292" title="Gets the next button press, release, or idle event. ">LCD::getButton()</a>.</p>
|
|
<p>Returns zero if the <em>event</em> has been handled and no further action is required.</p>
|
|
<p>Returns FORM_CHANGED if the <em>event</em> has changed the value of this field in a manner that may require the application to take further action based on the new field value.</p>
|
|
<p>Returns -1 if the <em>event</em> is not handled by this field, and should be handled by the <a class="el" href="classForm.html" title="Manager for a form containing data input/output fields. ">Form</a> itself (particularly for Left and Right buttons). The default implementation returns -1 for all events.</p>
|
|
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classForm.html#a89bd3850e87caa2ca7b2e946f923d0ee" title="Dispatches event to the currently active field using Field::dispatch(). ">Form::dispatch()</a>, <a class="el" href="classLCD.html#ac1e80e2603bd1cf0276c36092c416292" title="Gets the next button press, release, or idle event. ">LCD::getButton()</a> </dd></dl>
|
|
|
|
<p>Reimplemented from <a class="el" href="classField.html#a061bd1ed4d8b079df86465df8facd3b3">Field</a>.</p>
|
|
|
|
<p>Definition at line <a class="el" href="ListField_8cpp_source.html#l00087">87</a> of file <a class="el" href="ListField_8cpp_source.html">ListField.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a191b79b460e45cf48e04b04eface2888"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void ListField::enterField </td>
|
|
<td>(</td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>reverse</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Enters the field due to form navigation. </p>
|
|
<p>This function is typically called when the user presses Left and Right buttons to navigate to the field. If <em>reverse</em> is true, then navigation was due to the Left button being pressed.</p>
|
|
<p>This function can assume that the display has been cleared and the cursor is positioned at (0, 0).</p>
|
|
<p>The default implementation prints the <a class="el" href="classField.html#aaa861ef917130c989a955bc75c683afe" title="Returns the label to display in the first line of this field. ">label()</a>.</p>
|
|
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classField.html#ad6805c75ee1e62f8cd8bd550c4530c07" title="Exits the field due to form navigation. ">exitField()</a> </dd></dl>
|
|
|
|
<p>Reimplemented from <a class="el" href="classField.html#aa032bbeacb405c56546cb56fbbee94f5">Field</a>.</p>
|
|
|
|
<p>Definition at line <a class="el" href="ListField_8cpp_source.html#l00105">105</a> of file <a class="el" href="ListField_8cpp_source.html">ListField.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a4dbbdeebd386551eb8f245b42b45ccf0"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">ListItems ListField::items </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns the array of items in this list. </p>
|
|
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classListField.html#ae6709bce9355451b651893691456704e" title="Sets the array of items for this list. ">setItems()</a> </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="ListField_8h_source.html#l00041">41</a> of file <a class="el" href="ListField_8h_source.html">ListField.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ae6709bce9355451b651893691456704e"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void ListField::setItems </td>
|
|
<td>(</td>
|
|
<td class="paramtype">ListItems </td>
|
|
<td class="paramname"><em>items</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Sets the array of <em>items</em> for this list. </p>
|
|
<p>The <em>items</em> must be stored within program memory and terminated by null; for example:</p>
|
|
<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span> item_Eggs[] PROGMEM = <span class="stringliteral">"Eggs"</span>;</div>
|
|
<div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span> item_Cheese[] PROGMEM = <span class="stringliteral">"Cheese"</span>;</div>
|
|
<div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span> item_Pumpkin[] PROGMEM = <span class="stringliteral">"Pumpkin"</span>;</div>
|
|
<div class="line">ListItem <span class="keyword">const</span> ingredients[] PROGMEM = {</div>
|
|
<div class="line"> item_Eggs,</div>
|
|
<div class="line"> item_Cheese,</div>
|
|
<div class="line"> item_Pumpkin,</div>
|
|
<div class="line"> 0</div>
|
|
<div class="line">};</div>
|
|
<div class="line"></div>
|
|
<div class="line">list.setItems(ingredients);</div>
|
|
</div><!-- fragment --><dl class="section see"><dt>See Also</dt><dd><a class="el" href="classListField.html#a4dbbdeebd386551eb8f245b42b45ccf0" title="Returns the array of items in this list. ">items()</a> </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="ListField_8cpp_source.html#l00141">141</a> of file <a class="el" href="ListField_8cpp_source.html">ListField.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a266193631e897fb0b46e1270b1d0eb24"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void ListField::setValue </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>value</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Sets the <em>value</em> of this list; i.e. the index within <a class="el" href="classListField.html#a4dbbdeebd386551eb8f245b42b45ccf0" title="Returns the array of items in this list. ">items()</a> of the selected item. </p>
|
|
<p>The <em>value</em> will be clamped to the range of <a class="el" href="classListField.html#a4dbbdeebd386551eb8f245b42b45ccf0" title="Returns the array of items in this list. ">items()</a>.</p>
|
|
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classListField.html#aab8477757cd89bacd242c85bac2dccb1" title="Returns the value of this list; i.e. the index within items() of the selected item. ">value()</a>, <a class="el" href="classListField.html#a4dbbdeebd386551eb8f245b42b45ccf0" title="Returns the array of items in this list. ">items()</a> </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="ListField_8cpp_source.html#l00178">178</a> of file <a class="el" href="ListField_8cpp_source.html">ListField.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aab8477757cd89bacd242c85bac2dccb1"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int ListField::value </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns the value of this list; i.e. the index within <a class="el" href="classListField.html#a4dbbdeebd386551eb8f245b42b45ccf0" title="Returns the array of items in this list. ">items()</a> of the selected item. </p>
|
|
<p>Returns -1 if the <a class="el" href="classListField.html#a4dbbdeebd386551eb8f245b42b45ccf0" title="Returns the array of items in this list. ">items()</a> array is empty or null.</p>
|
|
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classListField.html#a266193631e897fb0b46e1270b1d0eb24" title="Sets the value of this list; i.e. the index within items() of the selected item. ">setValue()</a>, <a class="el" href="classListField.html#a4dbbdeebd386551eb8f245b42b45ccf0" title="Returns the array of items in this list. ">items()</a> </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="ListField_8h_source.html#l00044">44</a> of file <a class="el" href="ListField_8h_source.html">ListField.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following files:<ul>
|
|
<li><a class="el" href="ListField_8h_source.html">ListField.h</a></li>
|
|
<li><a class="el" href="ListField_8cpp_source.html">ListField.cpp</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Sat May 2 2015 10:17:20 for ArduinoLibs by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.6
|
|
</small></address>
|
|
</body>
|
|
</html>
|