Revision: 6934
http://oorexx.svn.sourceforge.net/oorexx/?rev=6934&view=rev
Author: miesfeld
Date: 2011-04-23 03:48:00 +0000 (Sat, 23 Apr 2011)
Log Message:
-----------
Continue ooDialog doc revision
Modified Paths:
--------------
docs/trunk/oodialog/baseClasses.xml
docs/trunk/oodialog/dialogObject.xml
docs/trunk/oodialog/eventNotification.xml
docs/trunk/oodialog/monthcalendar.xml
docs/trunk/oodialog/updown.xml
docs/trunk/oodialog/userdialog.xml
Modified: docs/trunk/oodialog/baseClasses.xml
===================================================================
--- docs/trunk/oodialog/baseClasses.xml 2011-04-22 15:47:35 UTC (rev 6933)
+++ docs/trunk/oodialog/baseClasses.xml 2011-04-23 03:48:00 UTC (rev 6934)
@@ -383,7 +383,7 @@
<listitem>
<para>
The <link linkend="clsMonthCalendar">month calendar</link> control has the <link
- linkend="mthConnectMonthCalendarEvent">GETDAYSTATE</link> event that is sent to request information on how certain
+ linkend="evtMonthCalendarGETDAYSTATE">GETDAYSTATE</link> event that is sent to request information on how certain
days are to be shown. The programmer can customize the calendar by returning a set of days that should be displayed
in bold. For instance, in a business application paid holidays could be displayed in bold.
</para>
Modified: docs/trunk/oodialog/dialogObject.xml
===================================================================
--- docs/trunk/oodialog/dialogObject.xml 2011-04-22 15:47:35 UTC (rev 6933)
+++ docs/trunk/oodialog/dialogObject.xml 2011-04-23 03:48:00 UTC (rev 6934)
@@ -3868,7 +3868,6 @@
upDown = self~newUpDown(IDC_UPD)
upDown~setRange(1, 20000)
upDown~setPosition(64)
- upDown~redraw
]]>
</programlisting>
Modified: docs/trunk/oodialog/eventNotification.xml
===================================================================
--- docs/trunk/oodialog/eventNotification.xml 2011-04-22 15:47:35 UTC (rev 6933)
+++ docs/trunk/oodialog/eventNotification.xml 2011-04-23 03:48:00 UTC (rev 6934)
@@ -3544,7 +3544,7 @@
</listitem></varlistentry>
</variablelist>
-<section id="evtListViewCLICK"><title>CLICK Event Handler</title>
+<section id="evtListViewCLICK"><title>Click Event Handler</title>
<indexterm><primary>ListView Event</primary><secondary>CLICK</secondary></indexterm>
<para>
The event handling method for the CLICK event is invoked when the user clicks on the list-view with the left mouse.
@@ -3597,7 +3597,7 @@
</variablelist>
</section>
-<section id="evtListViewCHECKBOXCHANGED"><title>CHECKBOXCHANGED Event Handler</title>
+<section id="evtListViewCHECKBOXCHANGED"><title>CheckBoxChanged Event Handler</title>
<indexterm><primary>ListView Event</primary><secondary>CHECKBOXCHANGED</secondary></indexterm>
<para>
The event handler for the checkbox changed event is invoked when the user checks or unchecks a checkbox in the
@@ -3667,7 +3667,7 @@
</section> <!-- End CheckBoxChanged Event Handler -->
-<section id="evtListViewSELECTCHANGE"><title>SELECTCHANGE Event Handler</title>
+<section id="evtListViewSELECTCHANGE"><title>SelectChange Event Handler</title>
<indexterm><primary>ListView Event</primary><secondary>SELECTCHANGE</secondary></indexterm>
<para>
The event handler for the selection changed event is invoked when the selection state of an item changes. The method
@@ -3705,7 +3705,7 @@
</variablelist>
</section>
-<section id="evtListViewFOCUSCHANGED"><title>FOCUSCHANGED Event Handler</title>
+<section id="evtListViewFOCUSCHANGED"><title>FocusChanged Event Handler</title>
<indexterm><primary>ListView Event</primary><secondary>FOCUSCHANGED</secondary></indexterm>
<para>
The event handler for the focus changed event is invoked when an item gains or loses focus. The method recieves three
@@ -3742,7 +3742,7 @@
</variablelist>
</section>
-<section id="evtListViewSELECTFOCUSCHANGED"><title>SELECTFOCUSCHANGED Event Handler</title>
+<section id="evtListViewSELECTFOCUSCHANGED"><title>SelectFocusChanged Event Handler</title>
<indexterm><primary>ListView Event</primary><secondary>SELECTFOCUSCHANGED</secondary></indexterm>
<para>
The event handle for the selection or focus changed event is invoked when either the selection or the focus of an item
@@ -3784,7 +3784,7 @@
</section>
-<section id="evtListViewENDEDIT"><title>ENDEDIT Event Handler</title>
+<section id="evtListViewENDEDIT"><title>EndEdit Event Handler</title>
<indexterm><primary>ListView Event</primary><secondary>ENDEDIT</secondary></indexterm>
<para>
The event-handling method connected to ENDEDIT receives two arguments: the item ID of which the label has been edited
@@ -3800,7 +3800,7 @@
</section>
-<section id="evtListViewCOLUMNCLICK"><title>COLUMNCLICK Event Handler</title>
+<section id="evtListViewCOLUMNCLICK"><title>ColumnClick Event Handler</title>
<indexterm><primary>ListView Event</primary><secondary>COLUMNCLICK</secondary></indexterm>
<para>
The event-handling method connected to COLUMNCLICK receives two arguments: the control ID of the list-view control and
@@ -3816,7 +3816,7 @@
</section>
-<section id="evtListViewKEYDOWN"><title>KEYDOWN Event Handler</title>
+<section id="evtListViewKEYDOWN"><title>KeyDown Event Handler</title>
<indexterm><primary>ListView Event</primary><secondary>KEYDOWN</secondary></indexterm>
<para>
The event-handling method connected to KEYDOWN receives two arguments: the control ID of the list-view control and the
@@ -3834,7 +3834,7 @@
</section>
-<section id="evtListViewBEGINDRAG"><title>BEGINDRAG Event Handler</title>
+<section id="evtListViewBEGINDRAG"><title>BeginDrag Event Handler</title>
<indexterm><primary>ListView Event</primary><secondary>BEGINDRAG</secondary></indexterm>
<para>
@@ -3851,7 +3851,7 @@
</programlisting>
</section>
-<section id="evtListViewBEGINRDRAG"><title>BEGINRDRAG Event Handler</title>
+<section id="evtListViewBEGINRDRAG"><title>BeginRDrag Event Handler</title>
<indexterm><primary>ListView Event</primary><secondary>BEGINRDRAG</secondary></indexterm>
<para>
@@ -4667,7 +4667,7 @@
</listitem></varlistentry>
</variablelist>
-<section id="evtMonthCalendarGETDAYSTATE"><title>GETDAYSTATE Event Handler</title>
+<section id="evtMonthCalendarGETDAYSTATE"><title>GetDayState Event Handler</title>
<indexterm><primary>MonthCalendar Event</primary><secondary>GETDAYSTATE</secondary></indexterm>
<para>
The event handler for the get day state event is invoked when the month calendar control requests information on how
@@ -4757,7 +4757,7 @@
</section> <!-- End GetDayState Event Handler -->
-<section id="evtMonthCalendarRELEASED"><title>RELEASED Event Handler</title>
+<section id="evtMonthCalendarRELEASED"><title>Released Event Handler</title>
<indexterm><primary>MonthCalendar Event</primary><secondary>RELEASED</secondary></indexterm>
<para>
The event handler for the released event is invoked when the month calendar releases the moust capture. The method
@@ -4790,7 +4790,7 @@
</section> <!-- End Released Event Handler -->
-<section id="evtMonthCalendarSELCHANGED"><title>SELCHANGED Event Handler</title>
+<section id="evtMonthCalendarSELCHANGED"><title>SelChanged Event Handler</title>
<indexterm><primary>MonthCalendar Event</primary><secondary>SELCHANGED</secondary></indexterm>
<para>
The event handler for the selection changed event is invoked when the currently selected date or range of dates
@@ -4845,7 +4845,7 @@
</section> <!-- End SelChanged Event Handler -->
-<section id="evtMonthCalendarSELECT"><title>SELECT Event Handler</title>
+<section id="evtMonthCalendarSELECT"><title>Select Event Handler</title>
<indexterm><primary>MonthCalendar Event</primary><secondary>SELECT</secondary></indexterm>
<para>
The SELECT event handler is invoked when the user explicity selects a new date. Contrast this with the SELCHANGE
@@ -4893,7 +4893,7 @@
</section> <!-- End Select Event Handler -->
-<section id="evtMonthCalendarVIEWCHANGE"><title>VIEWCHANGE Event Handler</title>
+<section id="evtMonthCalendarVIEWCHANGE"><title>ViewChange Event Handler</title>
<indexterm><primary>MonthCalendar Event</primary><secondary>VIEWCHANGE</secondary></indexterm>
<para>
The view change notification is sent when the current view changes. The notification is only sent on Windows Vista or
@@ -4978,11 +4978,6 @@
Exactly one of the following keywords. The keyword specifies the event to be connected and case is not
significant. Unlike most controls, the up-down control only has one event notification.
</para>
- <para>
- <simplelist type='vert' columns='3'>
- <member>DELTAPOS</member>
- </simplelist>
- </para>
<variablelist>
<varlistentry><term>DELTAPOS</term>
<listitem>
@@ -5116,7 +5111,7 @@
Since the <emphasis role="italic">deltaPosReply</emphasis> method can also be used to reply when the proposed change
is allowed, it may be simplest to always use the method to produce the proper return from the event handler. The
arguments to <emphasis role="italic">deltaPosReply</emphasis> allow the programmer to return a value that makes no
- change to the new position, cancels the change in position, or modify the resulting new position.
+ change to the new position, cancels the change in position, or modifies the resulting new position.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example</emphasis></term>
Modified: docs/trunk/oodialog/monthcalendar.xml
===================================================================
--- docs/trunk/oodialog/monthcalendar.xml 2011-04-22 15:47:35 UTC (rev 6933)
+++ docs/trunk/oodialog/monthcalendar.xml 2011-04-23 03:48:00 UTC (rev 6934)
@@ -43,18 +43,23 @@
<chapter id="clsMonthCalendar"><title>Month Calendar Controls</title>
<indexterm><primary>MonthCalendar class</primary></indexterm>
<para>
- xx
+ A month calendar control provides an easy to use interface that allows users to select or enter dates. The control has
+ the appearence of a typical calendar. The month calendar interface allows the user to select a date from the displayed
+ days or change the control's display in various ways. The appearence of month calendar controls differ slightly
+ between different versions of Windows.
</para>
<para>
- xx
+ Windows does not support dates prior to 1601, so the <computeroutput>MonthCalendar</computeroutput> object can to be
+ used for dates prior to 1601 either. The month calendar control is based on the Gregorian calendar, which was
+ introduced in 1753. It will not calculate dates that are consistent with the Julian calendar that was in use prior to
+ 1753.
</para>
<para>
- xx
+ The <computeroutput>MonthCalendar</computeroutput> class provides methods that allow access to all the capabilities of
+ the underlying Windows month calendar control, including the features available only on Windows Vista and Windows 7
+ when Rexx programs are running on those operationg systems.
</para>
<para>
- The MonthCalendar class provides methods xxx
-</para>
-<para>
In addition to the methods of the class itself, the following methods from other classes in the ooDialog framework are
needed, or are useful, when working with month calendar controls:
<variablelist>
@@ -62,14 +67,15 @@
<listitem>
<para>
Use the <link linkend="mthNewMonthCalendar">newMonthCalendar</link>() method to retrieve an object of
- the month calendar class.
+ the <computeroutput>MonthCalendar</computeroutput> class.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Dynamic Definition:</emphasis></term>
<listitem>
<para>
- To dynamically define a month calendar to a <link linkend="clsUserDialog">UserDialog</link> use the <link
- linkend="mthCreateMonthCalendar">createMonthCalendar</link> method.
+ To dynamically create a month calendar control in the temaplte of a <link linkend="clsUserDialog">UserDialog</link>
+ dialog use the <link linkend="mthCreateMonthCalendar">createMonthCalendar</link>
+ method.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Event Notification</emphasis></term>
@@ -92,7 +98,8 @@
<section id="sctMethodsMonthCalendar"><title>Method Table</title>
<para>
The following table provides links to the documentation for the primary methods and attributes used in working
- with <computeroutput>MonthCalendar</computeroutput> objects, including the pertinent methods from other classes:
+ with <computeroutput>MonthCalendar</computeroutput> objects, including other relevant classes and methods from other
+ classes:
</para>
<table id="tblMonthCalendarMethods" frame="all">
<title>MonthCalendar Methods and Attributes</title>
@@ -101,7 +108,7 @@
<thead>
<row>
<entry>Method</entry>
-<entry>Documentation</entry>
+<entry>Description</entry>
</row>
</thead>
<tbody>
@@ -297,8 +304,8 @@
<section id="tmthCreateMonthCalendar"><title>createMonthCalendar (UserDialog method)</title>
<para>
- A month calendar object can be added to the template of <link linkend="clsUserDialog">UserDialog</link> through
- the <link linkend="mthCreateMonthCalendar"></link>. The basic syntax is:
+ A month calendar object can be added to the template of a <link linkend="clsUserDialog">UserDialog</link> dialog
+ through the <link linkend="mthCreateMonthCalendar">createMonthCalendar</link> method. The basic syntax is:
<programlisting> <![CDATA[
>>-createMonthCalendar(-id-,--x-,--y-,--cx-,--cy-+----------+-+-------------+--><
+-,--style-+ +-,--attrName-+
Modified: docs/trunk/oodialog/updown.xml
===================================================================
--- docs/trunk/oodialog/updown.xml 2011-04-22 15:47:35 UTC (rev 6933)
+++ docs/trunk/oodialog/updown.xml 2011-04-23 03:48:00 UTC (rev 6934)
@@ -49,10 +49,10 @@
</para>
<para>
To the user, the up-down control with its buddy window often look like a single control. The programmer can specify
- that an up-down control automatically position itself next to its buddy window and that it automatically set the
- caption of the buddy window to its current position. For example, an up-down control with an edit control can be used
- to prompt the user for numeric input. Sometimes an up-down control with and edit control for its buddy window is
- referred to as a spinner control.
+ that an up-down control automatically position itself next to its buddy window and that it automatically set the text
+ of the buddy window to its current position. For example, an up-down control with an edit control can be used to
+ prompt the user for numeric input. Sometimes an up-down control with an edit control for its buddy window is referred
+ to as a spinner control.
</para>
<para>
Up-down controls can be used without a buddy window to provide a simplified type of scroll bar. Up-down controls allow
@@ -61,9 +61,11 @@
holds down an arrow button. The longer the user holds down the button, the faster the up-down control changes postion.
</para>
<para>
- For an up-down control with a buddy window, the current position is the number in the buddy window's text. This text
- may have changed. The user may have manually typed in a number in an edit control for example. Therefore, the up-down
- control retrieves the current text from the buddy control and updates its position using that text.
+ For an up-down control with a buddy window, the current position is the number in the buddy window's text. When the
+ programmer queries the up-down control for its position, this text may have changed. For example, if the buddy window
+ is an edit control, the user may have manually typed in a number in the edit control. Therefore, when the up-down
+ control is queried for its position, it first retrieves the current text from the buddy window and updates its
+ position using that text.
</para>
<para>
The possible range of positions for an up-down control is -2,147,483,648 to 2,147,483,647. However, the range for any
@@ -159,7 +161,7 @@
</row>
<row>
<entry><link linkend="mthGetBuddy">getBuddy</link></entry>
-<entry>Retrieves the up-down's buddy control object.</entry>
+<entry>Retrieves the up-down's buddy window as a dialog control object.</entry>
</row>
<row>
<entry><link linkend="mthGetPosition">getPosition</link></entry>
@@ -167,27 +169,27 @@
</row>
<row>
<entry><link linkend="mthGetRange">getRange</link></entry>
-<entry></entry>
+<entry>Returns the current range of the up-down control in a <computeroutput>Directory</computeroutput> object.</entry>
</row>
<row>
<entry><link linkend="mthSetAcceleration">setAcceleration</link></entry>
-<entry>xx</entry>
+<entry>Sets the acceleration for the up-down control.</entry>
</row>
<row>
<entry><link linkend="mthSetBase">setBase</link></entry>
-<entry>xx</entry>
+<entry>Sets the radix base for the up-down control.</entry>
</row>
<row>
<entry><link linkend="mthSetBuddy">setBuddy</link></entry>
-<entry>xx</entry>
+<entry>Sets the buddy window for the up-down control.</entry>
</row>
<row>
<entry><link linkend="mthSetPosition">setPosition</link></entry>
-<entry>xx</entry>
+<entry>Sets the current position of the up-down control.</entry>
</row>
<row>
<entry><link linkend="mthSetRangeClsUpDown">setRange</link></entry>
-<entry>xx</entry>
+<entry>Sets the range of positions for the up-down control to that specified.</entry>
</row>
</tbody></tgroup>
</table>
@@ -343,24 +345,24 @@
<indexterm><primary>UpDown class</primary><secondary>setBase</secondary></indexterm>
<programlisting>
<![CDATA[
->>--setBase(--+--------+--)---------------------------------------------><
- +--type--+
+>>--setBase(--radixBase--)-----------------------><
+
]]>
</programlisting>
<para>
- xx
+ Sets the radix base for an up-down control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
- xx
+ The single argument is:
<variablelist>
- <varlistentry><term>TERM</term>
+ <varlistentry><term>radixBase</term>
<listitem>
<para>
- xx
+ The base for the up-down. Can be 10 or 16.
</para>
</listitem></varlistentry>
</variablelist>
@@ -369,31 +371,30 @@
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
- xx
+ Returns the previous base of the up-down control, or 0 if the new base specified is not valid.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
- Additional comments.
+ The base value determines how the numbers are displayed in the buddy window. With base 10, the numbers displayed are
+ decimal digits, and with base 16, hexadecimal digits. Hexadecimal numbers are always non-negative, (not signed,) and
+ decimal numbers are whole numbers, (they can be signed.)
</para>
</listitem></varlistentry>
- <varlistentry><term><emphasis role="bold">Details</emphasis></term>
- <listitem>
- <para>
- Raises syntax errors when incorrect arguments are detected.
- </para>
- <para>
- Sets the <link linkend="dotSystemErrorCode">.SystemErrorCode</link> variable.
- </para>
- </listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
- This example ...
+ This example changes the base of the up-down control to 16:
<programlisting>
<![CDATA[
+ upDown = self~newUpDown(IDC_UPD)
+ ret = upDown~setBase(16)
+ if ret == 16 then say "The up-down base was already set to 16."
+ else if ret == 10 say "The up-down base was changed from 10 to 16."
+ else say "This else will never execute."
+
]]>
</programlisting>
</para>
@@ -412,8 +413,8 @@
</programlisting>
<para>
- Retrieves the current buddy control object of the up-down, or <computeroutput>.nil</computeroutput> if the up-down
- does not have a buddy control.
+ Retrieves the current buddy window, as a dialog control object, of the up-down, or
+ <computeroutput>.nil</computeroutput> if the up-down does not have a buddy window.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
@@ -425,18 +426,18 @@
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
- The return is the dialog control <link linkend="chpDialogControlObject">object</link> that is the buddy control of
+ The return is the dialog control <link linkend="chpDialogControlObject">object</link> that is the buddy window of
the up-down control. Normally, or at least most often, this will be an <link linkend="clsEdit">Edit</link> object.
- Howver, it could be some other type of dialog control object. If the up-down control does not have a buddy control,
+ Howver, it could be some other type of dialog control object. If the up-down control does not have a buddy window,
then <computeroutput>.nil</computeroutput> is returned.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
- It is difficult to prevent the user from typing in numbers in the buddy edit control of an up-down control, that are
- outside of the range of the up-down. This example shows a generic method that could be used to check that what the
- user typed lies within the proper range of the up-down.
+ It is difficult to prevent the user from typing in numbers, that are outside of the range of the up-down, in an edit
+ control that is the buddy window. This example shows a generic method that could be used to check that what the user
+ typed lies within the proper range of the up-down.
<programlisting>
<![CDATA[
@@ -461,24 +462,24 @@
<indexterm><primary>UpDown class</primary><secondary>setBuddy</secondary></indexterm>
<programlisting>
<![CDATA[
->>--setBuddy(--+--------+--)---------------------------------------------><
- +--type--+
+>>--setBuddy(--dlgControlObj--)------------------><
+
]]>
</programlisting>
<para>
- xx
+ Sets the buddy window for the up-down control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
- xx
+ The single argument is:
<variablelist>
- <varlistentry><term>TERM</term>
+ <varlistentry><term>dlgControlObj [required]</term>
<listitem>
<para>
- xx
+ The dialog control object that is to be the new buddy window for the up-down control.
</para>
</listitem></varlistentry>
</variablelist>
@@ -487,13 +488,18 @@
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
- xx
+ Returns the previous dialog control object of the buddy window, if there was a previous buddy. Returns
+ <computeroutput>.nil</computeroutput> if there was no previous buddy window.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
- Additional comments.
+ When an up-down control has the AUOTBUDDY style, the up-down control selects the previous window in the dialog
+ template as its buddy window. If the up-down control does not have that style, the <emphasis
+ role="italic">setBuddy</emphasis> method can be used to assign a specific dialog control as the buddy window. Of
+ course, the <emphasis role="italic">setBuddy</emphasis> method can be used to assign a specific dialog control, when
+ desired, for any other reason the programmer may have.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
@@ -501,17 +507,21 @@
<para>
Raises syntax errors when incorrect arguments are detected.
</para>
- <para>
- Sets the <link linkend="dotSystemErrorCode">.SystemErrorCode</link> variable.
- </para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
- This example ...
+ This example sets the buddy window during the <link linkend="mthInitDialog">initDialog</link> method for an up-down
+ control that does not have the AUTOBUDDY style.
<programlisting>
<![CDATA[
+::method initDialog
+
+ edit = self~newEdit(IDC_EDIT_EXPIRATION_YEAR)
+ upd = self~newUpDown(IDC_UPD_EXPIRATION)
+ upd~setBuddy(edit)
+
]]>
</programlisting>
</para>
@@ -548,10 +558,10 @@
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
- When the <emphasis role="italic">getPosition</emphasis> method is invoked, the up-down control updates it position
+ When the <emphasis role="italic">getPosition</emphasis> method is invoked, the up-down control updates its position
based on the text of its buddy window. If there is no buddy window, or if the text is outside of the range of the
- up-down control, then the position is not changed and the <computeroutput>.SystemErrorCode</computeroutput> is set
- to 13, the data is invalid.
+ up-down control, then the position is not changed and <computeroutput>.SystemErrorCode</computeroutput> is set to
+ 13, the data is invalid.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
@@ -593,6 +603,7 @@
return .false
end
+ return .true
]]>
</programlisting>
@@ -606,24 +617,25 @@
<indexterm><primary>UpDown class</primary><secondary>setPosition</secondary></indexterm>
<programlisting>
<![CDATA[
->>--setPosition(--+--------+--)---------------------------------------------><
- +--type--+
+>>--setPosition(--newPosition--)-----------------><
+
]]>
</programlisting>
<para>
- xx
+ Sets the position of the up-down control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
- xx
+ The single argument is:
<variablelist>
- <varlistentry><term>TERM</term>
+ <varlistentry><term>newPosition [required]</term>
<listitem>
<para>
- xx
+ A whole number in the range of -2,147,483,648 to 2,147,483,647 that specifies the new position for the up-down
+ control.
</para>
</listitem></varlistentry>
</variablelist>
@@ -632,13 +644,14 @@
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
- xx
+ The previous position of the up-down control.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
- Additional comments.
+ If <emphasis role="italic">newPosition</emphasis> is outside the control's current <link
+ linkend="mthSetRangeClsUpDown">range</link>, the position is set to the nearest valid position within the range.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
@@ -646,17 +659,21 @@
<para>
Raises syntax errors when incorrect arguments are detected.
</para>
- <para>
- Sets the <link linkend="dotSystemErrorCode">.SystemErrorCode</link> variable.
- </para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
- This example ...
+ This example sets the range for an up-down control to be the years 1900 through 2100 and then sets the current
+ position of the up-down control to the current year:
<programlisting>
<![CDATA[
+::method initDialog
+
+ upDown = self~newUpDown(IDC_UPD_YEARS)
+ upDown~setRange(1900, 2100)
+ upDown~setPosition(.DateTime~today~year)
+
]]>
</programlisting>
</para>
@@ -691,13 +708,13 @@
control. The directory contains the following indexes:
</para>
<variablelist>
- <varlistentry><term><emphasis role="bold">MIN</emphasis></term>
+ <varlistentry><term>MIN</term>
<listitem>
<para>
The minimum value of the current range for the up-down control.
</para>
</listitem></varlistentry>
- <varlistentry><term><emphasis role="bold">MAX</emphasis></term>
+ <varlistentry><term>MAX</term>
<listitem>
<para>
The maximum value of the current range for the up-down control.
@@ -708,8 +725,9 @@
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
- The maximum range value can be less than the minimum value. The up arrow moves towards the maximum and if the
- maximum value is less than the minium, then using the up arrow will decrease the current position.
+ The maximum range value can be less than the minimum value. The up arrow moves towards the maximum and the down
+ arrow moves towards the minimum. If the maximum value is less than the minium, then using the up arrow will decrease
+ the current position and the down arrow will increase the positions.
</para>
</listitem></varlistentry>
</variablelist>
@@ -720,57 +738,152 @@
<indexterm><primary>UpDown class</primary><secondary>setRange</secondary></indexterm>
<programlisting>
<![CDATA[
->>--setRange(--+--------+--)---------------------------------------------><
- +--type--+
+Form 1:
+
+>>--setRange(--+----------------+--)-------------><
+ +--directoryObj--+
+
+Form 2:
+
+>>--setRange(--+-------+-+--------+--)-----------><
+ +--min--+ +-,-max--+
+
+Generic form:
+
+>>--setRange(--+---------+--)--------------------><
+ +--range--+
+
]]>
</programlisting>
<para>
- xx
+ Sets the range of positions for the up-down control to that specified.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
- xx
- <variablelist>
- <varlistentry><term>TERM</term>
- <listitem>
- <para>
- xx
- </para>
- </listitem></varlistentry>
- </variablelist>
+ The <emphasis role="italic">range</emphasis> argument(s) are optional. If omitted, the range is set to a minimum of
+ 0 and a maximum of 100.
+ <variablelist>
+ <varlistentry><term><emphasis role="bold">Form 1:</emphasis></term>
+ <listitem>
+ <para>
+ The single argument for form 1 is:
+ <variablelist>
+ <varlistentry><term>directoryObj [optional]</term>
+ <listitem>
+ <para>
+ A <computeroutput>Directory</computeroutput> object whose indexes specify the minimum and maximum range. The
+ directory can contain the following indexes:
+ </para>
+ <variablelist>
+ <varlistentry><term>MIN [optiona]</term>
+ <listitem>
+ <para>
+ The minimum value for the range. If this index is omitted, the minimum is set to 0.
+ </para>
+ </listitem></varlistentry>
+ <varlistentry><term>MAX [optional]</term>
+ <listitem>
+ <para>
+ The maximum value for the range. If this index is omitted, the maximum is set to 100.
+ </para>
+ </listitem></varlistentry>
+ </variablelist>
+ </listitem></varlistentry>
+ </variablelist>
+ </para>
+ </listitem></varlistentry>
+ <varlistentry><term><emphasis role="bold">Form 2:</emphasis></term>
+ <listitem>
+ <para>
+ The arguments for form 2 are:
+ <variablelist>
+ <varlistentry><term>min [optiona]</term>
+ <listitem>
+ <para>
+ The minimum value for the range. If this argument is omitted, the minimum is set to 0.
+ </para>
+ </listitem></varlistentry>
+ <varlistentry><term>max [optional]</term>
+ <listitem>
+ <para>
+ The maximum value for the range. If this argument is omitted, the maximum is set to 100.
+ </para>
+ </listitem></varlistentry>
+ </variablelist>
+ </para>
+ </listitem></varlistentry>
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
- xx
+ This method always returns 0.
</para>
</listitem></varlistentry>
- <varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
- <listitem>
- <para>
- Additional comments.
- </para>
- </listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
Raises syntax errors when incorrect arguments are detected.
</para>
- <para>
- Sets the <link linkend="dotSystemErrorCode">.SystemErrorCode</link> variable.
- </para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
- This example ...
+ This example sets the range of an up-down control when the dialog first starts. Later in the life cycle of the
+ dialog the range is changed numerous times, so a generic functions is used to change the range:
<programlisting>
<![CDATA[
+::method initDialog
+ expose upDown staticPresident
+
+ upDown = self~newUpDown(IDC_UPD_LIFE_SPAN)
+ upDown~setRange(1732, 1799)
+
+ staticPresident = self~newStatic(IDC_ST_PRESIDENT)
+ static~President~setText("George Washington")
+
+ ...
+
+::method onComboBoxSelect
+ expose staticPresident
+
+ president = self~newComboBox(IDC_CB_PRESIDENT)~selected
+ staticPresident~setText(president)
+
+ select
+ when president == 'Abraham Lincon' then do
+ r = .directory~new
+ r~min = 1809
+ r~max = 1865
+ self~changeRange(r)
+ end
+ when president == 'Andrew Jackson' then do
+ r = .directory~new
+ r~min = 1767
+ r~max = 1845
+ self~changeRange(r)
+ end
+
+ ...
+
+ when president == 'Zachary Taylor' then do
+ r = .directory~new
+ r~min = 1784
+ r~max = 1850
+ self~changeRange(r)
+ end
+ end
+
+::method changeRange private
+ expose upDown
+ use strict arg range
+
+ upDown~setRange(range)
+
]]>
</programlisting>
</para>
@@ -805,14 +918,14 @@
An array of <computeroutput>Directory</computeroutput> objects. Each directory contains the following indexes:
</para>
<variablelist>
- <varlistentry><term><emphasis role="bold">SECONDS</emphasis></term>
+ <varlistentry><term>SECONDS</term>
<listitem>
<para>
The amount of elapsed time, in seconds, before the position change increment specified by the <emphasis
role="italic">increment</emphasis> index is used.
</para>
</listitem></varlistentry>
- <varlistentry><term><emphasis role="bold">INCREMENT</emphasis></term>
+ <varlistentry><term>INCREMENT</term>
<listitem>
<para>
The increment used to change the position after the time specified by the <emphasis
@@ -843,25 +956,46 @@
<indexterm><primary>UpDown class</primary><secondary>setAcceleration</secondary></indexterm>
<programlisting>
<![CDATA[
->>--setAcceleration(--+--------+--)---------------------------------------------><
- +--type--+
+>>--setAcceleration(--accelerations--)-----------><
+
]]>
</programlisting>
<para>
- xx
+ Sets the acceleration for the up-down control.
</para>
<variablelist>
<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
<listitem>
<para>
- xx
+ The single argument is:
<variablelist>
- <varlistentry><term>TERM</term>
+ <varlistentry><term>accelerations</term>
<listitem>
<para>
- xx
+ An array of <computeroutput>Directory</computeroutput> objects. Each directory in the array defines a single
+ acceleration and must contain the following indexes:
</para>
+ <variablelist>
+ <varlistentry><term>SECONDS</term>
+ <listitem>
+ <para>
+ The amount of elapsed time, in seconds, before the position change increment specified by the <emphasis
+ role="italic">increment</emphasis> index is used.
+ </para>
+ </listitem></varlistentry>
+ <varlistentry><term>INCREMENT</term>
+ <listitem>
+ <para>
+ The increment used to change the position after the time specified by the <emphasis
+ role="italic">seconds</emphasis> index elapses.
+ </para>
+ </listitem></varlistentry>
+ </variablelist>
+ <para>
+ The array can not be sparse, that is each index must contain a value. The value at each index must be a
+ <computeroutput>Directory</computeroutput> object and must contain the proper indexes.
+ </para>
</listitem></varlistentry>
</variablelist>
</para>
@@ -869,31 +1003,49 @@
<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
<listitem>
<para>
- xx
+ On succes, true. On failure false.
</para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
<listitem>
<para>
- Additional comments.
+ Accleration information allows the up-down control change its position faster the longer the user holds down the
+ control's up or down arrow, or the up or down keyboard arrow. A single acceleration specifies that after so many
+ seconds increment the position by this amount. For example, after 1 second increment the postion by 4. After 2
+ seconds increment the postion by 8, etc..
</para>
+ <para>
+ The accelerations must be sorted in the array, by seconds, in ascending order. Typically the first acelleration
+ would be 0 seconds with an increment of 1.
+ </para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Details</emphasis></term>
<listitem>
<para>
- Raises syntax errors when incorrect arguments are detected.
+ Raises syntax errors when incorrect usage is detected.
</para>
- <para>
- Sets the <link linkend="dotSystemErrorCode">.SystemErrorCode</link> variable.
- </para>
</listitem></varlistentry>
<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
<listitem>
<para>
- This example ...
+ The following example sets the acceleration to be very fast, much faster than normal:
<programlisting>
<![CDATA[
+::method initDialog
+
+ upd = self~newUpDown(IDC_UPD_HUGH_RANGE)
+
+ accels = .array~new(5)
+ do i = 0 to 4
+ d = .directory~new
+ d~seconds = i
+ d~increment = 8 ** i
+ accels[i + 1] = d
+ end
+
+ upd~setAcceleration(accels)
+
]]>
</programlisting>
</para>
Modified: docs/trunk/oodialog/userdialog.xml
===================================================================
--- docs/trunk/oodialog/userdialog.xml 2011-04-22 15:47:35 UTC (rev 6933)
+++ docs/trunk/oodialog/userdialog.xml 2011-04-23 03:48:00 UTC (rev 6934)
@@ -10594,8 +10594,8 @@
<varlistentry><term>WRAP</term>
<listitem>
<para>
- The position will not wrap around to the ending or beginning if it is incremented or decremented beyond the
- the range of the up-down control.
+ The position will wrap around to the ending or beginning if it is incremented or decremented beyond the the
+ range of the up-down control.
</para>
</listitem></varlistentry>
<varlistentry><term>HIDDEN</term>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.