Location: PHPKode > scripts > Dialog for PHP > dialog-for-php/apidoc/HTMLSmartyConverter/dialog4php/Menu.html
<html>
<head>
<title>Docs For Class Menu</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">dialog4php</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
  		  [ <a href="../classtrees_dialog4php.html" class="menu">class tree: dialog4php</a> ]
		  [ <a href="../elementindex_dialog4php.html" class="menu">index: dialog4php</a> ]
		  [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
	<div id="ric">
					<p><a href="../ric_README.html">README</a></p>
			</div>
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
      <b>Packages:</b><br />
              <a href="../li_dialog4php.html">dialog4php</a><br />
            <br /><br />
                        <b>Files:</b><br />
      	  <div class="package">
			<a href="../dialog4php/_dialog_php.html">		dialog.php
		</a><br>
			<a href="../dialog4php/_example_php.html">		example.php
		</a><br>
	  </div><br />

      
            <b>Classes:</b><br />
        <div class="package">
		    		<a href="../dialog4php/Calendar.html">Calendar</a><br />
	    		<a href="../dialog4php/CheckList.html">CheckList</a><br />
	    		<a href="../dialog4php/Dialog.html">Dialog</a><br />
	    		<a href="../dialog4php/FileSelectBox.html">FileSelectBox</a><br />
	    		<a href="../dialog4php/InfoBox.html">InfoBox</a><br />
	    		<a href="../dialog4php/InputBox.html">InputBox</a><br />
	    		<a href="../dialog4php/Menu.html">Menu</a><br />
	    		<a href="../dialog4php/MessageBox.html">MessageBox</a><br />
	    		<a href="../dialog4php/PasswordBox.html">PasswordBox</a><br />
	    		<a href="../dialog4php/RadioList.html">RadioList</a><br />
	    		<a href="../dialog4php/TailBox.html">TailBox</a><br />
	    		<a href="../dialog4php/TextBox.html">TextBox</a><br />
	    		<a href="../dialog4php/TimeBox.html">TimeBox</a><br />
	    		<a href="../dialog4php/YesNo.html">YesNo</a><br />
	  </div>

                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1>Class: Menu</h1>
Source Location: /dialog.php<br /><br />


<table width="100%" border="0">
<tr><td valign="top">

<h3><a href="#class_details">Class Overview</a></h3>
<pre><a href="../dialog4php/Dialog.html">Dialog</a>
   |
   --Menu</pre><br />
<div class="description">Allow the user to choose from a list of possible choices</div><br /><br />







</td>



<td valign="top">
<h3><a href="#class_methods">Methods</a></h3>
<ul>
    <li><a href="../dialog4php/Menu.html#methodMenu">Menu</a></li>
    <li><a href="../dialog4php/Menu.html#methodaddMenuItem">addMenuItem</a></li>
    <li><a href="../dialog4php/Menu.html#methodremoveMenuItem">removeMenuItem</a></li>
  </ul>
</td>

</tr></table>
<hr />

<table width="100%" border="0"><tr>


<td valign="top">
<h3>Child classes:</h3>
<div class="tags">
<dl>
<dt><a href="../dialog4php/RadioList.html">RadioList</a></dt>
	<dd>Essentially the same as Menu</dd>
</dl>
<dl>
<dt><a href="../dialog4php/CheckList.html">CheckList</a></dt>
	<dd>Allow the user to choose zero or more options from a list</dd>
</dl>
</div>
</td>



<td valign="top">
<h3>Inherited Methods</h3>
<div class="tags">
<h4>Class: <a href="../dialog4php/Dialog.html">Dialog</a></h4>
<dl>
    <dt>
    <a href="../dialog4php/Dialog.html#methodDialog">Dialog::Dialog()</a>
  </dt>
  <dd>
    This is a generic constructor.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetAspect">Dialog::getAspect()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetBackTitle">Dialog::getBackTitle()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetBeep">Dialog::getBeep()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetBeepAfter">Dialog::getBeepAfter()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetBegin">Dialog::getBegin()</a>
  </dt>
  <dd>
    &lt;strong&gt;Warning:&lt;/strong&gt; This does not actually work at the moment!
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetClear">Dialog::getClear()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetCRwrap">Dialog::getCRwrap()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetDefaultItem">Dialog::getDefaultItem()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetDefaultNo">Dialog::getDefaultNo()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetHeight">Dialog::getHeight()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetItemHelp">Dialog::getItemHelp()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetMainText">Dialog::getMainText()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetMaxDims">Dialog::getMaxDims()</a>
  </dt>
  <dd>
    Return the dimensions of the screen.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetNoCancel">Dialog::getNoCancel()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetNoShadow">Dialog::getNoShadow()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetOptions">Dialog::getOptions()</a>
  </dt>
  <dd>
    Returns array of options in effect for this Dialog instance
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetOutput">Dialog::getOutput()</a>
  </dt>
  <dd>
    Return user input.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetReturnValue">Dialog::getReturnValue()</a>
  </dt>
  <dd>
    Get the return value of the last show().
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetTabLength">Dialog::getTabLength()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetTitle">Dialog::getTitle()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodgetWidth">Dialog::getWidth()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodinheritSettingsFrom">Dialog::inheritSettingsFrom()</a>
  </dt>
  <dd>
    Set the Dialog item from which this instance should inherit settings.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodmakeCalendarInstance">Dialog::makeCalendarInstance()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodmakeCheckListInstance">Dialog::makeCheckListInstance()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodmakeFileSelectBoxInstance">Dialog::makeFileSelectBoxInstance()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodmakeInfoBoxInstance">Dialog::makeInfoBoxInstance()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodmakeInputBoxInstance">Dialog::makeInputBoxInstance()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodmakeMenuInstance">Dialog::makeMenuInstance()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodmakeMessageBoxInstance">Dialog::makeMessageBoxInstance()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodmakePasswordBoxInstance">Dialog::makePasswordBoxInstance()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodmakeRadioListInstance">Dialog::makeRadioListInstance()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodmakeTailBoxInstance">Dialog::makeTailBoxInstance()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodmakeTextBoxInstance">Dialog::makeTextBoxInstance()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodmakeTimeBoxInstance">Dialog::makeTimeBoxInstance()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodmakeYesNoInstance">Dialog::makeYesNoInstance()</a>
  </dt>
  <dd>
    Make child instances which inherit from the current object.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetAspect">Dialog::setAspect()</a>
  </dt>
  <dd>
    When auto-sizing, it represents width/height ratio, i.e. how  many characters wide it should be for every line high.  The  default is 9.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetBackTitle">Dialog::setBackTitle()</a>
  </dt>
  <dd>
    The title of the dialog which is placed on the background
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetBeep">Dialog::setBeep()</a>
  </dt>
  <dd>
    Sound an alarm each time the screen is refreshed?
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetBeepAfter">Dialog::setBeepAfter()</a>
  </dt>
  <dd>
    Sound an alarm if the input is interrupted (e.g. ctrl-c)?
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetBegin">Dialog::setBegin()</a>
  </dt>
  <dd>
    Set the position of the upper left corner of the dialog.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetClear">Dialog::setClear()</a>
  </dt>
  <dd>
    Whether the screen shoud be cleared after the dialog.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetCRwrap">Dialog::setCRwrap()</a>
  </dt>
  <dd>
    Whether to wrap carriage returns.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetDefaultItem">Dialog::setDefaultItem()</a>
  </dt>
  <dd>
    Set the default item for a menu or radiolist.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetDefaultNo">Dialog::setDefaultNo()</a>
  </dt>
  <dd>
    Whether no should be the default
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetForceScroll">Dialog::setForceScroll()</a>
  </dt>
  <dd>
    Whether to force the appearance of a scroll-bar
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetFullButtons">Dialog::setFullButtons()</a>
  </dt>
  <dd>
    Use full rather than compact buttons.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetHeight">Dialog::setHeight()</a>
  </dt>
  <dd>
    Set the height of the dialog in lines.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetItemHelp">Dialog::setItemHelp()</a>
  </dt>
  <dd>
    Whether to use help in menu, radiolist, or checklist.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetMainText">Dialog::setMainText()</a>
  </dt>
  <dd>
    Set the main text of the dialog--usually the instructions.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetMaxDims">Dialog::setMaxDims()</a>
  </dt>
  <dd>
    Sets the dimensions of the Dialog to the maximum screen size.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetNoCancel">Dialog::setNoCancel()</a>
  </dt>
  <dd>
    Whether to disallow cancel.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetNoItem">Dialog::setNoItem()</a>
  </dt>
  <dd>
    Whether item descriptions should be surpressed.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetNoShadow">Dialog::setNoShadow()</a>
  </dt>
  <dd>
    Whether to suppress the shadow.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetTabLength">Dialog::setTabLength()</a>
  </dt>
  <dd>
    Set the length of a tab
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetTitle">Dialog::setTitle()</a>
  </dt>
  <dd>
    Set title of the dialog
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodsetWidth">Dialog::setWidth()</a>
  </dt>
  <dd>
    Set the width of the dialog in characters.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodShow">Dialog::Show()</a>
  </dt>
  <dd>
    Run the dialog.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methoduseDialog">Dialog::useDialog()</a>
  </dt>
  <dd>
    If the `dialog` command is available, use it.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methoduseWhiptail">Dialog::useWhiptail()</a>
  </dt>
  <dd>
    If the `whiptail` command is available, use it.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methoduseXDialog">Dialog::useXDialog()</a>
  </dt>
  <dd>
    If the `xdialog` command is available, use it.
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodwasCancelled">Dialog::wasCancelled()</a>
  </dt>
  <dd>
    Returns true if the dialog was cancelled (not escape was  pressed) during the last show().
  </dd>
    <dt>
    <a href="../dialog4php/Dialog.html#methodwasEscaped">Dialog::wasEscaped()</a>
  </dt>
  <dd>
    Returns true if escape was pressed during the last show().
  </dd>
  </dl>
</div>
</td>

</tr></table>
<hr />

<a name="class_details"></a>
<h3>Class Details</h3>
<div class="tags">
[line <a href="..//__filesource/fsource_dialog4php__dialog.php.html#a1106">1106</a>]<br />
Allow the user to choose from a list of possible choices<br /><br /></div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />


<hr />
<a name="class_methods"></a>
<h3>Class Methods</h3>
<div class="tags">
  <hr />
	<a name="methodMenu"></a>
	<h3>constructor Menu <span class="smalllinenumber">[line <a href="..//__filesource/fsource_dialog4php__dialog.php.html#a1136">1136</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>Menu Menu(
string
$text, array
$choices, [array
$help = array()], [mixed
$parent = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Constructor<br /><br /><p>The choices and help are both associative arrays, both indexed  by the same tags.</p><br /><br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$text</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">array&nbsp;&nbsp;</td>
        <td><b>$choices</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">array&nbsp;&nbsp;</td>
        <td><b>$help</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">mixed&nbsp;&nbsp;</td>
        <td><b>$parent</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodaddMenuItem"></a>
	<h3>method addMenuItem <span class="smalllinenumber">[line <a href="..//__filesource/fsource_dialog4php__dialog.php.html#a1182">1182</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void addMenuItem(
string
$tag, string
$descr, [string
$help = ""])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Add a single menu item<br /><br /><p>Add a menu item as tag, description, and option help</p><br /><br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$tag</b>&nbsp;&nbsp;</td>
        <td>A unique tag</td>
      </tr>
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$descr</b>&nbsp;&nbsp;</td>
        <td>The description</td>
      </tr>
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$help</b>&nbsp;&nbsp;</td>
        <td>Optional help</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodremoveMenuItem"></a>
	<h3>method removeMenuItem <span class="smalllinenumber">[line <a href="..//__filesource/fsource_dialog4php__dialog.php.html#a1193">1193</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void removeMenuItem(
string
$tag)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Remove a menu item one at a time by it's tag.<br /><br /><br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$tag</b>&nbsp;&nbsp;</td>
        <td>The unique tag to remove</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
</div><br />


        <div class="credit">
		    <hr />
		    Documentation generated on Tue, 14 Jun 2005 18:50:54 -0600 by <a href="http://www.phpdoc.org">phpDocumentor 1.3.0RC3</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>
Return current item: Dialog for PHP