From: <mie...@us...> - 2008-09-03 22:00:56
|
Revision: 3152 http://oorexx.svn.sourceforge.net/oorexx/?rev=3152&view=rev Author: miesfeld Date: 2008-09-03 22:01:01 +0000 (Wed, 03 Sep 2008) Log Message: ----------- ooDialog - reorganize the doc for the button controls Modified Paths: -------------- docs/trunk/oodialog/Makefile docs/trunk/oodialog/oodialog.sgml Added Paths: ----------- docs/trunk/oodialog/buttoncontrols.sgml Removed Paths: ------------- docs/trunk/oodialog/anibut.sgml docs/trunk/oodialog/buttoncontrolc.sgml docs/trunk/oodialog/checkboxc.sgml docs/trunk/oodialog/radiobuttonc.sgml Modified: docs/trunk/oodialog/Makefile =================================================================== --- docs/trunk/oodialog/Makefile 2008-09-03 17:24:35 UTC (rev 3151) +++ docs/trunk/oodialog/Makefile 2008-09-03 22:01:01 UTC (rev 3152) @@ -48,11 +48,9 @@ SGML_FILES = advcntlc.sgml \ - anibut.sgml \ basedialog.sgml \ - buttoncontrolc.sgml \ + buttoncontrols.sgml \ categorydialog.sgml \ - checkboxc.sgml \ comboboxc.sgml \ dialogcontrolc.sgml \ editcontrolc.sgml \ @@ -65,7 +63,6 @@ preface.sgml \ progressbarc.sgml \ propertysheetc.sgml \ - radiobuttonc.sgml \ reference.sgml \ resdialog.sgml \ scrollbarc.sgml \ Deleted: docs/trunk/oodialog/anibut.sgml =================================================================== --- docs/trunk/oodialog/anibut.sgml 2008-09-03 17:24:35 UTC (rev 3151) +++ docs/trunk/oodialog/anibut.sgml 2008-09-03 22:01:01 UTC (rev 3152) @@ -1,270 +0,0 @@ -<!--######################################################################### - # - # Description: Open Object Rexx: OODialog Reference SGML file. - # - # Copyright (c) 2005-2007, Rexx Language Association. All rights reserved. - # Portions Copyright (c) 2004, IBM Corporation. All rights reserved. - # - # This program and the accompanying materials are made available under - # the terms of the Common Public License v1.0 which accompanies this - # distribution. A copy is also available at the following address: - # http://www.oorexx.org/license.html - # - # Redistribution and use in source and binary forms, with or - # without modification, are permitted provided that the following - # conditions are met: - # - # Redistributions of source code must retain the above copyright - # notice, this list of conditions and the following disclaimer. - # Redistributions in binary form must reproduce the above copyright - # notice, this list of conditions and the following disclaimer in - # the documentation and/or other materials provided with the distribution. - # - # Neither the name of Rexx Language Association nor the names - # of its contributors may be used to endorse or promote products - # derived from this software without specific prior written permission. - # - # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # - # Author(s): - # W. David Ashley <da...@us...> - # - ######################################################################### ---> -<chapter id="anibut"><title>AnimatedButton Class</title> -<indexterm><primary>AnimatedButton class</primary></indexterm> -<para>The AnimatedButton class provides the methods to -implement an animated button within a dialog. The attributes and methods are -only described briefly in this document. An example program, -<computeroutput>oowalker.rex</computeroutput>, -is provided with the OODialog sample programs. </para> -<variablelist> -<varlistentry><term>ParentDlg</term> -<listitem><para>Attribute holding the handle of the parent dialog -</para></listitem></varlistentry> -<varlistentry><term>Stopped</term> -<listitem><para>Animation ends when set to 1 (see Stop method) -</para></listitem></varlistentry> -<varlistentry><term>Init</term> -<listitem><para>Initialize the animation parameters:</para> -<programlisting> -<![CDATA[ -but = .AnimatedButton~new(buttonid,from,to, , - movex,movey,sizex,sizey,delay, , - startx,starty,parentdialog) -]]> -</programlisting> -<para>The values are -stored in a stem variable: </para> -<variablelist> -<varlistentry><term>sprite.buttonid</term> -<listitem><para>ID of animation button -</para></listitem></varlistentry> -<varlistentry><term>sprite.from</term> -<listitem><para>Array of in-memory bitmap handles, or a bitmap resource ID in a DLL, -or the name of an array in the .local directory containing handles to bitmaps -loaded with <link linkend="h000667">LoadBitmap</link>. -The array has to start with 1 and continue in increments by 1. -</para></listitem></varlistentry> -<varlistentry><term>sprite.to</term> -<listitem><para>0 if sprite.from is an array, or the name of -an array stored in <computeroutput>.local</computeroutput>, -or a bitmap resource ID in a DLL -</para></listitem></varlistentry> -<varlistentry><term>sprite.movex</term> -<listitem><para>Size of one move horizontally (pixels) -</para></listitem></varlistentry> -<varlistentry><term>sprite.movey</term> -<listitem><para>Size of one move vertically -</para></listitem></varlistentry> -<varlistentry><term>sprite.sizex</term> -<listitem><para>Horizontal size of all bitmaps (pixels) -</para></listitem></varlistentry> -<varlistentry><term>sprite.sizey</term> -<listitem><para>Vertical size of all bitmaps -</para></listitem></varlistentry> -<varlistentry><term>sprite.delay</term> -<listitem><para>Time delay between moves (ms) -</para></listitem></varlistentry> -</variablelist> -<para>Startx and starty -are the initial bitmap position, and parentdialog -is stored in the ParentDlg attribute.</para> -<para>Two more -values are initialized in the stem variable: </para> -<variablelist> -<varlistentry><term>sprite.smooth</term> -<listitem><para>Set to 1 for smooth edge change (can be changed to 0 for -a bouncy edge change) -</para></listitem></varlistentry> -<varlistentry><term>sprite.step</term> -<listitem><para>Set to 1 as the step size between sprite.from -and sprite.to for bitmaps in a DLL -</para></listitem></varlistentry> -</variablelist> -</listitem></varlistentry> -<varlistentry><term>SetSprite</term> -<listitem><para>Set all the sprite. animation values using a stem: -<programlisting> -<![CDATA[ -mysprite.from = .array~of(bmp1,bmp2,...) -mysprite.to = 0 -mysprite.movex = ... -... -self~setSprite(mysprite.) -]]> -</programlisting> -</para></listitem></varlistentry> -<varlistentry><term>GetSprite</term> -<listitem><para>Retrieve the animation values into a stem: -<programlisting> -<![CDATA[ -self~getSprite(mysprite.) -]]> -</programlisting> -</para></listitem></varlistentry> -<varlistentry><term>SetFromTo</term> -<listitem><para>Set bitmap information (sprite.from and sprite.to): -<programlisting> -<![CDATA[ -self~setFromTo(bmpfrom,bmpto) -]]> -</programlisting> -</para></listitem></varlistentry> -<varlistentry><term>SetMove</term> -<listitem><para>Set size of one move (sprite.movex and sprite.movey): -<programlisting> -<![CDATA[ -self~setMove(movex,movey) -]]> -</programlisting> -</para></listitem></varlistentry> -<varlistentry><term>SetDelay</term> -<listitem><para>Set delay between moves in milliseconds (sprite.delay): -<programlisting> -<![CDATA[ -self~setDelay(delay) -]]> -</programlisting> -</para></listitem></varlistentry> -<varlistentry><term>SetSmooth</term> -<listitem><para>Set smooth (1) or bouncy (0) edges (sprite.smooth): -<programlisting> -<![CDATA[ -self~setSmooth(smooth) /* 1 or 0 */ -]]> -</programlisting> -</para></listitem></varlistentry> -<varlistentry><term>SetStep</term> -<listitem><para>Set the step size (sprite.step) between sprite.from and -sprite.to for bitmaps in a DLL, for example, if bitmap resources are numbered -202, 204, 206, etc: -<programlisting> -<![CDATA[ -self~setFromTo(202,210) -self~setStep(2) -]]> -</programlisting> -</para></listitem></varlistentry> -<varlistentry><term>Run</term> -<listitem><para>Run the animation by going through all the bitmaps repetitively -until dialog is stopped; invokes MoveSeq: -<programlisting> -<![CDATA[ -self~run -]]> -</programlisting> -</para></listitem></varlistentry> -<varlistentry><term>MoveSeq</term> -<listitem><para>Animate one sequence through all the bitmaps in the given move -steps; invokes MovePos: -<programlisting> -<![CDATA[ -self~moveSeq -]]> -</programlisting> -</para></listitem></varlistentry> -<varlistentry><term>MovePos</term> -<listitem><para>Move the bitmaps by the arguments: -<programlisting> -<![CDATA[ -self~movePos(movex,movey) -]]> -</programlisting> -</para></listitem></varlistentry> -<varlistentry><term>MoveTo</term> -<listitem><para>Move the bitmaps in the predefined steps to -the given position; invokes MoveSeq: -<programlisting> -<![CDATA[ -self~moveTo(posx,posy) -]]> -</programlisting> -</para></listitem></varlistentry> -<varlistentry><term>SetPos</term> -<listitem><para>Set the new starting position of the bitmaps: -<programlisting> -<![CDATA[ -self~setPos(newx,newy) -]]> -</programlisting> -</para></listitem></varlistentry> -<varlistentry><term>GetPos</term> -<listitem><para>Retrieve the current position into a stem: -<programlisting> -<![CDATA[ -self~getPos(pos.) -say "pos=" pos.x pos.y -]]> -</programlisting> -</para></listitem></varlistentry> -<varlistentry><term>ParentStopped</term> -<listitem><para>Check the parent dialog window and return its finished attribute (1 -means finished) -</para></listitem></varlistentry> -<varlistentry><term>Stop</term> -<listitem><para>Stop animation by setting the stopped attribute to 1 -</para></listitem></varlistentry> -<varlistentry><term>HitRight</term> -<listitem><para>Invoked by run when the bitmap hits the right edge (returns 1 and bitmap -starts at left again; you can return 0 and set the new position yourself) -</para></listitem></varlistentry> -<varlistentry><term>HitLeft</term> -<listitem><para>Invoked when the bitmap hits the left edge (default action is to start -at right again) -</para></listitem></varlistentry> -<varlistentry><term>HitBottom</term> -<listitem><para>Invoked when the bitmap hits the bottom edge (default action is to start -at top again) -</para></listitem></varlistentry> -<varlistentry><term>HitTop</term> -<listitem><para>Invoked when the bitmap hits the top edge (default action is to start -at bottom again) -</para></listitem></varlistentry> -</variablelist> -<para>To use an animated button a dialog has to: </para> -<itemizedlist> -<listitem><para>Define a button in a resource file (owner-drawn)</para></listitem> -<listitem><para>Load the bitmaps of the animation into memory using an array</para></listitem> -<listitem><para>Initialize the animated button with the animation parameters</para></listitem> -<listitem><para>Invoke the run method of the animated button</para></listitem> -<listitem><para>Stop the animation and remove the bitmaps from memory</para></listitem> -</itemizedlist> -<para>The dialog may also dynamically change the parameters (for example, the -size of a move, or the speed) and override actions, such as hitting an edge.</para> -<para>See the <computeroutput>oowalker.rex</computeroutput> and -<computeroutput>oowalk2.rex</computeroutput> examples in -<computeroutput>OODIALOG\SAMPLES</computeroutput>.</para> -<para>For further information see -<link linkend="h001393">ConnectAnimatedButton</link>.</para> -</chapter> Deleted: docs/trunk/oodialog/buttoncontrolc.sgml =================================================================== --- docs/trunk/oodialog/buttoncontrolc.sgml 2008-09-03 17:24:35 UTC (rev 3151) +++ docs/trunk/oodialog/buttoncontrolc.sgml 2008-09-03 22:01:01 UTC (rev 3152) @@ -1,942 +0,0 @@ -<!--######################################################################### - # - # Description: Open Object Rexx: OODialog Reference SGML file. - # - # Copyright (c) 2005-2007, Rexx Language Association. All rights reserved. - # Portions Copyright (c) 2004, IBM Corporation. All rights reserved. - # - # This program and the accompanying materials are made available under - # the terms of the Common Public License v1.0 which accompanies this - # distribution. A copy is also available at the following address: - # http://www.oorexx.org/license.html - # - # Redistribution and use in source and binary forms, with or - # without modification, are permitted provided that the following - # conditions are met: - # - # Redistributions of source code must retain the above copyright - # notice, this list of conditions and the following disclaimer. - # Redistributions in binary form must reproduce the above copyright - # notice, this list of conditions and the following disclaimer in - # the documentation and/or other materials provided with the distribution. - # - # Neither the name of Rexx Language Association nor the names - # of its contributors may be used to endorse or promote products - # derived from this software without specific prior written permission. - # - # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # - # Author(s): - # W. David Ashley <da...@us...> - # - ######################################################################### ---> -<chapter id="buttoncontrolc"><title>ButtonControl Class</title> -<indexterm><primary>ButtonControl class</primary></indexterm> -<para>The ButtonControl class provides methods to query -and modify push button controls. It inherits all methods of the DialogControl -class (see <link linkend="dialogcontrolc">DialogControl Class</link>).</para> -<para>Use the GetButtonControl method (see -<link linkend="getbuttoncontrol">GetButtonControl</link>) to retrieve -an object of the ButtonControl class.</para> -<variablelist> -<varlistentry><term>Requires:</term> -<listitem><para>The ButtonControl class requires the class definition -file <computeroutput>oodwin32.cls</computeroutput>: -<programlisting> -<![CDATA[ -::requires "oodwin32.cls" -]]> -</programlisting> -</para></listitem></varlistentry> -<varlistentry><term>Methods:</term> -<listitem><para>Instances of the ButtonControl class implement -the methods listed in the -<link linkend="t000023">ButtonControl Instance Methods</link> table.</para> - -<table id="t000023" frame="all"> -<title>ButtonControl Instance Methods</title> -<tgroup cols="2"> -<thead> -<row> -<entry>Method...</entry> -<entry>...on page</entry> -</row> -</thead> -<tbody> -<row> -<entry>ChangeBitmap</entry> -<entry><link linkend="changebitmap">ChangeBitmap</link></entry> -</row> -<row> -<entry>DimBitmap</entry> -<entry><link linkend="dimbitmap">DimBitmap</link></entry> -</row> -<row> -<entry>DisplaceBitmap</entry> -<entry><link linkend="displacebitmap">DisplaceBitmap</link></entry> -</row> -<row> -<entry>DrawBitmap</entry> -<entry><link linkend="drawbitmap">DrawBitmap</link></entry> -</row> -<row> -<entry>GetBitmapSizeX</entry> -<entry><link linkend="getbitmapsizex">GetBitmapSizeX</link></entry> -</row> -<row> -<entry>GetBitmapSizeY</entry> -<entry><link linkend="getbitmapsizey">GetBitmapSizeY</link></entry> -</row> -<row> -<entry>GetBmpDisplacement</entry> -<entry><link linkend="getbmpdisplacement">GetBmpDisplacement</link></entry> -</row> -<row> -<entry>Scroll</entry> -<entry><link linkend="scrollbc">Scroll</link></entry> -</row> -<row> -<entry>ScrollBitmapFromTo</entry> -<entry><link linkend="scrollbitmapfromto">ScrollBitmapFromTo</link></entry> -</row> -<row> -<entry>ScrollText</entry> -<entry><link linkend="scrolltextbc">ScrollText</link></entry> -</row> -<row> -<entry>State</entry> -<entry><link linkend="state">State</link></entry> -</row> -<row> -<entry>State=</entry> -<entry><link linkend="statenew">State=</link></entry> -</row> -<row> -<entry>Style=</entry> -<entry><link linkend="stylenew">Style=</link></entry> -</row> -</tbody></tgroup> -</table> -</listitem></varlistentry> -</variablelist> - -<section id="state"><title>State</title> -<indexterm><primary>State</primary></indexterm> -<programlisting> -<![CDATA[ ->>-aButtonControl~State---------------------------------------->< - - -]]> -</programlisting> - -<para>The State method retrieves the current state of -the associated button control.</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>A text string that can contain one or more of the following keywords, -separated by blanks: -<variablelist> -<varlistentry><term>"CHECKED"</term> -<listitem><para>The radio button or the check box is checked. A radio button is -checked when it contains a black dot, a check box is checked when it contains a -check mark. -</para></listitem></varlistentry> -<varlistentry><term>"UNCHECKED"</term> -<listitem><para>The radio button or the check box is not checked. A radio -button is not checked when it does not contain a black dot and a check box is -not checked when it does not contain a check mark. -</para></listitem></varlistentry> -<varlistentry><term>"INDETERMINATE"</term> -<listitem><para>A 3-state check box button is neither checked nor unchecked. -Only 3-state check box buttons can be in this state. When in the indeterminate -state, the check box button is drawn in a visually distinctive manner that is -different from checked or unchecked. Exactly how the indeterminate state is -drawn is dependent on the operating system version. -</para></listitem></varlistentry> -<varlistentry><term>"PUSHED"</term> -<listitem><para>When a button is in the pushed state it is drawn as a sunken -button, otherwise it is drawn as a raised button. The user causes a button to -be in the pushed state by clicking the button with the left mouse button. As -long as the mouse button is held down, the button will be drawn as pushed. When -the user releases the mouse button, the button will resume its not pushed state. -When this keyword is not in the text string, the button is not in the pushed -state. -</para></listitem></varlistentry> -<varlistentry><term>"FOCUS"</term> -<listitem><para>The button has the keyboard focus. When this keyword is missing -from the text string, the button does not have the focus. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para> -<programlisting> -<![CDATA[ -button = MyDialog~GetButtonControl("IDOK") -if button == .Nil then return -say button~State -]]> -</programlisting></para> -<para>The result could be "UNCHECKED FOCUS".</para> -</listitem></varlistentry> -</variablelist> -</section> - -<section id="statenew"><title>State=</title> -<indexterm><primary>State=</primary></indexterm> -<programlisting> -<![CDATA[ - +-------------------+ - V | ->>-aButtonControl~State=--"----+-CHECKED-------+-+--"---------->< - +-UNCHECKED-----+ - +-INDETERMINATE-+ - +-PUSHED--------+ - +-NOTPUSHED-----+ - +-FOCUS---------+ - - -]]> -</programlisting> - -<para>The State= method sets the state for the associated -button control.</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The only argument is: -<variablelist> -<varlistentry><term>new_State</term> -<listitem><para>A text string that contains one or more of the following -keywords, separated by a blank: -<variablelist> -<varlistentry><term>CHECKED</term> -<listitem><para>The radio button or the check box is to be set to the -"checked" state. -</para></listitem></varlistentry> -<varlistentry><term>UNCHECKED</term> -<listitem><para>The radio button or the check box is to be set to the -"unchecked" state. -</para></listitem></varlistentry> -<varlistentry><term>INDETERMINATE</term> -<listitem><para>The 3-state check box button is to be set to the -"indeterminate" state. This state can only be applied to 3-state -check box buttons. -</para></listitem></varlistentry> -<varlistentry><term>PUSHED</term> -<listitem><para>The button is to be set to the "pushed" state. -</para></listitem></varlistentry> -<varlistentry><term>NOTPUSHED</term> -<listitem><para>The "pushed" state is to be removed from the button. -</para></listitem></varlistentry> -<varlistentry><term>FOCUS</term> -<listitem><para>The button is to be set to the "focused" state. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para> -<programlisting> -<![CDATA[ -button = MyDialog~GetButtonControl("IDOK") -if button == .Nil then return -button~State="FOCUS PUSHED" -]]> -</programlisting> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Notes:</emphasis></term> -<listitem><para>Some points to remember when using this method. -<orderedlist> -<listitem><para>A button can be set to only one of the checked, unchecked or -indeterminate states. If more than one of these states is specified in the -text string the button is set to the state that is first in the string. -</para></listitem> -<listitem><para>Only 3-state check box buttons can be set to the indeterminate -state. If this keyword is used for a button that is not a 3-state button then -the button's state is not changed. -</para></listitem> -<listitem><para>To change a button state to not focused programmatically use -one of the ooDialog methods that move the focus: <link linkend="tabtonext">TabToNext</link>, -<link linkend="tabtoprevious">TabToPrevious</link>, <link linkend="setfocus">SetFocus</link>, -<link linkend="focusitem">FocusItem</link>, etc.. -</para></listitem> -</orderedlist> -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="stylenew"><title>Style=</title> -<indexterm><primary>Style=</primary></indexterm> -<programlisting> -<![CDATA[ ->>-aButtonControl~Style=--"--+-DEFPUSHBUTTON---+--"------------>< - +-PUSHBOX---------+ - +-RADIO-----------+ - +-AUTORADIO-------+ - +-CHECKBOX--------+ - +-AUTOCHECKBOX----+ - +-3STATE----------+ - +-AUTO3STATE------+ - +-GROUPBOX--------+ - +-OWNERDRAW-------+ - +-LEFTTEXT--------+ - +-RIGHTBUTTON-----+ - +-NOTLEFTTEXT-----+ - +-TEXT------------+ - +-ICON------------+ - +-BITMAP----------+ - +-LEFT------------+ - +-RIGHT-----------+ - +-HCENTER---------+ - +-TOP-------------+ - +-BOTTOM----------+ - +-VCENTER---------+ - +-PUSHLIKE--------+ - +-MULTILINE-------+ - +-NOTIFY----------+ - +-FLAT------------+ - +-NOTPUSHLIKE-----+ - +-NOTMULTILINE----+ - +-NOTNOTIFY-------+ - +-NOTFLAT---------+ - - -]]> -</programlisting> - -<para>The Style= method changes the style of the associated -button control. -<note><title>Note</title><para> - In the past, the documentation for this method was incomplete or misleading. - There are really two aspects to a button, its type (or kind) and its style. - Many of the button styles only have meaning within the same type of button. - These styles can not be applied to a button of a different type after the - button has been created. -<para> - For instance, the AUTOCHECKBOX style can only be applied to a check box type - of button. Trying to give this style to a radio type button has no effect. - Because of this, certain of the style key words have no effect. They are - listed here only because they were listed in previous versions of the - documentation. This may have lead someone to use the key word in their code. - An example is the GROUPBOX key word. The group box type of button only has one - style. This style can not be applied to any other type of button, so setting - the style of any button to GROUPBOX has no effect, and has never had any - effect. -</para> -<para> - However, within each type of button, the styles that apply to that type of - button can be changed. For instance, a check box type of button that has the - 3STATE style, can be changed to have the AUTOCHECKBOX style or to have the - AUTO3STATE style. -</para></note> -</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The only argument is: -<variablelist> -<varlistentry><term>new_Style</term> -<listitem><para>A text string containing at least one or more of the following - keywords. Common sense should be used when constructing the new_Style string. - If mutually exclusive key words are used, the outcome will be dependent on the - order of the key words. -<variablelist> -<varlistentry><term>DEFPUSHBUTTON</term> -<listitem><para>In a dialog, the default push button is the button that is - pushed when the Enter key is pressed. Changing the default push button will - change the behavior of the dialog when the user presses the enter key. -</para></listitem></varlistentry> -<varlistentry><term>PUSHBOX</term> -<listitem><para>A push button that does not display the button face or border, - only the text appears. This button style is not applicable when Windows - themes are in use. -</para></listitem></varlistentry> -<varlistentry><term>RADIOBUTTON</term> -<listitem><para>A radio button the state of which has to be maintained by the - programmer. -</para></listitem></varlistentry> -<varlistentry><term>AUTORADIOBUTTON</term> -<listitem><para>A radio button where the operating system maintains the check -state for all radio buttons in the same group. When one radio button in the -group is checked by the user, the operating system unchecks all other buttons in -the group. -</para></listitem></varlistentry> -<varlistentry><term>CHECKBOX</term> -<listitem><para>A check box where the state has to be maintained by the - programmer. The state can only be checked or unchecke. -</para></listitem></varlistentry> -<varlistentry><term>AUTOCHECKBOX</term> -<listitem><para>A check box where the operating system maintains the check state - for the programmer. -</para></listitem></varlistentry> -<varlistentry><term>3STATE</term> -<listitem><para>A check box button that has a grayed state as well as checked or -unchecked. The greyed state shows that the check state of the button is not -determined. The programmer needs to manage the state of the button when it is -clicked. -</para></listitem></varlistentry> -<varlistentry><term>AUTO3STATE</term> -<listitem><para>A check box button that is the same as a three-state check box -except that the operating system maintains the check state for the programmer. -</para></listitem></varlistentry> -<varlistentry><term>GROUPBOX</term> -<listitem><para>This key word has no effect. -</para></listitem></varlistentry> -<varlistentry><term>OWNERDRAW</term> -<listitem><para>This key word has no effect. -</para></listitem></varlistentry> -<varlistentry><term>LEFTTEXT</term> -<listitem><para>Places the text on the left of the button for a radio button or - check box. This style and RIGHTBUTTON are equivalent. -</para></listitem></varlistentry> -<varlistentry><term>RIGHTBUTTON</term> -<listitem><para>Places the button on the right of the text for a radio button - or a check box. This style is the same as LEFTTEXT. -</para></listitem></varlistentry> -<varlistentry><term>NOTLEFTTEXT</term> -<listitem><para>Removes the LEFTTEXT style. -</para></listitem></varlistentry> -<varlistentry><term>TEXT</term> -<listitem><para>The button displays text. -</para></listitem></varlistentry> -<varlistentry><term>ICON</term> -<listitem><para>The button displays an icon image. -</para></listitem></varlistentry> -<varlistentry><term>BITMAP</term> -<listitem><para>The button displays a bitmap image. -</para></listitem></varlistentry> -<varlistentry><term>LEFT</term> -<listitem><para>The button has its text left-justified in the button rectangle. -</para></listitem></varlistentry> -<varlistentry><term>RIGHT</term> -<listitem><para>The button has its text right-justified in the button rectangle. -</para></listitem></varlistentry> -<varlistentry><term>HCENTER</term> -<listitem><para>The button has its text centered horizontally in the button - rectangle. -</para></listitem></varlistentry> -<varlistentry><term>TOP</term> -<listitem><para>The text is placed at the top of the button rectangle. -</para></listitem></varlistentry> -<varlistentry><term>BOTTOM</term> -<listitem><para>The text is placed at the bottom of the button rectangle. -</para></listitem></varlistentry> -<varlistentry><term>VCENTER</term> -<listitem><para>The text is vertically centered in the button rectanble. -</para></listitem></varlistentry> -<varlistentry><term>PUSHLIKE</term> -<listitem><para>Causes a radio button or check box button to behave like a push - button. -</para></listitem></varlistentry> -<varlistentry><term>MULTILINE</term> -<listitem><para>Causes the text for a button to wrap to multiple lines if the - text is too long for the width of the button. -</para></listitem></varlistentry> -<varlistentry><term>NOTIFY</term> -<listitem><para>Enables a button to send the kill focus and set focus messages. - See the <link linkend="connectbuttonnotify">ConnectButtonNotify</link> method - of the <link linkend="mesextcl">MessageExtensions Class</link>. -</para></listitem></varlistentry> -<varlistentry><term>FLAT</term> -<listitem><para>Gives the button a flat appearance. This style is not - applicable when Windows themes are in effect. -</para></listitem></varlistentry> -<varlistentry><term>NOTPUSHLIKE</term> -<listitem><para>Removes the push like style. -</para></listitem></varlistentry> -<varlistentry><term>NOTMULTILINE</term> -<listitem><para>Removes the multi-line style. -</para></listitem></varlistentry> -<varlistentry><term>NOTNOTIFY</term> -<listitem><para>Removes the notify style. -</para></listitem></varlistentry> -<varlistentry><term>NOTFLAT</term> -<listitem><para>Removes the flat style. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example 1:</emphasis></term> -<listitem><para>The following example makes the OK button the default button: -<programlisting> -<![CDATA[ -button = MyDialog~GetButtonControl("IDOK") -if button == .Nil then return -button~Style="DEFPUSHBUTTON" -]]> -</programlisting> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example 2:</emphasis></term> -<listitem><para>This example changes the text of a check box button depending on - the state another check box. When the button text is long, the multi-line - style is added and the placement of the text in relation to the button - rectangle is changed. When the text is short, the button style is set back to - the default style. -<programlisting> <![CDATA[ -::method idCheckOne - use arg wParam, lParam - - id = .DlgUtil~loWord(wParam) - if self~getCheckControl(id)~checked then do - chkButton = self~getCheckControl(IDC_CHECK_TWO) - chkButton~style = "MULTILINE TOP HCENTER" - chkButton~setTitle("Use IPv6 not IPv4 during this connection") - end - else do - chkButton = self~getCheckControl(IDC_CHECK_TWO) - chkButton~style = "NOTMULTILINE VCENTER LEFT" - chkButton~setTitle("Connect") - end - -]]> -</programlisting> -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="changebitmap"><title>ChangeBitmap</title> -<indexterm><primary>ChangeBitmap</primary></indexterm> -<programlisting> -<![CDATA[ ->>-aButtonControl~ChangeBitmap(--bmpNormal--,--+------------+--,--> - +-bmpFocused-+ - ->--+-------------+--,--+-------------+--+-----------------+--)->< - +-bmpSelected-+ +-bmpDisabled-+ +-,--+-FRAME----+-+ - +-USEPAL---+ - +-INMEMORY-+ - +-STRETCH--+ - - -]]> -</programlisting> - -<para>The ChangeBitmap method changes the bitmap of a -bitmap button.</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments are: -<variablelist> -<varlistentry><term>bmpNormal</term> -<listitem><para>The (alphanumeric) name, (numeric) resource ID, or handle of a bitmap -that is displayed when the button is neither selected, nor focused, nor disabled. -If you specify the bitmap handle, the INMEMORY option must be specified.</para> -<para>This option is used if none of the other arguments is specified.</para> -</listitem></varlistentry> -<varlistentry><term>bmpFocused</term> -<listitem><para>The (alphanumeric) name, (numeric) resource ID, or handle of a bitmap -that is displayed when the button is focused. The focused button is activated -when the Enter key is pressed. If you specify the bitmap handle, the INMEMORY -option must be specified. -</para></listitem></varlistentry> -<varlistentry><term>bmpSelected</term> -<listitem><para>The (alphanumeric) name, (numeric) resource ID, or handle of a bitmap -that is displayed when the button is clicked and held. If you specify the -bitmap handle, the INMEMORY option must be specified. -</para></listitem></varlistentry> -<varlistentry><term>bmpDisabled</term> -<listitem><para>The (alphanumeric) name, (numeric) resource ID, or handle of a bitmap -that is displayed when the button is disabled. If you specify the bitmap handle, -the INMEMORY option must be specified. -</para></listitem></varlistentry> -<varlistentry><term>styleOptions</term> -<listitem><para>The last argument can be one of the following: -<variablelist> -<varlistentry><term>FRAME</term> -<listitem><para>Draws a frame around the button. When you use this option, the bitmap -button behaves like a normal Windows button except that a bitmap is -shown instead of text. -</para></listitem></varlistentry> -<varlistentry><term>USEPAL</term> -<listitem><para>Takes the colors of the bitmap file and stores them as the system color -palette. This option is needed when the bitmap was created with a palette -other than the default Windows color palette. Use it for one -button only because only one color palette can be active at a time.</para> -<para>This -option is not valid for a bitmap loaded from a dynamic-link library.</para> -</listitem></varlistentry> -<varlistentry><term>INMEMORY</term> -<listitem><para>This option must be used if the named bitmaps are already loaded into -memory by using the LoadBitmap method (see -<link linkend="h000667">LoadBitmap</link>). -In this case, you must specify a bitmap handle instead of a file name or ID. -</para></listitem></varlistentry> -<varlistentry><term>STRETCH</term> -<listitem><para>If this option is specified and the extent of the bitmap is smaller -than the extent of the button rectangle, the bitmap is adapted to match the -extent of the button. This option has no effect on bitmaps loaded from a dynamic-link -library. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para> -<programlisting> -<![CDATA[ -button = MyDialog~GetButtonControl("IDOK") -if button == .Nil then return -button~ChangeBitmap("AddBut_n.bmp", "AddBut_f.bmp", "AddBut_s.bmp", , -"AddBut_d.bmp", "FRAME") -]]> -</programlisting> -</para></listitem></varlistentry> -</variablelist> -<para>See also <link linkend="h000156">ConnectBitmapButton</link>.</para> -</section> - -<section id="displacebitmap"><title>DisplaceBitmap</title> -<indexterm><primary>DisplaceBitmap</primary> -<secondary>ButtonControl class</secondary></indexterm> -<programlisting> -<![CDATA[ ->>-aButtonControl~DisplaceBitmap(--x--,--y--)------------------>< - - -]]> -</programlisting> - -<para>The DisplaceBitmap method sets the position of -a bitmap within a bitmap button.</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments are: -<variablelist> -<varlistentry><term>x</term> -<listitem><para>The horizontal displacement, in screen pixels. A negative value can -also be used. -</para></listitem></varlistentry> -<varlistentry><term>y</term> -<listitem><para>The vertical displacement, in screen pixels. A negative value can also -be used. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para>The following example moves the bitmap within the associated bitmap -button 4 screen pixels to the right and 3 pixels upward: -<programlisting> -<![CDATA[ -button = MyDialog~GetButtonControl("IDOK") -if button == .Nil then return -parse value button~GetBmpDisplacement with dx dy -button~DisplacementBitmap(244, dx+4, dy-3) -]]> -</programlisting> -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="getbmpdisplacement"><title>GetBmpDisplacement</title> -<indexterm><primary>GetBmpDisplacement</primary> -<secondary>ButtonControl class</secondary></indexterm> -<programlisting> -<![CDATA[ ->>-aButtonControl~GetBmpDisplacement--------------------------->< - - -]]> -</programlisting> - -<para>The GetBmpDisplacement method retrieves the position -of a bitmap within a bitmap button.</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The horizontal and vertical positions of the bitmap, in screen pixels -and separated by a blank. -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para>See <link linkend="displacebitmap">DisplaceBitmap</link>. -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="scrollbc"><title>Scroll</title> -<indexterm><primary>Scroll</primary> -<secondary>ButtonControl class</secondary></indexterm> -<programlisting> -<![CDATA[ ->>-aButtonControl~Scroll(--xPos--,--yPos--,--left--,--top--,--right--,--bottom--)->< - - -]]> -</programlisting> - -<para>The Scroll method moves the rectangle within the -associated button and redraws the uncovered area with the button background -color. It is used to move bitmaps within bitmap buttons.</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments are: -<variablelist> -<varlistentry><term>xPos, yPos</term> -<listitem><para>The new position of the rectangle, in screen pixels. -</para></listitem></varlistentry> -<varlistentry><term>left, top, right, bottom</term> -<listitem><para>The upper left and lower right corner of the rectangle to be moved. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="scrolltextbc"><title>ScrollText</title> -<indexterm><primary>ScrollText</primary> -<secondary>ButtonControl class</secondary></indexterm> -<programlisting> -<![CDATA[ - +-10-------+ ->>-aButtonControl~ScrollText(--text--,--+----------+--,--+----------+--,------> - +-fontName-+ +-fontSize-+ - - +-0---------+ +-4----+ +-10----+ ->--+--------------------------+--,--+-----------+--,--+------+--,--+-------+--> - | +----------------+ | +-displaceY-+ +-step-+ +-sleep-+ - | V | | - +-"----+-THIN-------+-+--"-+ - +-EXTRALIGHT-+ - +-LIGHT------+ - +-MEDIUM-----+ - +-SEMIBOLD---+ - +-EXTRABOLD--+ - +-BOLD-------+ - +-HEAVY------+ - +-UNDERLINE--+ - +-ITALIC-----+ - +-STRIKEOUT--+ - - +-0-----+ ->--,--+-------+--)---------------------------------------------------------->< - +-color-+ - - -]]> -</programlisting> - -<para>The ScrollText method scrolls text in the associated -button with the given font, size, and color. The text is scrolled from right -to left. If the method is started concurrently, call it a second time to stop -scrolling. The associated button must have the OWNERDRAWN style.</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments are: -<variablelist> -<varlistentry><term>text</term> -<listitem><para>A text string that is displayed and scrolled. -</para></listitem></varlistentry> -<varlistentry><term>fontName</term> -<listitem><para>The name of the font used to write the text. If omitted, the system -font is used. -</para></listitem></varlistentry> -<varlistentry><term>fontSize</term> -<listitem><para>The size of the font used to write the text. If omitted, the standard -size (10) is used. -</para></listitem></varlistentry> -<varlistentry><term>fontStyle</term> -<listitem><para>This argument can be one or more of the keywords listed in the syntax -diagram. If you use more than one keyword, put them in one string, separated -by blanks. -</para></listitem></varlistentry> -<varlistentry><term>displaceY</term> -<listitem><para>The vertical displacement of the text relative to the top of the client -area of the window. The default is 0. -</para></listitem></varlistentry> -<varlistentry><term>step</term> -<listitem><para>The amount of screen pixels that the text is moved in each cycle. The -default is 4. -</para></listitem></varlistentry> -<varlistentry><term>sleep</term> -<listitem><para>The time, in milliseconds, that the program waits after each movement -to determine the scrolling speed. The default is 10. -</para></listitem></varlistentry> -<varlistentry><term>color</term> -<listitem><para>The color index used for the text. The default is 0, which is black. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para>The following example scrolls the string "Hello world!" from left to -right within the associated button. The text is located 2 pixels below the -top of the client area, one move is 3 screen pixels, and the delay time after -each movement is 15 ms. -<programlisting> -<![CDATA[ -button = MyDialog~GetButtonControl("IFOK") -if button == .Nil then return -button~ScrollText("Hello world!", "Arial", 36, "BOLD ITALIC", 2, 3, 15, 4) -]]> -</programlisting> -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="getbitmapsizex"><title>GetBitmapSizeX</title> -<indexterm><primary>GetBitmapSizeX</primary> -<secondary>ButtonControl class</secondary></indexterm> -<programlisting> -<![CDATA[ ->>-aButtonControl~GetBitmapSizeX------------------------------->< - - -]]> -</programlisting> - -<para>The GetBitmapSizeX method retrieves the width of -the bitmap that is set for the associated button.</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The width of the bitmap, in screen pixels. -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="getbitmapsizey"><title>GetBitmapSizeY</title> -<indexterm><primary>GetBitmapSizeY</primary> -<secondary>ButtonControl class</secondary></indexterm> -<programlisting> -<![CDATA[ ->>-aButtonControl~GetBitmapSizeY------------------------------->< - - -]]> -</programlisting> - -<para>The GetBitmapSizeY method retrieves the height -of the bitmap that is set for the associated button.</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The height of the bitmap, in screen pixels. -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="drawbitmap"><title>DrawBitmap</title> -<indexterm><primary>DrawBitmap</primary> -<secondary>ButtonControl class</secondary></indexterm> -<programlisting> -<![CDATA[ - +-0----+ +-0----+ +-0----+ ->>-aButtonControl~DrawBitmap(--+------+--,--+------+--,--+------+--,--> - +-tarx-+ +-tary-+ +-srcx-+ - - +-0----+ +-0-----+ +-0------+ ->--+------+--,--+-------+--,--+--------+--)-------------------->< - +-srcy-+ +-width-+ +-height-+ - - -]]> -</programlisting> - -<para>The DrawBitmap method draws the bitmap of the associated -bitmap button. You can also use this method to move a bitmap or part of it.</para> -<para>Contrary to the method <link linkend="displacebitmap">DisplaceBitmap</link>, which sets a permanent -position for the bitmap, DrawBitmap immediately draws the bitmap, or part -of it, at the specified position. If the button must be refreshed, the bitmap -is drawn at the position set with DisplaceBitmap. DrawBitmap is used by <link linkend="scrollbitmapfromto">ScrollBitmapFromTo</link>, for example.</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments are: -<variablelist> -<varlistentry><term>tarx,tary</term> -<listitem><para>The position relative to the client area of the button where the bitmap -is to be displayed. The default is 0,0. -</para></listitem></varlistentry> -<varlistentry><term>srcx,srcy</term> -<listitem><para>The offsets that specify the first pixel in the bitmap to be displayed. -If you omit these arguments, the pixel at position 0,0 is the first pixel -displayed. -</para></listitem></varlistentry> -<varlistentry><term>width,height</term> -<listitem><para>The width and height of the bitmap. If you omit these arguments or specify -0, the entire bitmap is displayed at the specified position. You can use these -arguments to display only parts of the bitmap. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>0 if the bitmap could be drawn. -</para></listitem></varlistentry> -</variablelist> - -<note><title>Note</title><para> -You can use the DrawBitmap method to animate a bitmap by providing -a bitmap that contains several images and use the offset and extension arguments -to display a single image of the bitmap. -</para></note> -</section> - -<section id="dimbitmap"><title>DimBitmap</title> -<indexterm><primary>DimBitmap</primary></indexterm> -<programlisting> -<![CDATA[ ->>-aButtonControl~DimBitmap(--bmpHandle--,--width--,--height--,--> - - +-2-----+ +-2-----+ +-10----+ ->--+-------+--,--+-------+--,--+-------+--)-------------------->< - +-stepx-+ +-stepy-+ +-steps-+ - - -]]> -</programlisting> - -<para>The DimBitmap method draws a bitmap step by step.</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments are: -<variablelist> -<varlistentry><term>bmpHandle</term> -<listitem><para>A handle to the bitmap loaded with -<link linkend="h000667">LoadBitmap</link>. -</para></listitem></varlistentry> -<varlistentry><term>width, height</term> -<listitem><para>The extensions of the bitmap. -</para></listitem></varlistentry> -<varlistentry><term>stepx, stepy</term> -<listitem><para>The number of incremental pixels displayed at each step. -The default is 2,2. -</para></listitem></varlistentry> -<varlistentry><term>steps</term> -<listitem><para>The number of iterations used to display the bitmap. -The default is 10. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>This method does not return a value. -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="scrollbitmapfromto"><title>ScrollBitmapFromTo</title> -<indexterm><primary>ScrollBitmapFromTo</primary> -<secondary>ButtonControl class</secondary></indexterm> -<programlisting> -<![CDATA[ ->>-aButtonControl~ScrollBitmapFromTo(--fromX--,--fromY--,--toX--,--toY--,--> - ->--stepx--,--stepy--,--delay--,--displace--)------------------->< - - -]]> -</programlisting> - -<para>The ScrollBitmapFromTo method scrolls the bitmap -within the associated bitmap button from one position to another.</para> -<para>For an explanation of the arguments, refer to -<link linkend="h001172">ScrollBitmapFromTo</link>.</para> -</section> -</chapter> Copied: docs/trunk/oodialog/buttoncontrols.sgml (from rev 3151, docs/trunk/oodialog/buttoncontrolc.sgml) =================================================================== --- docs/trunk/oodialog/buttoncontrols.sgml (rev 0) +++ docs/trunk/oodialog/buttoncontrols.sgml 2008-09-03 22:01:01 UTC (rev 3152) @@ -0,0 +1,1344 @@ +<!--######################################################################### + # + # Description: Open Object Rexx: OODialog Reference SGML file. + # + # Copyright (c) 2005-2007, Rexx Language Association. All rights reserved. + # Portions Copyright (c) 2004, IBM Corporation. All rights reserved. + # + # This program and the accompanying materials are made available under + # the terms of the Common Public License v1.0 which accompanies this + # distribution. A copy is also available at the following address: + # http://www.oorexx.org/license.html + # + # Redistribution and use in source and binary forms, with or + # without modification, are permitted provided that the following + # conditions are met: + # + # Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # Redistributions in binary form must reproduce the above copyright + # notice, this list of conditions and the following disclaimer in + # the documentation and/or other materials provided with the distribution. + # + # Neither the name of Rexx Language Association nor the names + # of its contributors may be used to endorse or promote products + # derived from this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + # Author(s): + # W. David Ashley <da...@us...> + # + ######################################################################### +--> +<chapter id="buttoncontrols"><title>Button Controls</title> +<indexterm><primary>Button Controls</primary></indexterm> +<para> + Button controls are +</para> +<section id="buttoncontrolc"><title>ButtonControl Class</title> +<indexterm><primary>ButtonControl class</primary></indexterm> +<para>The ButtonControl class provides methods to query +and modify push button controls. It inherits all methods of the DialogControl +class (see <link linkend="dialogcontrolc">DialogControl Class</link>).</para> +<para>Use the GetButtonControl method (see +<link linkend="getbuttoncontrol">GetButtonControl</link>) to retrieve +an object of the ButtonControl class.</para> +<variablelist> +<varlistentry><term>Requires:</term> +<listitem><para>The ButtonControl class requires the class definition +file <computeroutput>oodwin32.cls</computeroutput>: +<programlisting> +<![CDATA[ +::requires "oodwin32.cls" +]]> +</programlisting> +</para></listitem></varlistentry> +<varlistentry><term>Methods:</term> +<listitem><para>Instances of the ButtonControl class implement +the methods listed in the +<link linkend="t000023">ButtonControl Instance Methods</link> table.</para> + +<table id="t000023" frame="all"> +<title>ButtonControl Instance Methods</title> +<tgroup cols="2"> +<thead> +<row> +<entry>Method...</entry> +<entry>...on page</entry> +</row> +</thead> +<tbody> +<row> +<entry>ChangeBitmap</entry> +<entry><link linkend="changebitmap">ChangeBitmap</link></entry> +</row> +<row> +<entry>DimBitmap</entry> +<entry><link linkend="dimbitmap">DimBitmap</link></entry> +</row> +<row> +<entry>DisplaceBitmap</entry> +<entry><link linkend="displacebitmap">DisplaceBitmap</link></entry> +</row> +<row> +<entry>DrawBitmap</entry> +<entry><link linkend="drawbitmap">DrawBitmap</link></entry> +</row> +<row> +<entry>GetBitmapSizeX</entry> +<entry><link linkend="getbitmapsizex">GetBitmapSizeX</link></entry> +</row> +<row> +<entry>GetBitmapSizeY</entry> +<entry><link linkend="getbitmapsizey">GetBitmapSizeY</link></entry> +</row> +<row> +<entry>GetBmpDisplacement</entry> +<entry><link linkend="getbmpdisplacement">GetBmpDisplacement</link></entry> +</row> +<row> +<entry>Scroll</entry> +<entry><link linkend="scrollbc">Scroll</link></entry> +</row> +<row> +<entry>ScrollBitmapFromTo</entry> +<entry><link linkend="scrollbitmapfromto">ScrollBitmapFromTo</link></entry> +</row> +<row> +<entry>ScrollText</entry> +<entry><link linkend="scrolltextbc">ScrollText</link></entry> +</row> +<row> +<entry>State</entry> +<entry><link linkend="state">State</link></entry> +</row> +<row> +<entry>State=</entry> +<entry><link linkend="statenew">State=</link></entry> +</row> +<row> +<entry>Style=</entry> +<entry><link linkend="stylenew">Style=</link></entry> +</row> +</tbody></tgroup> +</table> +</listitem></varlistentry> +</variablelist> + +<section id="state"><title>State</title> +<indexterm><primary>State</primary></indexterm> +<programlisting> +<![CDATA[ +>>-aButtonControl~State---------------------------------------->< + + +]]> +</programlisting> + +<para>The State method retrieves the current state of +the associated button control.</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>A text string that can contain one or more of the following keywords, +separated by blanks: +<variablelist> +<varlistentry><term>"CHECKED"</term> +<listitem><para>The radio button or the check box is checked. A radio button is +checked when it contains a black dot, a check box is checked when it contains a +check mark. +</para></listitem></varlistentry> +<varlistentry><term>"UNCHECKED"</term> +<listitem><para>The radio button or the check box is not checked. A radio +button is not checked when it does not contain a black dot and a check box is +not checked when it does not contain a check mark. +</para></listitem></varlistentry> +<varlistentry><term>"INDETERMINATE"</term> +<listitem><para>A 3-state check box button is neither checked nor unchecked. +Only 3-state check box buttons can be in this state. When in the indeterminate +state, the check box button is drawn in a visually distinctive manner that is +different from checked or unchecked. Exactly how the indeterminate state is +drawn is dependent on the operating system version. +</para></listitem></varlistentry> +<varlistentry><term>"PUSHED"</term> +<listitem><para>When a button is in the pushed state it is drawn as a sunken +button, otherwise it is drawn as a raised button. The user causes a button to +be in the pushed state by clicking the button with the left mouse button. As +long as the mouse button is held down, the button will be drawn as pushed. When +the user releases the mouse button, the button will resume its not pushed state. +When this keyword is not in the text string, the button is not in the pushed +state. +</para></listitem></varlistentry> +<varlistentry><term>"FOCUS"</term> +<listitem><para>The button has the keyboard focus. When this keyword is missing +from the text string, the button does not have the focus. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para> +<programlisting> +<![CDATA[ +button = MyDialog~GetButtonControl("IDOK") +if button == .Nil then return +say button~State +]]> +</programlisting></para> +<para>The result could be "UNCHECKED FOCUS".</para> +</listitem></varlistentry> +</variablelist> +</section> + +<section id="statenew"><title>State=</title> +<indexterm><primary>State=</primary></indexterm> +<programlisting> +<![CDATA[ + +-------------------+ + V | +>>-aButtonControl~State=--"----+-CHECKED-------+-+--"---------->< + +-UNCHECKED-----+ + +-INDETERMINATE-+ + +-PUSHED--------+ + +-NOTPUSHED-----+ + +-FOCUS---------+ + + +]]> +</programlisting> + +<para>The State= method sets the state for the associated +button control.</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The only argument is: +<variablelist> +<varlistentry><term>new_State</term> +<listitem><para>A text string that contains one or more of the following +keywords, separated by a blank: +<variablelist> +<varlistentry><term>CHECKED</term> +<listitem><para>The radio button or the check box is to be set to the +"checked" state. +</para></listitem></varlistentry> +<varlistentry><term>UNCHECKED</term> +<listitem><para>The radio button or the check box is to be set to the +"unchecked" state. +</para></listitem></varlistentry> +<varlistentry><term>INDETERMINATE</term> +<listitem><para>The 3-state check box button is to be set to the +"indeterminate" state. This state c... [truncated message content] |
From: <mie...@us...> - 2008-10-02 14:23:08
|
Revision: 3419 http://oorexx.svn.sourceforge.net/oorexx/?rev=3419&view=rev Author: miesfeld Date: 2008-10-02 14:20:04 +0000 (Thu, 02 Oct 2008) Log Message: ----------- docs - incremental update to ooDialog docs. Modified Paths: -------------- docs/trunk/oodialog/advcntlc.sgml docs/trunk/oodialog/buttoncontrols.sgml Modified: docs/trunk/oodialog/advcntlc.sgml =================================================================== --- docs/trunk/oodialog/advcntlc.sgml 2008-10-01 23:47:26 UTC (rev 3418) +++ docs/trunk/oodialog/advcntlc.sgml 2008-10-02 14:20:04 UTC (rev 3419) @@ -129,6 +129,10 @@ <entry><link linkend="geteditcontrol">GetEditControl</link></entry> </row> <row> +<entry>GetGroupBox</entry> +<entry><link linkend="getgroupbox">GetGroupBox</link></entry> +</row> +<row> <entry>GetListBox</entry> <entry><link linkend="getlistbox">GetListBox</link></entry> </row> @@ -456,6 +460,71 @@ </para></note> </section> +<section id="getgroupbox"><title>GetGroupBox</title> +<indexterm><primary>GetGroupBox</primary></indexterm> +<programlisting> +<![CDATA[ +>>-anAdvancedControl~GetGroupBox(--id--+-------------+--)------>< + +-,--category-+ + + +]]> +</programlisting> + +<para> + The GetGroupBox method returns an object of the GroupBox class that represents + the group box with the specified resource ID. See the + <link linkend="groupboxc">GroupBox Class</link> for more detail on group + boxes. +</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments are: +<variablelist> +<varlistentry><term>id</term> +<listitem><para>The resource ID of the group box. +</para></listitem></varlistentry> +<varlistentry><term>category</term> +<listitem><para>The number of the category dialog page containing the requested +group box. This argument must only be specified for category dialogs. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>A GroupBox object or .Nil if the underlying Windows group box +control does not exist. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>The following example shows how the text (label) of a group box + could be changed during program execution: +<programlisting> +<![CDATA[ +::class MyPhoneBook subclass ResDialog inherit AdvancedControls + +::method onUseFull + gb = self~getGroupBox(IDC_GB_TELEPHONE) + chkBox = self~getCheckBox(IDC_CHK_USE_FULL) + if chkBox~checked then do + gb~setTitle("Phone Numbers (including area code)") + end + else do + gb~setTitle("Phone Numbers") + end +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> + +<note><title>Note</title> +<para> + GetGroupBox connects the ooDialog object with a Windows control. If the + control does not exist, this connection can not be made. Therefore, this + method should only be used after the Windows dialog has been created. In + <link linkend="mthInitDialog">initDialog()</link> or at some point in the life + cycle of the dialog after initDialog(). +</para></note> +</section> + <section id="getlistbox"><title>GetListBox</title> <indexterm><primary>GetListBox</primary></indexterm> <programlisting> Modified: docs/trunk/oodialog/buttoncontrols.sgml =================================================================== --- docs/trunk/oodialog/buttoncontrols.sgml 2008-10-01 23:47:26 UTC (rev 3418) +++ docs/trunk/oodialog/buttoncontrols.sgml 2008-10-02 14:20:04 UTC (rev 3419) @@ -44,8 +44,63 @@ <chapter id="buttoncontrols"><title>Button Controls</title> <indexterm><primary>Button Controls</primary></indexterm> <para> - Button controls are + In Windows the Button control has a number of different types or kinds. Most + button types have a number of different styles. The style of a button effects + its behavior and appearance. The appearance of a button is usually maintained + by the operating system in combination with the programmer. </para> +<para> + In general people refer to "pushing," "clicking," or "checking" a button. The + mouse is used to click a button and the enter key to push a button. Checking + a button can be done with the mouse or the keyboard. Buttons have a state, + the most common of which are checked, unchecked, pushed, and focused. +</para> +<para> + The five kinds of buttons are: + <itemizedlist> + <listitem><para>Push Buttons</para></listitem> + <listitem><para>Check Boxes</para></listitem> + <listitem><para>Radio Buttons</para></listitem> + <listitem><para>Group Boxes</para></listitem> + <listitem><para>Owner Drawn Buttons</para></listitem> + </itemizedlist> +</para> +<para> + ooDialog provides these classes to allow the programmer to interface with the + underlying button controls: +<table id="tButtonControls" frame="all"> +<title>ooDialog Button Control Classes</title> +<tgroup cols="2"> +<thead> +<row> +<entry>Button Control Type</entry> +<entry>ooDialog Class</entry> +</row> +</thead> +<tbody> +<row> +<entry>Push Button</entry> +<entry><link linkend="buttoncontrolc">ButtonControl Class</link></entry> +</row> +<row> +<entry>Check Box Button</entry> +<entry><link linkend="checkboxc">Check Boxes</link></entry> +</row> +<row> +<entry>Raido Button</entry> +<entry><link linkend="radiobuttonc">Radio Buttons</link></entry> +</row> +<row> +<entry>Group Box</entry> +<entry><link linkend="groupboxc">Group Boxes</link></entry> +</row> +<row> +<entry>Owner Drawn Button</entry> +<entry><link linkend="anibut">Owner Drawn Buttons</link></entry> +</row> +</tbody></tgroup> +</table> +</para> <section id="buttoncontrolc"><title>ButtonControl Class</title> <indexterm><primary>ButtonControl class</primary></indexterm> <para>The ButtonControl class provides methods to query @@ -284,7 +339,8 @@ </section> <section id="stylenew"><title>Style=</title> -<indexterm><primary>Style=</primary></indexterm> +<indexterm><primary>Style=</primary> +<secondary>ButtonControl class</secondary></indexterm> <programlisting> <![CDATA[ >>-aButtonControl~Style=--"--+-DEFPUSHBUTTON---+--"------------>< @@ -1113,6 +1169,83 @@ <link linkend="mesextcl">MessageExtensions Class</link>.</para> </section> +<section id="groupboxc"><title>GroupBox Class</title> +<indexterm><primary>GroupBox class</primary></indexterm> +<para> + The Windows Group Box control is actually a button control, not a static + control. Its purpose is to group together a set of related controls. It + consists of a label and a rectangle. The related controls are placed within + the rectangle. Group boxes have no state, they can not be selected, and an + application can not send messages to the control. In addition, a group box + does not send notifications to its parent so there are no events to connect ot + a group box. +</para> +<para> + The GroupBox class provides methods to work with group box controls. It + inherits all methods of: +</para> +<itemizedlist> +<listitem><para>The DialogControl class (see +<link linkend="dialogcontrolc">DialogControl Class</link>) +</para></listitem> +</itemizedlist> +<para>The GroupBox class requires the class definition file +<computeroutput>oodwin32.cls</computeroutput>:</para> +<programlisting> +<![CDATA[ +::requires "oodwin32.cls" +]]> +</programlisting> +<para>Use the GetGroupBox method (see +<link linkend="getgroupbox">GetCheckControl</link>) +to retrieve an object of the GroupBox class.</para> + +<section id="mthGBStyleEquals"><title>Style=</title> +<indexterm><primary>Style=</primary> +<secondary>GroupBox class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aControl~style=-"--+-LEFT-----+--"------------------->< + +-RIGHT----+ + +]]> +</programlisting> + +<para> + Assigns a new text alignment to the group box. By default the text of a group + box is in the upper left corner. The alignment can also be set to the right, + although this is not commonly done. +</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The only argument is: +<variablelist> +<varlistentry><term>new_style/term> +<listitem><para>A text string that is either: +<variablelist> +<varlistentry><term>LEFT</term> +<listitem><para>The group box label is aligned to the upper left. +</para></listitem></varlistentry> +<varlistentry><term>RIGHT</term> +<listitem><para>The label is aligned to the upper right. +</para></listitem></varlistentry> +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para> +<programlisting> +<![CDATA[ +gb = dlg~getGroupBox(IDC_GB_AREACODES) +if gb == .Nil then return +gb~style="RIGHT" +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> +</section> + <section id="anibut"><title>AnimatedButton Class</title> <indexterm><primary>AnimatedButton class</primary></indexterm> <para>The AnimatedButton class provides the methods to This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2008-12-04 00:29:25
|
Revision: 3746 http://oorexx.svn.sourceforge.net/oorexx/?rev=3746&view=rev Author: miesfeld Date: 2008-12-04 00:29:21 +0000 (Thu, 04 Dec 2008) Log Message: ----------- Continue with ooDialog updates Modified Paths: -------------- docs/trunk/oodialog/Makefile docs/trunk/oodialog/buttoncontrols.sgml docs/trunk/oodialog/oodialog.sgml Added Paths: ----------- docs/trunk/oodialog/utilityclasses.sgml Removed Paths: ------------- docs/trunk/oodialog/dlgareac.sgml docs/trunk/oodialog/virtualkeycodesc.sgml Modified: docs/trunk/oodialog/Makefile =================================================================== --- docs/trunk/oodialog/Makefile 2008-12-03 21:22:10 UTC (rev 3745) +++ docs/trunk/oodialog/Makefile 2008-12-04 00:29:21 UTC (rev 3746) @@ -57,7 +57,7 @@ listboxc.sgml \ listcontrolc.sgml \ mesextcl.sgml \ - dlgareac.sgml \ + utilityclasses.sgml \ oodialog.sgml \ plainuserdialogc.sgml \ preface.sgml \ @@ -72,7 +72,6 @@ termdef.sgml \ treecontrolc.sgml \ userdialog.sgml \ - virtualkeycodesc.sgml \ ../shared/notices.sgml \ ../shared/legalstuff.sgml \ ../shared/gethelp.sgml \ @@ -131,9 +130,6 @@ svnversion > svnrev.tmp - - clean: - rm *.log *.aux *.out *.fmt *.pdf genindex.sgml *.htm *.zip \ - HTML.index *.tmp + rm -f *.log *.aux *.out *.fmt *.pdf genindex.sgml *.htm *.zip HTML.index *.tmp Modified: docs/trunk/oodialog/buttoncontrols.sgml =================================================================== --- docs/trunk/oodialog/buttoncontrols.sgml 2008-12-03 21:22:10 UTC (rev 3745) +++ docs/trunk/oodialog/buttoncontrols.sgml 2008-12-04 00:29:21 UTC (rev 3746) @@ -230,13 +230,91 @@ </listitem></varlistentry> </variablelist> +<section id="mthPush"><title>push</title> +<indexterm><primary>push</primary> +<secondary>ButtonControl class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aButtonControl~push------------------------------->< +]]> +</programlisting> + +<para> + The push method simulates the user pushing the associated button control. It + allows an ooRexx programmer to produce the exact same behavior from within, an + ooDialog program, as the behavior produced by the user pushing the button in + the dialog. +</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>There are no arguments to this method. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>This method does not return a value. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>This example comes from an imaginary program that has a list of + window handles. The dialog has a Refresh button that the user can push to + update the window list. The code comes from a section of the program that is + checking if a specific window handle is valid. If the handle is not valid, + the code simulates the user pushing the Refresh button to update the window + list. +<programlisting> +<![CDATA[ +::method validate private + use strict arg hwnd + if \ self~isWindowHandle(hwnd) then do + self~getButtonControl(IDC_PB_REFRESH)~push + return .false + end + ... +return .true +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + + +<section id="mthClick"><title>click</title> +<indexterm><primary>click</primary> +<secondary>ButtonControl class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aButtonControl~click------------------------------->< +]]> +</programlisting> + +<para> + The click method programmatically clicks the associated button control. It + simulates the user pusing the button and produces exactly the same behavior as + if the user had click on the button. +</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>This method takes no arguments. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>This method does not return any value. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>This example closes the dialog as if the user had clicked the + cancel button. (Provided of course that the dialog has a cancel button.) +<programlisting> +<![CDATA[ +self~getButtonControl(IDCANCEL)~click +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + + <section id="state"><title>State</title> <indexterm><primary>State</primary></indexterm> <programlisting> <![CDATA[ >>-aButtonControl~State---------------------------------------->< - - ]]> </programlisting> @@ -359,10 +437,15 @@ <varlistentry><term><emphasis role="bold">Notes:</emphasis></term> <listitem><para>Some points to remember when using this method. <orderedlist> -<listitem><para>A button can be set to only one of the checked, unchecked or -indeterminate states. If more than one of these states is specified in the -text string the button is set to the state that is first in the string. +<listitem><para>The checked, unchecked or indeterminate states have no meaning +for a push button. Setting a push button to one of these states therefore has +no effect. </para></listitem> +<listitem><para>A radio button or check box can be set to only one of the +checked, unchecked or indeterminate states. If more than one of these states is +specified in the text string the button is set to the state that is first in the +string. +</para></listitem> <listitem><para>Only 3-state check box buttons can be set to the indeterminate state. If this keyword is used for a button that is not a 3-state button then the button's state is not changed. @@ -610,100 +693,6 @@ </section> -<section id="mthClick"><title>click</title> -<indexterm><primary>click</primary> -<secondary>ButtonControl class</secondary></indexterm> -<programlisting> -<![CDATA[ ->>-aButtonControl~click(--x--,--y--)------------------>< - - -]]> -</programlisting> - -<para></para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments are: -<variablelist> -<varlistentry><term>x</term> -<listitem><para>xx. -</para></listitem></varlistentry> -<varlistentry><term>y</term> -<listitem><para>yyy, -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The possible return values are: -<variablelist> -<varlistentry><term>0</term> -<listitem><para>Success -</para></listitem></varlistentry> -<varlistentry><term>-1</term> -<listitem><para>Some error. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para>This example ... -<programlisting> -<![CDATA[ -x = y -return 0 -]]> -</programlisting> -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="mthPush"><title>push</title> -<indexterm><primary>push</primary> -<secondary>ButtonControl class</secondary></indexterm> -<programlisting> -<![CDATA[ ->>-aButtonControl~push(--x--,--y--)------------------>< - - -]]> -</programlisting> - -<para></para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments are: -<variablelist> -<varlistentry><term>x</term> -<listitem><para>xx. -</para></listitem></varlistentry> -<varlistentry><term>y</term> -<listitem><para>yyy, -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The possible return values are: -<variablelist> -<varlistentry><term>0</term> -<listitem><para>Success -</para></listitem></varlistentry> -<varlistentry><term>-1</term> -<listitem><para>Some error. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para>This example ... -<programlisting> -<![CDATA[ -x = y -return 0 -]]> -</programlisting> -</para></listitem></varlistentry> -</variablelist> -</section> - <section id="mthGetIdealSize"><title>getIdealSize</title> <indexterm><primary>getIdealSize</primary> <secondary>ButtonControl class</secondary></indexterm> Deleted: docs/trunk/oodialog/dlgareac.sgml =================================================================== --- docs/trunk/oodialog/dlgareac.sgml 2008-12-03 21:22:10 UTC (rev 3745) +++ docs/trunk/oodialog/dlgareac.sgml 2008-12-04 00:29:21 UTC (rev 3746) @@ -1,874 +0,0 @@ -<!--######################################################################### - # - # Description: Open Object Rexx: OODialog Reference SGML file. - # - # Copyright (c) 2005-2007, Rexx Language Association. All rights reserved. - # Portions Copyright (c) 2004, IBM Corporation. All rights reserved. - # - # This program and the accompanying materials are made available under - # the terms of the Common Public License v1.0 which accompanies this - # distribution. A copy is also available at the following address: - # http://www.oorexx.org/license.html - # - # Redistribution and use in source and binary forms, with or - # without modification, are permitted provided that the following - # conditions are met: - # - # Redistributions of source code must retain the above copyright - # notice, this list of conditions and the following disclaimer. - # Redistributions in binary form must reproduce the above copyright - # notice, this list of conditions and the following disclaimer in - # the documentation and/or other materials provided with the distribution. - # - # Neither the name of Rexx Language Association nor the names - # of its contributors may be used to endorse or promote products - # derived from this software without specific prior written permission. - # - # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # - # Author(s): - # W. David Ashley <da...@us...> - # - ######################################################################### ---> -<chapter id="dialogareac"><title>DlgArea and DlgAreaU Classes</title> -<indexterm><primary>DlgArea, DlgAreaU classes</primary></indexterm> -<para>The DlgArea class provides assistance in laying out the dialog controls in -a dynamically defined dialog. The DlgAreaU class provides assistance in -resizing and / or positioning controls when a dialog is resized. Used together, -the two classes provide a convenient way to create resizable dialogs. -</para> -<section id="dlgareacls"><title>DlgArea Class</title> -<indexterm><primary>DlgArea class</primary></indexterm> -<para>The DlgArea class defines an area of a UserDialog and provides co-ordinates of and within it. -It is a helper for the DefineDialog Method of an OODialog UserDialog Object and has no effect on any Windows Object. -</para> -<para>To use objects of the DlgArea class include this line in your code: -</para> -<programlisting> -::requires "OODIALOG.CLS" -</programlisting> -<para>The following figure shows the measuement attributes used to position a -DlgArea on a UserDialog.</para> -<figure id="dlgareafig"><title>DlgArea Measurements</title> -<mediaobject> -<imageobject> -<!-- Note! - if we include a /imagedata tag we get an error for DSSSL! --> -<imagedata fileref="dlgarea.jpg" scale="300"> -</imageobject> -</mediaobject> -</figure> - -<section id="dlgareainit"><title>Init</title> -<indexterm><primary>Init</primary> -<secondary>DlgArea class</secondary></indexterm> -<programlisting> -<![CDATA[ ->>- aDlgArea~Init(--X--,--Y--,--Width--,--Height--+-------------+--)-->< - +--,--Margin--+ -]]> -</programlisting> - -<para></para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments you pass to the new method when creating a -DlgArea Object are: -<variablelist> -<varlistentry><term>X</term> -<listitem><para>The X Co-ordinate in dialog units relative to the UserDialog -of the top left corner of the area you wish to define -</para></listitem></varlistentry> -<varlistentry><term>Y</term> -<listitem><para>The Y Co-ordinate in dialog units relative to the UserDialog -of the top left corner of the area you wish to define. -</para></listitem></varlistentry> -<varlistentry><term>Width</term> -<listitem><para>The width in dialog units of the area of the UserDialog you -wish to define -</para></listitem></varlistentry> -<varlistentry><term>Height</term> -<listitem><para>The height in dialog units of the area of the UserDialog you -wish to define</para> -</listitem></varlistentry> -<varlistentry><term>Margin</term> -<listitem><para>An inner margin within the DlgArea in Dialog Units to be left -blank. The default is 5 -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para> -</para></listitem></varlistentry> -</variablelist> - -<programlisting> -<![CDATA[ -u = .dlgArea~new(0, 0, self~SizeX,Self~SizeY) /* u is whole of UserDialog */ -b = .dlgArea~new(u~x("70%"), u~y , u~w("R"), u~h("R")) /* sub area for buttons */ -]]> -</programlisting> -</section> - -<section id="dlgareab"><title>B</title> -<indexterm><primary>B</primary> -<secondary>DlgArea class</secondary></indexterm> -<para>Returns the y coordinate of the bottom margin in dialog units relative to -UserDialog. -</para> -<programlisting> -<![CDATA[ ->>--ADlgArea~B-------------------------------------------------------->< -]]> -</programlisting> - -<para></para> -</section> - -<section id="dlgareabottom"><title>Bottom</title> -<indexterm><primary>Bottom</primary> -<secondary>DlgArea class</secondary></indexterm> -<para>Returns the y coordinate of the bottom edge in dialog units relative to -UserDialog. -</para> -<programlisting> -<![CDATA[ ->>--ADlgArea~Bottom--------------------------------------------------->< -]]> -</programlisting> - -<para></para> -</section> - -<section id="dlgareacx"><title>CX</title> -<indexterm><primary>CX</primary> -<secondary>DlgArea class</secondary></indexterm> -<para>Synonym for the W method. -</para> -<programlisting> -<![CDATA[ ->>--ADlgArea~cx(--+-------+--)---------------------------------------->< - +--n%---+ - +--"R"--+ -]]> -</programlisting> - -<para></para> -</section> - -<section id="dlgareacy"><title>CY</title> -<indexterm><primary>CY</primary> -<secondary>DlgArea class</secondary></indexterm> -<para>Synonym for the H method. -</para> -<programlisting> -<![CDATA[ ->>--ADlgArea~cy(--+-------+--)---------------------------------------->< - +--n%---+ - +--"R"--+ -]]> -</programlisting> - -<para></para> -</section> - -<section id="dlgareah"><title>H</title> -<indexterm><primary>H</primary> -<secondary>DlgArea class</secondary></indexterm> -<para>Returns a height in dialog units relative to the dialog area. -</para> -<para>If no argument is passed returns the inter-margin height. -</para> -<programlisting> -<![CDATA[ ->>--ADlgArea~h(--+-------+--)----------------------------------------->< - +--n%---+ - +--"R"--+ -]]> -</programlisting> - -<para></para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments you pass to the H method are: -<variablelist> -<varlistentry><term>n%</term> -<listitem><para>If <computeroutput>n</computeroutput> is a percentage returns -<computeroutput>n%</computeroutput> of the inter-margin height. -</para></listitem></varlistentry> -<varlistentry><term>"R"</term> -<listitem><para>If "R" is passed returns Remaining height between last ~y and -bottom margin. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="dlgareahr"><title>HR</title> -<indexterm><primary>HR</primary> -<secondary>DlgArea class</secondary></indexterm> -<para>Returns the remaining height between last ~Y and bottom margin in dialog -units. This is equivalent to ~H("R"). -</para> -<programlisting> -<![CDATA[ ->>--ADlgArea~hr------------------------------------------------------->< -]]> -</programlisting> - -<para></para> -</section> - -<section id="dlgareal"><title>L</title> -<indexterm><primary>L</primary> -<secondary>DlgArea class</secondary></indexterm> -<para>Returns the x coordinate of the left margin in dialog units relative to -UserDialog. -</para> -<programlisting> -<![CDATA[ ->>--ADlgArea~L-------------------------------------------------------->< -]]> -</programlisting> - -<para></para> -</section> - -<section id="dlgarealeft"><title>Left</title> -<indexterm><primary>Left</primary> -<secondary>DlgArea class</secondary></indexterm> -<para>Returns the x coordinate of the left edge in dialog units relative to -UserDialog. -</para> -<programlisting> -<![CDATA[ ->>--ADlgArea~Left----------------------------------------------------->< -]]> -</programlisting> - -<para></para> -</section> - -<section id="dlgareamargin"><title>Margin</title> -<indexterm><primary>Margim</primary> -<secondary>DlgArea class</secondary></indexterm> -<para>Size in dialog units of DlgArea margin. -</para> -<programlisting> -<![CDATA[ ->>--ADlgArea~Margin--------------------------------------------------->< -]]> -</programlisting> - -<para></para> -</section> - -<section id="dlgarear"><title>R</title> -<indexterm><primary>R</primary> -<secondary>DlgArea class</secondary></indexterm> -<para>Returns the x coordinate of the right margin in dialog units relative to -UserDialog. -</para> -<programlisting> -<![CDATA[ ->>--ADlgArea~R-------------------------------------------------------->< -]]> -</programlisting> - -<para></para> -</section> - -<section id="dlgarearight"><title>Right</title> -<indexterm><primary>Right</primary> -<secondary>DlgArea class</secondary></indexterm> -<para>Returns the x coordinate of the right edge in dialog units relative to -UserDialog. -</para> -<programlisting> -<![CDATA[ ->>--ADlgArea~Right---------------------------------------------------->< -]]> -</programlisting> - -<para></para> -</section> - -<section id="dlgareat"><title>T</title> -<indexterm><primary>T</primary> -<secondary>DlgArea class</secondary></indexterm> -<para>Returns the y coordinate of the top margin in dialog units relative to -UserDialog. -</para> -<programlisting> -<![CDATA[ ->>--ADlgArea~T-------------------------------------------------------->< -]]> -</programlisting> - -<para></para> -</section> - -<section id="dlgareatop"><title>Top</title> -<indexterm><primary>Top</primary> -<secondary>DlgArea class</secondary></indexterm> -<para>Returns the y coordinate of the top edge in dialog units relative to -UserDialog. -</para> -<programlisting> -<![CDATA[ ->>--ADlgArea~Top------------------------------------------------------>< -]]> -</programlisting> - -<para></para> -</section> - -<section id="dlgareaw"><title>W</title> -<indexterm><primary>W</primary> -<secondary>DlgArea class</secondary></indexterm> -<para>Returns a width in dialog units relative to the dialog area. -</para> -<para>If no argument is passed returns the inter-margin width. -</para> -<programlisting> -<![CDATA[ ->>--ADlgArea~w(--+-------+--)----------------------------------------->< - +--n%---+ - +--"R"--+ -]]> -</programlisting> - -<para></para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments you pass to the Y method are: -<variablelist> -<varlistentry><term>n%</term> -<listitem><para>If <computeroutput>n</computeroutput> is a percentage returns -<computeroutput>n%</computeroutput> of the inter-margin width. -</para></listitem></varlistentry> -<varlistentry><term>"R"</term> -<listitem><para>If "R" is passed returns Remaining width between last ~x and -right margin. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="dlgareawr"><title>WR</title> -<indexterm><primary>WR</primary> -<secondary>DlgArea class</secondary></indexterm> -<para>Returns the remaining width between last ~X and right margin in dialog -units. This is equivalent to ~W("R"). -</para> -<programlisting> -<![CDATA[ ->>--ADlgArea~wr------------------------------------------------------->< -]]> -</programlisting> - -<para></para> -</section> - -<section id="dlgareax"><title>X</title> -<indexterm><primary>X</primary> -<secondary>DlgArea class</secondary></indexterm> -<para>Returns an X Coordinate in dialog units relative to the dialog area. -</para> -<para>If no <computeroutput>n</computeroutput> is passed returns the x -coordinate of the left margin. -</para> -<programlisting> -<![CDATA[ ->>--ADlgArea~x(--+------+--)------------------------------------------>< - +--n---+ - +--n%--+ -]]> -</programlisting> - -<para></para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments you pass to the X method are: -<variablelist> -<varlistentry><term>n</term> -<listitem><para>If <computeroutput>n</computeroutput> is passed and is positive, -then returns the x coordinate <computeroutput>n</computeroutput> dialog units -to the right of the left margin. -If <computeroutput>n</computeroutput> is passed and is negative, then returns -the x coordinate <computeroutput>n</computeroutput> dialog units to the left of -the right margin.. -</para></listitem></varlistentry> -<varlistentry><term>n%</term> -<listitem><para>If <computeroutput>n</computeroutput> is passed and is a -percentage, then returns the x coordinate <computeroutput>n%</computeroutput> -of the way between the left and right margins. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="dlgareay"><title>Y</title> -<indexterm><primary>Y</primary> -<secondary>DlgArea class</secondary></indexterm> -<para>Returns an Y Coordinate in dialog units relative to the dialog area. -</para> -<para>If no <computeroutput>n</computeroutput> is passed returns the x -coordinate of the top margin. -</para> -<programlisting> -<![CDATA[ ->>--ADlgArea~y(--+------+--)------------------------------------------>< - +--n---+ - +--n%--+ -]]> -</programlisting> - -<para></para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments you pass to the Y method are: -<variablelist> -<varlistentry><term>n</term> -<listitem><para>If <computeroutput>n</computeroutput> is passed and is positive, -then returns the y coordinate <computeroutput>n</computeroutput> dialog units -below the topmargin. -If <computeroutput>n</computeroutput> is passed and is negative, then returns -the y coordinate <computeroutput>n</computeroutput> dialog units above -the bottom margin.. -</para></listitem></varlistentry> -<varlistentry><term>n%</term> -<listitem><para>If <computeroutput>n</computeroutput> is passed and is a -percentage, then returns the y coordinate <computeroutput>n%</computeroutput> -of the way between the top and bottom margins. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="exampleDlgArea"><title>DlgArea Example</title> -<para>On a UserDialog we want the top left to be an entry area, with an area -for buttons on the right and a status area below.</para> -<para>We decide to give 70% of the width and 90% of the height to the entry area. -We leave the margin as the default. -We want all the areas to resize themselves if we change the UserDialog size -except the OK button should remain 15 units high.</para> -<figure id="dlgareaplanfig"><title>DlgArea Plan</title> -<mediaobject> -<imageobject> -<!-- Note! - if we include a /imagedata tag we get an error for DSSSL! --> -<imagedata fileref="dlgareaplan.jpg" scale="300"> -</imageobject> -</mediaobject> -</figure> -<para>Here is what our DefineDialog method might look like:</para> -<programlisting> -<![CDATA[ -/* ------------------------------------------------------------------------- */ -::method DefineDialog -/* ------------------------------------------------------------------------- */ -/* define DlgArea named u as whole of user dialog */ -u=.dlgArea~new( 0 , 0,self~SizeX,Self~SizeY) /* whole dlg */ - -/* define DlgArea named e within DlgArea u for entry line */ -e=.dlgArea~new(u~x ,u~y ,u~w("70%"),u~h("90%")) - -/* define DlgArea named s within DlgArea u for Status Area in remaining height*/ -s=.dlgArea~new(u~x ,u~y("90%"),u~w("70%"),u~hr ) - -/* define DlgArea named b within DlgArea u for Button area */ -b=.dlgArea~new(u~x("70%"),u~y ,u~wr ,u~hr ) - -/* entry line coterminous with area e margins */ -self~AddEntryLine(12,"text",e~x,e~y,e~w,e~h,"multiline") - -/* Status Area Coterminous with area s margins */ -self~AddText(s~x,s~y,s~w,s~h,"Status info appears here",11) - -/* Seven buttons evenly spaced at 10% intervals, 9% high */ -do i = 0 to 6 - self~addButton(12+i,b~x,b~y((i * 10)||"%"),b~w,b~h("9%"),"Button" i,"Button"||i) -end /* DO */ - -/* ok button 15 dialog units high at bottom of area b */ -self~AddButton(1,b~x,b~y(-15),b~w,15,"OK","OK","Default") -]]> -</programlisting> -<para>Here is the resultant dialog.</para> -<figure id="dlgareasample"><title>Sample DlgArea</title> -<mediaobject> -<imageobject> -<!-- Note! - if we include a /imagedata tag we get an error for DSSSL! --> -<imagedata fileref="sample1.jpg" scale="300"> -</imageobject> -</mediaobject> -</figure> -</section> -</section> - -<section id="dlgareaucls"><title>DlgAreaU Class</title> -<indexterm><primary>DlgAreaU class</primary></indexterm> -<para>The DlgAreaU class is a subclass of the DlgArea class that assists the -creation of dynamically resizable Dialogs. -</para> -<para>To use objects of the DlgAreaU class include this line in your code: -</para> -<programlisting> -::requires "OODIALOG.CLS" -</programlisting> - -<section id="dlgareauinit"><title>Init</title> -<indexterm><primary>Init</primary> -<secondary>DlgAreaU class</secondary></indexterm> -<programlisting> -<![CDATA[ ->>- aDlgAreaU~Init(Dialog--+--------------------------+--------+-)-->< - +--,--Margin-+ | | - +--,---------+--,-NoResize-+ | - +--,---------+--,----------+-NoMove-+ -]]> -</programlisting> - -<para> -The DlgAreaU object creates a dialog area coterminous with the calling dialog. -It inherits all the methods and attributes of the DlgArea Class (listed above). -</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments you pass to the new method when creating a -DlgArea Object are: -<variablelist> -<varlistentry><term>Dialog</term> -<listitem><para>An Object that is SubClassed from A UserDialog. -</para></listitem></varlistentry> -<varlistentry><term>Margin</term> -<listitem><para>See DlgArea Margin. -</para></listitem></varlistentry> -<varlistentry><term>NoResize</term> -<listitem><para>A set of Dialog Ids of widgets not to be resized during a resize. -</para></listitem></varlistentry> -<varlistentry><term>NoMove</term> -<listitem><para>A set of Dialog Ids of widgets not to be moved during a resize. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="mthCorrectionFactor"><title>CorrectionFactor</title> -<indexterm><primary>CorrectionFactor</primary> -<secondary>DlgAreaU class</secondary></indexterm> -<programlisting> -<![CDATA[ ->>--ADlgAreaU~CorrectionFactor---------------------------------------->< -]]> -</programlisting> - -<para>An attribute containing the value used to adjust the ratio of the top & -left margins to the bottom & right margins. (The default correction factor -is set to 1.05.) See the <link linkend="dlgareaubug">Possible Problems</link> -section for some additional detail. -</para> -</section> - -<section id="dlgareaulasterror"><title>LastError</title> -<indexterm><primary>LastError</primary> -<secondary>DlgAreaU class</secondary></indexterm> -<programlisting> -<![CDATA[ ->>--ADlgAreaU~LastError----------------------------------------------->< -]]> -</programlisting> - -<para>An attribute holding the details if an error was encountered when parsing -the calling dialog's DefineDialog method. The value of the attribute is .nil if -no error occurred. -</para> -</section> - -<section id="dlgareaunomove"><title>NoMove</title> -<indexterm><primary>NoMove</primary> -<secondary>DlgAreaU class</secondary></indexterm> -<programlisting> -<![CDATA[ ->>--ADlgAreaU~NoMove-------------------------------------------------->< -]]> -</programlisting> - -<para>An attribute holding the set of Dialog Ids of widgets not to be moved -during a resize event. -</para> -</section> - -<section id="dlgareaunoresize"><title>NoResize</title> -<indexterm><primary>NoResize</primary> -<secondary>DlgAreaU class</secondary></indexterm> -<programlisting> -<![CDATA[ ->>--ADlgAreaU~NoResize------------------------------------------------>< -]]> -</programlisting> - -<para>An attribute holding the set of Dialog Ids of widgets not to be resized -during a resize event. -</para> -</section> -</section> - -<section id="dlgareaucreate"><title>Creating Resizeable Dialogs</title> -<indexterm><primary>Dynamically Resizable dialogs</primary> -<secondary>DlgAreaU class</secondary></indexterm> -<para>You can use the DlgAreaU Object to facilitate in creating dynamically -resizable Dialog objects, but to do so you must carefully satisfy all the -requirements below. -</para> -<para> -The Dialog must be created with the -<computeroutput>ThickFrame</computeroutput> option. -It may be created with the UserDialog Create method or CreateCenter method. -</para> -<para> -Your Dialog init method must include the line:</para> -<programlisting> -<![CDATA[ -self~connectResize("OnResize") -]]> -</programlisting> -<para> -Your DefineDialog method must start with these lines: -</para> -<programlisting> -<![CDATA[ -expose u -u = .dlgAreaU~new(self) /* whole dlg */ -]]> -</programlisting> -<para> -Your DefineDialog method must not reference variables within the Add Method -parameters, although you can use references to DlgArea attributes, so -</para> -<programlisting> -<![CDATA[ -Self~AddButton(23,1,5,6,"MyButton","Pressed") -self~addButton(14,b~x,b~y("10%"),b~w,b~h("9%"),"Button" 1,"Button"||1) -]]> -</programlisting> -<para> -Both are OK, whereas -</para> -<programlisting> -<![CDATA[ -/* Seven buttons evenly spaced at 10% intervals, 9% high */ -do i = 0 to 6 - self~addButton(12+i,b~x,b~y((i * 10)||"%"),b~w,b~h("9%"),"Button" i,"Button"||i) -end /* DO */ -]]> -</programlisting> -<para> -would now fail as the variable <computeroutput>i</computeroutput> -is referenced within the parameters. -</para> -<para> -To debug your DlgAreaU call/insert the following after the instantiation -</para> -<programlisting> -<![CDATA[ -if u~lastError \= .nil then call errormessage u~lastError -]]> -</programlisting> -<para>You must also include the following in your code.</para> -<programlisting> -<![CDATA[ -/* ------------------------------------------------------------------------- */ -::method OnResize -/* ------------------------------------------------------------------------- */ -expose u -if u~lastError \= .nil then call errormessage u~lastError -use arg dummy,sizeinfo - /* wait for last size event msg then resize */ -if self~PeekDialogMessage~left(8) \= "OnResize" then u~resize(self,sizeinfo) -]]> -</programlisting> -<para> -The DlgAreaU method will then automatically resize & place the following -widgets in your dialog when the dialog frame is dragged or the minimize, -maximise or restore buttons are pressed: -</para> -<table frame="all"> -<title>DlgAreaU Automatic Resize Elements</title> -<tgroup cols="4" align="left" colsep="1" rowsep="1"> -<tbody> -<row> - <entry>BLACKFRAME</entry> - <entry>BLACKRECT</entry> - <entry>BITMAPBUTTON</entry> - <entry>BUTTON</entry> -</row> -<row> - <entry>CHECKBOX</entry> - <entry>COMBOBOX</entry> - <entry>ENTRYLINE</entry> - <entry>GRAYFRAME</entry> -</row> -<row> - <entry>GRAYRECT</entry> - <entry>GROUPBOX</entry> - <entry>LISTBOX</entry> - <entry>LISTCONTROL</entry> -</row> -<row> - <entry>PASSWORDLINE</entry> - <entry>PROGRESSBAR</entry> - <entry>RADIOBUTTON</entry> - <entry>SCROLLBAR</entry> -</row> -<row> - <entry>SLIDERCONTROL</entry> - <entry>TABCONTROL</entry> - <entry>TEXT</entry> - <entry>TREECONTROL</entry> -</row> -<row> - <entry>WHITEFRAME</entry> - <entry>WHITERECT</entry> - <entry></entry> - <entry></entry> -</row> -</tbody> -</tgroup> -</table> -<para> -The following widgets can be defined in a UserDialog, but cannot be handled by -the DlgAreaU resize method, so should not be used. -</para> -<table frame="all"> -<title>DlgAreaU Non-Automatic Resize Elements</title> -<tgroup cols="4" align="left" colsep="1" rowsep="1"> -<tbody> -<row> - <entry>BUTTONGROUP</entry> - <entry>CHECKBOXSTEM</entry> - <entry>CHECKGROUP</entry> - <entry>COMBOINPUT</entry> -</row> -<row> - <entry>FULLSEQ</entry> - <entry>INPUT</entry> - <entry>INPUTGROUP</entry> - <entry>INPUTSTEM</entry> -</row> -<row> - <entry>OKCANCEL...</entry> - <entry>RADIOGROUP</entry> - <entry>RADIOSTEM</entry> - <entry></entry> -</row> -</tbody> -</tgroup> -</table> -<para> -All of these widgets can be achieved using combinations of the permitted -methods. -</para> -</section> - -<section id="dlgareaubug"><title>Possible Problems</title> -<para>The DlgAreaU resize method can create slightly over-size margins on the -left & bottom of the Dialog. To correct for this the DlgAreaU class has -a <link linkend="mthCorrectionFactor">CorrectionFactor </link> attribute set by -default to 1.05. In tests, this correction factor appears to neutralise the -effect. If your dialogs have over (or under) sized margins, you may be able to -correct this in your code by adjusting the Correction Factor. For example: -</para> -<programlisting> -<![CDATA[ -U=.DlgAreaU~new(self) -U~CorrectionFactor=1.07 -]]> -</programlisting> -<para>You will have to experiment to find the apropriate setting for this -attribute. -</para> -</section> - -<section id="dlgareausample"><title>Sample Code</title> -<programlisting> -<![CDATA[ -/* DlgAreaDemo.Rex -- Demonstrate DlgArea & DlgAreaU Classes -- Feb 2006 */ - -MyDlg=.MyDialog~new -MyDlg~execute("ShowTop") -MyDlg~DeInstall - -exit -::requires "OODWIN32.CLS" -/* ========================================================================= */ -::class MyDialog Subclass UserDialog -/* ========================================================================= */ -::method Init -/* ------------------------------------------------------------------------- */ - self~Init:super - rc=self~CreateCenter(250,250,"MyDialog","ThickFrame", ,"MS Sans Serif",8) - self~InitCode=(rc=0) - self~connectResize("OnResize") - -/* ------------------------------------------------------------------------- */ -::method DefineDialog -/* ------------------------------------------------------------------------- */ -expose u - -u=.dlgAreaU~new(self) /* whole dlg */ -if u~lastError \= .nil then call errormessage u~lastError -e=.dlgArea~new(u~x ,u~y ,u~w("70%"),u~h("90%")) /* edit area */ -s=.dlgArea~new(u~x ,u~y("90%"),u~w("70%"),u~hr ) /* status area */ -b=.dlgArea~new(u~x("70%"),u~y ,u~wr ,u~hr ) /* button area */ - -self~AddEntryLine(12,"text",e~x,e~y,e~w,e~h,"multiline") -self~AddText(s~x,s~y,s~w,s~h,"Status info appears here", ,11) - -self~addButton(13,b~x,b~y("00%"),b~w,b~h("9%"),"Button" 0,"Button"||0) -self~addButton(14,b~x,b~y("10%"),b~w,b~h("9%"),"Button" 1,"Button"||1) -self~addButton(15,b~x,b~y("20%"),b~w,b~h("9%"),"Button" 2,"Button"||2) -self~addButton(16,b~x,b~y("30%"),b~w,b~h("9%"),"Button" 3,"Button"||3) -self~addButton(17,b~x,b~y("40%"),b~w,b~h("9%"),"Button" 4,"Button"||4) -self~addButton(18,b~x,b~y("50%"),b~w,b~h("9%"),"Button" 5,"Button"||5) -self~addButton(19,b~x,b~y("60%"),b~w,b~h("9%"),"Button" 6,"Button"||6) -self~AddButton( 1,b~x,b~y("90%"),b~w,b~h("9%"),"Ok","Ok","DEFAULT") - -/* ------------------------------------------------------------------------- */ -::method Unknown -/* ------------------------------------------------------------------------- */ -use arg msgname, args -StatusLine = Self~GetStaticControl(11) -StatusLine~SetTitle("You Pressed" msgname) - -/* ------------------------------------------------------------------------- */ -::method OnResize -/* ------------------------------------------------------------------------- */ -expose u -use arg dummy,sizeinfo - /* wait for last size event msg then resize */ -if self~PeekDialogMessage~left(8) \= "OnResize" then u~resize(self,sizeinfo) - -]]> -</programlisting> -<para>This achieves the same dialog as the previous <link linkend="exampleDlgArea"> -DlgArea example</link>, but now it is resizable by dragging the frame. -</para> -</section> - -</chapter> Modified: docs/trunk/oodialog/oodialog.sgml =================================================================== --- docs/trunk/oodialog/oodialog.sgml 2008-12-03 21:22:10 UTC (rev 3745) +++ docs/trunk/oodialog/oodialog.sgml 2008-12-04 00:29:21 UTC (rev 3746) @@ -11,8 +11,8 @@ <!ENTITY plainuserdialogc SYSTEM "plainuserdialogc.sgml"> <!ENTITY resdialog SYSTEM "resdialog.sgml"> <!ENTITY categorydialog SYSTEM "categorydialog.sgml"> -<!ENTITY dlgareac SYSTEM "dlgareac.sgml"> <!ENTITY standarddialog SYSTEM "standarddialog.sgml"> +<!ENTITY utilityclasses SYSTEM "utilityclasses.sgml"> <!ENTITY mesextcl SYSTEM "mesextcl.sgml"> <!ENTITY advcntlc SYSTEM "advcntlc.sgml"> <!ENTITY staticcontrolc SYSTEM "staticcontrolc.sgml"> @@ -23,11 +23,10 @@ <!ENTITY comboboxc SYSTEM "comboboxc.sgml"> <!ENTITY scrollbarc SYSTEM "scrollbarc.sgml"> <!ENTITY propertysheetc SYSTEM "propertysheetc.sgml"> -<!ENTITY progressbarc SYSTEM "progressbarc.sgml"> +<!ENTITY progressbarc SYSTEM "progressbarc.sgml"> <!ENTITY slidercontrolc SYSTEM "slidercontrolc.sgml"> <!ENTITY tabcontrolc SYSTEM "tabcontrolc.sgml"> <!ENTITY treecontrolc SYSTEM "treecontrolc.sgml"> -<!ENTITY virtualkeycodesc SYSTEM "virtualkeycodesc.sgml"> <!ENTITY notices SYSTEM "../shared/notices.sgml"> <!ENTITY cpl SYSTEM "../shared/CPLv1.0.sgml"> <!ENTITY gethelp SYSTEM "../shared/gethelp.sgml"> @@ -97,9 +96,9 @@ &userdialog; <!-- UserDialog Class --> &plainuserdialogc; <!-- PlainUserDialog Class --> &resdialog; <!-- ResDialog Class --> -&categorydialog; <!-- CategoryDialog Class --> -&standarddialog; <!-- Standard Dialogs, External Functions, and Public Routines --> -&dlgareac; <!-- DlgArea and DlgAreaU Classess --> +&categorydialog; <!-- CategoryDialog Class --> +&standarddialog; <!-- Standard Dialogs, External Functions, and Public Routines --> +&utilityclasses; <!-- Utility Classess, DlgUtil, Point, DlgArea, etc.. --> &mesextcl; <!-- MessageExtensions Class --> &advcntlc; <!-- AdvancedControl Class --> &staticcontrolc; <!-- StaticControl Class --> @@ -114,7 +113,6 @@ &slidercontrolc; <!-- SliderControl Class --> &tabcontrolc; <!-- TabControl Class --> &treecontrolc; <!-- TreeControl Class --> -&virtualkeycodesc; <!-- VirtualKeyCodes Class --> <!-- start of appendix --> ¬ices; <!-- Notices --> &cpl; <!-- CPL --> Added: docs/trunk/oodialog/utilityclasses.sgml =================================================================== --- docs/trunk/oodialog/utilityclasses.sgml (rev 0) +++ docs/trunk/oodialog/utilityclasses.sgml 2008-12-04 00:29:21 UTC (rev 3746) @@ -0,0 +1,1462 @@ +<!--######################################################################### + # + # Description: Open Object Rexx: OODialog Reference SGML file. + # + # Copyright (c) 2005-2008, Rexx Language Association. All rights reserved. + # Portions Copyright (c) 2004, IBM Corporation. All rights reserved. + # + # This program and the accompanying materials are made available under + # the terms of the Common Public License v1.0 which accompanies this + # distribution. A copy is also available at the following address: + # http://www.oorexx.org/license.html + # + # Redistribution and use in source and binary forms, with or + # without modification, are permitted provided that the following + # conditions are met: + # + # Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # Redistributions in binary form must reproduce the above copyright + # notice, this list of conditions and the following disclaimer in + # the documentation and/or other materials provided with the distribution. + # + # Neither the name of Rexx Language Association nor the names + # of its contributors may be used to endorse or promote products + # derived from this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + # Author(s): + # W. David Ashley <da...@us...> + # + ######################################################################### +--> +<chapter id="utilityclasses"><title>Utility Classes</title> +<indexterm><primary>Utility Classes</primary></indexterm> +<para> + Utility classes provide ... +</para> +<para> + And ... +</para> +<para> + The classes in the following table are considered utility classes and are + described in this chapter: +<table id="tUtilityClasses" frame="all"> +<title>ooDialog Utilitiy Classes</title> +<tgroup cols="2"> +<thead> +<row> +<entry>Utility Class</entry> +<entry>Description</entry> +</row> +</thead> +<tbody> +<row> +<entry>Push Button</entry> +<entry><link linkend="buttoncontrolc">ButtonControl Class</link></entry> +</row> +<row> +<entry>Check Box Button</entry> +<entry><link linkend="checkboxc">CheckBox Class</link></entry> +</row> +<row> +<entry>Raido Button</entry> +<entry><link linkend="radiobuttonc">RadioButton Class</link></entry> +</row> +<row> +<entry>Group Box</entry> +<entry><link linkend="groupboxc">GroupBox Class</link></entry> +</row> +<row> +<entry>Owner Drawn Button</entry> +<entry><link linkend="anibut">AnimatedButton Class</link>, +<link linkend="buttoncontrolc">ButtonControl Class</link></entry> +</row> +</tbody></tgroup> +</table> +</para> + + +<section id="dialogareac"><title>DlgArea and DlgAreaU Classes</title> +<indexterm><primary>DlgArea, DlgAreaU classes</primary></indexterm> +<para>The DlgArea class provides assistance in laying out the dialog controls in +a dynamically defined dialog. The DlgAreaU class provides assistance in +resizing and / or positioning controls when a dialog is resized. Used together, +the two classes provide a convenient way to create resizable dialogs. +</para> +<section id="dlgareacls"><title>DlgArea Class</title> +<indexterm><primary>DlgArea class</primary></indexterm> +<para>The DlgArea class defines an area of a UserDialog and provides co-ordinates of and within it. +It is a helper for the DefineDialog Method of an OODialog UserDialog Object and has no effect on any Windows Object. +</para> +<para>To use objects of the DlgArea class include this line in your code: +</para> +<programlisting> +::requires "OODIALOG.CLS" +</programlisting> +<para>The following figure shows the measuement attributes used to position a +DlgArea on a UserDialog.</para> +<figure id="dlgareafig"><title>DlgArea Measurements</title> +<mediaobject> +<imageobject> +<!-- Note! - if we include a /imagedata tag we get an error for DSSSL! --> +<imagedata fileref="dlgarea.jpg" scale="300"> +</imageobject> +</mediaobject> +</figure> + +<section id="dlgareainit"><title>Init</title> +<indexterm><primary>Init</primary> +<secondary>DlgArea class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>- aDlgArea~Init(--X--,--Y--,--Width--,--Height--+-------------+--)-->< + +--,--Margin--+ +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments you pass to the new method when creating a +DlgArea Object are: +<variablelist> +<varlistentry><term>X</term> +<listitem><para>The X Co-ordinate in dialog units relative to the UserDialog +of the top left corner of the area you wish to define +</para></listitem></varlistentry> +<varlistentry><term>Y</term> +<listitem><para>The Y Co-ordinate in dialog units relative to the UserDialog +of the top left corner of the area you wish to define. +</para></listitem></varlistentry> +<varlistentry><term>Width</term> +<listitem><para>The width in dialog units of the area of the UserDialog you +wish to define +</para></listitem></varlistentry> +<varlistentry><term>Height</term> +<listitem><para>The height in dialog units of the area of the UserDialog you +wish to define</para> +</listitem></varlistentry> +<varlistentry><term>Margin</term> +<listitem><para>An inner margin within the DlgArea in Dialog Units to be left +blank. The default is 5 +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para> +</para></listitem></varlistentry> +</variablelist> + +<programlisting> +<![CDATA[ +u = .dlgArea~new(0, 0, self~SizeX,Self~SizeY) /* u is whole of UserDialog */ +b = .dlgArea~new(u~x("70%"), u~y , u~w("R"), u~h("R")) /* sub area for buttons */ +]]> +</programlisting> +</section> + +<section id="dlgareab"><title>B</title> +<indexterm><primary>B</primary> +<secondary>DlgArea class</secondary></indexterm> +<para>Returns the y coordinate of the bottom margin in dialog units relative to +UserDialog. +</para> +<programlisting> +<![CDATA[ +>>--ADlgArea~B-------------------------------------------------------->< +]]> +</programlisting> + +<para></para> +</section> + +<section id="dlgareabottom"><title>Bottom</title> +<indexterm><primary>Bottom</primary> +<secondary>DlgArea class</secondary></indexterm> +<para>Returns the y coordinate of the bottom edge in dialog units relative to +UserDialog. +</para> +<programlisting> +<![CDATA[ +>>--ADlgArea~Bottom--------------------------------------------------->< +]]> +</programlisting> + +<para></para> +</section> + +<section id="dlgareacx"><title>CX</title> +<indexterm><primary>CX</primary> +<secondary>DlgArea class</secondary></indexterm> +<para>Synonym for the W method. +</para> +<programlisting> +<![CDATA[ +>>--ADlgArea~cx(--+-------+--)---------------------------------------->< + +--n%---+ + +--"R"--+ +]]> +</programlisting> + +<para></para> +</section> + +<section id="dlgareacy"><title>CY</title> +<indexterm><primary>CY</primary> +<secondary>DlgArea class</secondary></indexterm> +<para>Synonym for the H method. +</para> +<programlisting> +<![CDATA[ +>>--ADlgArea~cy(--+-------+--)---------------------------------------->< + +--n%---+ + +--"R"--+ +]]> +</programlisting> + +<para></para> +</section> + +<section id="dlgareah"><title>H</title> +<indexterm><primary>H</primary> +<secondary>DlgArea class</secondary></indexterm> +<para>Returns a height in dialog units relative to the dialog area. +</para> +<para>If no argument is passed returns the inter-margin height. +</para> +<programlisting> +<![CDATA[ +>>--ADlgArea~h(--+-------+--)----------------------------------------->< + +--n%---+ + +--"R"--+ +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments you pass to the H method are: +<variablelist> +<varlistentry><term>n%</term> +<listitem><para>If <computeroutput>n</computeroutput> is a percentage returns +<computeroutput>n%</computeroutput> of the inter-margin height. +</para></listitem></varlistentry> +<varlistentry><term>"R"</term> +<listitem><para>If "R" is passed returns Remaining height between last ~y and +bottom margin. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="dlgareahr"><title>HR</title> +<indexterm><primary>HR</primary> +<secondary>DlgArea class</secondary></indexterm> +<para>Returns the remaining height between last ~Y and bottom margin in dialog +units. This is equivalent to ~H("R"). +</para> +<programlisting> +<![CDATA[ +>>--ADlgArea~hr------------------------------------------------------->< +]]> +</programlisting> + +<para></para> +</section> + +<section id="dlgareal"><title>L</title> +<indexterm><primary>L</primary> +<secondary>DlgArea class</secondary></indexterm> +<para>Returns the x coordinate of the left margin in dialog units relative to +UserDialog. +</para> +<programlisting> +<![CDATA[ +>>--ADlgArea~L-------------------------------------------------------->< +]]> +</programlisting> + +<para></para> +</section> + +<section id="dlgarealeft"><title>Left</title> +<indexterm><primary>Left</primary> +<secondary>DlgArea class</secondary></indexterm> +<para>Returns the x coordinate of the left edge in dialog units relative to +UserDialog. +</para> +<programlisting> +<![CDATA[ +>>--ADlgArea~Left----------------------------------------------------->< +]]> +</programlisting> + +<para></para> +</section> + +<section id="dlgareamargin"><title>Margin</title> +<indexterm><primary>Margim</primary> +<secondary>DlgArea class</secondary></indexterm> +<para>Size in dialog units of DlgArea margin. +</para> +<programlisting> +<![CDATA[ +>>--ADlgArea~Margin--------------------------------------------------->< +]]> +</programlisting> + +<para></para> +</section> + +<section id="dlgarear"><title>R</title> +<indexterm><primary>R</primary> +<secondary>DlgArea class</secondary></indexterm> +<para>Returns the x coordinate of the right margin in dialog units relative to +UserDialog. +</para> +<programlisting> +<![CDATA[ +>>--ADlgArea~R-------------------------------------------------------->< +]]> +</programlisting> + +<para></para> +</section> + +<section id="dlgarearight"><title>Right</title> +<indexterm><primary>Right</primary> +<secondary>DlgArea class</secondary></indexterm> +<para>Returns the x coordinate of the right edge in dialog units relative to +UserDialog. +</para> +<programlisting> +<![CDATA[ +>>--ADlgArea~Right---------------------------------------------------->< +]]> +</programlisting> + +<para></para> +</section> + +<section id="dlgareat"><title>T</title> +<indexterm><primary>T</primary> +<secondary>DlgArea class</secondary></indexterm> +<para>Returns the y coordinate of the top margin in dialog units relative to +UserDialog. +</para> +<programlisting> +<![CDATA[ +>>--ADlgArea~T-------------------------------------------------------->< +]]> +</programlisting> + +<para></para> +</section> + +<section id="dlgareatop"><title>Top</title> +<indexterm><primary>Top</primary> +<secondary>DlgArea class</secondary></indexterm> +<para>Returns the y coordinate of the top edge in dialog units relative to +UserDialog. +</para> +<programlisting> +<![CDATA[ +>>--ADlgArea~Top------------------------------------------------------>< +]]> +</programlisting> + +<para></para> +</section> + +<section id="dlgareaw"><title>W</title> +<indexterm><primary>W</primary> +<secondary>DlgArea class</secondary></indexterm> +<para>Returns a width in dialog units relative to the dialog area. +</para> +<para>If no argument is passed returns the inter-margin width. +</para> +<programlisting> +<![CDATA[ +>>--ADlgArea~w(--+-------+--)----------------------------------------->< + +--n%---+ + +--"R"--+ +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments you pass to the Y method are: +<variablelist> +<varlistentry><term>n%</term> +<listitem><para>If <computeroutput>n</computeroutput> is a percentage returns +<computeroutput>n%</computeroutput> of the inter-margin width. +</para></listitem></varlistentry> +<varlistentry><term>"R"</term> +<listitem><para>If "R" is passed returns Remaining width between last ~x and +right margin. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="dlgareawr"><title>WR</title> +<indexterm><primary>WR</primary> +<secondary>DlgArea class</secondary></indexterm> +<para>Returns the remaining width between last ~X and right margin in dialog +units. This is equivalent to ~W("R"). +</para> +<programlisting> +<![CDATA[ +>>--ADlgArea~wr------------------------------------------------------->< +]]> +</programlisting> + +<para></para> +</section> + +<section id="dlgareax"><title>X</title> +<indexterm><primary>X</primary> +<secondary>DlgArea class</secondary></indexterm> +<para>Returns an X Coordinate in dialog units relative to the dialog area. +</para> +<para>If no <computeroutput>n</computeroutput> is passed returns the x +coordinate of the left margin. +</para> +<programlisting> +<![CDATA[ +>>--ADlgArea~x(--+------+--)------------------------------------------>< + +--n---+ + +--n%--+ +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments you pass to the X method are: +<variablelist> +<varlistentry><term>n</term> +<listitem><para>If <computeroutput>n</computeroutput> is passed and is positive, +then returns the x coordinate <computeroutput>n</computeroutput> dialog units +to the right of the left margin. +If <computeroutput>n</computeroutput> is passed and is negative, then returns +the x coordinate <computeroutput>n</computeroutput> dialog units to the left of +the right margin.. +</para></listitem></varlistentry> +<varlistentry><term>n%</term> +<listitem><para>If <computeroutput>n</computeroutput> is passed and is a +percentage, then returns the x coordinate <computeroutput>n%</computeroutput> +of the way between the left and right margins. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="dlgareay"><title>Y</title> +<indexterm><primary>Y</primary> +<secondary>DlgArea class</secondary></indexterm> +<para>Returns an Y Coordinate in dialog units relative to the dialog area. +</para> +<para>If no <computeroutput>n</computeroutput> is passed returns the x +coordinate of the top margin. +</para> +<programlisting> +<![CDATA[ +>>--ADlgArea~y(--+------+--)------------------------------------------>< + +--n---+ + +--n%--+ +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments you pass to the Y method are: +<variablelist> +<varlistentry><term>n</term> +<listitem><para>If <computeroutput>n</computeroutput> is passed and is positive, +then returns the y coordinate <computeroutput>n</computeroutput> dialog units +below the topmargin. +If <computeroutput>n</computeroutput> is passed and is negative, then returns +the y coordinate <computeroutput>n</computeroutput> dialog units above +the bottom margin.. +</para></listitem></varlistentry> +<varlistentry><term>n%</term> +<listitem><para>If <computeroutput>n</computeroutput> is passed and is a +percentage, then returns the y coordinate <computeroutput>n%</computeroutput> +of the way between the top and bottom margins. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="exampleDlgArea"><title>DlgArea Example</title> +<para>On a UserDialog we want the top left to be an entry area, with an area +for buttons on the right and a status area below.</para> +<para>We decide to give 70% of the width and 90% of the height to the entry area. +We leave the margin as the default. +We want all the areas to resize themselves if we change the UserDialog size +except the OK button should remain 15 units high.</para> +<figure id="dlgareaplanfig"><title>DlgArea Plan</title> +<mediaobject> +<imageobject> +<!-- Note! - if we include a /imagedata tag we get an error for DSSSL! --> +<imagedata fileref="dlgareaplan.jpg" scale="300"> +</imageobject> +</mediaobject> +</figure> +<para>Here is what our DefineDialog method might look like:</para> +<programlisting> +<![CDATA[ +/* ------------------------------------------------------------------------- */ +::method DefineDialog +/* ------------------------------------------------------------------------- */ +/* define DlgArea named u as whole of user dialog */ +u=.dlgArea~new( 0 , 0,self~SizeX,Self~SizeY) /* whole dlg */ + +/* define DlgArea named e within DlgArea u for entry line */ +e=.dlgArea~new(u~x ,u~y ,u~w("70%"),u~h("90%")) + +/* define DlgArea named s within DlgArea u for Status Area in remaining height*/ +s=.dlgArea~new(u~x ,u~y("90%"),u~w("70%"),u~hr ) + +/* define DlgArea named b within DlgArea u for Button area */ +b=.dlgArea~new(u~x("70%"),u~y ,u~wr ,u~hr ) + +/* entry line coterminous with area e margins */ +self~AddEntryLine(12,"text",e~x,e~y,e~w,e~h,"multiline") + +/* Status Area Coterminous with area s margins */ +self~AddText(s~x,s~y,s~w,s~h,"Status info appears here",11) + +/* Seven buttons evenly spaced at 10% intervals, 9% high */ +do i = 0 to 6 + self~addButton(12+i,b~x,b~y((i * 10)||"%"),b~w,b~h("9%"),"Button" i,"Button"||i) +end /* DO */ + +/* ok button 15 dialog units high at bott... [truncated message content] |
From: <mie...@us...> - 2008-12-04 04:30:39
|
Revision: 3747 http://oorexx.svn.sourceforge.net/oorexx/?rev=3747&view=rev Author: miesfeld Date: 2008-12-04 04:30:34 +0000 (Thu, 04 Dec 2008) Log Message: ----------- Continue ooDialog doc update Modified Paths: -------------- docs/trunk/oodialog/basedialog.sgml docs/trunk/oodialog/buttoncontrols.sgml docs/trunk/oodialog/utilityclasses.sgml Modified: docs/trunk/oodialog/basedialog.sgml =================================================================== --- docs/trunk/oodialog/basedialog.sgml 2008-12-04 00:29:21 UTC (rev 3746) +++ docs/trunk/oodialog/basedialog.sgml 2008-12-04 04:30:34 UTC (rev 3747) @@ -2364,7 +2364,7 @@ </para> <para>The keys are specified by the numeric value defined by Microsoft for its virtual key set. These numeric values are 0 through 255, although both 0 and -255 are not used. The <link linkend="virtualkeycodesc">VirtualKeyCodes</link> +255 are not used. The <link linkend="clsVirtualKeyCodes">VirtualKeyCodes</link> class can be used to make a program more readable. </para> <note><title>Note</title> Modified: docs/trunk/oodialog/buttoncontrols.sgml =================================================================== --- docs/trunk/oodialog/buttoncontrols.sgml 2008-12-04 00:29:21 UTC (rev 3746) +++ docs/trunk/oodialog/buttoncontrols.sgml 2008-12-04 04:30:34 UTC (rev 3747) @@ -241,7 +241,7 @@ <para> The push method simulates the user pushing the associated button control. It - allows an ooRexx programmer to produce the exact same behavior from within, an + allows an ooRexx programmer to produce the exact same behavior from within an ooDialog program, as the behavior produced by the user pushing the button in the dialog. </para> @@ -288,7 +288,7 @@ <para> The click method programmatically clicks the associated button control. It simulates the user pusing the button and produces exactly the same behavior as - if the user had click on the button. + if the user had clicked on the button with the mouse. </para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> Modified: docs/trunk/oodialog/utilityclasses.sgml =================================================================== --- docs/trunk/oodialog/utilityclasses.sgml 2008-12-04 00:29:21 UTC (rev 3746) +++ docs/trunk/oodialog/utilityclasses.sgml 2008-12-04 04:30:34 UTC (rev 3747) @@ -44,12 +44,11 @@ <chapter id="utilityclasses"><title>Utility Classes</title> <indexterm><primary>Utility Classes</primary></indexterm> <para> - Utility classes provide ... + The ooDialog framework provides a number of utility classes that are useful + when writing more complex programs. These classes do not easily fit into the + category of a type of dialog or a type of dialog control. </para> <para> - And ... -</para> -<para> The classes in the following table are considered utility classes and are described in this chapter: <table id="tUtilityClasses" frame="all"> @@ -63,42 +62,364 @@ </thead> <tbody> <row> -<entry>Push Button</entry> -<entry><link linkend="buttoncontrolc">ButtonControl Class</link></entry> +<entry>DlgArea Class</entry> +<entry><link linkend="clsDlgArea">DlgArea Class</link></entry> </row> <row> -<entry>Check Box Button</entry> -<entry><link linkend="checkboxc">CheckBox Class</link></entry> +<entry>DlgAreaU Class</entry> +<entry><link linkend="clsDlgAreaU">DlgAreaU Class</link></entry> </row> <row> -<entry>Raido Button</entry> -<entry><link linkend="radiobuttonc">RadioButton Class</link></entry> +<entry>DlgUtil Class</entry> +<entry><link linkend="clsDlgUtil">DlgUtil Class</link></entry> </row> <row> -<entry>Group Box</entry> -<entry><link linkend="groupboxc">GroupBox Class</link></entry> +<entry>Point Class</entry> +<entry><link linkend="clsPoint">Point Class</link></entry> </row> <row> -<entry>Owner Drawn Button</entry> -<entry><link linkend="anibut">AnimatedButton Class</link>, -<link linkend="buttoncontrolc">ButtonControl Class</link></entry> +<entry>Rect Class</entry> +<entry><link linkend="clsRect">Rect Class</link></entry> </row> +<row> +<entry>VirtualKeyCodes Class</entry> +<entry><link linkend="clsVirtualKeyCodes">VirtualKeyCodes Class</link></entry> +</row> </tbody></tgroup> </table> </para> -<section id="dialogareac"><title>DlgArea and DlgAreaU Classes</title> -<indexterm><primary>DlgArea, DlgAreaU classes</primary></indexterm> -<para>The DlgArea class provides assistance in laying out the dialog controls in -a dynamically defined dialog. The DlgAreaU class provides assistance in -resizing and / or positioning controls when a dialog is resized. Used together, -the two classes provide a convenient way to create resizable dialogs. +<section id="clsDlgUtil"><title>DlgUtil Class</title> +<indexterm><primary>DlgUtil class</primary></indexterm> +<para> + All the methods of the DlgUitl class are class methods, there are no instance + methods for this class. The class methods are a collection of common + utilities, mostly for converting different Windows values, getting version + information, and the like. </para> -<section id="dlgareacls"><title>DlgArea Class</title> +<variablelist> +<varlistentry><term>Requires:</term> +<listitem><para>The DlgUtil class requires the class definition file +<computeroutput>oodPlain.cls</computeroutput>: +<programlisting> +<![CDATA[ +::requires "oodPlain.cls" +]]> +</programlisting> +</para></listitem></varlistentry> +<varlistentry><term>Methods:</term> +<listitem> +<para> + Instances of the DlgUtil class implement the methods listed in the following + table: +</para> +<table id="tblDlgUtilMethods" frame="all"> +<title>Name Instance Methods</title> +<tgroup cols="2"> +<thead> +<row> +<entry>Method...</entry> +<entry>...on page</entry> +</row> +</thead> +<tbody> +<row> +<entry>version</entry> +<entry><link linkend="mthVersion">version</link></entry> +</row> +<row> +<entry>comctl32Version</entry> +<entry><link linkend="mthcomctl32Version">comctl32Version</link></entry> +</row> +</tbody></tgroup> +</table> +</listitem></varlistentry> +</variablelist> + + +<section id="mthVersion"><title>version</title> +<indexterm><primary>version</primary></indexterm> +<programlisting> +<![CDATA[ +>>-.DlgUtil~version---------------------------------------->< + +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>There are no arguments for this method. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem> +<para> + A string specifying the version of ooDialog. The string has the format: + <computeroutput>ooDialog Version x.x.x.SS (an ooRexx Windows + Extension)</computeroutput> where x.x.x is the ooRexx interpreter version and + SS is the Subversion revision number of the build. The actual version string + might look like: <computeroutput>ooDialog Version 4.0.0.3734 (an ooRexx Windows + Extension)</computeroutput> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para> +<programlisting> +<![CDATA[ + v = .DlgUtil~version + say v + +::requires 'oodPlain.cls' + +/* Out put could be: + * ooDialog Version 4.0.0.3735 (an ooRexx Windows Extension) + */ +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + + +<section id="mthcomctl32Version"><title>comctl32Version</title> +<indexterm><primary>comctl32Version</primary></indexterm> +<programlisting> +<![CDATA[ +>>-.DlgUtil~comctl32Version-------------------------------->< + + +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments are: +<variablelist> +<varlistentry><term>x</term> +<listitem><para>xx. +</para></listitem></varlistentry> +<varlistentry><term>y</term> +<listitem><para>yyy, +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The possible return values are: +<variablelist> +<varlistentry><term>0</term> +<listitem><para>Success +</para></listitem></varlistentry> +<varlistentry><term>-1</term> +<listitem><para>Some error. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>This example ... +<programlisting> +<![CDATA[ +x = y +return 0 +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> +</section> + +<section id="clsRect"><title>Rect Class</title> +<indexterm><primary>Rect class</primary></indexterm> +<para> + A ... is .. +</para> +<para> +</para> +<variablelist> +<varlistentry><term>Requires:</term> +<listitem><para>The Name class requires the class +definition file <computeroutput>name.cls</computeroutput>: +<programlisting> +<![CDATA[ +::requires "name.cls" +]]> +</programlisting> +</para></listitem></varlistentry> +<varlistentry><term>Methods:</term> +<listitem> +<para> + Instances of the Name class implement the methods listed in the following + table: +</para> + +<table id="tblRectMethods" frame="all"> +<title>Rect Instance Methods</title> +<tgroup cols="2"> +<thead> +<row> +<entry>Method...</entry> +<entry>...on page</entry> +</row> +</thead> +<tbody> +<row> +<entry>init</entry> +<entry><link linkend="mthInitClsRect">init</link></entry> +</row> +</tbody></tgroup> +</table> +</listitem></varlistentry> +</variablelist> + + +<section id="mthInitClsRect"><title>init</title> +<indexterm><primary>init</primary> +<secondary>Rect class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aRect~init(--------------------------)------------------>< + +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments are: +<variablelist> +<varlistentry><term>x</term> +<listitem><para>xx. +</para></listitem></varlistentry> +<varlistentry><term>y</term> +<listitem><para>yyy, +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The possible return values are: +<variablelist> +<varlistentry><term>0</term> +<listitem><para>Success +</para></listitem></varlistentry> +<varlistentry><term>-1</term> +<listitem><para>Some error. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>This example ... +<programlisting> +<![CDATA[ +x = y +return 0 +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> +</section> <!-- End Rect Class --> + + +<chapter id="clsPoint"><title>Point Class</title> +<indexterm><primary>Point class</primary></indexterm> +<para> + A ... is .. +</para> +<para> +</para> +<variablelist> +<varlistentry><term>Requires:</term> +<listitem><para>The Name class requires the class +definition file <computeroutput>name.cls</computeroutput>: +<programlisting> +<![CDATA[ +::requires "name.cls" +]]> +</programlisting> +</para></listitem></varlistentry> +<varlistentry><term>Methods:</term> +<listitem> +<para> + Instances of the Name class implement the methods listed in the following + table: +</para> + +<table id="tblPointMeth" frame="all"> +<title>Name Instance Methods</title> +<tgroup cols="2"> +<thead> +<row> +<entry>Method...</entry> +<entry>...on page</entry> +</row> +</thead> +<tbody> +<row> +<entry>init</entry> +<entry><link linkend="mthInitClsPoint">init</link></entry> +</row> +</tbody></tgroup> +</table> +</listitem></varlistentry> +</variablelist> + + +<section id="mthInitClsPoint"><title>init</title> +<indexterm><primary>init</primary> +<secondary>Point class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aPoint~init(-------------------------)------------------>< + +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments are: +<variablelist> +<varlistentry><term>x</term> +<listitem><para>xx. +</para></listitem></varlistentry> +<varlistentry><term>y</term> +<listitem><para>yyy, +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The possible return values are: +<variablelist> +<varlistentry><term>0</term> +<listitem><para>Success +</para></listitem></varlistentry> +<varlistentry><term>-1</term> +<listitem><para>Some error. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>This example ... +<programlisting> +<![CDATA[ +x = y +return 0 +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> +</section> <!-- End Point Class --> + + +<section id="clsDlgArea"><title>DlgArea Class</title> <indexterm><primary>DlgArea class</primary></indexterm> -<para>The DlgArea class defines an area of a UserDialog and provides co-ordinates of and within it. -It is a helper for the DefineDialog Method of an OODialog UserDialog Object and has no effect on any Windows Object. +<para> + The DlgArea class provides assistance in laying out the dialog controls in a + dynamically defined dialog. The class defines an area of a UserDialog and + provides co-ordinates of and within it. It is a helper for the DefineDialog + Method of an OODialog UserDialog Object and has no effect on any Windows + Object. </para> <para>To use objects of the DlgArea class include this line in your code: </para> @@ -567,10 +888,14 @@ </section> </section> -<section id="dlgareaucls"><title>DlgAreaU Class</title> +<section id="clsDlgAreaU"><title>DlgAreaU Class</title> <indexterm><primary>DlgAreaU class</primary></indexterm> -<para>The DlgAreaU class is a subclass of the DlgArea class that assists the -creation of dynamically resizable Dialogs. +<para> + The DlgAreaU class is a subclass of the DlgArea class that assists the + creation of dynamically resizable Dialogs. This class provides assistance in + resizing and / or positioning controls when a dialog is resized. When the + DlgArea and DlgAreaU classes are used together, the they provide a convenient + way to create resizable dialogs. </para> <para>To use objects of the DlgAreaU class include this line in your code: </para> @@ -674,7 +999,6 @@ during a resize event. </para> </section> -</section> <section id="dlgareaucreate"><title>Creating Resizeable Dialogs</title> <indexterm><primary>Dynamically Resizable dialogs</primary> @@ -919,13 +1243,14 @@ </section> </section> -<section id="virtualkeycodesc"><title>VirtualKeyCodes Class</title> +<section id="clsVirtualKeyCodes"><title>VirtualKeyCodes Class</title> <indexterm><primary>VirtualKeyCodes class</primary></indexterm> -<para>The methods of the VirtualKeyCodes class can be -used for all objects of the WindowsProgramManager and WindowObject classes. -These classes inherit from the VirtualKeyCodes class. -The VirtualKeyCodes class cannot be used as a standalone -class.</para> +<para> + The methods of the VirtualKeyCodes class can be used for all objects of the + WindowsProgramManager and WindowObject classes. These classes inherit from the + VirtualKeyCodes class. The VirtualKeyCodes class cannot be used as a + standalone class. +</para> <para>The VirtualKeyCodes class requires the class definition file <computeroutput>WinSystm.cls</computeroutput>:</para> <programlisting> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2008-12-04 23:44:11
|
Revision: 3751 http://oorexx.svn.sourceforge.net/oorexx/?rev=3751&view=rev Author: miesfeld Date: 2008-12-04 23:44:07 +0000 (Thu, 04 Dec 2008) Log Message: ----------- Continue ooDialog doc update Modified Paths: -------------- docs/trunk/oodialog/buttoncontrols.sgml docs/trunk/oodialog/termdef.sgml docs/trunk/oodialog/utilityclasses.sgml Modified: docs/trunk/oodialog/buttoncontrols.sgml =================================================================== --- docs/trunk/oodialog/buttoncontrols.sgml 2008-12-04 23:36:59 UTC (rev 3750) +++ docs/trunk/oodialog/buttoncontrols.sgml 2008-12-04 23:44:07 UTC (rev 3751) @@ -632,7 +632,10 @@ <varlistentry><term>NOTIFY</term> <listitem><para>Enables a button to send the kill focus and set focus messages. See the <link linkend="connectbuttonnotify">ConnectButtonNotify</link> method - of the <link linkend="mesextcl">MessageExtensions Class</link>. + of the <link linkend="mesextcl">MessageExtensions Class</link>. If the button + does not have this style, kill and set focus events will not be received, if + the programmer does <computeroutput>connectButtonNotify()</computeroutput> to + connect those events. </para></listitem></varlistentry> <varlistentry><term>FLAT</term> <listitem><para>Gives the button a flat appearance. This style is not @@ -698,33 +701,34 @@ <secondary>ButtonControl class</secondary></indexterm> <programlisting> <![CDATA[ ->>-aButtonControl~getIdealSize(--x--,--y--)------------------>< +>>-aButtonControl~getIdealSize------------------------------->< - ]]> </programlisting> - -<para></para> +<para> + This method queries the button control for its ideal size. The ideal size is + the size that best fits its text or image. (If the button has an image list.) +</para> <variablelist> +<varlistentry><term><emphasis role="bold">ComCtl32 dependent </emphasis></term> +<listitem> +<para> + This method requires <link linkend="comctl32">Common Control Library</link> + version 6.0 or later. If necessary use the <link + linkend="mthComCtl32Version">comCtl32Version</link>() method to determine the + current version of the library. +</para></listitem></varlistentry> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments are: -<variablelist> -<varlistentry><term>x</term> -<listitem><para>xx. +<listitem><para>This method has no arguments. </para></listitem></varlistentry> -<varlistentry><term>y</term> -<listitem><para>yyy, -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem><para>The possible return values are: <variablelist> -<varlistentry><term>0</term> -<listitem><para>Success +<varlistentry><term>A <link linkend="clsSize">.Size</link> object</term> +<listitem><para>The ideal size for the button. </para></listitem></varlistentry> -<varlistentry><term>-1</term> -<listitem><para>Some error. +<varlistentry><term>The <computeroutput>.nil</computeroutput> object</term> +<listitem><para>Some unanticipated error. This is very unlikely. </para></listitem></varlistentry> </variablelist> </para></listitem></varlistentry> Modified: docs/trunk/oodialog/termdef.sgml =================================================================== --- docs/trunk/oodialog/termdef.sgml 2008-12-04 23:36:59 UTC (rev 3750) +++ docs/trunk/oodialog/termdef.sgml 2008-12-04 23:44:07 UTC (rev 3751) @@ -228,6 +228,38 @@ a button; it must be explicitly freed when the text or graphic operations are completed. </para></listitem></varlistentry> +<varlistentry><term id="comctl32">Common Controls Library (ComCtl32)</term> +<listitem> +<para> The dialog control windows used in dialogs, List-Views, Edit, + Tree-Views, etc., are supplied by Microsoft in the common controls library. + This is a DLL with the name comctl32.dll. Every version of Windows is + supplied with a common controls library. However, Microsoft has updated the + library a number of times to provide enhanced functionality and improved + features +</para> +<para> + Each new version of the library is backwards compatible with previous + versions, but will contain features not available in older versions. For + instance, some of the List-View <link linkend="listControlExtendedStyles"> + extended styles</link> are only available with a 6.0, or later, version of the + common controls library. ooDialog can only provide the features available in + the version of the common controls libray on the system ooDialog is running + on. +</para> +<para> + Therefore, an ooDialog program running on a Windows 2000 machine will not have + available some of the features that are available when ooDialog is running on + a XP service pack two system. The DlgUtil class provides a method, <link + linkend="mthComCtl32Version">comCtl32Version</link> that allows the programmer + to determine the exact version of the common controls library that ooDialog is + using. In the documentation for the ooDialog dialog control classes, features + that are not available in all versions of the common control library are + noted. The minimum version of the library that is needed is listed. In + general, at this time, all features of ooDialog are avaialable on Windows XP + or later. This may change in the future as Vista has common control features + not available on XP. +</para> +</listitem></varlistentry> <varlistentry><term>pixel</term> <listitem><para>Individual addressable point within a window. VGA screens support 640 by 480 pixels, SVGA screens support higher resolutions, such as 800 by 600, Modified: docs/trunk/oodialog/utilityclasses.sgml =================================================================== --- docs/trunk/oodialog/utilityclasses.sgml 2008-12-04 23:36:59 UTC (rev 3750) +++ docs/trunk/oodialog/utilityclasses.sgml 2008-12-04 23:44:07 UTC (rev 3751) @@ -94,9 +94,9 @@ <indexterm><primary>DlgUtil class</primary></indexterm> <para> All the methods of the DlgUitl class are class methods, there are no instance - methods for this class. The class methods are a collection of common - utilities, mostly for converting different Windows values, getting version - information, and the like. + methods, other than inherited methods, for this class. The class methods are + a collection of common utilities, mostly for converting different Windows + values, getting version information, and the like. </para> <variablelist> <varlistentry><term>Requires:</term> @@ -111,26 +111,25 @@ <varlistentry><term>Methods:</term> <listitem> <para> - Instances of the DlgUtil class implement the methods listed in the following - table: + The class methods of DlgUtil are listed in the following table: </para> <table id="tblDlgUtilMethods" frame="all"> -<title>Name Instance Methods</title> +<title>Methods of the DlgUtil class</title> <tgroup cols="2"> <thead> <row> <entry>Method...</entry> -<entry>...on page</entry> +<entry>...description</entry> </row> </thead> <tbody> <row> -<entry>version</entry> +<entry>version (Class Method)</entry> <entry><link linkend="mthVersion">version</link></entry> </row> <row> -<entry>comctl32Version</entry> -<entry><link linkend="mthcomctl32Version">comctl32Version</link></entry> +<entry>comCtl32Version (Class Method)</entry> +<entry><link linkend="mthComCtl32Version">comCtl32Version</link></entry> </row> </tbody></tgroup> </table> @@ -138,7 +137,7 @@ </variablelist> -<section id="mthVersion"><title>version</title> +<section id="mthVersion"><title>version (Class Method)</title> <indexterm><primary>version</primary></indexterm> <programlisting> <![CDATA[ @@ -147,7 +146,7 @@ ]]> </programlisting> -<para></para> +<para>Returns the ooDialog version string.</para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem><para>There are no arguments for this method. @@ -156,11 +155,11 @@ <listitem> <para> A string specifying the version of ooDialog. The string has the format: - <computeroutput>ooDialog Version x.x.x.SS (an ooRexx Windows - Extension)</computeroutput> where x.x.x is the ooRexx interpreter version and + <computeroutput>ooDialog Version x.x.x.SS (an ooRexx Windows Extension) + </computeroutput> where x.x.x is the ooRexx interpreter version and SS is the Subversion revision number of the build. The actual version string - might look like: <computeroutput>ooDialog Version 4.0.0.3734 (an ooRexx Windows - Extension)</computeroutput> + might look like: <computeroutput>ooDialog Version 4.0.0.3734 (an ooRexx + Windows Extension)</computeroutput> </para></listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem><para> @@ -171,8 +170,8 @@ ::requires 'oodPlain.cls' -/* Out put could be: - * ooDialog Version 4.0.0.3735 (an ooRexx Windows Extension) +/* On the screen you might see: + * ooDialog Version 4.0.0.3896 (an ooRexx Windows Extension) */ ]]> </programlisting> @@ -181,16 +180,117 @@ </section> -<section id="mthcomctl32Version"><title>comctl32Version</title> -<indexterm><primary>comctl32Version</primary></indexterm> +<section id="mthComCtl32Version"><title>comCtl32Version (Class Method)</title> +<indexterm><primary>comCtl32Version</primary></indexterm> <programlisting> <![CDATA[ ->>-.DlgUtil~comctl32Version-------------------------------->< +>>-.DlgUtil~comCtl32Version-------------------------------->< ]]> </programlisting> +<para> + Use this method to determine the version of the<link linkend="comctl32"> + Common Controls Library</link> used by ooDialog on the current system. +</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>There are no arguments to this method. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem> +<para> + This method returns a string in the format <computeroutput>comctl32.dll + version 6.0 (XP)</computeroutput>. The version number is the version number + of the common controls library. The Windows version name in parenthesis is + the minimum operating system that includes this version. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem> +<para> + In the following example, the programmer repositions the dialog controls under + certain conditions. In Windows XP and later, this task is made easier by + using the <computeroutput>getIdealSize()</computeroutput> method of the + ButtonControl class. However, the programmer needs the program to also run on + Windows 2000. He uses the <computeroutput>comCtl32Version()</computeroutput> + method to determine if the <computeroutput>getIdealSize()</computeroutput> + method is available. +<programlisting> +<![CDATA[ +::method repositionControls + + parse value .DlgUtil~comCtl32Version with . . v . + + if v < 6.0 then return self~doW2KReposition + + size = self~getButtonControl(IDC_CHECK_TWO)~getIdealSize + if size == .nil then return .false + + -- do the repositioning + +return .true +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> +</section> + +<section id="clsRect"><title>Rect Class</title> +<indexterm><primary>Rect class</primary></indexterm> +<para> + A ... is .. +</para> +<para> +</para> +<variablelist> +<varlistentry><term>Requires:</term> +<listitem><para>The Name class requires the class +definition file <computeroutput>name.cls</computeroutput>: +<programlisting> +<![CDATA[ +::requires "name.cls" +]]> +</programlisting> +</para></listitem></varlistentry> +<varlistentry><term>Methods:</term> +<listitem> +<para> + Instances of the Name class implement the methods listed in the following + table: +</para> + +<table id="tblRectMethods" frame="all"> +<title>Rect Instance Methods</title> +<tgroup cols="2"> +<thead> +<row> +<entry>Method...</entry> +<entry>...on page</entry> +</row> +</thead> +<tbody> +<row> +<entry>init</entry> +<entry><link linkend="mthInitClsRect">init</link></entry> +</row> +</tbody></tgroup> +</table> +</listitem></varlistentry> +</variablelist> + + +<section id="mthInitClsRect"><title>init</title> +<indexterm><primary>init</primary> +<secondary>Rect class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aRect~init(--------------------------)------------------>< + +]]> +</programlisting> + <para></para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> @@ -226,10 +326,11 @@ </para></listitem></varlistentry> </variablelist> </section> -</section> +</section> <!-- End Rect Class --> -<section id="clsRect"><title>Rect Class</title> -<indexterm><primary>Rect class</primary></indexterm> + +<section id="clsPoint"><title>Point Class</title> +<indexterm><primary>Point class</primary></indexterm> <para> A ... is .. </para> @@ -237,23 +338,23 @@ </para> <variablelist> <varlistentry><term>Requires:</term> -<listitem><para>The Name class requires the class -definition file <computeroutput>name.cls</computeroutput>: +<listitem><para>The Point class requires the class definition file +<computeroutput>oodPlain.cls</computeroutput>: <programlisting> <![CDATA[ -::requires "name.cls" +::requires "oodPlain.cls" ]]> </programlisting> </para></listitem></varlistentry> <varlistentry><term>Methods:</term> <listitem> <para> - Instances of the Name class implement the methods listed in the following + Instances of the Point class implement the methods listed in the following table: </para> -<table id="tblRectMethods" frame="all"> -<title>Rect Instance Methods</title> +<table id="tblPointMethods" frame="all"> +<title>Point Class and Instance Methods</title> <tgroup cols="2"> <thead> <row> @@ -263,8 +364,8 @@ </thead> <tbody> <row> -<entry>init</entry> -<entry><link linkend="mthInitClsRect">init</link></entry> +<entry>new (Class Method)</entry> +<entry><link linkend="mthNewClsPoint">new</link></entry> </row> </tbody></tgroup> </table> @@ -272,12 +373,12 @@ </variablelist> -<section id="mthInitClsRect"><title>init</title> -<indexterm><primary>init</primary> -<secondary>Rect class</secondary></indexterm> +<section id="mthNewClsPoint"><title>new (Class Method)</title> +<indexterm><primary>new</primary> +<secondary>Point class</secondary></indexterm> <programlisting> <![CDATA[ ->>-aRect~init(--------------------------)------------------>< +>>-.Point~new(--------------------------)------------------>< ]]> </programlisting> @@ -317,11 +418,11 @@ </para></listitem></varlistentry> </variablelist> </section> -</section> <!-- End Rect Class --> +</section> <!-- End Point Class --> -<section id="clsPoint"><title>Point Class</title> -<indexterm><primary>Point class</primary></indexterm> +<section id="clsSize"><title>Size Class</title> +<indexterm><primary>Size class</primary></indexterm> <para> A ... is .. </para> @@ -329,23 +430,23 @@ </para> <variablelist> <varlistentry><term>Requires:</term> -<listitem><para>The Name class requires the class -definition file <computeroutput>name.cls</computeroutput>: +<listitem><para>The Size class requires the class +definition file <computeroutput>oodPlain.cls</computeroutput>: <programlisting> <![CDATA[ -::requires "name.cls" +::requires "oodPlain.cls" ]]> </programlisting> </para></listitem></varlistentry> <varlistentry><term>Methods:</term> <listitem> <para> - Instances of the Name class implement the methods listed in the following + Instances of the Size class implement the methods listed in the following table: </para> -<table id="tblPointMeth" frame="all"> -<title>Name Instance Methods</title> +<table id="tblSizeMethods" frame="all"> +<title>Size Class and Instance Methods</title> <tgroup cols="2"> <thead> <row> @@ -355,8 +456,8 @@ </thead> <tbody> <row> -<entry>init</entry> -<entry><link linkend="mthInitClsPoint">init</link></entry> +<entry>new (Class Method)</entry> +<entry><link linkend="mthNewClsSize">new</link></entry> </row> </tbody></tgroup> </table> @@ -364,12 +465,12 @@ </variablelist> -<section id="mthInitClsPoint"><title>init</title> -<indexterm><primary>init</primary> -<secondary>Point class</secondary></indexterm> +<section id="mthNewClsSize"><title>new (Class Method)</title> +<indexterm><primary>new</primary> +<secondary>Size class</secondary></indexterm> <programlisting> <![CDATA[ ->>-aPoint~init(-------------------------)------------------>< +>>-.Size~new(---------------------------)------------------>< ]]> </programlisting> @@ -409,7 +510,7 @@ </para></listitem></varlistentry> </variablelist> </section> -</section> <!-- End Point Class --> +</section> <!-- End Size Class --> <section id="clsDlgArea"><title>DlgArea Class</title> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2008-12-08 05:15:51
|
Revision: 3766 http://oorexx.svn.sourceforge.net/oorexx/?rev=3766&view=rev Author: miesfeld Date: 2008-12-08 05:15:47 +0000 (Mon, 08 Dec 2008) Log Message: ----------- Continue ooDialog doc update Modified Paths: -------------- docs/trunk/oodialog/buttoncontrols.sgml docs/trunk/oodialog/utilityclasses.sgml Modified: docs/trunk/oodialog/buttoncontrols.sgml =================================================================== --- docs/trunk/oodialog/buttoncontrols.sgml 2008-12-08 02:46:47 UTC (rev 3765) +++ docs/trunk/oodialog/buttoncontrols.sgml 2008-12-08 05:15:47 UTC (rev 3766) @@ -142,10 +142,18 @@ </thead> <tbody> <row> +<entry>releaseImageList (Class method)</entry> +<entry><link linkend="mthReleaseImageListClsButonControl">releaseImageList</link></entry> +</row> +<row> <entry>changeBitmap</entry> <entry><link linkend="changebitmap">changeBitmap</link></entry> </row> <row> +<entry>changeBitmap</entry> +<entry><link linkend="changebitmap">changeBitmap</link></entry> +</row> +<row> <entry>click</entry> <entry><link linkend="mthClick">click</link></entry> </row> @@ -230,6 +238,45 @@ </listitem></varlistentry> </variablelist> + +<section id="mthReleaseImageListClsButtonControl"><title>releaseImageList</title> +<indexterm><primary>releaseImageList</primary> +<secondary>ButtonControl class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-.ButtonControl~releaseImageList(--handle--)------------->< + +]]> +</programlisting> + +<para> + Use this method to release the operating system resources assigned to an image + list created by the <link linkend="mthSetImageList">setImageList</link>() + method. +</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The only argument is: +<variablelist> +<varlistentry><term>handle</term> +<listitem><para>The handle to the image list. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The method does not return any value. +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>This example ... +<programlisting> +<![CDATA[ +x = y +return 0 +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + <section id="mthPush"><title>push</title> <indexterm><primary>push</primary> <secondary>ButtonControl class</secondary></indexterm> @@ -885,7 +932,7 @@ <listitem><para>The are no arguments to this method. </para></listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The possible return values are: +<listitem><para>The return value is: <variablelist> <varlistentry><term>A <computeroutput>.Directory</computeroutput> object.</term> <listitem> @@ -946,13 +993,12 @@ <section id="mthSetImageList"><title>setImageList</title> -<indexterm><primary>setImageList</primary> -<secondary>ButtonControl class</secondary></indexterm> +<indexterm><primary>setImageList</primary></indexterm> <programlisting> <![CDATA[ ->>-aButtonControl~setImageList(--x--,--y--)------------------>< +>>-aButtonControl~setImageList(--imageList--,--+--------+--,--+-------+--)->< + +-margin-+ +-align-+ - ]]> </programlisting> @@ -980,8 +1026,16 @@ </para></listitem></varlistentry> </variablelist> </para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para>This example ... +<varlistentry id="exampleSetImageList"><term><emphasis role="bold">Example:</emphasis></term> +<listitem> +<para> + In addition to the setImageList() method, this example uses a number of other methods + related to using image lists with buttons. Such as, <link + linkend="mthReleaseImageListClsButonControl">releaseImageList</link>, <link + linkend="mthGetImageList">getImageList</link>, <link + linkend="mthGetIdealSize">getIdealSize</link>, and <link + linkend="mthComCtl32Version">comCtl32Version</link>. + <programlisting> <![CDATA[ x = y Modified: docs/trunk/oodialog/utilityclasses.sgml =================================================================== --- docs/trunk/oodialog/utilityclasses.sgml 2008-12-08 02:46:47 UTC (rev 3765) +++ docs/trunk/oodialog/utilityclasses.sgml 2008-12-08 05:15:47 UTC (rev 3766) @@ -140,9 +140,9 @@ <section id="mthVersion"><title>version (Class Method)</title> <indexterm><primary>version</primary></indexterm> <programlisting> -<![CDATA[ ->>-.DlgUtil~version---------------------------------------->< - +<![CDATA[ +-Full----+ +>>-.DlgUtil~version(--------------)------------------------>< + +-Short---+ ]]> </programlisting> @@ -179,14 +179,14 @@ </variablelist> </section> - <section id="mthComCtl32Version"><title>comCtl32Version (Class Method)</title> <indexterm><primary>comCtl32Version</primary></indexterm> <programlisting> -<![CDATA[ ->>-.DlgUtil~comCtl32Version-------------------------------->< - - +<![CDATA[ +-Short---+ +>>-.DlgUtil~comCtl32Version(--------------)---------------->< + +-Number--+ + +-OS------+ + +-Full----+ ]]> </programlisting> @@ -196,34 +196,66 @@ </para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>There are no arguments to this method. +<listitem><para>The single argument is: +<variablelist> +<varlistentry><term>format</term> +<listitem> +<para> + A keyword indicating the format of the returned version string. Only the first letter is + needed and case is not significant. Any unrecognized keyword is ignored and the default + format is used. The format for each keyword is as follows: +</para> +<variablelist> +<varlistentry><term>Short</term> +<listitem> +<para> + The version number, for instance <computeroutput>4.72</computeroutput> or + <computeroutput>6.0</computeroutput>. This is the default. </para></listitem></varlistentry> +<varlistentry><term>Number</term> +<listitem><para>This is an alias for short. +</para></listitem></varlistentry> +<varlistentry><term>OS</term> +<listitem> +<para> + The minimum operating system that can be expected to be compatible with the libray. + Earlier versions of the common control library were also distributed with Internet + Explorer and so an OS part of say, <computeroutput>W98 / IE 4.01</computeroutput> would + indicate that the current common control library supports all the features available on + Windows 98 or with Internet Explorer 4.01. +</para></listitem></varlistentry> +<varlistentry><term>Full</term> +<listitem> +<para> + The full format string in the format <computeroutput>comctl32.dll version 6.0 + (XP)</computeroutput>. Where the 6.0 is the number part and XP is the OS part. +</para></listitem></varlistentry> +</variablelist> +</listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - This method returns a string in the format <computeroutput>comctl32.dll - version 6.0 (XP)</computeroutput>. The version number is the version number - of the common controls library. The Windows version name in parenthesis is - the minimum operating system that includes this version. + This method returns a string in one of the formats described above. </para></listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> <para> In the following example, the programmer repositions the dialog controls under - certain conditions. In Windows XP and later, this task is made easier by - using the <computeroutput>getIdealSize()</computeroutput> method of the - ButtonControl class. However, the programmer needs the program to also run on + certain conditions. In Windows XP and later, this task is more accurate if the + <computeroutput>getIdealSize()</computeroutput> method of the ButtonControl + class is used. However, the programmer needs the application to also run on Windows 2000. He uses the <computeroutput>comCtl32Version()</computeroutput> method to determine if the <computeroutput>getIdealSize()</computeroutput> - method is available. + method is available. If it is not available he uses an alternative method, + but less accurate method to reposition the controls. <programlisting> <![CDATA[ ::method repositionControls - parse value .DlgUtil~comCtl32Version with . . v . + if .DlgUtil~comCtl32Version < 6.0 then return self~doW2KReposition - if v < 6.0 then return self~doW2KReposition - size = self~getButtonControl(IDC_CHECK_TWO)~getIdealSize if size == .nil then return .false @@ -232,6 +264,19 @@ return .true ]]> </programlisting> + An alternative way to achieve the same thing might be: +<programlisting> +<![CDATA[ +::method repositionControls + + if .DlgUtil~comCtl32Version('O') == "XP" then return self~doXPReposition + + -- Do the less accurate repositioning + ... + +return .true +]]> +</programlisting> </para></listitem></varlistentry> </variablelist> </section> @@ -272,8 +317,8 @@ </thead> <tbody> <row> -<entry>init</entry> -<entry><link linkend="mthInitClsRect">init</link></entry> +<entry>new (Class method)</entry> +<entry><link linkend="mthNewClsRect">new</link></entry> </row> </tbody></tgroup> </table> @@ -281,12 +326,12 @@ </variablelist> -<section id="mthInitClsRect"><title>init</title> -<indexterm><primary>init</primary> +<section id="mthNewClsRect"><title>new (Class method)</title> +<indexterm><primary>new</primary> <secondary>Rect class</secondary></indexterm> <programlisting> <![CDATA[ ->>-aRect~init(--------------------------)------------------>< +>>-aRect~new(---------------------------)------------------>< ]]> </programlisting> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2008-12-09 00:39:20
|
Revision: 3771 http://oorexx.svn.sourceforge.net/oorexx/?rev=3771&view=rev Author: miesfeld Date: 2008-12-09 00:39:15 +0000 (Tue, 09 Dec 2008) Log Message: ----------- Continue ooDialog doc update Modified Paths: -------------- docs/trunk/oodialog/basedialog.sgml docs/trunk/oodialog/listboxc.sgml docs/trunk/oodialog/mesextcl.sgml docs/trunk/oodialog/utilityclasses.sgml Modified: docs/trunk/oodialog/basedialog.sgml =================================================================== --- docs/trunk/oodialog/basedialog.sgml 2008-12-08 16:52:30 UTC (rev 3770) +++ docs/trunk/oodialog/basedialog.sgml 2008-12-09 00:39:15 UTC (rev 3771) @@ -2008,21 +2008,31 @@ <programlisting> <![CDATA[ -::class MyDlgClass subclass UserDialog + dlg = .ResizingDialog~new + dlg~createCenter(100, 60, "Resize Me", "THICKFRAME") + dlg~execute("SHOWTOP") -::method Init - self~init:super(...) - self~ConnectResize("OnSize") +::requires 'ooDialog.cls' -::method OnSize - use arg sizeEvent, sizeinfo /* sizeinfo contains information about the - new width and height */ - msg = self~PeekDialogMessage - if msg~left(6) = "ONSIZE" then return /* not the last size - event message */ - w = binaryand(sizeinfo, "0x0000FFFF") / self~FactorX - h = binaryand(sizeinfo, "0xFFFF0000") % X2D("FFFF") / self~FactorY +::class 'ResizingDialog' subclass UserDialog + +::method init + forward class (super) continue + + self~connectResize("onSize") + +::method onSize + use arg sizeEvent, sizeInfo + + -- Wait until the last size event message, in a series of messages, arrives. + msg = self~peekDialogMessage + if msg~left(6) = "ONSIZE" then return + + -- sizeInfo contains information about the new width and height in pixels. + w = .DlgUtil~loWord(sizeinfo) / self~factorX + h = .DlgUtil~hiWord(sizeinfo) / self~factorY say "New width=" w ", new height=" h + ]]> </programlisting> </para></listitem></varlistentry> @@ -2105,19 +2115,24 @@ <![CDATA[ ::class MyDlgClass subclass UserDialog -::method Init - self~init:super(...) - selfConnectMove("OnMove") +::method init + forward class (super) continue -::method OnMove - use arg dummy, posinfo /* posinfo contains information - about the new position */ - msg = self~PeekDialogMessage - if msg~left(6) = "ONMOVE" then return /* not the last move - event message */ - w = binaryand(data, "0x0000FFFF") / self~FactorX - h = binaryand(data, "0xFFFF0000") % X2D("FFFF") / self~FactorY - say "New x=" x ", new y=" y + self~connectMove(onMove) + +::method onMove + use arg unUsed, posInfo + + -- Look at our message queue to see if the next message in the queue is also + -- onMove. If so, just return. + msg = self~peekDialogMessage + if msg~left(6) = "ONMOVE" then return + + -- Now, we should be done moving, print out where we are. + x = .DlgUtil~loWord(posInfo) + y = .DlgUtil~hiWord(posInfo) + say 'At coordinate (' x',' y' ) on the screen. (In pixels.)' + ]]> </programlisting> </para></listitem></varlistentry> Modified: docs/trunk/oodialog/listboxc.sgml =================================================================== --- docs/trunk/oodialog/listboxc.sgml 2008-12-08 16:52:30 UTC (rev 3770) +++ docs/trunk/oodialog/listboxc.sgml 2008-12-09 00:39:15 UTC (rev 3771) @@ -908,7 +908,8 @@ </section> <section id="width"><title>Width</title> -<indexterm><primary>Width</primary></indexterm> +<indexterm><primary>Width</primary> +<secondary>ListBox class</secondary></indexterm> <programlisting> <![CDATA[ >>-aListBox~Width---------------------------------------------->< Modified: docs/trunk/oodialog/mesextcl.sgml =================================================================== --- docs/trunk/oodialog/mesextcl.sgml 2008-12-08 16:52:30 UTC (rev 3770) +++ docs/trunk/oodialog/mesextcl.sgml 2008-12-09 00:39:15 UTC (rev 3771) @@ -1213,7 +1213,7 @@ <![CDATA[ ::method Handler use arg ev_id, handle - id = BinaryAnd(ev_id, "0x0000FFFF") + id = .DlgUtil~loWord(ev_id) ... ]]> </programlisting></para></listitem> @@ -1348,7 +1348,7 @@ <![CDATA[ ::method Handler use arg ev_id, handle - id = BinaryAnd(ev_id, "0x0000FFFF") + id = .DlgUtil~loWord(ev_id) ... ]]> </programlisting></listitem> @@ -1459,7 +1459,7 @@ <![CDATA[ ::method Handler use arg ev_id, handle - id = BinaryAnd(ev_id, "0x0000FFFF") + id = .DlgUtil~loWord(ev_id) ... ]]> </programlisting></para></listitem> @@ -1596,7 +1596,7 @@ <![CDATA[ ::method PlaySong use arg eventID, handle - id = BinaryAnd(eventID, "0x0000FFFF") + id = .DlgUtil~loWord(eventID) if id == self~ConstDir["PROFESSIONS"] then -- take some action ... @@ -1709,11 +1709,13 @@ ::method OnPosition use arg ev_pos, hnd - pos = ev_pos % "10000"~x2d - self~GetScrollBar("MYSCROLL")~SetPos(pos,1) /* redraw scroll bar - with new position */ - say "Pos=" pos ", event code to verify=" BinaryAnd(ev_pos, , - "0x0000FFFF") "(expected 4)" + pos = .DlgUtil~hiWord(ev_pos) + + -- redraw scroll bar with new position + self~GetScrollBar("MYSCROLL")~SetPos(pos,1) + + say "Pos:" pos + say "Verify event code (should be 4):" .DlgUtil~loWord(ev_pos) ]]> </programlisting> </para></listitem></varlistentry> @@ -1730,7 +1732,7 @@ <![CDATA[ ::method Handler use arg ev_pos, handle - position = ev_pos % "10000"~x2d + position = .DlgUtil~hiWord(ev_pos) ]]> </programlisting> <para>If the user changed the @@ -1842,7 +1844,7 @@ <![CDATA[ ::method Handler use arg ev_id, handle - id = BinaryAnd(ev_id, "0x0000FFFF") + id = .DlgUtil~loWord(ev_id) ]]> </programlisting></para></listitem> </orderedlist> @@ -1941,7 +1943,7 @@ <listitem><para>The following example connects the POSITION event (release mouse button after dragging) with method PosSet, which extracts the new slider position from the notification arguments and displays it together with the event type -for POSITION, which is to be 4: +for POSITION, which should be 4: <programlisting> <![CDATA[ ::class MyDlgClass subclass UserDialog inherit MessageExtensions @@ -1952,9 +1954,9 @@ ::method PosSet use arg ev_pos, hnd - pos = ev_pos % "10000"~x2d - say "Pos=" pos ", event code to verify=" BinaryAnd(ev_pos, , - "0x0000FFFF") "(expected 4)" + pos = .DlgUtil~hiWord(ev_pos) + + say "Verify event code (should be 4):" .DlgUtil~loWord(ev_pos) ]]> </programlisting> </para></listitem></varlistentry> @@ -1971,7 +1973,7 @@ <![CDATA[ ::method Handler use arg ev_pos, handle - position = ev_pos % "10000"~x2d + position = .DlgUtil~hiWord(ev_pos) ]]> </programlisting></para></listitem> </orderedlist> Modified: docs/trunk/oodialog/utilityclasses.sgml =================================================================== --- docs/trunk/oodialog/utilityclasses.sgml 2008-12-08 16:52:30 UTC (rev 3770) +++ docs/trunk/oodialog/utilityclasses.sgml 2008-12-09 00:39:15 UTC (rev 3771) @@ -124,13 +124,37 @@ </thead> <tbody> <row> -<entry>version (Class Method)</entry> -<entry><link linkend="mthVersion">version</link></entry> +<entry>colorRef (Class Method)</entry> +<entry><link linkend="mthColorRef">colorRef</link></entry> </row> <row> <entry>comCtl32Version (Class Method)</entry> <entry><link linkend="mthComCtl32Version">comCtl32Version</link></entry> </row> +<row> +<entry>getBValue (Class Method)</entry> +<entry><link linkend="mthGetBValue">getBValue</link></entry> +</row> +<row> +<entry>getGValue (Class Method)</entry> +<entry><link linkend="mthGetGValue">getGValue</link></entry> +</row> +<row> +<entry>getRValue (Class Method)</entry> +<entry><link linkend="mthGetRValue">getRValue</link></entry> +</row> +<row> +<entry>hiWord (Class Method)</entry> +<entry><link linkend="mthHiWord">hiWord</link></entry> +</row> +<row> +<entry>loWord (Class Method)</entry> +<entry><link linkend="mthLoWord">loWord</link></entry> +</row> +<row> +<entry>version (Class Method)</entry> +<entry><link linkend="mthVersion">version</link></entry> +</row> </tbody></tgroup> </table> </listitem></varlistentry> @@ -151,29 +175,60 @@ <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem><para>There are no arguments for this method. +<variablelist> +<varlistentry><term>format</term> +<listitem> +<para> + A keyword indicating the format of the returned version string. Only the first letter is + needed and case is not significant. Any unrecognized keyword is ignored and the default + format is used. The format for each keyword is as follows: +</para> +<variablelist> +<varlistentry><term>Full</term> +<listitem> +<para> + A string specifying the version of ooDialog. This is the default. The string has the format: + <computeroutput>ooDialog Version x.x.x.SS (an ooRexx Windows Extension) </computeroutput> where + x.x.x is the ooRexx interpreter version and SS is the Subversion revision number of the build. + The actual version string might look like: <computeroutput>ooDialog Version 4.0.0.3734 (an ooRexx + Windows Extension)</computeroutput> </para></listitem></varlistentry> +<varlistentry><term>Short</term> +<listitem><para>Only the x.x.x.SS part of the full version string is returned. +</para></listitem></varlistentry> +</variablelist> +</listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - A string specifying the version of ooDialog. The string has the format: - <computeroutput>ooDialog Version x.x.x.SS (an ooRexx Windows Extension) - </computeroutput> where x.x.x is the ooRexx interpreter version and - SS is the Subversion revision number of the build. The actual version string - might look like: <computeroutput>ooDialog Version 4.0.0.3734 (an ooRexx - Windows Extension)</computeroutput> + A string in one of the formats specified above. </para></listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem><para> <programlisting> <![CDATA[ - v = .DlgUtil~version - say v +v = .DlgUtil~version +say v +say +if .DlgUtil~version("SHORT") < 4.1.0.0000 then do + say 'Too bad, you are still running ooRexx 4.0.0' +end +else do + say 'Great you have upgraded past ooRexx 4.1.0' +end + ::requires 'oodPlain.cls' /* On the screen you might see: - * ooDialog Version 4.0.0.3896 (an ooRexx Windows Extension) - */ + +ooDialog Version 4.0.0.3768 (an ooRexx Windows Extension) + +Too bad, you are still running ooRexx 4.0.0 + +*/ ]]> </programlisting> </para></listitem></varlistentry> @@ -281,30 +336,316 @@ </para></listitem></varlistentry> </variablelist> </section> + +<section id="mthLoWord"><title>loWord</title> +<indexterm><primary>loWord</primary></indexterm> +<programlisting> +<![CDATA[ +>>-.DlgUtil~loWord(--param--)------------------------------>< + +]]> +</programlisting> + +<para> + The Windows API often packs two values into a single number. One value in the low-order word and + the other value in the high-order word. In ooDialog this is most often seen in the arguments + passed to event notification methods. This utility method is used to extract the low-order word + from a number. +</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments are: +<variablelist> +<varlistentry><term>param</term> +<listitem><para>The number whose low-order word is needed. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The return is the low-order portion of the number. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem> +<para> + A common place in the Windows API where two values are packed into a single number is where the + API deals with position. This example shows how to extract the x and y position coordinates of a + dialog after it has been moved. The example is complete, it can be cut and pasted into a file and + will execute as is. +<programlisting id="exampleLoWordClsDlgUtil"> +<![CDATA[ + + dlg = .MovingDialog~new + dlg~createCenter(100, 60, "Move Me") + dlg~execute("SHOWTOP") + +::requires 'ooDialog.cls' + +::class 'MovingDialog' subclass UserDialog + +::method init + forward class (super) continue + + self~connectMove(onMove) + +::method onMove + use arg unUsed, posInfo + + -- Look at our message queue to see if the next message in the queue is also + -- onMove. If so, just return. + msg = self~peekDialogMessage + if msg~left(6) = "ONMOVE" then return + + -- Now, we should be done moving, print out where we are. + x = .DlgUtil~loWord(posInfo) + y = .DlgUtil~hiWord(posInfo) + say 'At coordinate (' x',' y' ) on the screen. (In pixels.)' + +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> </section> +<section id="mthHiWord"><title>hiWord</title> +<indexterm><primary>hiWord</primary></indexterm> +<programlisting> +<![CDATA[ +>>-.DlgUtil~hiWord(--param--)------------------------------>< + +]]> +</programlisting> + +<para> + The Windows API often packs two values into a single number. One value in the low-order word and + the other value in the high-order word. In ooDialog this is most often seen in the arguments + passed to event notification methods. This utility method is used to extract the high-order word + from a number. +</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments are: +<variablelist> +<varlistentry><term>param</term> +<listitem><para>The number whose high-order word is needed. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The return is the high-order portion of the number. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem> +<para> + See the <link linkend="exampleLoWordClsDlgUtil">loWord() example</link>. +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthColorRef"><title>colorRef</title> +<indexterm><primary>colorRef</primary></indexterm> +<programlisting> +<![CDATA[ +>>-aButtonControl~methodName(--x--,--y--)------------------>< + +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments are: +<variablelist> +<varlistentry><term>x</term> +<listitem><para>xx. +</para></listitem></varlistentry> +<varlistentry><term>y</term> +<listitem><para>yyy, +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The possible return values are: +<variablelist> +<varlistentry><term>0</term> +<listitem><para>Success +</para></listitem></varlistentry> +<varlistentry><term>-1</term> +<listitem><para>Some error. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>This example ... +<programlisting> +<![CDATA[ +x = y +return 0 +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthGetRValue"><title>getRValue</title> +<indexterm><primary>getRValue</primary></indexterm> +<programlisting> +<![CDATA[ +>>-aButtonControl~methodName(--x--,--y--)------------------>< + +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments are: +<variablelist> +<varlistentry><term>x</term> +<listitem><para>xx. +</para></listitem></varlistentry> +<varlistentry><term>y</term> +<listitem><para>yyy, +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The possible return values are: +<variablelist> +<varlistentry><term>0</term> +<listitem><para>Success +</para></listitem></varlistentry> +<varlistentry><term>-1</term> +<listitem><para>Some error. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>This example ... +<programlisting> +<![CDATA[ +x = y +return 0 +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthGetGValue"><title>getGValue</title> +<indexterm><primary>getRValue</primary></indexterm> +<programlisting> +<![CDATA[ +>>-aButtonControl~methodName(--x--,--y--)------------------>< + +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments are: +<variablelist> +<varlistentry><term>x</term> +<listitem><para>xx. +</para></listitem></varlistentry> +<varlistentry><term>y</term> +<listitem><para>yyy, +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The possible return values are: +<variablelist> +<varlistentry><term>0</term> +<listitem><para>Success +</para></listitem></varlistentry> +<varlistentry><term>-1</term> +<listitem><para>Some error. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>This example ... +<programlisting> +<![CDATA[ +x = y +return 0 +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthGetBValue"><title>getBValue</title> +<indexterm><primary>getRValue</primary></indexterm> +<programlisting> +<![CDATA[ +>>-aButtonControl~methodName(--x--,--y--)------------------>< + +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments are: +<variablelist> +<varlistentry><term>x</term> +<listitem><para>xx. +</para></listitem></varlistentry> +<varlistentry><term>y</term> +<listitem><para>yyy, +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The possible return values are: +<variablelist> +<varlistentry><term>0</term> +<listitem><para>Success +</para></listitem></varlistentry> +<varlistentry><term>-1</term> +<listitem><para>Some error. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>This example ... +<programlisting> +<![CDATA[ +x = y +return 0 +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + +</section> <!-- End DlgUtil Class --> + <section id="clsRect"><title>Rect Class</title> <indexterm><primary>Rect class</primary></indexterm> <para> - A ... is .. + The Rect object is most often used to represent a rectangle on a coordinate system, specifically + the coordinate system used by Windows where the upper left corner is considered (0,0). However, + it is convenient to use the Rect object for other things, for instance the margin around a + rectangle. </para> -<para> -</para> <variablelist> <varlistentry><term>Requires:</term> -<listitem><para>The Name class requires the class -definition file <computeroutput>name.cls</computeroutput>: +<listitem> +<para> + The Rect class requires the class definition file <computeroutput>oodPlain.cls</computeroutput>: <programlisting> <![CDATA[ -::requires "name.cls" +::requires "oodPlain.cls" ]]> </programlisting> </para></listitem></varlistentry> <varlistentry><term>Methods:</term> <listitem> <para> - Instances of the Name class implement the methods listed in the following - table: + Instances of the Rect class implement the methods listed in the following table: </para> <table id="tblRectMethods" frame="all"> @@ -321,6 +662,38 @@ <entry>new (Class method)</entry> <entry><link linkend="mthNewClsRect">new</link></entry> </row> +<row> +<entry>bottom</entry> +<entry><link linkend="mthBottom">bottom</link></entry> +</row> +<row> +<entry>bottom=</entry> +<entry><link linkend="mthBottomEquals">bottom=</link></entry> +</row> +<row> +<entry>left</entry> +<entry><link linkend="mthLeft">left</link></entry> +</row> +<row> +<entry>left=</entry> +<entry><link linkend="mthLeftEquals">left=</link></entry> +</row> +<row> +<entry>right</entry> +<entry><link linkend="mthRight">right</link></entry> +</row> +<row> +<entry>right=</entry> +<entry><link linkend="mthRightEquals">right=</link></entry> +</row> +<row> +<entry>top</entry> +<entry><link linkend="mthTop">top</link></entry> +</row> +<row> +<entry>top=</entry> +<entry><link linkend="mthTopEquals">top=</link></entry> +</row> </tbody></tgroup> </table> </listitem></varlistentry> @@ -332,60 +705,305 @@ <secondary>Rect class</secondary></indexterm> <programlisting> <![CDATA[ ->>-aRect~new(---------------------------)------------------>< + +-0----+ +-left-+ +-left--+ +-left---+ +>>-aRect~new(--+------+--,--+------+--,--+-------+--,--+--------+--)------>< + +-left-+ +-top--+ +-right-+ +-bottom-+ ]]> </programlisting> -<para></para> +<para> + Instantiates a new Rect object. All the arguments are whole numbers. +</para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem><para>The arguments are: <variablelist> -<varlistentry><term>x</term> -<listitem><para>xx. +<varlistentry><term>left</term> +<listitem><para>The left postion. The default is 0. </para></listitem></varlistentry> -<varlistentry><term>y</term> -<listitem><para>yyy, +<varlistentry><term>top</term> +<listitem><para>The top position. The default is the value of left. </para></listitem></varlistentry> +<varlistentry><term>right</term> +<listitem><para>The right position. The default is the value of left. +</para></listitem></varlistentry> +<varlistentry><term>bottom</term> +<listitem><para>The bottom position. The default is the value of left. +</para></listitem></varlistentry> </variablelist> </para></listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The possible return values are: +<listitem><para>The new Rect object is returned. +</para></listitem></varlistentry> +<varlistentry id="exampleNewClsRect"><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para> +<programlisting> +<![CDATA[ +r = .Rect~new(3, 4, 13, 9) +say 'Upper corner ('r~left','r~top') lower corner 'r~right','r~bottom')' +say +margin = .Rect~new(5) +say 'Margins:' +say ' Left: ' margin~left +say ' Top ' margin~top +say ' Right ' margin~right +say ' Bottom' margin~bottom +say + +r~left = 55 +r~top = 75 +r~right = 110 +r~bottom = 125 +say 'New upper corner ('r~left','r~top') new lower corner 'r~right','r~bottom')' +say + +/* Output would be: +Upper corner (3,4) lower corner 13,9) + +Margins: + Left: 5 + Top 5 + Right 5 + Bottom 5 + +New upper corner (55,75) new lower corner 110,125) + +/* + +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthLeft"><title>left</title> +<indexterm><primary>left</primary> +<secondary>Rect class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aRect~left---------------------------------------------->< + +]]> +</programlisting> + +<para>Retrieves the left value of the rectangle.</para> <variablelist> -<varlistentry><term>0</term> -<listitem><para>Success +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>This method takes no arguments </para></listitem></varlistentry> -<varlistentry><term>-1</term> -<listitem><para>Some error. +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The return value is the numeric value for the left of the rectangle. </para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>See <link linkend="exampleNewClsRect">.Rect~new</link> example. +</para></listitem></varlistentry> </variablelist> +</section> + +<section id="mthLeftEquals"><title>left=</title> +<indexterm><primary>left=</primary> +<secondary>Rect class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aRect~left=value---------------------------------------->< + +]]> +</programlisting> + +<para>Sets the left value of the rectangle.</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>This has one argument: +<variablelist> +<varlistentry><term>value</term> +<listitem><para>The left value for the rectangle. </para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>This method does not return a value. +</para></listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para>This example ... +<listitem><para>See <link linkend="exampleNewClsRect">.Rect~new</link> example. +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthTop"><title>top</title> +<indexterm><primary>top</primary> +<secondary>Rect class</secondary></indexterm> <programlisting> <![CDATA[ -x = y -return 0 +>>-aRect~top----------------------------------------------->< + ]]> </programlisting> + +<para>Retrieves the top value of the rectangle.</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>This method takes no arguments </para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The return value is the numeric value for the top of the rectangle. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>See <link linkend="exampleNewClsRect">.Rect~new</link> example. +</para></listitem></varlistentry> </variablelist> </section> + +<section id="mthTopEquals"><title>top=</title> +<indexterm><primary>top=</primary> +<secondary>Rect class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aRect~top=value----------------------------------------->< + +]]> +</programlisting> + +<para>Sets the top value of the rectangle.</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>This method takes one argument: +<variablelist> +<varlistentry><term>value</term> +<listitem><para>The top value for the rectangle. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>This method does not return any value. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>See <link linkend="exampleNewClsRect">.Rect~new</link> example. +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthRight"><title>right</title> +<indexterm><primary>right</primary> +<secondary>Rect class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aRect~right--------------------------------------------->< + +]]> +</programlisting> + +<para>Retrieves the right value of the rectangle.</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>This method takes no arguments +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The return value is the numeric value for the right of the rectangle. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>See <link linkend="exampleNewClsRect">.Rect~new</link> example. +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthRightEquals"><title>right=</title> +<indexterm><primary>right=</primary> +<secondary>Rect class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aRect~right=value--------------------------------------->< + +]]> +</programlisting> + +<para>Sets the right value of the rectangle.</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>This method has one argument: +<variablelist> +<varlistentry><term>value</term> +<listitem><para>The new right value for the rectangle. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>There is nor return value for this method. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>See <link linkend="exampleNewClsRect">.Rect~new</link> example. +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthBottom"><title>bottom</title> +<indexterm><primary>bottom</primary> +<secondary>Rect class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aRect~bottom-------------------------------------------->< + +]]> +</programlisting> + +<para>Retrieves the bottom value of the rectangle.</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>This method takes no arguments +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The return value is the numeric value for the bottom of the rectangle. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>See <link linkend="exampleNewClsRect">.Rect~new</link> example. +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthBottomEquals"><title>bottom=</title> +<indexterm><primary>bottom=</primary> +<secondary>Rect class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aRect~bottom=value-------------------------------------->< + +]]> +</programlisting> + +<para>Sets the bottom value of the rectangle.</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>This method has one argument: +<variablelist> +<varlistentry><term>value</term> +<listitem><para>The bottom value for the rectangle. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The method does not return a value. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>See <link linkend="exampleNewClsRect">.Rect~new</link> example. +</para></listitem></varlistentry> +</variablelist> +</section> + </section> <!-- End Rect Class --> <section id="clsPoint"><title>Point Class</title> <indexterm><primary>Point class</primary></indexterm> <para> - A ... is .. + The Point class represents a point in a 2-D coordinate system. </para> <para> </para> <variablelist> <varlistentry><term>Requires:</term> -<listitem><para>The Point class requires the class definition file -<computeroutput>oodPlain.cls</computeroutput>: +<listitem> +<para> + The Point class requires the class definition file <computeroutput>oodPlain.cls</computeroutput>: <programlisting> <![CDATA[ ::requires "oodPlain.cls" @@ -395,8 +1013,7 @@ <varlistentry><term>Methods:</term> <listitem> <para> - Instances of the Point class implement the methods listed in the following - table: + Instances of the Point class implement the methods listed in the following table: </para> <table id="tblPointMethods" frame="all"> @@ -413,6 +1030,22 @@ <entry>new (Class Method)</entry> <entry><link linkend="mthNewClsPoint">new</link></entry> </row> +<row> +<entry>x</entry> +<entry><link linkend="mthX">x</link></entry> +</row> +<row> +<entry>x=</entry> +<entry><link linkend="mthXEquals">x=</link></entry> +</row> +<row> +<entry>y</entry> +<entry><link linkend="mthY">y</link></entry> +</row> +<row> +<entry>y=</entry> +<entry><link linkend="mthYEquals">y=</link></entry> +</row> </tbody></tgroup> </table> </listitem></varlistentry> @@ -424,8 +1057,9 @@ <secondary>Point class</secondary></indexterm> <programlisting> <![CDATA[ ->>-.Point~new(--------------------------)------------------>< - + +-0-+ +-x-+ +>>-.Point~new(--+---+--,--+---+--)------------------------->< + +-x-+ +-y-+ ]]> </programlisting> @@ -435,42 +1069,162 @@ <listitem><para>The arguments are: <variablelist> <varlistentry><term>x</term> -<listitem><para>xx. +<listitem><para>The x coordinate of the point. The default is 0. </para></listitem></varlistentry> <varlistentry><term>y</term> -<listitem><para>yyy, +<listitem><para>The y coordinate of the point. The default is the x coordinate. </para></listitem></varlistentry> </variablelist> </para></listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The possible return values are: +<listitem><para>This method returns a new Point object. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para> +<programlisting id="exampleNewClsPoint"> +<![CDATA[ +p = .Point~new(45, 90) +say 'Point p is at ('p~x','p~y')' +say +q = .Point~new(55) +say 'A new point q is at ('q~x','q~y')' +say + +q~x = 150 +q~y = 300 +say 'Changed point q to be at ('q~x','q~y')' +say + +::requires 'oodPlain.cls' + +/* Output would be: + +Point p is at (45,90) + +A new point q is at (55,55) + +Changed point q to be at (150,300) + +*/ +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthX"><title>x</title> +<indexterm><primary>x</primary> +<secondary>Point class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aPoint~x------------------------------------------------>< + +]]> +</programlisting> + +<para>Retrieves the x coordinate of the point.</para> <variablelist> -<varlistentry><term>0</term> -<listitem><para>Success +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>This method takes no arguments </para></listitem></varlistentry> -<varlistentry><term>-1</term> -<listitem><para>Some error. +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The return value is the x coordinate. </para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>See <link linkend="exampleNewClsPoint">.Point~new</link> example. +</para></listitem></varlistentry> </variablelist> +</section> + +<section id="mthXEquals"><title>x=</title> +<indexterm><primary>x=</primary> +<secondary>Point class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aPoint~x=value------------------------------------------>< + +]]> +</programlisting> + +<para>Sets the x coordinate of the point</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>This method has one argument: +<variablelist> +<varlistentry><term>value</term> +<listitem><para>The new x coordinate for the point. </para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>This method does not return a value. +</para></listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para>This example ... +<listitem><para>See <link linkend="exampleNewClsPoint">.Point~new</link> example. +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthY"><title>y</title> +<indexterm><primary>y</primary> +<secondary>Point class</secondary></indexterm> <programlisting> <![CDATA[ -x = y -return 0 +>>-aPoint~y------------------------------------------------>< + ]]> </programlisting> + +<para>Retrieves the y coordinate of the point.</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>This method takes no arguments </para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The return value is the y coordinate of the point. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>See <link linkend="exampleNewClsPoint">.Point~new</link> example. +</para></listitem></varlistentry> </variablelist> </section> + +<section id="mthYEquals"><title>y=</title> +<indexterm><primary>y=</primary> +<secondary>Point class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aPoint~y=value------------------------------------------>< + +]]> +</programlisting> + +<para>Sets the y coordinate of the point</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>This method has one argument: +<variablelist> +<varlistentry><term>value</term> +<listitem><para>The new y coordinate for the point. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>This method does not return a value. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>See <link linkend="exampleNewClsPoint">.Point~new</link> example. +</para></listitem></varlistentry> +</variablelist> +</section> + </section> <!-- End Point Class --> <section id="clsSize"><title>Size Class</title> <indexterm><primary>Size class</primary></indexterm> <para> - A ... is .. + A Size object encapsulates a width and height dimension in a 2-D coordinate system. </para> <para> </para> @@ -487,8 +1241,7 @@ <varlistentry><term>Methods:</term> <listitem> <para> - Instances of the Size class implement the methods listed in the following - table: + Instances of the Size class implement the methods listed in the following table: </para> <table id="tblSizeMethods" frame="all"> @@ -505,6 +1258,22 @@ <entry>new (Class Method)</entry> <entry><link linkend="mthNewClsSize">new</link></entry> </row> +<row> +<entry>width</entry> +<entry><link linkend="mthWidth">width</link></entry> +</row> +<row> +<entry>width=</entry> +<entry><link linkend="mthWidthEquals">width=</link></entry> +</row> +<row> +<entry>height</entry> +<entry><link linkend="mthHeight">height</link></entry> +</row> +<row> +<entry>height=</entry> +<entry><link linkend="mthHeightEquals">height=</link></entry> +</row> </tbody></tgroup> </table> </listitem></varlistentry> @@ -516,46 +1285,179 @@ <secondary>Size class</secondary></indexterm> <programlisting> <![CDATA[ ->>-.Size~new(---------------------------)------------------>< - + +-0-----+ +-width---+ +>>-.Size~new(--+-------+--,--+---------+--)---------------->< + +-width-+ +-height--+ ]]> </programlisting> - -<para></para> +<para> + Instantiates a new Size object with the dimensions specified. +</para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem><para>The arguments are: <variablelist> -<varlistentry><term>x</term> -<listitem><para>xx. +<varlistentry><term>width</term> +<listitem> +<para> + The whole number value of the width of the new object. The defualt is 0. +</para> +</listitem></varlistentry> +<varlistentry><term>height</term> +<listitem> +<para> + The whole number value of the height for the new object. The default is the width value. +</para> +</listitem></varlistentry> +</variablelist> </para></listitem></varlistentry> -<varlistentry><term>y</term> -<listitem><para>yyy, +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>This method returns the new Size object. </para></listitem></varlistentry> +<varlistentry id="exampleNewClsSize"><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para> +<programlisting> +<![CDATA[ + +size = .Size~new(4, 8) +say 'Width:' size~width 'Height:' size~height +say +size2 = .Size~new(16) +say 'A new size object:' +say ' Width: ' size2~width +say ' Height:' size2~height +say + +size2~width = 100 +size2~height = 300 +say 'New width:' size2~width 'new height:' size2~height +say + +::requires 'oodPlain.cls' + +/* Output would be: + +Width: 4 Height: 8 + +A new size object: + Width: 16 + Height: 16 + +New width: 100 new height: 300 + +*/ +]]> +</programlisting> +</para></listitem></varlistentry> </variablelist> +</section> + +<section id="mthWidth"><title>width</title> +<indexterm><primary>width</primary> +<secondary>Size class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aSize~width--------------------------------------------->< + +]]> +</programlisting> + +<para>Retrieves the width of the size object.</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>This method takes no arguments </para></listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The possible return values are: +<listitem><para>The return value is the width of the object +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>See <link linkend="exampleNewClsSize">.Size~new</link> example. +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthWidthEquals"><title>width=</title> +<indexterm><primary>width=</primary> +<secondary>Size class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aSize~width=value--------------------------------------->< + +]]> +</programlisting> + +<para>Sets the width of the size object.</para> <variablelist> -<varlistentry><term>0</term> -<listitem><para>Success +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>This method has one argument: +<variablelist> +<varlistentry><term>value</term> +<listitem><para>The new width of the size object. </para></listitem></varlistentry> -<varlistentry><term>-1</term> -<listitem><para>Some error. +</variablelist> </para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>This method does not return a value. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>See <link linkend="exampleNewClsSize">.Size~new</link> example. +</para></listitem></varlistentry> </variablelist> +</section> + +<section id="mthHeight"><title>height</title> +<indexterm><primary>height</primary> +<secondary>Size class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aSize~height-------------------------------------------->< + +]]> +</programlisting> + +<para>Retrieves the height of the size object.</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>This method takes no arguments </para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>Returns the height of the size object. +</para></listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para>This example ... +<listitem><para>See <link linkend="exampleNewClsSize">.Size~new</link> example. +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthHeightEquals"><title>height=</title> +<indexterm><primary>height=</primary> +<secondary>Size class</secondary></indexterm> <programlisting> <![CDATA[ -x = y -return 0 +>>-aSize~height=value-------------------------------------->< + ]]> </programlisting> + +<para>Sets the height of the size object.</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>This method has one argument: +<variablelist> +<varlistentry><term>value</term> +<listitem><para>The new height of the size object. </para></listitem></varlistentry> </variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>This method does not return a value. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>See <link linkend="exampleNewClsSize">.Size~new</link> example. +</para></listitem></varlistentry> +</variablelist> </section> + </section> <!-- End Size Class --> @@ -564,7 +1466,7 @@ <para> The DlgArea class provides assistance in laying out the dialog controls in a dynamically defined dialog. The class defines an area of a UserDialog and - provides co-ordinates of and within it. It is a helper for the DefineDialog + provides coordinates of and within it. It is a helper for the DefineDialog Method of an OODialog UserDialog Object and has no effect on any Windows Object. </para> @@ -601,11 +1503,11 @@ DlgArea Object are: <variablelist> <varlistentry><term>X</term> -<listitem><para>The X Co-ordinate in dialog units relative to the UserDialog +<listitem><para>The X coordinate in dialog units relative to the UserDialog of the top left corner of the area you wish to define </para></listitem></varlistentry> <varlistentry><term>Y</term> -<listitem><para>The Y Co-ordinate in dialog units relative to the UserDialog +<listitem><para>The Y coordinate in dialog units relative to the UserDialog of the top left corner of the area you wish to define. </para></listitem></varlistentry> <varlistentry><term>Width</term> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2008-12-09 16:35:35
|
Revision: 3779 http://oorexx.svn.sourceforge.net/oorexx/?rev=3779&view=rev Author: miesfeld Date: 2008-12-09 16:35:33 +0000 (Tue, 09 Dec 2008) Log Message: ----------- update id to something meaningfull Modified Paths: -------------- docs/trunk/oodialog/plainuserdialogc.sgml docs/trunk/oodialog/userdialog.sgml Modified: docs/trunk/oodialog/plainuserdialogc.sgml =================================================================== --- docs/trunk/oodialog/plainuserdialogc.sgml 2008-12-09 16:31:13 UTC (rev 3778) +++ docs/trunk/oodialog/plainuserdialogc.sgml 2008-12-09 16:35:33 UTC (rev 3779) @@ -271,7 +271,7 @@ </row> <row> <entry>AddText</entry> -<entry><link linkend="h001695">AddText</link></entry> +<entry><link linkend="mthAddText">AddText</link></entry> </row> <row> <entry>AddUserMsg</entry> Modified: docs/trunk/oodialog/userdialog.sgml =================================================================== --- docs/trunk/oodialog/userdialog.sgml 2008-12-09 16:31:13 UTC (rev 3778) +++ docs/trunk/oodialog/userdialog.sgml 2008-12-09 16:35:33 UTC (rev 3779) @@ -293,7 +293,7 @@ </row> <row> <entry>AddText</entry> -<entry><link linkend="h001695">AddText</link></entry> +<entry><link linkend="mthAddText">AddText</link></entry> </row> <row> <entry>AddWhiteFrame</entry> @@ -1361,7 +1361,7 @@ </variablelist> </section> -<section id="h001695"><title>AddText</title> +<section id="mthAddText"><title>AddText</title> <indexterm><primary>AddText</primary></indexterm> <programlisting> <![CDATA[ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2008-12-10 04:06:02
|
Revision: 3784 http://oorexx.svn.sourceforge.net/oorexx/?rev=3784&view=rev Author: miesfeld Date: 2008-12-10 04:05:57 +0000 (Wed, 10 Dec 2008) Log Message: ----------- Incremental update on ooDialog doc Modified Paths: -------------- docs/trunk/oodialog/staticcontrolc.sgml docs/trunk/oodialog/userdialog.sgml Modified: docs/trunk/oodialog/staticcontrolc.sgml =================================================================== --- docs/trunk/oodialog/staticcontrolc.sgml 2008-12-10 03:47:05 UTC (rev 3783) +++ docs/trunk/oodialog/staticcontrolc.sgml 2008-12-10 04:05:57 UTC (rev 3784) @@ -43,19 +43,26 @@ --> <chapter id="staticcontrolc"><title>StaticControl Class</title> <indexterm><primary>StaticControl class</primary></indexterm> -<para>The StaticControl class provides methods to query -and modify static controls, such as static text, group boxes, and frames. -It inherits all methods of the DialogControl class (see -<link linkend="dialogcontrolc">DialogControl Class</link>).</para> -<para>The StaticControl class requires the class definition -file <computeroutput>oodwin32.cls</computeroutput>:</para> +<para> + The StaticControl class provides methods to query and modify static controls (static text, + rectangles, and frames.) It inherits all methods of the DialogControl class (see <link + linkend="dialogcontrolc">DialogControl Class</link>). By default, static controls are assigned a + resource ID of -1. There is no way to query or modify static controls unless the control has a + positive resource ID. Which in most circumstances is fine, usually static controls do not need to + be modified. Be sure to assign a positive resource ID to statict controls that will be modified + during the execution of a dialog. +</para> +<para> + The StaticControl class requires the class definition file + <computeroutput>oodWin32.cls</computeroutput>:</para> <programlisting> <![CDATA[ -::requires "oodwin32.cls" +::requires "oodWin32.cls" ]]> </programlisting> -<para>Use the GetStaticControl method (see -<link linkend="getstaticcontrol">GetStaticControl</link>) -to retrieve an object of the StaticControl class. To use this method, -the static control must have a positive ID.</para> +<para> + Use the getStaticControl method (see <link linkend="getstaticcontrol">getStaticControl</link>) to + retrieve an object of the StaticControl class. To use this method, the static control must have a + positive ID. +</para> </chapter> Modified: docs/trunk/oodialog/userdialog.sgml =================================================================== --- docs/trunk/oodialog/userdialog.sgml 2008-12-10 03:47:05 UTC (rev 3783) +++ docs/trunk/oodialog/userdialog.sgml 2008-12-10 04:05:57 UTC (rev 3784) @@ -1361,6 +1361,190 @@ </variablelist> </section> + +<section id="sectAddStaticControls"><title>Add Static Controls</title> +<indexterm><primary>Add staic control methods</primary></indexterm> +<para> + The methods in this section are all used to add a static control to the dialog. However, there is + no need to use a number of different methods to add static controls. The <link + linkend="mthAddStatic">addStatic</link> method is all that is needed. You control the appearance + and behavior of the static control in the same way as with other controls, by specifying the + appropriate control styles. Given the proper combination of style keywords, the + <computeroutput>addStatic</computeroutput> can create any static control that the other methods in + this section create. +<para> + However, there are a large number of style keywords for the static control. Many of the keywords + have no meaning when used in combination with other keywords. For instance, the ENDELLIPIS + keyword has no meaning if used with the ICON keyword. The other methods in this section are + convenience methods where the number of style keywords are reduced to only those that make sense + in combination. +</para> +<para> + A word about frames and rectangles. In previous versions of the ooDialog reference frames and + rectangles were documented as though they were a type of separate controls. They are not, they + are just a static control with a particular style. The <link linkend="fig56">Frames and + Rectangles</link> picture gives some idea of the different types of static controls. + + <figure id="fig56"><title>Frames and Rectangles in 3D Style</title> + <mediaobject> + <imageobject> + <!-- Note! - if we include a /imagedata tag we get an error for DSSSL! --> + <imagedata fileref="rxou0s20.jpg" scale="70"> + </imageobject> + </mediaobject> + </figure> +</para> +<note><title>Note</title> +<para> + The difference between frames and rectangles is subtle +</para></note> +</section> + +<section id="mthAddStatic"><title>addStatic</title> +<indexterm><primary>addStatic</primary></indexterm> +<programlisting> +<![CDATA[ +>>-aUserDialog~AddGrayRect(--x--,--y--,--cx--,--cy--------------> + +>--+----------------------------------------+--)--------------->< + +-,--+----------------------+--+-------+-+ + | +------------+ | +-,--id-+ + | V | | + +-"----+-HIDDEN-+-+--"-+ + +-BORDER-+ + + +]]> +</programlisting> + +<para>The AddGrayRect method adds a gray rectangle to +the dialog. </para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>See <link linkend="h001709">AddWhiteRect</link> for a description of the arguments. +</para></listitem></varlistentry> +</variablelist> +</section> + + +<section id="h001709"><title>AddWhiteRect</title> +<indexterm><primary>AddWhiteRect</primary></indexterm> +<programlisting> +<![CDATA[ +>>-aUserDialog~AddWhiteRect(--x--,--y--,--cx--,--cy-------------> + +>--+------------------------------------+--)------------------->< + | +------------+ | + | V | | + +-,--"----+-HIDDEN-+-+--"--+-------+-+ + +-BORDER-+ +-,--id-+ + + +]]> +</programlisting> + +<para>The AddWhiteRect method adds a white rectangle +to the dialog. </para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments are: +<variablelist> +<varlistentry><term>x, y</term> +<listitem><para>The position of the rectangle's upper-left corner relative to the dialog +measured in dialog units +</para></listitem></varlistentry> +<varlistentry><term>cx, cy</term> +<listitem><para>The size of the rectangle in dialog units +</para></listitem></varlistentry> +<varlistentry><term>options</term> +<listitem><para>The options can be: +<variablelist> +<varlistentry><term>HIDDEN</term> +<listitem><para>The frame or rectangle is not visible at startup time +</para></listitem></varlistentry> +<varlistentry><term>BORDER</term> +<listitem><para>A border is drawn around the rectangle or frame +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term>id</term> +<listitem><para>The ID of the item, -1 is used by default +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="h001748"><title>AddWhiteFrame</title> +<indexterm><primary>AddWhiteFrame</primary></indexterm> +<para>The AddWhiteFrame method is currently identical +to the <link linkend="h001709">AddWhiteRect</link> method.</para> +</section> + +<section id="h001722"><title>AddGrayRect</title> +<indexterm><primary>AddGrayRect</primary></indexterm> +<programlisting> +<![CDATA[ +>>-aUserDialog~AddGrayRect(--x--,--y--,--cx--,--cy--------------> + +>--+----------------------------------------+--)--------------->< + +-,--+----------------------+--+-------+-+ + | +------------+ | +-,--id-+ + | V | | + +-"----+-HIDDEN-+-+--"-+ + +-BORDER-+ + + +]]> +</programlisting> + +<para>The AddGrayRect method adds a gray rectangle to +the dialog. </para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>See <link linkend="h001709">AddWhiteRect</link> for a description of the arguments. +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="h001761"><title>AddGreyFrame</title> +<indexterm><primary>AddGrayFrame</primary></indexterm> +<para>The AddGreyFrame method is currently identical +to the <link linkend="h001722">AddGreyRect</link> method.</para> +</section> + +<section id="h001735"><title>AddBlackRect</title> +<indexterm><primary>AddBlackRect</primary></indexterm> +<programlisting> +<![CDATA[ +>>-aUserDialog~AddBlackRect(--x--,--y--,--cx--,--cy-------------> + +>--+----------------------------------------+--)--------------->< + +-,--+----------------------+--+-------+-+ + | +------------+ | +-,--id-+ + | V | | + +-"----+-HIDDEN-+-+--"-+ + +-BORDER-+ + + +]]> +</programlisting> + +<para>The AddBlackRect method adds a black rectangle +to the dialog. </para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>See <link linkend="h001709">AddWhiteRect</link> for a description of the arguments. +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="h001774"><title>AddBlackFrame</title> +<indexterm><primary>AddBlackFrame</primary></indexterm> +<para>The AddBlackFrame method is currently identical +to the <link linkend="h001735">AddBlackRect</link> method.</para> +</section> + <section id="mthAddText"><title>AddText</title> <indexterm><primary>AddText</primary></indexterm> <programlisting> @@ -1421,6 +1605,7 @@ </listitem></varlistentry> </variablelist> </section> +</section> <!-- End Add Static Controls section --> <section id="mthAddEntryLine"><title>AddEntryLine</title> <indexterm><primary>AddEntryLine</primary></indexterm> @@ -2513,147 +2698,8 @@ ]]> </programlisting> </section> -</section> -<section id="man0007"><title>Frames and Rectangles</title> -<indexterm><primary>Frames</primary></indexterm> -<indexterm><primary>Rectangles</primary></indexterm> -<para>The methods listed below add simple graphical elements to the dialog. They -are useful for giving the dialog a nice finish. Use <link linkend="fig56">Frames and Rectangles in 3D Style</link> to -help you find the right element.</para> -<figure id="fig56"><title>Frames and Rectangles in 3D Style</title> -<mediaobject> -<imageobject> -<!-- Note! - if we include a /imagedata tag we get an error for DSSSL! --> -<imagedata fileref="rxou0s20.jpg" scale="70"> -</imageobject> -</mediaobject> -</figure> - -<note><title>Note</title><para> -There is currently no difference between rectangles and frames. -</para></note> - -<section id="h001709"><title>AddWhiteRect</title> -<indexterm><primary>AddWhiteRect</primary></indexterm> -<programlisting> -<![CDATA[ ->>-aUserDialog~AddWhiteRect(--x--,--y--,--cx--,--cy-------------> - ->--+------------------------------------+--)------------------->< - | +------------+ | - | V | | - +-,--"----+-HIDDEN-+-+--"--+-------+-+ - +-BORDER-+ +-,--id-+ - - -]]> -</programlisting> - -<para>The AddWhiteRect method adds a white rectangle -to the dialog. </para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments are: -<variablelist> -<varlistentry><term>x, y</term> -<listitem><para>The position of the rectangle's upper-left corner relative to the dialog -measured in dialog units -</para></listitem></varlistentry> -<varlistentry><term>cx, cy</term> -<listitem><para>The size of the rectangle in dialog units -</para></listitem></varlistentry> -<varlistentry><term>options</term> -<listitem><para>The options can be: -<variablelist> -<varlistentry><term>HIDDEN</term> -<listitem><para>The frame or rectangle is not visible at startup time -</para></listitem></varlistentry> -<varlistentry><term>BORDER</term> -<listitem><para>A border is drawn around the rectangle or frame -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term>id</term> -<listitem><para>The ID of the item, -1 is used by default -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="h001748"><title>AddWhiteFrame</title> -<indexterm><primary>AddWhiteFrame</primary></indexterm> -<para>The AddWhiteFrame method is currently identical -to the <link linkend="h001709">AddWhiteRect</link> method.</para> -</section> - -<section id="h001722"><title>AddGrayRect</title> -<indexterm><primary>AddGrayRect</primary></indexterm> -<programlisting> -<![CDATA[ ->>-aUserDialog~AddGrayRect(--x--,--y--,--cx--,--cy--------------> - ->--+----------------------------------------+--)--------------->< - +-,--+----------------------+--+-------+-+ - | +------------+ | +-,--id-+ - | V | | - +-"----+-HIDDEN-+-+--"-+ - +-BORDER-+ - - -]]> -</programlisting> - -<para>The AddGrayRect method adds a gray rectangle to -the dialog. </para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>See <link linkend="h001709">AddWhiteRect</link> for a description of the arguments. -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="h001761"><title>AddGreyFrame</title> -<indexterm><primary>AddGrayFrame</primary></indexterm> -<para>The AddGreyFrame method is currently identical -to the <link linkend="h001722">AddGreyRect</link> method.</para> -</section> - -<section id="h001735"><title>AddBlackRect</title> -<indexterm><primary>AddBlackRect</primary></indexterm> -<programlisting> -<![CDATA[ ->>-aUserDialog~AddBlackRect(--x--,--y--,--cx--,--cy-------------> - ->--+----------------------------------------+--)--------------->< - +-,--+----------------------+--+-------+-+ - | +------------+ | +-,--id-+ - | V | | - +-"----+-HIDDEN-+-+--"-+ - +-BORDER-+ - - -]]> -</programlisting> - -<para>The AddBlackRect method adds a black rectangle -to the dialog. </para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>See <link linkend="h001709">AddWhiteRect</link> for a description of the arguments. -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="h001774"><title>AddBlackFrame</title> -<indexterm><primary>AddBlackFrame</primary></indexterm> -<para>The AddBlackFrame method is currently identical -to the <link linkend="h001735">AddBlackRect</link> method.</para> -</section> -</section> - <section id="pkcancelbutton"><title>OK and Cancel Push Buttons</title> <indexterm><primary>Cancel push buttons</primary></indexterm> <indexterm><primary>Ok push buttons</primary></indexterm> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2008-12-10 23:42:01
|
Revision: 3790 http://oorexx.svn.sourceforge.net/oorexx/?rev=3790&view=rev Author: miesfeld Date: 2008-12-10 23:41:57 +0000 (Wed, 10 Dec 2008) Log Message: ----------- incremental ooDialog doc updated Modified Paths: -------------- docs/trunk/oodialog/dialogcontrolc.sgml docs/trunk/oodialog/plainuserdialogc.sgml docs/trunk/oodialog/userdialog.sgml Modified: docs/trunk/oodialog/dialogcontrolc.sgml =================================================================== --- docs/trunk/oodialog/dialogcontrolc.sgml 2008-12-10 23:02:06 UTC (rev 3789) +++ docs/trunk/oodialog/dialogcontrolc.sgml 2008-12-10 23:41:57 UTC (rev 3790) @@ -43,38 +43,38 @@ --> <chapter id="dialogcontrolc"><title>DialogControl Class</title> <indexterm><primary>DialogControl class</primary></indexterm> -<para>The DialogControl class provides methods that are common to all dialog -controls. It is a generic class that serves as a superclass to all dialog -control specific classes. In the graphical user interface (GUI) for the Windows -operating system both dialogs and dialog controls are windows. Therefore, many -of the methods of the DialogControl class are the same as the methods of the -ooDialog dialog classes. These are the methods that are common to all windows, -whether they are dialog windows or dialog control windows. +<para> + The DialogControl class provides methods that are common to all dialog controls. It is a generic + class that serves as a superclass to all dialog control specific classes. In the graphical user + interface (GUI) for the Windows operating system both dialogs and dialog controls are windows. + Therefore, many of the methods of the DialogControl class are the same as the methods of the + ooDialog dialog classes. These are the methods that are common to all windows, whether they are + dialog windows or dialog control windows. </para> -<para id="paraDialogControlStyles">In the Windows GUI all windows are created -with a set of <emphasis role="italic">window styles</emphasis>. Dialog control -windows are created using styles that are common to all windows, (for example -the visible style,) and styles specific to the dialog control itself, (for -example the multi-line style of the -<link linkend="editcontrolc">EditControl</link> class.) In general the styles -of a control fall into three categories: Styles that can only be set when the -control is created and then can not be changed afterwards. Styles that can be -changed after the control is created by sending messages to the control. And, -styles that can be changed after the control is created by accessing the -control window directly. +<para id="paraDialogControlStyles"> + In the Windows GUI all windows are created with a set of <emphasis role="italic">window + styles</emphasis>. Dialog control windows are created using styles that are common to all + windows, (for example the visible style,) and styles specific to the dialog control itself, (for + example the multi-line style of the <link linkend="editcontrolc">EditControl</link> class.) In + general the styles of a control fall into three categories: Styles that can only be set when the + control is created and then can not be changed afterwards. Styles that can be changed after + control creation by sending messages to the control. And, styles that can be changed after the + control is created by accessing the control window directly. </para> -<para>The ooDialog programmer chooses the window styles for dialog controls when -he defines the dialog, either by using the <link linkend="addmeth">Add... -Methods</link> for a user dialog, or by using a resource editor for dialogs -defined with resource scripts or binary compiled resources. After the dialog -control has been created, the individual dialog control classes provide methods -to change those styles that can be changed, either by sending the proper message -to the control or by accessing the control window directly. +<para> + The ooDialog programmer chooses the window styles for dialog controls when he defines the dialog, + either by using a resource editor for dialogs defined with resource scripts or binary compiled + resources, or by using the <link linkend="addmeth">Add... Methods</link> for a user dialog. After + the dialog control has been created, the individual dialog control classes provide methods to + change those styles that can be changed, either by sending the proper message to the control or by + accessing the control window directly. </para> <variablelist> <varlistentry><term>Requires:</term> -<listitem><para>The DialogControl class requires the class definition -file <computeroutput>oodwin32.cls</computeroutput>: +<listitem> +<para> + The DialogControl class requires the class definition file + <computeroutput>oodwin32.cls</computeroutput>: <programlisting> <![CDATA[ ::requires oodwin32.cls Modified: docs/trunk/oodialog/plainuserdialogc.sgml =================================================================== --- docs/trunk/oodialog/plainuserdialogc.sgml 2008-12-10 23:02:06 UTC (rev 3789) +++ docs/trunk/oodialog/plainuserdialogc.sgml 2008-12-10 23:41:57 UTC (rev 3790) @@ -283,7 +283,7 @@ </row> <row> <entry>AddWhiteRect</entry> -<entry><link linkend="h001709">AddWhiteRect</link></entry> +<entry><link linkend="mthAddWhiteRect">AddWhiteRect</link></entry> </row> <row> <entry>AssignWindow</entry> Modified: docs/trunk/oodialog/userdialog.sgml =================================================================== --- docs/trunk/oodialog/userdialog.sgml 2008-12-10 23:02:06 UTC (rev 3789) +++ docs/trunk/oodialog/userdialog.sgml 2008-12-10 23:41:57 UTC (rev 3790) @@ -220,8 +220,8 @@ <entry><link linkend="h001722">AddGrayRect</link></entry> </row> <row> -<entry>AddGroupBox</entry> -<entry><link linkend="h001681">AddGroupBox</link></entry> +<entry>addGroupBox</entry> +<entry><link linkend="h001681">addGroupBox</link></entry> </row> <row> <entry>AddIcon</entry> @@ -288,6 +288,10 @@ <entry><link linkend="h001982">AddRadioStem</link></entry> </row> <row> +<entry>addStatic</entry> +<entry><link linkend="mthAddStatic">addStatic</link></entry> +</row> +<row> <entry>AddScrollBar</entry> <entry><link linkend="h001983">AddScrollBar</link></entry> </row> @@ -300,8 +304,8 @@ <entry><link linkend="h001748">AddWhiteFrame</link></entry> </row> <row> -<entry>AddWhiteRect</entry> -<entry><link linkend="h001709">AddWhiteRect</link></entry> +<entry>addWhiteRect</entry> +<entry><link linkend="mthAddWhiteRect">addWhiteRect</link></entry> </row> <row> <entry>Create</entry> @@ -829,110 +833,177 @@ associated Object Rexx attribute. Add... methods cannot be used after <link linkend="h000048">Execute</link> has started. </para> -<note><title>Note</title> -<para> Unless otherwise stated, the coordinates (the x, y, cx, and cy arguments) -of the dialog control definitions are specified in dialog units. -</para></note> -<para>The behavior and appearance of all dialog controls created using one of -the Add... methods are controlled by a style option. For each of the Add... -methods, one of the arguments consists of a set of keywords that define the -style of the control being defined. These keywords allow the programmer to -change the default behavior and / or appearance of the control. +<para id="paraStyleExplanation"> + The behavior and appearance of all dialog controls created using one of the Add... methods are + controlled by a style option. For each of the Add... methods, one of the arguments consists of a + set of keywords that define the style of the control being defined. These keywords allow the + programmer to change the default behavior and / or appearance of the control. </para> -<para>There are five styles that all dialog controls share. The following list -explains these styles and the keywords that are used for the styles. In many -cases, there is a common default value for the style and the programmer only -needs to specify a keyword when she wants a non-default value for the style. -For instance, normally all dialog controls are created enabled. The programmer -would only need to specify the <emphasis role="bold">DISABLED</emphasis> keyword -when the control should be disabled as the dialog is first displayed. +<para> + There are five styles that all dialog controls share: </para> +<itemizedlist> + <listitem><para>Visible</para></listitem> + <listitem><para>Enabled</para></listitem> + <listitem><para>Border</para></listitem> + <listitem><para>Group</para></listitem> + <listitem><para>TabStop</para></listitem> +</itemizedlist> +<para> + The following style keyword list explains these styles and how the keywords are used for the + styles. In many cases, there is a common default value for the style and the programmer only + needs to specify a keyword when she wants a non-default value for the style. For instance, + normally all dialog controls are created enabled. The programmer would only need to specify the + DISABLED keyword when the control should be disabled as the dialog is first displayed. +</para> <variablelist> -<varlistentry><term id="wsvisible">Visible</term> -<listitem><para>All windows (and every dialog control is a window) can be -visible or invisible. When a control is invisible it is not displayed on the -screen and the user will not see it. The control is also not active and will -not accept any keyboard or mouse input. But, the control still exists and does -not lose any of its internal state. Since the control is invisible, whatever is -underneath it will be displayed on the screen. Normally this would be the owner -dialog. However, it could also be another dialog control. If this other dialog -control is visible, the user will see and can interact with it rather than the -invisible control. +<varlistentry><term id="wsvisible"><emphasis role="bold">HIDDEN</emphasis></term> + <listitem> + <para> + All windows (and every dialog control is a window) can be visible or invisible. When a control + is invisible it is not displayed on the screen and the user will not see it. The control is + also not active and will not accept any keyboard or mouse input. But, the control still exists + and does not lose any of its internal state. Since the control is invisible, whatever is + underneath it will be displayed on the screen. Normally this would be the owner dialog. + However, it could also be another dialog control. If this other dialog control is visible, the + user will see and can interact with it rather than the invisible control. + </para> + <para> + In ooDialog by default all controls created using the Add... methods will be created visible. + To change the default for any control when using the Add... methods add the HIDDEN keyword to + the style argument. This will make the control invisible when the dialog is first shown on the + screen. + </para> + <para> + For any control, the visible style can be changed during program execution by using the <link + linkend="hide">Hide</link> or <link linkend="showdc">Show</link> methods. (Or any of the related + methods like <link linkend="hidefast">HideFast</link>, <link linkend="display">Display</link>, + etc..) + </para></listitem> +</varlistentry> +<varlistentry><term id="wsdisabled"><emphasis role="bold">DISABLED</emphasis></term> + <listitem> + <para> + All windows can be disabled or enabled. When a dialog control is disabled it will not accept + keyboard or mouse input and therefore the user can not interact with it. The operating system + will draw disabled controls in a different manner than enabled controls to give the user a + visual clue that the control is disabled. + </para> + <para> + When using the Add... methods controls will be created enabled. To change this for any control + add the DISABLED keyword to the style argument. The control will then be disabled when the + dialog is first shown on the screen. + </para> + <para> + All controls can have their enabled style changed during program execution by using the <link + linkend="disable">Disable</link> or <link linkend="enable">Enable</link> methods. (Or any of the + related methods like <link linkend="h001229">DisableItem</link>, <link + linkend="h001221">EnableItem</link>, etc..) + </para></listitem> +</varlistentry> +<varlistentry><term id="wsborder"><emphasis role="bold">BORDER, NOBORDER</emphasis></term> + <listitem> + <para> + Most, but not all, windows are drawn with a border. When using the Add... methods individual + controls are drawn by default with, or without, a border. The default is changed by using + either the BORDER or NOBORDER keywords. The reference for each individual Add... method notes + the default for the control for this style and which keyword is used to change the default. In + general, this style can not be changed after a control is created. + </para></listitem> +</varlistentry> +<varlistentry> + <term id="wsgroup"><emphasis role="bold">GROUP</emphasis></term> + <listitem> + <para> + This style is used to place a series of consecutive dialog controls in a group. The first + control with the group style starts a new group of controls. This group continues for each + control that does not have the group style. As soon as a successive control is encountered with + the group style, a new group is started. This style is only meaningful for dialog control + windows. + </para> + <para> + The Windows dialog manager uses this style to determine the behavior of a dialog, mostly the + navigation behavior. Within a group of controls the user navigates from one control to the + other using the arrow keys rather than the tab key. + </para> + <para> + The GROUP keyword is used to give a control the group style when it is created using one of the + Add... methods. After the control has been created its group style can be changed during the + execution of a dialog by using the <link linkend="mthSetGroup">SetGroup</link> method of the + PlainBaseDialog class or the <link linkend="mthGroup">Group</link> method of the DialogControl + class. + </para></listitem> +</varlistentry> +<varlistentry> + <term id="wstabstop"><emphasis role="bold">TAB, NOTAB</emphasis></term> + <listitem> + <para> + The tabstop style is another style that is only meaningful with dialog controls. When a control + has the tabstop style the user can navigate to it using the tab key. If a control does not have + this style, the tab key will skip over the control. Dialog controls in the same class usually + all have the same style for tabstop. As an example, all button controls usually have the + tabstop style, whereas all static text controls usually do not have the tabstop style. + </para> + <para> + When a control as added to an UserDialog instance it is given the tabstop style that is normal + for the control. The individual Add... methods document the default for the control. The + programmer uses either the TAB or NOTAB keywords to change the default. After controls have been + created they can have their tabstop style changed using the <link + linkend="mthSetTabSTop">SetTabStop</link> method of the PlainBaseDialog class or the <link + linkend="mthTabStop">TabStop</link> method of the DialogControl class. + </para></listitem> +</varlistentry> +</variablelist> +<para> + All dialog controls have a position and size. The position of the control is specified by the + coordinates of its upper left corner (x, y) and the size is specified by its width (cx) and height + (cy). Windows uses a coordinate system that specifies the upper left corner of the screen as + (0,0). Moving to the left in this system increases the x value and moving down increases the y + value. Negative values for either x or y would then move off the screen. (Normally. This simple + explanation becomes more complicated with dual-monitor systems.) + <note><title>Note</title> + <para> + Unless otherwise stated, the coordinates (the x, y, cx, and cy arguments) of the dialog control + definitions are specified in dialog units. + </para></note> + <note><title>Note</title> + <para> + When dialog controls are defined, their position and size is specified in relation to the upper + left corner of the dialog's <emphasis role="italic">client window</emphasis>. Specifying the + position relative to the screen would of course be meaningless as the dialog is moved + around. + </para></note> </para> -<para>In ooDialog by default all controls created using the Add... methods will -be created visible. To change the default for any control when using the Add... -methods add the <emphasis role="bold">HIDDEN</emphasis> keyword to the style -argument. This will make the control invisible when the dialog is first shown -on the screen. +<para> + All the Add... Methods that create a single control have the following common arguments. Some of + the other Add... Methods that create a group of controls will only take the postion, or the size + arguments: </para> -<para>For any control, the visible style can be changed during program execution -by using the <link linkend="hide">Hide</link> or <link linkend="showdc">Show</link> -methods. (Or any of the related methods like <link linkend="hidefast">HideFast</link>, -<link linkend="display">Display</link>, etc..) -</para></listitem></varlistentry> -<varlistentry><term id="wsdisabled">Enabled</term> -<listitem><para>All windows can be disabled or enabled. When a dialog control -is disabled it will not accept keyboard or mouse input and therefore the user -can not interact with it. The operating system will draw disabled controls in a -different manner than enabled controls to give the user a visual clue that the -control is disabled.</para> -<para>When using the Add... methods controls will be created enabled. To -change this for any control add the <emphasis role="bold">DISABLED</emphasis> -keyword to the style argument. The control will then be disabled when the -dialog is first shown on the screen. -</para> -<para>All controls can have their enabled style changed during program execution -by using the <link linkend="disable">Disable</link> or <link linkend="enable">Enable</link> -methods. (Or any of the related methods like <link linkend="h001229">DisableItem</link>, -<link linkend="h001221">EnableItem</link>, etc..) -</para></listitem></varlistentry> -<varlistentry><term id="wsborder">Border</term> -<listitem><para>Most, but not all, windows are drawn with a border. When using -the Add... methods individual controls are drawn by default with, or without, a -border. The default is changed by using either the <emphasis role="bold">BORDER</emphasis> -or <emphasis role="bold">NOBORDER</emphasis> keywords. The reference for each -individual Add... method notes the default for the control for this style and -which keyword is used to change the default. In general, this style can not be -changed after a control is created. -</para></listitem></varlistentry> -<varlistentry><term id="wsgroup">Group</term> -<listitem><para>This style is used to place a series of consecutive dialog -controls in a group. The first control with the group style starts a new group -of controls. This group continues for each control that does not have the group -style. As soon as a successive control is encountered with the group style, a -new group is started. This style is only meaningful for dialog control windows. -</para> -<para>The Windows dialog manager uses this style to determine the behavior of a -dialog, mostly the navigation behavior. Within a group of controls the user -navigates from one control to the other using the arrow keys rather than the tab -key. -</para> -<para>The <emphasis role="bold">GROUP</emphasis> keyword is used to give a -control the group style when it is created using one of the Add... methods. -After the control has been created its group style can be changed during the -execution of a dialog by using the <link -linkend="mthSetGroup">SetGroup</link> method of the PlainBaseDialog class or -the <link linkend="mthGroup">Group</link> method of the DialogControl class. -</para></listitem></varlistentry> -<varlistentry><term id="wstabstop">Tabstop</term> -<listitem><para>The tabstop style is another style that is only meaningful with -dialog controls. When a control has the tabstop style the user can navigate to -it using the tab key. If a control does not have this style, the tab key will -skip over the control. Dialog controls in the same class usually all have the -same style for tabstop. As an example, all button controls usually have the -tabstop style, whereas all static text controls usually do not have the tabstop -style. -</para> -<para>When a control as added to an UserDialog instance it is given the tabstop -style that is normal for the control. The individual Add... methods document the -default for the control. The programmer uses either the -<emphasis role="bold">TAB</emphasis> or -<emphasis role="bold">NOTAB</emphasis> keywords to change the default. After -controls have been created they can have their tabstop style changed using the -<link linkend="mthSetTabSTop">SetTabStop</link> method of the PlainBaseDialog -class or the <link linkend="mthTabStop">TabStop</link> method of the -DialogControl class. -</para></listitem></varlistentry> +<variablelist id="listControlCoordinates"> +<varlistentry><term id="xCoordinate"><emphasis role="bold">x</emphasis></term> + <listitem> + <para> + The left position of the control in the dialog's client window, in dialog units. + </para></listitem> +</varlistentry> +<varlistentry><term id="yCoordinate"><emphasis role="bold">y</emphasis></term> + <listitem> + <para> + The top position of the control in the dialog's client window, in dialog units. + </para></listitem> +</varlistentry> +<varlistentry><term id="cxCoordinate"><emphasis role="bold">cx</emphasis></term> + <listitem> + <para> + The width of the control in dialog units. + </para></listitem> +</varlistentry> +<varlistentry><term id="cyCoordinate"><emphasis role="bold">cx</emphasis></term> + <listitem> + <para> + The height of the control in dialog units. + </para></listitem> +</varlistentry> </variablelist> <section id="h001647"><title>AddButton</title> @@ -941,7 +1012,7 @@ <![CDATA[ >>-aUserDialog~AddButton(--id--,--x--,--y--,--cx--,--cy--,--text--> ->--+-----------------------------------------------+--)--------->< +>--+-----------------------------------------------+--)-------->< +-,--msgToRaise--+----------------------------+-+ | .---------------+ | | V | | @@ -1324,44 +1395,67 @@ </variablelist> </section> -<section id="h001681"><title>AddGroupBox</title> -<indexterm><primary>AddGroupBox</primary></indexterm> +<section id="h001681"><title>addGroupBox</title> +<indexterm><primary>addGroupBox</primary></indexterm> <programlisting> <![CDATA[ ->>-aUserDialog~AddGroupBox(--x--,--y--,--cx--,--cy--,--text-----> +>>-dlg~addGroupBox(--x-,-y-,-cx-,-cy--,--text--+-----------+--------+--)------>< + +-,--style--+-,--id--+ ->--+------------------------+--)------------------------------->< - +-,--"BORDER"--+-------+-+ - +-,--id-+ - - ]]> </programlisting> -<para>The AddGroupBox method adds a group box to the -dialog. A group box has a frame and a title. </para> +<para> + The addGroupBox method adds a group box to the dialog. A group box is actually a button control. A + group box can have a frame and a title. +</para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments are the same as for <link linkend="h001647">AddButton</link>, -with the changes listed below: +<listitem> <variablelist> +<varlistentry><term>x, y, cx, cy</term> +<listitem><para>The <link linkend="listControlCoordinates">control coordinates</link> +</para></listitem></varlistentry> <varlistentry><term>text</term> -<listitem><para>The title of the group box +<listitem><para>The text for the group box title. </para></listitem></varlistentry> -<varlistentry><term>options</term> +<varlistentry><term>style</term> +<listitem> + <para> + A list of the <link linkend="paraStyleExplanation">style</link> keywords separated by spaces: + <variablelist> + <varlistentry><term>RIGHT</term> + <listitem><para>Normaly the text is aligned to the upper left of the group box frame. This + style aligns the text to the upper right of the frame + </para></listitem></varlistentry> + <varlistentry><term>HIDDEN</term> + <listitem><para>The <link linkend="wsvisible">not visible</link> window style. + </para></listitem></varlistentry> + <varlistentry><term>DISABLED</term> + <listitem><para>The <link linkend="wsborder">not enabled</link> window style. + </para></listitem></varlistentry> + <varlistentry><term>BORDER</term> + <listitem><para>The <link linkend="wsborder">border</link> window style. + </para></listitem></varlistentry> + <varlistentry><term>GROUP</term> + <listitem><para>The <link linkend="wsborder">group</link> control style. + </para></listitem></varlistentry> + <varlistentry><term>TAB</term> + <listitem><para>The <link linkend="wsborder">tab</link> control style. + </para></listitem></varlistentry> + </variablelist> + </para></listitem></varlistentry> +<varlistentry><term>id</term> <listitem><para> -<variablelist> -<varlistentry><term>BORDER</term> -<listitem><para>A rectangle is drawn around the group box + The resource id of the group box. By the default a group box is assigned a resource id of -1. + Assigning a positive id allows the programmer to modify the group box after it is created, perhaps + to change the text of its title, change its postition. </para></listitem></varlistentry> </variablelist> -</para></listitem></varlistentry> +</listitem></varlistentry> </variablelist> -</para></listitem></varlistentry> -</variablelist> </section> - <section id="sectAddStaticControls"><title>Add Static Controls</title> <indexterm><primary>Add staic control methods</primary></indexterm> <para> @@ -1370,8 +1464,8 @@ linkend="mthAddStatic">addStatic</link> method is all that is needed. You control the appearance and behavior of the static control in the same way as with other controls, by specifying the appropriate control styles. Given the proper combination of style keywords, the - <computeroutput>addStatic</computeroutput> can create any static control that the other methods in - this section create. + <computeroutput>addStatic</computeroutput> method can create any static control that the other + methods in this section create. </para> <para> However, there are a large number of style keywords for the static control. Many of the keywords @@ -1384,9 +1478,9 @@ A word about frames and rectangles. In previous versions of the ooDialog reference frames and rectangles were documented as though they were a type of separate controls. They are not, they are just a static control with a particular style. The <link linkend="fig56">Frames and - Rectangles</link> picture gives some idea of the different types of static controls. - - <figure id="fig56"><title>Frames and Rectangles in 3D Style</title> + Rectangles</link> picture gives some idea of how the different types of static controls can + appear. + <figure id="fig56"><title>Frames and Rectangles</title> <mediaobject> <imageobject> <!-- Note! - if we include a /imagedata tag we get an error for DSSSL! --> @@ -1395,55 +1489,166 @@ </mediaobject> </figure> </para> -<note><title>Note</title> -<para> - The difference between frames and rectangles is subtle -</para></note> <section id="mthAddStatic"><title>addStatic</title> <indexterm><primary>addStatic</primary></indexterm> <programlisting> <![CDATA[ ->>-aUserDialog~AddGrayRect(--x--,--y--,--cx--,--cy--------------> + +_-1_+ +-,-"TEXT"-+ +-,-""----+ +>>-dlg~addStatic(--+----+--,-x-,-y-,-cx-,-cy--+----------+--+---------+--)---->< + +-id-+ +-,-style--+--+-,-text--+ ->--+----------------------------------------+--)--------------->< - +-,--+----------------------+--+-------+-+ - | +------------+ | +-,--id-+ - | V | | - +-"----+-HIDDEN-+-+--"-+ - +-BORDER-+ - - ]]> </programlisting> - -<para>The AddGrayRect method adds a gray rectangle to -the dialog. </para> +<para> + The addStatic method adds any type of static control. +</para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>See <link linkend="h001709">AddWhiteRect</link> for a description of the arguments. +<listitem><para> +<variablelist> +<varlistentry><term>id</term> +<listitem><para> + The resource id for the control By default a static control is assigned a resource id of -1. + Assigning a positive id allows the programmer to modify the static control after it is created, + perhaps to change its text or to change its postition. </para></listitem></varlistentry> +<varlistentry><term>x, y, cx, cy</term> +<listitem><para>The <link linkend="listControlCoordinates">control coordinates</link> +</para></listitem></varlistentry> +<varlistentry><term>style</term> +<listitem> + <para> + A list of the <link linkend="paraStyleExplanation">style</link> keywords separated by spaces. + The keywords: TEXT, BITMAP, METAFILE, ICON, WHITERECT, GRAYRECT, BLACKRECT, WHITEFRAME, + GRAYFRAME, BLACKFRAME, ETCHED, HORZ, and VERT determine the type of static control to be + created. If more than one of these type keywords is specified, which static control is created + is undefined. The other style keywords modify the appearance or behavior of the static control. + <variablelist> + <varlistentry><term>TEXT</term> + <listitem><para>A static text control is created, this is the default. + </para></listitem></varlistentry> + <varlistentry><term>BITMAP</term> + <listitem><para>A static image control is created that will use a bitmap. + </para></listitem></varlistentry> + <varlistentry><term>METAFILE</term> + <listitem><para>A static image control that uses a metafile will be created. + </para></listitem></varlistentry> + <varlistentry><term>ICON</term> + <listitem><para>A static image control that uses an icon will be created. + </para></listitem></varlistentry> + <varlistentry><term>WHITERECT</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>WHITEFRAME</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>GRAYRECT</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>GRAYFRAME</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>BLACKRECT</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>BLACKFRAME</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>ETCHED</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>HORZ</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>VERT</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>CENTER</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>RIGHT</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>SIMPLE</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>LEFTNOWRAP</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>LEFT</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>NOTIFY</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>SUNKEN</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>EDITCONTROL</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>ENDELLIPSIS</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>NOPREFIX</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>PATHELLIPSIS</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>WORDELLIPSIS</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>CENTERIMAGE</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>RIGHTJUST</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>SIZECONTROL</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>SIZEIMAGE</term> + <listitem><para>keyword explanation + </para></listitem></varlistentry> + <varlistentry><term>HIDDEN</term> + <listitem><para>The <link linkend="wsvisible">not visible</link> window style. + </para></listitem></varlistentry> + <varlistentry><term>DISABLED</term> + <listitem><para>The <link linkend="wsborder">not enabled</link> window style. + </para></listitem></varlistentry> + <varlistentry><term>BORDER</term> + <listitem><para>The <link linkend="wsborder">border</link> window style. + </para></listitem></varlistentry> + <varlistentry><term>GROUP</term> + <listitem><para>The <link linkend="wsborder">group</link> control style. + </para></listitem></varlistentry> + <varlistentry><term>TAB</term> + <listitem><para>The <link linkend="wsborder">tab</link> control style. + </para></listitem></varlistentry> + </variablelist> + </para></listitem></varlistentry> </variablelist> +</para></listitem></varlistentry> +</variablelist> + </section> -<section id="h001709"><title>AddWhiteRect</title> -<indexterm><primary>AddWhiteRect</primary></indexterm> +<section id="mthAddWhiteRect"><title>addWhiteRect</title> +<indexterm><primary>addWhiteRect</primary></indexterm> <programlisting> <![CDATA[ ->>-aUserDialog~AddWhiteRect(--x--,--y--,--cx--,--cy-------------> ->--+------------------------------------+--)------------------->< - | +------------+ | - | V | | - +-,--"----+-HIDDEN-+-+--"--+-------+-+ - +-BORDER-+ +-,--id-+ +>>-dlg~addWhiteRect(--x-,-y-,-cx-,-cy--,--text--+-----------+--------+--)------>< + +-,--style--+-,--id--+ ]]> </programlisting> -<para>The AddWhiteRect method adds a white rectangle +<para>The addWhiteRect method adds a white rectangle to the dialog. </para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> @@ -1478,7 +1683,7 @@ <section id="h001748"><title>AddWhiteFrame</title> <indexterm><primary>AddWhiteFrame</primary></indexterm> <para>The AddWhiteFrame method is currently identical -to the <link linkend="h001709">AddWhiteRect</link> method.</para> +to the <link linkend="mthAddWhiteRect">addWhiteRect</link> method.</para> </section> <section id="h001722"><title>AddGrayRect</title> @@ -1502,7 +1707,7 @@ the dialog. </para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>See <link linkend="h001709">AddWhiteRect</link> for a description of the arguments. +<listitem><para>See <link linkend="mthAddWhiteRect">addWhiteRect</link> for a description of the arguments. </para></listitem></varlistentry> </variablelist> </section> @@ -1534,7 +1739,7 @@ to the dialog. </para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>See <link linkend="h001709">AddWhiteRect</link> for a description of the arguments. +<listitem><para>See <link linkend="mthAddWhiteRect">addWhiteRect</link> for a description of the arguments. </para></listitem></varlistentry> </variablelist> </section> @@ -1552,7 +1757,7 @@ >>-aUserDialog~AddText(--x--,--y--,--+----+--,--+----+--,--text--> +-cx-+ +-cy-+ ->--+----------------------------------------+--)---------------->< +>--+----------------------------------------+--)--------------->< +-,--+----------------------+--+-------+-+ | .------------. | +-,--id-+ | V | | @@ -1615,7 +1820,7 @@ >>-aUserDialog~AddEntryLine(--id--,--+------+--,--x--,--y--,--cx--> +-name-+ ->--+-----------------------------------------------+---)--------->< +>--+-----------------------------------------------+---)------->< +-,--+----+--+--------------------------------+-+ +-cy-+ | +-------------------+ | | V | | @@ -2921,7 +3126,7 @@ <indexterm><primary>AddMenuItem</primary></indexterm> <programlisting> <![CDATA[ ->>-aUserDialog~AddMenuItem(--name--,--id--,--"--options--"--,--msgToRaise--)->< +>>-aUserDialog~AddMenuItem(--name--,--id--,--"--options--"--,--msgToRaise--)-->< ]]> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2008-12-11 05:21:49
|
Revision: 3792 http://oorexx.svn.sourceforge.net/oorexx/?rev=3792&view=rev Author: miesfeld Date: 2008-12-11 05:21:44 +0000 (Thu, 11 Dec 2008) Log Message: ----------- Incremental update to the ooDialog doc Modified Paths: -------------- docs/trunk/oodialog/plainuserdialogc.sgml docs/trunk/oodialog/userdialog.sgml Modified: docs/trunk/oodialog/plainuserdialogc.sgml =================================================================== --- docs/trunk/oodialog/plainuserdialogc.sgml 2008-12-11 04:02:14 UTC (rev 3791) +++ docs/trunk/oodialog/plainuserdialogc.sgml 2008-12-11 05:21:44 UTC (rev 3792) @@ -195,7 +195,7 @@ </row> <row> <entry>AddGroupBox</entry> -<entry><link linkend="h001681">AddGroupBox</link></entry> +<entry><link linkend="mthAddGroupBox">AddGroupBox</link></entry> </row> <row> <entry>AddIcon</entry> Modified: docs/trunk/oodialog/userdialog.sgml =================================================================== --- docs/trunk/oodialog/userdialog.sgml 2008-12-11 04:02:14 UTC (rev 3791) +++ docs/trunk/oodialog/userdialog.sgml 2008-12-11 05:21:44 UTC (rev 3792) @@ -221,7 +221,7 @@ </row> <row> <entry>addGroupBox</entry> -<entry><link linkend="h001681">addGroupBox</link></entry> +<entry><link linkend="mthAddGroupBox">addGroupBox</link></entry> </row> <row> <entry>AddIcon</entry> @@ -979,38 +979,54 @@ the other Add... Methods that create a group of controls will only take the postion, or the size arguments: </para> -<variablelist id="listControlCoordinates"> -<varlistentry><term id="xCoordinate"><emphasis role="bold">x</emphasis></term> +<variablelist id="listCommonArguments"> +<varlistentry><term id="xArgument"><emphasis role="bold">x</emphasis></term> <listitem> <para> The left position of the control in the dialog's client window, in dialog units. </para></listitem> </varlistentry> -<varlistentry><term id="yCoordinate"><emphasis role="bold">y</emphasis></term> +<varlistentry><term id="yArgument"><emphasis role="bold">y</emphasis></term> <listitem> <para> The top position of the control in the dialog's client window, in dialog units. </para></listitem> </varlistentry> -<varlistentry><term id="cxCoordinate"><emphasis role="bold">cx</emphasis></term> +<varlistentry><term id="cxArgument"><emphasis role="bold">cx</emphasis></term> <listitem> <para> The width of the control in dialog units. </para></listitem> </varlistentry> -<varlistentry><term id="cyCoordinate"><emphasis role="bold">cx</emphasis></term> +<varlistentry><term id="cyArgument"><emphasis role="bold">cx</emphasis></term> <listitem> <para> The height of the control in dialog units. </para></listitem> </varlistentry> +<varlistentry><term id="idArgument"><emphasis role="bold">id</emphasis></term> + <listitem> + <para id="paraResouceIDs"> + All dialog controls have a numeric <link linkend="resourceid">resource</link> ID. The ooDialog + framework is designed to accept a <link linkend="symbolicid">symbolic</link> ID anywhere a + resource ID is needed. All the Add... methods accepted a symbolic ID for the id argument. + <para> + By default static controls and group boxes are assigned a resource id of -1. However, assigning + a positive id allows the programmer to modify the static control or group box after it is + created, perhaps to change the text of its title, or to change its postition. Without a positive + ID, a static control or group box can not be modified. Which is fine, normally static controls + and group boxes do not need to be modified. + </para></listitem> +</varlistentry> </variablelist> <section id="h001647"><title>AddButton</title> <indexterm><primary>AddButton</primary></indexterm> <programlisting> <![CDATA[ ->>-aUserDialog~AddButton(--id--,--x--,--y--,--cx--,--cy--,--text--> + +-,-""---+ +>>-aUserDialog~AddButton(--id--,--x--,--y--,--cx--,--cy--,-+--------+----> + +-,-text-+ >--+-----------------------------------------------+--)-------->< +-,--msgToRaise--+----------------------------+-+ @@ -1043,96 +1059,86 @@ <listitem><para>The arguments are: <variablelist> <varlistentry><term>id</term> -<listitem><para>The <link linkend="resourceid">resource ID</link> (numeric or -symbolic) for the button. Each control in a dialog (other than static controls) -must be assigned a unique resource ID. +<listitem> + <para> + The resource <link linkend="idArgument">ID</link> for the button. + </para> +</listitem></varlistentry> +<varlistentry><term>x, y, cx, cy</term> +<listitem><para>The <link linkend="listCommonArguments">control coordinates</link> </para></listitem></varlistentry> -<varlistentry><term>x, y</term> -<listitem><para>The position of the button's upper-left corner relative to the dialog -measured in dialog units -</para></listitem></varlistentry> -<varlistentry><term>cx</term> -<listitem><para>The width of the button in dialog units -</para></listitem></varlistentry> -<varlistentry><term>cy</term> -<listitem><para>The height of the button in dialog units -</para></listitem></varlistentry> <varlistentry><term>text</term> -<listitem><para>The label that is displayed for the button +<listitem><para>The text for the label of the button. </para></listitem></varlistentry> <varlistentry><term>msgToRaise</term> <listitem><para>The name of a method of the dialog class that is to be invoked each time the button is clicked </para></listitem></varlistentry> <varlistentry><term>style</term> -<listitem><para>The last argument can be one or more of the following keywords: -<variablelist> -<varlistentry><term>DEFAULT</term> -<listitem><para>The button becomes the default button in the dialog. -</para></listitem></varlistentry> -<varlistentry><term>OWNER</term> -<listitem><para>The programmer is completely responsible for drawing the button -when the dialog receives the WM_DRAWITEM message. Currently this would be -difficult (but not impossible) to implement in ooDialog. A simpler approach for -an owner drawn button is to use a bitmap button. See the <link -linkend="mthAddBitmapButton">AddBitmapButton</link> method. -</para></listitem></varlistentry> -<varlistentry><term>LEFT</term> -<listitem><para>Left justifies the text in the button rectangle. If neither -LEFT nor RIGHT are specified the text is centered in the button rectangle. -</para></listitem></varlistentry> -<varlistentry><term>RIGHT</term> -<listitem><para>Right justifies the text in the button rectangle. If neither -LEFT nor RIGHT are specified the text is centered in the button rectangle. -</para></listitem></varlistentry> -<varlistentry><term>TOP</term> -<listitem><para>The text is aligned at the top of the button rectangle. If -neither TOP nor BOTTOM are specified the text is vertically centered in the -button rectangle. -</para></listitem></varlistentry> -<varlistentry><term>BOTTOM</term> -<listitem><para>The text is aligned at the bottom of the button rectangle. If -neither TOP nor BOTTOM are specified the text is vertically centered in the -button rectangle. -</para></listitem></varlistentry> -<varlistentry><term>MULTILINE</term> -<listitem><para>If the text for the label of the button is longer than the width -of the button rectangle, the operating system will word wrap the text producing -more than one line. The height of the button rectangle has to be sufficient to -display the extra line(s) or the text is clipped. -</para></listitem></varlistentry> -<varlistentry><term>NOTIFY</term> -<listitem><para>Enables the button to send notifications for the gained focus, -lost focus, and double click events. This is only necessary when the <link -linkend="connectbuttonnotify">ConnectButtonNotify</link> method is used, and -only for the GOTFOCUS, LOSTFOCUS, or DBLCLK keywords of that method. -</para></listitem></varlistentry> -<varlistentry><term>FLAT</term> -<listitem><para>The button is drawn with a flat appearance, i.e., it is drawn as -a flat rectangle the label text inside the rectangle. -</para></listitem></varlistentry> -<varlistentry><term>HIDDEN</term> -<listitem><para>Create the button without the <link -linkend="wsvisible">visible</link> style. -</para></listitem></varlistentry> -<varlistentry><term>DISABLED</term> -<listitem><para>Create the button without the <link -linkend="wsdisabled">enabled</link> style. -</para></listitem></varlistentry> -<varlistentry><term>GROUP</term> -<listitem><para>Create the button with the <link linkend="wsgroup">group</link> -style. -</para></listitem></varlistentry> -<varlistentry><term>NOTAB</term> -<listitem><para>Create the button without the <link -linkend="wstabstop">tabstop</link> style. By default the button is created -with the tabstop style. -</para></listitem></varlistentry> -<varlistentry><term>BORDER</term> -<listitem><para>Create the button with the <link -linkend="wsborder">border</link> style. By default buttons are created -without a border. -</para></listitem></varlistentry> + <listitem> + <para> + A list of 0 or more <link linkend="paraStyleExplanation">style</link> keywords separated by + spaces: + <variablelist> + <varlistentry><term>DEFAULT</term> + <listitem><para>The button becomes the default button in the dialog. + </para></listitem></varlistentry> + <varlistentry><term>OWNER</term> + <listitem><para>The programmer is completely responsible for drawing the button + when the dialog receives the WM_DRAWITEM message. Currently this would be + difficult (but not impossible) to implement in ooDialog. A simpler approach for + an owner drawn button is to use a bitmap button. See the <link + linkend="mthAddBitmapButton">AddBitmapButton</link> method. + </para></listitem></varlistentry> + <varlistentry><term>LEFT</term> + <listitem><para>Left justifies the text in the button rectangle. If neither + LEFT nor RIGHT are specified the text is centered in the button rectangle. + </para></listitem></varlistentry> + <varlistentry><term>RIGHT</term> + <listitem><para>Right justifies the text in the button rectangle. If neither + LEFT nor RIGHT are specified the text is centered in the button rectangle. + </para></listitem></varlistentry> + <varlistentry><term>TOP</term> + <listitem><para>The text is aligned at the top of the button rectangle. If + neither TOP nor BOTTOM are specified the text is vertically centered in the + button rectangle. + </para></listitem></varlistentry> + <varlistentry><term>BOTTOM</term> + <listitem><para>The text is aligned at the bottom of the button rectangle. If + neither TOP nor BOTTOM are specified the text is vertically centered in the + button rectangle. + </para></listitem></varlistentry> + <varlistentry><term>MULTILINE</term> + <listitem><para>If the text for the label of the button is longer than the width + of the button rectangle, the operating system will word wrap the text producing + more than one line. The height of the button rectangle has to be sufficient to + display the extra line(s) or the text is clipped. + </para></listitem></varlistentry> + <varlistentry><term>NOTIFY</term> + <listitem><para>Enables the button to send notifications for the gained focus, + lost focus, and double click events. This is only necessary when the <link + linkend="connectbuttonnotify">ConnectButtonNotify</link> method is used, and + only for the GOTFOCUS, LOSTFOCUS, or DBLCLK keywords of that method. + </para></listitem></varlistentry> + <varlistentry><term>FLAT</term> + <listitem><para>The button is drawn with a flat appearance, i.e., it is drawn as + a flat rectangle the label text inside the rectangle. + </para></listitem></varlistentry> + <varlistentry><term>HIDDEN</term> + <listitem><para>The <link linkend="wsvisible">not visible</link> window style. + </para></listitem></varlistentry> + <varlistentry><term>DISABLED</term> + <listitem><para>The <link linkend="wsborder">not enabled</link> window style. + </para></listitem></varlistentry> + <varlistentry><term>BORDER</term> + <listitem><para>The <link linkend="wsborder">border</link> window style. + </para></listitem></varlistentry> + <varlistentry><term>GROUP</term> + <listitem><para>The <link linkend="wsborder">group</link> control style. + </para></listitem></varlistentry> + <varlistentry><term>NOTAB</term> + <listitem><para>The no <link linkend="wsborder">tabstop</link> control style. + </para></listitem></varlistentry> </variablelist> </para></listitem></varlistentry> </variablelist> @@ -1395,12 +1401,13 @@ </variablelist> </section> -<section id="h001681"><title>addGroupBox</title> +<section id="mthAddGroupBox"><title>addGroupBox</title> <indexterm><primary>addGroupBox</primary></indexterm> <programlisting> <![CDATA[ ->>-dlg~addGroupBox(--x-,-y-,-cx-,-cy--,--text--+-----------+--------+--)------>< - +-,--style--+-,--id--+ + +-,-""----+-,--""-----+-,__-1__+ +>>-dlg~addGroupBox(--x-,-y-,-cx-,-cy--+---------+-----------+--------+--)----->< + +-,-text--+-,--style--+-,--id--+ ]]> </programlisting> @@ -1411,10 +1418,9 @@ </para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem> -<variablelist> +<listitem><variablelist> <varlistentry><term>x, y, cx, cy</term> -<listitem><para>The <link linkend="listControlCoordinates">control coordinates</link> +<listitem><para>The <link linkend="listCommonArguments">control coordinates</link> </para></listitem></varlistentry> <varlistentry><term>text</term> <listitem><para>The text for the group box title. @@ -1422,10 +1428,11 @@ <varlistentry><term>style</term> <listitem> <para> - A list of the <link linkend="paraStyleExplanation">style</link> keywords separated by spaces: + A list of 0 or more <link linkend="paraStyleExplanation">style</link> keywords separated by + spaces: <variablelist> <varlistentry><term>RIGHT</term> - <listitem><para>Normaly the text is aligned to the upper left of the group box frame. This + <listitem><para>Normally the text is aligned to the upper left of the group box frame. This style aligns the text to the upper right of the frame </para></listitem></varlistentry> <varlistentry><term>HIDDEN</term> @@ -1514,7 +1521,7 @@ perhaps to change its text or to change its postition. </para></listitem></varlistentry> <varlistentry><term>x, y, cx, cy</term> -<listitem><para>The <link linkend="listControlCoordinates">control coordinates</link> +<listitem><para>The <link linkend="listCommonArguments">control coordinates</link> </para></listitem></varlistentry> <varlistentry><term>style</term> <listitem> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2008-12-26 19:20:51
|
Revision: 3810 http://oorexx.svn.sourceforge.net/oorexx/?rev=3810&view=rev Author: miesfeld Date: 2008-12-26 19:20:48 +0000 (Fri, 26 Dec 2008) Log Message: ----------- Continue work on ooDialog doc update Modified Paths: -------------- docs/trunk/oodialog/Makefile docs/trunk/oodialog/oodialog.sgml docs/trunk/oodialog/resources.sgml docs/trunk/oodialog/userdialog.sgml Modified: docs/trunk/oodialog/Makefile =================================================================== --- docs/trunk/oodialog/Makefile 2008-12-26 19:19:54 UTC (rev 3809) +++ docs/trunk/oodialog/Makefile 2008-12-26 19:20:48 UTC (rev 3810) @@ -68,6 +68,7 @@ scrollbarc.sgml \ slidercontrolc.sgml \ staticcontrolc.sgml \ + resources.sgml \ tabcontrolc.sgml \ termdef.sgml \ treecontrolc.sgml \ Modified: docs/trunk/oodialog/oodialog.sgml =================================================================== --- docs/trunk/oodialog/oodialog.sgml 2008-12-26 19:19:54 UTC (rev 3809) +++ docs/trunk/oodialog/oodialog.sgml 2008-12-26 19:20:48 UTC (rev 3810) @@ -15,18 +15,19 @@ <!ENTITY utilityclasses SYSTEM "utilityclasses.sgml"> <!ENTITY mesextcl SYSTEM "mesextcl.sgml"> <!ENTITY advcntlc SYSTEM "advcntlc.sgml"> +<!ENTITY resources SYSTEM "resources.sgml"> <!ENTITY staticcontrolc SYSTEM "staticcontrolc.sgml"> +<!ENTITY buttoncontrols SYSTEM "buttoncontrols.sgml"> <!ENTITY editcontrolc SYSTEM "editcontrolc.sgml"> -<!ENTITY listcontrolc SYSTEM "listcontrolc.sgml"> -<!ENTITY buttoncontrols SYSTEM "buttoncontrols.sgml"> +<!ENTITY comboboxc SYSTEM "comboboxc.sgml"> <!ENTITY listboxc SYSTEM "listboxc.sgml"> -<!ENTITY comboboxc SYSTEM "comboboxc.sgml"> <!ENTITY scrollbarc SYSTEM "scrollbarc.sgml"> -<!ENTITY propertysheetc SYSTEM "propertysheetc.sgml"> +<!ENTITY listcontrolc SYSTEM "listcontrolc.sgml"> +<!ENTITY treecontrolc SYSTEM "treecontrolc.sgml"> +<!ENTITY slidercontrolc SYSTEM "slidercontrolc.sgml"> <!ENTITY progressbarc SYSTEM "progressbarc.sgml"> -<!ENTITY slidercontrolc SYSTEM "slidercontrolc.sgml"> <!ENTITY tabcontrolc SYSTEM "tabcontrolc.sgml"> -<!ENTITY treecontrolc SYSTEM "treecontrolc.sgml"> +<!ENTITY propertysheetc SYSTEM "propertysheetc.sgml"> <!ENTITY notices SYSTEM "../shared/notices.sgml"> <!ENTITY cpl SYSTEM "../shared/CPLv1.0.sgml"> <!ENTITY gethelp SYSTEM "../shared/gethelp.sgml"> @@ -87,36 +88,37 @@ </bookinfo> -&preface; <!-- About This Book --> +&preface; <!-- About This Book --> <!-- start of body --> -&reference; <!-- Reference --> -&termdef; <!-- Definition of Terms --> +&reference; <!-- Reference --> +&termdef; <!-- Definition of Terms --> &basedialog; <!-- BaseDialog Class --> -&dialogcontrolc; <!-- DialogControl Class --> +&dialogcontrolc; <!-- DialogControl Class --> &userdialog; <!-- UserDialog Class --> -&plainuserdialogc; <!-- PlainUserDialog Class --> -&resdialog; <!-- ResDialog Class --> -&categorydialog; <!-- CategoryDialog Class --> -&standarddialog; <!-- Standard Dialogs, External Functions, and Public Routines --> -&utilityclasses; <!-- Utility Classess, DlgUtil, Point, DlgArea, etc.. --> -&mesextcl; <!-- MessageExtensions Class --> -&advcntlc; <!-- AdvancedControl Class --> -&staticcontrolc; <!-- StaticControl Class --> -&editcontrolc; <!-- EditControl Class --> -&listcontrolc; <!-- ListControl Class --> -&buttoncontrols; <!-- Button Controls --> -&listboxc; <!-- ListBox Class --> -&comboboxc; <!-- ComboBox Class --> +&plainuserdialogc; <!-- PlainUserDialog Class --> +&resdialog; <!-- ResDialog Class --> +&categorydialog; <!-- CategoryDialog Class --> +&standarddialog; <!-- Standard Dialogs, External Functions, and Public Routines --> +&utilityclasses; <!-- Utility Classess, DlgUtil, Point, DlgArea, etc.. --> +&mesextcl; <!-- MessageExtensions Class --> +&advcntlc; <!-- AdvancedControl Class --> +&resources; <!-- Resources --> +&staticcontrolc; <!-- StaticControl Class --> +&buttoncontrols; <!-- Button Controls --> +&editcontrolc; <!-- EditControl Class --> +&comboboxc; <!-- ComboBox Class --> +&listboxc; <!-- ListBox Class --> &scrollbarc; <!-- ScrollBar Class --> -&propertysheetc; <!-- PropertySheet Class --> -&progressbarc; <!-- ProgressBar Class --> -&slidercontrolc; <!-- SliderControl Class --> +&listcontrolc; <!-- ListControl Class --> +&treecontrolc; <!-- TreeControl Class --> +&slidercontrolc; <!-- SliderControl Class --> +&progressbarc; <!-- ProgressBar Class --> &tabcontrolc; <!-- TabControl Class --> -&treecontrolc; <!-- TreeControl Class --> +&propertysheetc; <!-- PropertySheet Class --> <!-- start of appendix --> -¬ices; <!-- Notices --> -&cpl; <!-- CPL --> +¬ices; <!-- Notices --> +&cpl; <!-- CPL --> -&genindex; <!-- Index --> +&genindex; <!-- Index --> </book> Modified: docs/trunk/oodialog/resources.sgml =================================================================== --- docs/trunk/oodialog/resources.sgml 2008-12-26 19:19:54 UTC (rev 3809) +++ docs/trunk/oodialog/resources.sgml 2008-12-26 19:20:48 UTC (rev 3810) @@ -44,17 +44,23 @@ <chapter id="resources"><title>Resources</title> <indexterm><primary>Resources</primary></indexterm> <para> - In Windows resources are binary data used in Windows based applications. The data in standard - resources describes things like: dialog boxes, icons, menus, cursors, bitmaps, fonts, etc., familar to - ooDialog programmers. Standard resources also include things accelerator tables, string-table entries, - message-table entries, and other resourcess that ooDialog does not currently have support for, but may - support in the future. + In the Windows OS, a <emphasis role="italic">resource</emphasis>, is binary data used by a + Windows-based application. Usually, the binary data is attached to one of the applicatios's + executable files (*.exe or *.dll.) However, the binary data can also be generated dynamically in + memory. (Which is common in ooDialog, for example a UserDialog.) </para> <para> + The data in standard resources describes things like: dialog boxes, icons, menus, cursors, + bitmaps, fonts, etc., familar to ooDialog programmers. Standard resources also include things + accelerator tables, string-table entries, message-table entries, and other resourcess that + ooDialog does not currently have support for, but may support in the future. +</para> +<para> This chapter describes ooDialog classes that provide access to Windows resources. The classes allow - the oodialog programmer to use and manipulate resources in their ooDialog programs. The classes listed - in the following table are documented in this chapter: -<table id="tUtilityClasses" frame="all"> + the oodialog programmer to use and manipulate resources in their ooDialog programs. This is an + area of ooDialog is slated for future improvements. The classes listed in the following table are + documented in this chapter: +<table id="tblResourcesClasses" frame="all"> <title>ooDialog Utilitiy Classes</title> <tgroup cols="2"> <thead> @@ -80,5 +86,430 @@ </table> </para> +<section id="clsImage"><title>Image Class</title> +<indexterm><primary>Image class</primary></indexterm> +<para> + A ... is .. +</para> +<para> +</para> +<variablelist> +<varlistentry><term>Requires:</term> +<listitem><para>The Image class requires the class +definition file <computeroutput>ooDialog.cls</computeroutput>: +<programlisting> +<![CDATA[ +::requires "ooDialog" +]]> +</programlisting> +</para></listitem></varlistentry> +<varlistentry><term>Methods:</term> +<listitem> +<para> + Instances of the Image class implement the methods listed in the following + table: +</para> +<table id="tblImageMethods" frame="all"> +<title>Image Instance Methods</title> +<tgroup cols="2"> +<thead> +<row> +<entry>Method...</entry> +<entry>...on page</entry> +</row> +</thead> +<tbody> +<row> +<entry>new (Class method)</entry> +<entry><link linkend="mthNewClsImage">new</link></entry> +</row> +<row> +<entry>id (Class method)</entry> +<entry><link linkend="mthIdClsImage">id</link></entry> +</row> +</tbody></tgroup> +</table> +</listitem></varlistentry> +</variablelist> + + +<section id="mthNewClsImage"><title>new (Class method)</title> +<indexterm><primary>methodName</primary> +<secondary>ButtonControl class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aButtonControl~methodName(--x--,--y--)------------------>< + +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments are: +<variablelist> +<varlistentry><term>x</term> +<listitem><para>xx. +</para></listitem></varlistentry> +<varlistentry><term>y</term> +<listitem><para>yyy, +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The possible return values are: +<variablelist> +<varlistentry><term>0</term> +<listitem><para>Success +</para></listitem></varlistentry> +<varlistentry><term>-1</term> +<listitem><para>Some error. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>This example ... +<programlisting> +<![CDATA[ +x = y +return 0 +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + + +<section id="mthIdClsImage"><title>id</title> +<indexterm><primary>methodName</primary> +<secondary>ButtonControl class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aButtonControl~methodName(--x--,--y--)------------------>< + +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments are: +<variablelist> +<varlistentry><term>x</term> +<listitem><para>xx. +</para></listitem></varlistentry> +<varlistentry><term>y</term> +<listitem><para>yyy, +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The possible return values are: +<variablelist> +<varlistentry><term>0</term> +<listitem><para>Success +</para></listitem></varlistentry> +<varlistentry><term>-1</term> +<listitem><para>Some error. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>This example ... +<programlisting> +<![CDATA[ +x = y +return 0 +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + +</section> <!-- End Image class --> + +<section id="clsImageList"><title>ImageList Class</title> +<indexterm><primary>ImageList class</primary></indexterm> +<para> + A ... is .. +</para> +<para> +</para> +<variablelist> +<varlistentry><term>Requires:</term> +<listitem><para>The ImageList class requires the class +definition file <computeroutput>ooDialog.cls</computeroutput>: +<programlisting> +<![CDATA[ +::requires "ooDialog.cls" +]]> +</programlisting> +</para></listitem></varlistentry> +<varlistentry><term>Methods:</term> +<listitem> +<para> + Instances of the ImageList class implement the methods listed in the following table: +</para> + +<table id="tblImageListMethods" frame="all"> +<title>Image Instance Methods</title> +<tgroup cols="2"> +<thead> +<row> +<entry>Method...</entry> +<entry>...on page</entry> +</row> +</thead> +<tbody> +<row> +<entry>new (Class method)</entry> +<entry><link linkend="mthNewClsImageList">new</link></entry> +</row> +<row> +<entry>create (Class method)</entry> +<entry><link linkend="mthCreateClsImageList">id</link></entry> +</row> +</tbody></tgroup> +</table> +</listitem></varlistentry> +</variablelist> + + +<section id="mthNewClsImageList"><title>new (Class method)</title> +<indexterm><primary>methodName</primary> +<secondary>ButtonControl class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aButtonControl~methodName(--x--,--y--)------------------>< + +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments are: +<variablelist> +<varlistentry><term>x</term> +<listitem><para>xx. +</para></listitem></varlistentry> +<varlistentry><term>y</term> +<listitem><para>yyy, +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The possible return values are: +<variablelist> +<varlistentry><term>0</term> +<listitem><para>Success +</para></listitem></varlistentry> +<varlistentry><term>-1</term> +<listitem><para>Some error. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>This example ... +<programlisting> +<![CDATA[ +x = y +return 0 +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthCreateClsImageList"><title>id</title> +<indexterm><primary>methodName</primary> +<secondary>ButtonControl class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aButtonControl~methodName(--x--,--y--)------------------>< + +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments are: +<variablelist> +<varlistentry><term>x</term> +<listitem><para>xx. +</para></listitem></varlistentry> +<varlistentry><term>y</term> +<listitem><para>yyy, +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The possible return values are: +<variablelist> +<varlistentry><term>0</term> +<listitem><para>Success +</para></listitem></varlistentry> +<varlistentry><term>-1</term> +<listitem><para>Some error. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>This example ... +<programlisting> +<![CDATA[ +x = y +return 0 +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + +</section> <!-- End ImageList class --> + +<section id="clsResourceImage"><title>ResourceImage Class</title> +<indexterm><primary>ResourceImage class</primary></indexterm> +<para> + A ... is .. +</para> +<para> +</para> +<variablelist> +<varlistentry><term>Requires:</term> +<listitem><para>The ResourceImage class requires the class definition file +<computeroutput>ooDialog.cls</computeroutput>: +<programlisting> +<![CDATA[ +::requires "ooDialog.cls" +]]> +</programlisting> +</para></listitem></varlistentry> +<varlistentry><term>Methods:</term> +<listitem> +<para> + Instances of the ResourceImage class implement the methods listed in the following table: +</para> + +<table id="tblResourceImageMethods" frame="all"> +<title>Name Instance Methods</title> +<tgroup cols="2"> +<thead> +<row> +<entry>Method...</entry> +<entry>...on page</entry> +</row> +</thead> +<tbody> +<row> +<entry>new (Class method)</entry> +<entry><link linkend="mthNewClsResourceImage">new</link></entry> +</row> +<row> +<entry>getImage</entry> +<entry><link linkend="mthGetImageClsResourceImage">getImage</link></entry> +</row> +</tbody></tgroup> +</table> +</listitem></varlistentry> +</variablelist> + + +<section id="mthNewClsResourceImage"><title>new</title> +<indexterm><primary>new</primary> +<secondary>ResouceImage class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aButtonControl~methodName(--x--,--y--)------------------>< + +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments are: +<variablelist> +<varlistentry><term>x</term> +<listitem><para>xx. +</para></listitem></varlistentry> +<varlistentry><term>y</term> +<listitem><para>yyy, +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The possible return values are: +<variablelist> +<varlistentry><term>0</term> +<listitem><para>Success +</para></listitem></varlistentry> +<varlistentry><term>-1</term> +<listitem><para>Some error. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>This example ... +<programlisting> +<![CDATA[ +x = y +return 0 +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthGetImageClsResourceImage"><title>getImage</title> +<indexterm><primary>getImage</primary> +<secondary>ResouceImage class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>-aButtonControl~methodName(--x--,--y--)------------------>< + +]]> +</programlisting> + +<para></para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments are: +<variablelist> +<varlistentry><term>x</term> +<listitem><para>xx. +</para></listitem></varlistentry> +<varlistentry><term>y</term> +<listitem><para>yyy, +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The possible return values are: +<variablelist> +<varlistentry><term>0</term> +<listitem><para>Success +</para></listitem></varlistentry> +<varlistentry><term>-1</term> +<listitem><para>Some error. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para>This example ... +<programlisting> +<![CDATA[ +x = y +return 0 +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + +</section> <!-- End ResourceImage class --> + + </chapter> Modified: docs/trunk/oodialog/userdialog.sgml =================================================================== --- docs/trunk/oodialog/userdialog.sgml 2008-12-26 19:19:54 UTC (rev 3809) +++ docs/trunk/oodialog/userdialog.sgml 2008-12-26 19:20:48 UTC (rev 3810) @@ -1406,7 +1406,6 @@ <indexterm><primary>addGroupBox</primary></indexterm> <programlisting> <![CDATA[ - +-,-""----+-,--""-----+-,__-1__+ >>-dlg~addGroupBox(--x-,-y-,-cx-,-cy--+---------+-----------+--------+--)----->< +-,-text--+-,--style--+-,--id--+ @@ -1414,54 +1413,80 @@ </programlisting> <para> - The addGroupBox method adds a group box to the dialog. A group box is actually a button control. A - group box can have a frame and a title. + The addGroupBox method adds a group box to the dialog. A group box is a button control, not a + static control. A group box can have a frame and a label </para> <variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><variablelist> -<varlistentry><term>x, y, cx, cy</term> -<listitem><para>The <link linkend="listCommonArguments">control coordinates</link> -</para></listitem></varlistentry> -<varlistentry><term>text</term> -<listitem><para>The text for the group box title. -</para></listitem></varlistentry> -<varlistentry><term>style</term> -<listitem> - <para> - A list of 0 or more <link linkend="paraStyleExplanation">style</link> keywords separated by - spaces: + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> <variablelist> - <varlistentry><term>RIGHT</term> - <listitem><para>Normally the text is aligned to the upper left of the group box frame. This - style aligns the text to the upper right of the frame - </para></listitem></varlistentry> - <varlistentry><term>HIDDEN</term> - <listitem><para>The <link linkend="wsvisible">not visible</link> window style. - </para></listitem></varlistentry> - <varlistentry><term>DISABLED</term> - <listitem><para>The <link linkend="wsborder">not enabled</link> window style. - </para></listitem></varlistentry> - <varlistentry><term>BORDER</term> - <listitem><para>The <link linkend="wsborder">border</link> window style. - </para></listitem></varlistentry> - <varlistentry><term>GROUP</term> - <listitem><para>The <link linkend="wsborder">group</link> control style. - </para></listitem></varlistentry> - <varlistentry><term>TAB</term> - <listitem><para>The <link linkend="wsborder">tab</link> control style. - </para></listitem></varlistentry> + <varlistentry><term>x, y, cx, cy</term> + <listitem> + <para> + The <link linkend="listCommonArguments">control coordinates</link> + </para> + </listitem></varlistentry> + <varlistentry><term>text</term> + <listitem> + <para> + The text for the group box label + </para> + </listitem></varlistentry> + <varlistentry><term>style</term> + <listitem> + <para> + A list of 0 or more <link linkend="paraStyleExplanation">style</link> keywords separated by + spaces: + <variablelist> + <varlistentry><term>RIGHT</term> + <listitem> + <para> + Normally the text is aligned to the upper left of the group box frame. This style + aligns the text to the upper right of the frame + </para> + </listitem></varlistentry> + <varlistentry><term>HIDDEN</term> + <listitem> + <para> + The <link linkend="wsvisible">not visible</link> window style. + </para> + </listitem></varlistentry> + <varlistentry><term>DISABLED</term> + <listitem> + <para> + The <link linkend="wsborder">not enabled</link> window style. + </para> + </listitem></varlistentry> + <varlistentry><term>BORDER</term> + <listitem> + <para> + The <link linkend="wsborder">border</link> window style. + </para> + </listitem></varlistentry> + <varlistentry><term>GROUP</term> + <listitem> + <para> + The <link linkend="wsborder">group</link> control style. + </para> + </listitem></varlistentry> + <varlistentry><term>TAB</term> + <listitem> + <para> + The <link linkend="wsborder">tabstop</link> control style. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term>id</term> + <listitem> + <para> + The resource <link linkend="idArgument">ID</link> for the group box. + </para> + </listitem></varlistentry> </variablelist> - </para></listitem></varlistentry> -<varlistentry><term>id</term> -<listitem><para> - The resource id of the group box. By the default a group box is assigned a resource id of -1. - Assigning a positive id allows the programmer to modify the group box after it is created, perhaps - to change the text of its title, change its postition. -</para></listitem></varlistentry> + </listitem></varlistentry> </variablelist> -</listitem></varlistentry> -</variablelist> </section> <section id="sectAddStaticControls"><title>Add Static Controls</title> @@ -1485,10 +1510,10 @@ <para> A word about frames and rectangles. In previous versions of the ooDialog reference frames and rectangles were documented as though they were a type of separate controls. They are not, they - are just a static control with a particular style. The <link linkend="fig56">Frames and + are just a static control with a particular style. The <link linkend="figFramesRects">Frames and Rectangles</link> picture gives some idea of how the different types of static controls can appear. - <figure id="fig56"><title>Frames and Rectangles</title> + <figure id="figFramesRects"><title>Frames and Rectangles</title> <mediaobject> <imageobject> <!-- Note! - if we include a /imagedata tag we get an error for DSSSL! --> @@ -1502,144 +1527,272 @@ <indexterm><primary>addStatic</primary></indexterm> <programlisting> <![CDATA[ - +_-1_+ +-,-"TEXT"-+ +-,-""----+ + +-,-"TEXT"-+ >>-dlg~addStatic(--+----+--,-x-,-y-,-cx-,-cy--+----------+--+---------+--)---->< +-id-+ +-,-style--+--+-,-text--+ ]]> </programlisting> <para> - The addStatic method adds any type of static control. + The addStatic method adds any type of static control. The 3 basic types of static controls are + static text, static image, and static frames / rectangles. </para> <variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para> -<variablelist> -<varlistentry><term>id</term> -<listitem><para> - The resource id for the control By default a static control is assigned a resource id of -1. - Assigning a positive id allows the programmer to modify the static control after it is created, - perhaps to change its text or to change its postition. -</para></listitem></varlistentry> -<varlistentry><term>x, y, cx, cy</term> -<listitem><para>The <link linkend="listCommonArguments">control coordinates</link> -</para></listitem></varlistentry> -<varlistentry><term>style</term> -<listitem> - <para> - A list of the <link linkend="paraStyleExplanation">style</link> keywords separated by spaces. - The keywords: TEXT, BITMAP, METAFILE, ICON, WHITERECT, GRAYRECT, BLACKRECT, WHITEFRAME, - GRAYFRAME, BLACKFRAME, ETCHED, HORZ, and VERT determine the type of static control to be - created. If more than one of these type keywords is specified, which static control is created - is undefined. The other style keywords modify the appearance or behavior of the static control. + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> <variablelist> - <varlistentry><term>TEXT</term> - <listitem><para>A static text control is created, this is the default. - </para></listitem></varlistentry> - <varlistentry><term>BITMAP</term> - <listitem><para>A static image control is created that will use a bitmap. - </para></listitem></varlistentry> - <varlistentry><term>METAFILE</term> - <listitem><para>A static image control that uses a metafile will be created. - </para></listitem></varlistentry> - <varlistentry><term>ICON</term> - <listitem><para>A static image control that uses an icon will be created. - </para></listitem></varlistentry> - <varlistentry><term>WHITERECT</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>WHITEFRAME</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>GRAYRECT</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>GRAYFRAME</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>BLACKRECT</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>BLACKFRAME</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>ETCHED</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>HORZ</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>VERT</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>CENTER</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>RIGHT</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>SIMPLE</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>LEFTNOWRAP</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>LEFT</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>NOTIFY</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>SUNKEN</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>EDITCONTROL</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>ENDELLIPSIS</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>NOPREFIX</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>PATHELLIPSIS</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>WORDELLIPSIS</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>CENTERIMAGE</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>RIGHTJUST</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>SIZECONTROL</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>SIZEIMAGE</term> - <listitem><para>keyword explanation - </para></listitem></varlistentry> - <varlistentry><term>HIDDEN</term> - <listitem><para>The <link linkend="wsvisible">not visible</link> window style. - </para></listitem></varlistentry> - <varlistentry><term>DISABLED</term> - <listitem><para>The <link linkend="wsborder">not enabled</link> window style. - </para></listitem></varlistentry> - <varlistentry><term>BORDER</term> - <listitem><para>The <link linkend="wsborder">border</link> window style. - </para></listitem></varlistentry> - <varlistentry><term>GROUP</term> - <listitem><para>The <link linkend="wsborder">group</link> control style. - </para></listitem></varlistentry> - <varlistentry><term>TAB</term> - <listitem><para>The <link linkend="wsborder">tab</link> control style. - </para></listitem></varlistentry> + <varlistentry><term>id</term> + <listitem> + <para> + The resource <link linkend="idArgument">ID</link> for the static control. + </para> + </listitem></varlistentry> + <varlistentry><term>x, y, cx, cy</term> + <listitem> + <para> + The <link linkend="listCommonArguments">control coordinates</link> + </para> + </listitem></varlistentry> + <varlistentry><term>style</term> + <listitem> + <para> + A list of 0 or more <link linkend="paraStyleExplanation">style</link> keywords separated by + spaces. The keywords: TEXT, BITMAP, METAFILE, ICON, WHITERECT, GRAYRECT, BLACKRECT, + WHITEFRAME, GRAYFRAME, BLACKFRAME, ETCHED, HORZ, and VERT determine the type of static + control to be created. If more than one of these type keywords is specified, which static + control is created is undefined. The other style keywords modify the appearance or behavior + of the static control. + <variablelist> + <varlistentry><term>TEXT</term> + <listitem> + <para> + A static text control is created, this is the default. + </para> + </listitem></varlistentry> + <varlistentry><term>BITMAP</term> + <listitem> + <para> + A static image control is created that will use a bitmap. + </para> + </listitem></varlistentry> + <varlistentry><term>METAFILE</term> + <listitem> + <para> + A static image control that uses a metafile will be created. + </para> + </listitem></varlistentry> + <varlistentry><term>ICON</term> + <listitem> + <para> + A static image control that uses an icon will be created. + </para> + </listitem></varlistentry> + <varlistentry><term>WHITERECT</term> + <listitem> + <para> + A <link linkend="figFramesRects">rectangle</link>rectangle filled with the current window + background color, which is white in the default color scheme. + </para> + </listitem></varlistentry> + <varlistentry><term>WHITEFRAME</term> + <listitem> + <para> + A <link linkend="figFramesRects">frame</link> drawn with the same color as the window + background, which is white in the default color scheme. + </para> + </listitem></varlistentry> + <varlistentry><term>GRAYRECT</term> + <listitem> + <para> + A <link linkend="figFramesRects">rectangle</link>rectangle filled with the current screen + background color, which is gray in the default color scheme. + </para> + </listitem></varlistentry> + <varlistentry><term>GRAYFRAME</term> + <listitem> + <para> + A <link linkend="figFramesRects">frame</link> drawn with the same color as the current + screen background, which is gray in the default color scheme. + </para> + </listitem></varlistentry> + <varlistentry><term>BLACKRECT</term> + <listitem> + <para> + A <link linkend="figFramesRects">rectangle</link>rectangle filled with the current window + frame color, which is black in the default color scheme. + </para> + </listitem></varlistentry> + <varlistentry><term>BLACKFRAME</term> + <listitem> + <para> + A <link linkend="figFramesRects">frame</link> drawn with the same color as the current + window frames, which is black in the default color scheme. + </para> + </listitem></varlistentry> + <varlistentry><term>ETCHED</term> + <listitem> + <para> + A <link linkend="figFramesRects">frame</link> drawn with an etched appearance. + </para> + </listitem></varlistentry> + <varlistentry><term>HORZ</term> + <listitem> + <para> + A <link linkend="figFramesRects">frame</link> drawn with an etched appearance, but only + the top horizontal line of the frame is drawn. In other words, this is a single + horizontal line, whose position and length are determined by the position and width of + the imaginary frame specified by the control coordinates. + </para> + </listitem></varlistentry> + <varlistentry><term>VERT</term> + <listitem> + <para> + A <link linkend="figFramesRects">frame</link> drawn with an etched appearance, but only + the left vertical line of the frame is drawn. In other words, this is a single vertical + line, whose position and length are determined by the position and height of the + imaginary frame specified by the control coordinates. + </para> + </listitem></varlistentry> + <varlistentry><term>LEFT</term> + <listitem> + <para> + Left aligns text for static text controls. Lines are automatically word wrapped. Words + longer than the width of the control are truncated. This is the default for static text + controls and does not need to be specified. + </para> + </listitem></varlistentry> + <varlistentry><term>CENTER</term> + <listitem> + <para> + Uses centered text alignment for static text controls. Lines are automatically word + wrapped. Words longer than the width of the control are truncated. If no text alignment + style is specified, the text is left aligned. + </para> + </listitem></varlistentry> + <varlistentry><term>RIGHT</term> + <listitem> + <para> + Right aligns text for static text controls. Lines are automatically word wrapped. Words + longer than the width of the control are truncated. If no text alignment style is + specified, the text is left aligned. + </para> + </listitem></varlistentry> + <varlistentry><term>SIMPLE</term> + <listitem> + <para> + A single line of left-aligned text in the rectangle. The text line cannot be shortened + or altered in any way. If the control is disabled, the text is not grayed. + </para> + </listitem></varlistentry> + <varlistentry><term>LEFTNOWRAP</term> + <listitem> + <para> + A single line of text, left-aligned. Tabs are expanded, but words are not wrapped. Text + that extends past the end of a line is clipped. + </para> + </listitem></varlistentry> + <varlistentry><term>NOTIFY</term> + <listitem> + <para> + keyword explanation + </para> + </listitem></varlistentry> + <varlistentry><term>SUNKEN</term> + <listitem> + <para> + keyword explanation + </para> + </listitem></varlistentry> + <varlistentry><term>EDITCONTROL</term> + <listitem> + <para> + keyword explanation + </para> + </listitem></varlistentry> + <varlistentry><term>ENDELLIPSIS</term> + <listitem> + <para> + keyword explanation + </para> + </listitem></varlistentry> + <varlistentry><term>NOPREFIX</term> + <listitem> + <para> + keyword explanation + </para> + </listitem></varlistentry> + <varlistentry><term>PATHELLIPSIS</term> + <listitem> + <para> + keyword explanation + </para> + </listitem></varlistentry> + <varlistentry><term>WORDELLIPSIS</term> + <listitem> + <para> + keyword explanation + </para> + </listitem></varlistentry> + <varlistentry><term>CENTERIMAGE</term> + <listitem> + <para> + keyword explanation + </para> + </listitem></varlistentry> + <varlistentry><term>RIGHTJUST</term> + <listitem> + <para> + keyword explanation + </para> + </listitem></varlistentry> + <varlistentry><term>SIZECONTROL</term> + <listitem> + <para> + keyword explanation + </para> + </listitem></varlistentry> + <varlistentry><term>SIZEIMAGE</term> + <listitem> + <para> + keyword explanation + </para> + </listitem></varlistentry> + <varlistentry><term>HIDDEN</term> + <listitem> + <para> + The <link linkend="wsvisible">not visible</link> window style. + </para> + </listitem></varlistentry> + <varlistentry><term>DISABLED</term> + <listitem> + <para> + The <link linkend="wsborder">not enabled</link> window style. + </para> + </listitem></varlistentry> + <varlistentry><term>BORDER</term> + <listitem> + <para> + The <link linkend="wsborder">border</link> window style. + </para> + </listitem></varlistentry> + <varlistentry><term>GROUP</term> + <listitem> + <para> + The <link linkend="wsborder">group</link> control style. + </para> + </listitem></varlistentry> + <varlistentry><term>TAB</term> + <listitem> + <para> + The <link linkend="wsborder">tabstop</link> control style. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> </variablelist> - </para></listitem></varlistentry> + </listitem></varlistentry> </variablelist> -</para></listitem></varlistentry> -</variablelist> </section> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2008-12-27 03:24:58
|
Revision: 3811 http://oorexx.svn.sourceforge.net/oorexx/?rev=3811&view=rev Author: miesfeld Date: 2008-12-27 03:24:56 +0000 (Sat, 27 Dec 2008) Log Message: ----------- Add a chapter for menus, continue ooDialog doc upate Modified Paths: -------------- docs/trunk/oodialog/Makefile docs/trunk/oodialog/oodialog.sgml docs/trunk/oodialog/resources.sgml docs/trunk/oodialog/utilityclasses.sgml Added Paths: ----------- docs/trunk/oodialog/menus.sgml Modified: docs/trunk/oodialog/Makefile =================================================================== --- docs/trunk/oodialog/Makefile 2008-12-26 19:20:48 UTC (rev 3810) +++ docs/trunk/oodialog/Makefile 2008-12-27 03:24:56 UTC (rev 3811) @@ -69,6 +69,7 @@ slidercontrolc.sgml \ staticcontrolc.sgml \ resources.sgml \ + menus.sgml \ tabcontrolc.sgml \ termdef.sgml \ treecontrolc.sgml \ Added: docs/trunk/oodialog/menus.sgml =================================================================== --- docs/trunk/oodialog/menus.sgml (rev 0) +++ docs/trunk/oodialog/menus.sgml 2008-12-27 03:24:56 UTC (rev 3811) @@ -0,0 +1,89 @@ +<!--######################################################################### + # + # Description: Open Object Rexx: OODialog Reference SGML file. + # + # Copyright (c) 2005-2007, Rexx Language Association. All rights reserved. + # Portions Copyright (c) 2004, IBM Corporation. All rights reserved. + # + # This program and the accompanying materials are made available under + # the terms of the Common Public License v1.0 which accompanies this + # distribution. A copy is also available at the following address: + # http://www.oorexx.org/license.html + # + # Redistribution and use in source and binary forms, with or + # without modification, are permitted provided that the following + # conditions are met: + # + # Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # Redistributions in binary form must reproduce the above copyright + # notice, this list of conditions and the following disclaimer in + # the documentation and/or other materials provided with the distribution. + # + # Neither the name of Rexx Language Association nor the names + # of its contributors may be used to endorse or promote products + # derived from this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + # Author(s): + # W. David Ashley <da...@us...> + # + ######################################################################### +--> +<chapter id="menuclasses"><title>StaticControl Class</title> +<indexterm><primary>Menus</primary></indexterm> + +<note><title>This documentation is preliminary and subject to change</title> +<para> + The menu related classes are new to ooDialog in ooRexx version 4.0.0. These classes are being + documented and made available in the hopes that the users of ooDialog will help in refining the + usability of the classes. Because of this, it is possible that some methods and / or arguments to + methods may have slight changes to them in future versions of ooDialog. +</para></note> + +<para> + Menus are lists of items that specify options for an application. Groups of related options are + usually placed in submenus. Clicking a menu item either opens a submenu or causes the application + to carry out a command. +</para> +<para> + Menus are arranged as a hierarchy. A <emphasis role="italic">menu bar</emphasis> is the top of the + hiearchy for menus attached to an application window. The menu bar will containa a list of + <emphasis role="italic">menus</emphasis>, and menus can contain <emphasis + role="italic">submenus</emphasis>. Menu bars are often called <emphasis + role="italic">top-level</emphasis> menus, while the menus and submenus are also known as + <emphasis role="italic">pop-up</emphasis> menus. +</para> +<para> + A menu <emphasis role="italic">item</emphasis> either carries out a command or opens a submenu. + Menu items that do not open a submenu are called <emphasis role="italic">command</emphasis> items + or simply commands. +</para> +<para> + The Menu related classes all require the class definition file + <computeroutput>ooDialog.cls</computeroutput>: +</para> +<programlisting> +<![CDATA[ +::requires "ooDialog" +]]> +</programlisting> +<para> + Use the getStaticControl method (see <link linkend="getstaticcontrol">getStaticControl</link>) to + retrieve an object of the StaticControl class. To use this method, the static control must have a + positive ID. +</para> + + +</chapter> Modified: docs/trunk/oodialog/oodialog.sgml =================================================================== --- docs/trunk/oodialog/oodialog.sgml 2008-12-26 19:20:48 UTC (rev 3810) +++ docs/trunk/oodialog/oodialog.sgml 2008-12-27 03:24:56 UTC (rev 3811) @@ -15,7 +15,6 @@ <!ENTITY utilityclasses SYSTEM "utilityclasses.sgml"> <!ENTITY mesextcl SYSTEM "mesextcl.sgml"> <!ENTITY advcntlc SYSTEM "advcntlc.sgml"> -<!ENTITY resources SYSTEM "resources.sgml"> <!ENTITY staticcontrolc SYSTEM "staticcontrolc.sgml"> <!ENTITY buttoncontrols SYSTEM "buttoncontrols.sgml"> <!ENTITY editcontrolc SYSTEM "editcontrolc.sgml"> @@ -28,6 +27,8 @@ <!ENTITY progressbarc SYSTEM "progressbarc.sgml"> <!ENTITY tabcontrolc SYSTEM "tabcontrolc.sgml"> <!ENTITY propertysheetc SYSTEM "propertysheetc.sgml"> +<!ENTITY resources SYSTEM "resources.sgml"> +<!ENTITY menuclasses SYSTEM "menus.sgml"> <!ENTITY notices SYSTEM "../shared/notices.sgml"> <!ENTITY cpl SYSTEM "../shared/CPLv1.0.sgml"> <!ENTITY gethelp SYSTEM "../shared/gethelp.sgml"> @@ -88,36 +89,37 @@ </bookinfo> -&preface; <!-- About This Book --> +&preface; <!-- About This Book --> <!-- start of body --> -&reference; <!-- Reference --> -&termdef; <!-- Definition of Terms --> -&basedialog; <!-- BaseDialog Class --> +&reference; <!-- Reference --> +&termdef; <!-- Definition of Terms --> +&basedialog; <!-- BaseDialog Class --> &dialogcontrolc; <!-- DialogControl Class --> -&userdialog; <!-- UserDialog Class --> +&userdialog; <!-- UserDialog Class --> &plainuserdialogc; <!-- PlainUserDialog Class --> -&resdialog; <!-- ResDialog Class --> +&resdialog; <!-- ResDialog Class --> &categorydialog; <!-- CategoryDialog Class --> &standarddialog; <!-- Standard Dialogs, External Functions, and Public Routines --> &utilityclasses; <!-- Utility Classess, DlgUtil, Point, DlgArea, etc.. --> -&mesextcl; <!-- MessageExtensions Class --> -&advcntlc; <!-- AdvancedControl Class --> -&resources; <!-- Resources --> +&mesextcl; <!-- MessageExtensions Class --> +&advcntlc; <!-- AdvancedControl Class --> &staticcontrolc; <!-- StaticControl Class --> &buttoncontrols; <!-- Button Controls --> -&editcontrolc; <!-- EditControl Class --> -&comboboxc; <!-- ComboBox Class --> -&listboxc; <!-- ListBox Class --> -&scrollbarc; <!-- ScrollBar Class --> -&listcontrolc; <!-- ListControl Class --> -&treecontrolc; <!-- TreeControl Class --> +&editcontrolc; <!-- EditControl Class --> +&comboboxc; <!-- ComboBox Class --> +&listboxc; <!-- ListBox Class --> +&scrollbarc; <!-- ScrollBar Class --> +&listcontrolc; <!-- ListControl Class --> +&treecontrolc; <!-- TreeControl Class --> &slidercontrolc; <!-- SliderControl Class --> &progressbarc; <!-- ProgressBar Class --> -&tabcontrolc; <!-- TabControl Class --> +&tabcontrolc; <!-- TabControl Class --> &propertysheetc; <!-- PropertySheet Class --> +&resources; <!-- Resources --> +&menuclasses; <!-- Menus --> <!-- start of appendix --> -¬ices; <!-- Notices --> -&cpl; <!-- CPL --> +¬ices; <!-- Notices --> +&cpl; <!-- CPL --> &genindex; <!-- Index --> Modified: docs/trunk/oodialog/resources.sgml =================================================================== --- docs/trunk/oodialog/resources.sgml 2008-12-26 19:20:48 UTC (rev 3810) +++ docs/trunk/oodialog/resources.sgml 2008-12-27 03:24:56 UTC (rev 3811) @@ -227,6 +227,198 @@ </variablelist> </section> +<section id="mthColorRef"><title>colorRef (Class Method)</title> +<indexterm><primary>colorRef</primary></indexterm> +<programlisting> +<![CDATA[ + +>>-.Image~colorRef(--R--,--+---+--,--+---+--)-------------->< + +-G-+ +-B-+ +]]> +</programlisting> + +<para> + The Windows API uses a COLORREF to specify a RGB color. This is a 32-bit number with a + hexidecimal format of: <computeroutput>0x00bbggrr</computeroutput>. Windows also defines 2 + special values, CLR_NONE and CLR_DEFAULT. The <computeroutput>colorRef</computeroutput>() method + provides a way to construct a COLORREF from the red, green, and blue values, or to get the + CLR_NONE and CLR_DEFAULT values. Each color value (red, green, or blue) is a whole number in the + range of 0 to 255 inclusive. +</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The arguments are: +<variablelist> +<varlistentry><term>R</term> +<listitem> +<para> + Either the red component of the RGB color, or one of two keywords. If a keyword is used for the + first argument, it must be the only argument. If a keyword is not used, all three arguments are + required. Only the first letter of the keyword is needed and case is not significant. Allowable + keywords: + <itemizedlist> + <listitem><para>DEFAULT used to get the CLR_DEFAULT value.</para></listitem> + <listitem><para>NONE used to get the CLR_NONE value.</para></listitem> + </itemizedlist> +</para></listitem></varlistentry> +<varlistentry><term>G</term> +<listitem><para>The green component of the RGB value. +</para></listitem></varlistentry> +<varlistentry><term>B</term> +<listitem><para>The blue component of the RGB value. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The return is a valid RGB color, or CLR_NONE, or CLR_DEFAULT. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para> +<programlisting> +<![CDATA[ + + ref = .Image~colorRef(245, 89, 255) + say 'A fancy puple:' ref '(0x' || ref~d2x~right(8, '0')')' + say + +::requires 'oodPlain.cls' + +/* Output: + +A fancy puple: 16734709 (0x00FF59F5) + +*/ +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthGetRValue"><title>getRValue (Class Method)</title> +<indexterm><primary>getRValue</primary></indexterm> +<programlisting> +<![CDATA[ +>>-.Image~getRValue(--colorRef--)-------------------------->< + +]]> +</programlisting> + +<para>Returns the red component of a RGB color. +</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The argument is: +<variablelist> +<varlistentry><term>colorRef</term> +<listitem> +<para> + A RGB color, a COLORREF. See the <link linkend="mthColorRef">colorRef</link>() method for a brief + discussion of these terms. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The return is the red component of the specified RGB color. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para> +<programlisting id="exampleGetRValueClsImage"> +<![CDATA[ + progressBar = self~getProgressBar("IDC_PB_FILES") + if progressBar <> .nil then do + purple = .Image~colorRef(245, 89, 255) + + say 'Going to set the background color for the progress bar' + oldColor = progressBar~backgroundColor(purple) + + say 'Old background color was:' oldColor '(0x'oldColor~d2x')' + say ' Red: ' .Image~getRValue(oldColor) + say ' Green:' .Image~getGValue(oldColor) + say ' Blue: ' .IMage~getBValue(oldColor) + say + end + + /* Output might be: + + Going to set the background color for the progress bar + Old background color was: 11460781 (0xAEE0AD) + Red: 173 + Green: 224 + Blue: 174 + + */ +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthGetGValue"><title>getGValue (Class Method)</title> +<indexterm><primary>getRValue</primary></indexterm> +<programlisting> +<![CDATA[ +>>-.Image~getGValue(--colorRef--)-------------------------->< + +]]> +</programlisting> + +<para>Returns the green component of a RGB color.</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The argument is: +<variablelist> +<varlistentry><term>colorRef</term> +<listitem> +<para> + A RGB color, a COLORREF. See the <link linkend="mthColorRef">colorRef</link>() method for a brief + discussion of these terms. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The return is the green component of the specified RGB color. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem> +<para> + See the example for the <link linkend="exampleGetRValueClsImage">getRValue</link>() method. +</para></listitem></varlistentry> +</variablelist> +</section> + +<section id="mthGetBValue"><title>getBValue (Class Method)</title> +<indexterm><primary>getRValue</primary></indexterm> +<programlisting> +<![CDATA[ +>>-.Image~getBValue(--colorRef--)-------------------------->< + +]]> +</programlisting> + +<para>Returns the blue component of a RGB color.</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem><para>The argument is: +<variablelist> +<varlistentry><term>colorRef</term> +<listitem> +<para> + A RGB color, a COLORREF. See the <link linkend="mthColorRef">colorRef</link>() method for a brief + discussion of these terms. +</para></listitem></varlistentry> +</variablelist> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The return is the blue component of the specified RGB color. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem> +<para> + See the example for the <link linkend="exampleGetRValueClsImage">getRValue</link>() method. +</para></listitem></varlistentry> +</variablelist> +</section> + </section> <!-- End Image class --> <section id="clsImageList"><title>ImageList Class</title> Modified: docs/trunk/oodialog/utilityclasses.sgml =================================================================== --- docs/trunk/oodialog/utilityclasses.sgml 2008-12-26 19:20:48 UTC (rev 3810) +++ docs/trunk/oodialog/utilityclasses.sgml 2008-12-27 03:24:56 UTC (rev 3811) @@ -443,198 +443,6 @@ </variablelist> </section> -<section id="mthColorRef"><title>colorRef (Class Method)</title> -<indexterm><primary>colorRef</primary></indexterm> -<programlisting> -<![CDATA[ - ->>-.DlgUtil~colorRef(--R--,--+---+--,--+---+--)------------>< - +-G-+ +-B-+ -]]> -</programlisting> - -<para> - The Windows API uses a COLORREF to specify a RGB color. This is a 32-bit number with a - hexidecimal format of: <computeroutput>0x00bbggrr</computeroutput>. Windows also defines 2 - special values, CLR_NONE and CLR_DEFAULT. The <computeroutput>colorRef</computeroutput>() method - provides a way to construct a COLORREF from the red, green, and blue values, or to get the - CLR_NONE and CLR_DEFAULT values. Each color value (red, green, or blue) is a whole number in the - range of 0 to 255 inclusive. -</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments are: -<variablelist> -<varlistentry><term>R</term> -<listitem> -<para> - Either the red component of the RGB color, or one of two keywords. If a keyword is used for the - first argument, it must be the only argument. If a keyword is not used, all three arguments are - required. Only the first letter of the keyword is needed and case is not significant. Allowable - keywords: - <itemizedlist> - <listitem><para>DEFAULT used to get the CLR_DEFAULT value.</para></listitem> - <listitem><para>NONE used to get the CLR_NONE value.</para></listitem> - </itemizedlist> -</para></listitem></varlistentry> -<varlistentry><term>G</term> -<listitem><para>The green component of the RGB value. -</para></listitem></varlistentry> -<varlistentry><term>B</term> -<listitem><para>The blue component of the RGB value. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The return is a valid RGB color, or CLR_NONE, or CLR_DEFAULT. -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para> -<programlisting> -<![CDATA[ - - ref = .DlgUtil~colorRef(245, 89, 255) - say 'A fancy puple:' ref '(0x' || ref~d2x~right(8, '0')')' - say - -::requires 'oodPlain.cls' - -/* Output: - -A fancy puple: 16734709 (0x00FF59F5) - -*/ -]]> -</programlisting> -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="mthGetRValue"><title>getRValue (Class Method)</title> -<indexterm><primary>getRValue</primary></indexterm> -<programlisting> -<![CDATA[ ->>-.DlgUtil~getRValue(--colorRef--)------------------------>< - -]]> -</programlisting> - -<para>Returns the red component of a RGB color. -</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The argument is: -<variablelist> -<varlistentry><term>colorRef</term> -<listitem> -<para> - A RGB color, a COLORREF. See the <link linkend="mthColorRef">colorRef</link>() method for a brief - discussion of these terms. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The return is the red component of the specified RGB color. -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para> -<programlisting id="exampleGetRValueClsDlgUtil"> -<![CDATA[ - progressBar = self~getProgressBar("IDC_PB_FILES") - if progressBar <> .nil then do - purple = .DlgUtil~colorRef(245, 89, 255) - - say 'Going to set the background color for the progress bar' - oldColor = progressBar~backgroundColor(purple) - - say 'Old background color was:' oldColor '(0x'oldColor~d2x')' - say ' Red: ' .DlgUtil~getRValue(oldColor) - say ' Green:' .DlgUtil~getGValue(oldColor) - say ' Blue: ' .DlgUtil~getBValue(oldColor) - say - end - - /* Output might be: - - Going to set the background color for the progress bar - Old background color was: 11460781 (0xAEE0AD) - Red: 173 - Green: 224 - Blue: 174 - - */ -]]> -</programlisting> -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="mthGetGValue"><title>getGValue (Class Method)</title> -<indexterm><primary>getRValue</primary></indexterm> -<programlisting> -<![CDATA[ ->>-.DlgUtil~getGValue(--colorRef--)------------------------>< - -]]> -</programlisting> - -<para>Returns the green component of a RGB color.</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The argument is: -<variablelist> -<varlistentry><term>colorRef</term> -<listitem> -<para> - A RGB color, a COLORREF. See the <link linkend="mthColorRef">colorRef</link>() method for a brief - discussion of these terms. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The return is the green component of the specified RGB color. -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem> -<para> - See the example for the <link linkend="exampleGetRValueClsDlgUtil">getRValue</link>() method. -</para></listitem></varlistentry> -</variablelist> -</section> - -<section id="mthGetBValue"><title>getBValue (Class Method)</title> -<indexterm><primary>getRValue</primary></indexterm> -<programlisting> -<![CDATA[ ->>-.DlgUtil~getBValue(--colorRef--)------------------------>< - -]]> -</programlisting> - -<para>Returns the blue component of a RGB color.</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The argument is: -<variablelist> -<varlistentry><term>colorRef</term> -<listitem> -<para> - A RGB color, a COLORREF. See the <link linkend="mthColorRef">colorRef</link>() method for a brief - discussion of these terms. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The return is the blue component of the specified RGB color. -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem> -<para> - See the example for the <link linkend="exampleGetRValueClsDlgUtil">getRValue</link>() method. -</para></listitem></varlistentry> -</variablelist> -</section> - </section> <!-- End DlgUtil Class --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2008-12-28 06:09:14
|
Revision: 3815 http://oorexx.svn.sourceforge.net/oorexx/?rev=3815&view=rev Author: miesfeld Date: 2008-12-28 06:09:07 +0000 (Sun, 28 Dec 2008) Log Message: ----------- Continue ooDialog doc update Modified Paths: -------------- docs/trunk/oodialog/menus.sgml docs/trunk/oodialog/resources.sgml Modified: docs/trunk/oodialog/menus.sgml =================================================================== --- docs/trunk/oodialog/menus.sgml 2008-12-27 21:13:35 UTC (rev 3814) +++ docs/trunk/oodialog/menus.sgml 2008-12-28 06:09:07 UTC (rev 3815) @@ -41,17 +41,16 @@ # ######################################################################### --> -<chapter id="menuclasses"><title>StaticControl Class</title> +<chapter id="menuclasses"><title>Menus</title> <indexterm><primary>Menus</primary></indexterm> -<note><title>This documentation is preliminary and subject to change</title> -<para> - The menu related classes are new to ooDialog in ooRexx version 4.0.0. These classes are being - documented and made available in the hopes that the users of ooDialog will help in refining the - usability of the classes. Because of this, it is possible that some methods and / or arguments to - methods may have slight changes to them in future versions of ooDialog. +<note><title>Note</title><para> + <emphasis role="bold">This documentation is preliminary and subject to change</emphasis> The menu + related classes are new to ooDialog in ooRexx version 4.0.0. These classes are being documented + and made available in the hopes that the users of ooDialog will help in refining the usability of + the classes. Because of this, it is possible that some methods and / or arguments to methods may + have slight changes to them in future versions of ooDialog. </para></note> - <para> Menus are lists of items that specify options for an application. Groups of related options are usually placed in submenus. Clicking a menu item either opens a submenu or causes the application @@ -68,22 +67,913 @@ <para> A menu <emphasis role="italic">item</emphasis> either carries out a command or opens a submenu. Menu items that do not open a submenu are called <emphasis role="italic">command</emphasis> items - or simply commands. + or simply commands. Only top-level windows can have menu bars. Child windows can not have a menu + bar. If the window has a title bar the system positions a menu bar underneath it. All menus must + have an owner window. </para> <para> - The Menu related classes all require the class definition file - <computeroutput>ooDialog.cls</computeroutput>: + The system also provides <emphasis role="italic">shortcut menus</emphasis> and the <emphasis + role="italic">Window</emphasis> menu. A shortcut menu is not attached to a menu bar and can + appear anywhere on the screen. Shortcut menus are typically activated by the user right-clicking + on a specific portion of the screen and the menu items are usually only relevant to what the user + clicked on. For this reason, shortcut menus are often called <emphasis + role="italic">contetxt</emphasis> menus. The Window menu is also knows as the <emphasis + role="italic">System</emphasis> menu or the <emphasis role="italic">Control</emphasis> menu. The + System menu is usually managed exclusively by the system. The user activates the System menu by + clicking on the icon in the upper left corner of a window, or by right-clicking anywhere on the + title bar. Unlike menu bars, child windows can have a System menu. It is unusual for a top-level + window to not have a System menu. </para> +<para> + The Menu related classes in ooDialog all require the class definition file + <computeroutput> ooDialog.cls </computeroutput>: +</para> <programlisting> <![CDATA[ ::requires "ooDialog" ]]> </programlisting> + <para> - Use the getStaticControl method (see <link linkend="getstaticcontrol">getStaticControl</link>) to - retrieve an object of the StaticControl class. To use this method, the static control must have a - positive ID. + The menu related classes in the following table are described in this chapter. The primary + classes that the ooDialog programmer will use are the <computeroutput>BinaryMenuBar, UserMenuBar, + ScriptMenuBar</computeroutput>, and <computeroutput>PopupMenu</computeroutput>. The other classes + are mixin classes that implement the functionality common to all types of menus. The binary, user, + and script menu bar classes all have the same essential functionality. They just differ in how + they are initially created. The popup menu class is similar to the menu bar classes, it just does + not have any methods that are only relevant to a menu bar. +<table id="tblMenuClasses" frame="all"> +<title>ooDialog Menu Classes</title> +<tgroup cols="2"> +<thead> +<row> +<entry>Class</entry> +<entry>Link to Description</entry> +</row> +</thead> +<tbody> +<row> +<entry>BinaryMenuBar</entry> +<entry><link linkend="clsBinaryMenuBar">BinaryMenuBar Class</link></entry> +</row> +<row> +<entry>ScriptMenuBar</entry> +<entry><link linkend="clsScriptMenuBar">ScriptMenuBar Class</link></entry> +</row> +<row> +<entry>UserMenuBar</entry> +<entry><link linkend="clsUserMenuBar">UserMenuBar Class</link></entry> +</row> +<row> +<entry>PopupMenu</entry> +<entry><link linkend="clsPopupMenu">PopupMenu Class</link></entry> +</row> +<row> +<entry>Menu</entry> +<entry><link linkend="clsMenu">Menu (Mixin Class)</link></entry> +</row> +<row> +<entry>MenuBar</entry> +<entry><link linkend="clsMenuBar">MenuBar (Mixin Class)</link></entry> +</row> +<row> +<entry>MenuTemplate Class</entry> +<entry><link linkend="clsMenuTemplate">MenuTemplate (Mixin Class)</link></entry> +</row> +</tbody></tgroup> +</table> </para> +<section id="clsBinaryMenuBar"><title>BinaryMenuBar Class</title> +<indexterm><primary>BinaryMenuBar class</primary></indexterm> +<para> + A ... is .. +</para> +<para> +</para> +<variablelist> + <varlistentry><term>Requires:</term> + <listitem> + <para> + The BinaryMenuBar class requires the class definition file + <computeroutput>ooDialog.cls</computeroutput>: + <programlisting> + <![CDATA[ + ::requires "ooDialog.cls" + ]]> + </programlisting> + </para> + </listitem></varlistentry> + <varlistentry><term>Methods:</term> + <listitem> + <para> + Instances of the BinaryMenuBar class implement the methods listed in the following table: + </para> + <table id="tblBinaryMenuBarMethods" frame="all"> + <title>BinaryMenuBar Instance Methods</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Method...</entry> + <entry>...on page</entry> + </row> + </thead> + <tbody> + <row> + <entry>new (Class method)</entry> + <entry><link linkend="mthNewClsBinaryMenuBar">new</link></entry> + </row> + </tbody></tgroup> + </table> + </listitem></varlistentry> +</variablelist> +<section id="mthNewClsBinaryMenuBar"><title>new (Class)</title> +<indexterm><primary>new</primary> +<secondary>BinaryMenuBar class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--new(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> + +</section> <!-- End BinaryMenuBar class --> + +<section id="clsScriptMenuBar"><title>ScriptMenuBar Class</title> +<indexterm><primary>ScriptMenuBar class</primary></indexterm> +<para> + A ... is .. +</para> +<para> +</para> +<variablelist> + <varlistentry><term>Requires:</term> + <listitem> + <para> + The ScriptMenuBar class requires the class definition file <computeroutput>ooDialog.cls</computeroutput>: + <programlisting> + <![CDATA[ + ::requires "ooDialog.cls" + ]]> + </programlisting> + </para> + </listitem></varlistentry> + <varlistentry><term>Methods:</term> + <listitem> + <para> + Instances of the ScriptMenuBar class implement the methods listed in the following table: + </para> + <table id="tblScriptMenuBarMethods" frame="all"> + <title>ScriptMenuBar Instance Methods</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Method...</entry> + <entry>...on page</entry> + </row> + </thead> + <tbody> + <row> + <entry>new (Class method)</entry> + <entry><link linkend="mthNewClsScriptMenuBar">new</link></entry> + </row> + </tbody></tgroup> + </table> + </listitem></varlistentry> +</variablelist> + +<section id="mthNewClsScriptMenuBar"><title>new (Class)</title> +<indexterm><primary>new</primary> +<secondary>ScriptMenuBar class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--new(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> + +</section> <!-- End ScriptMenuBar class --> + +<!-- + Could be chapter, or section +--> +<section id="clsUserMenuBar"><title>UserMenuBar Class</title> +<indexterm><primary>UserMenuBar class</primary></indexterm> +<para> + A ... is .. +</para> +<para> +</para> +<variablelist> + <varlistentry><term>Requires:</term> + <listitem> + <para> + The UserMenuBar class requires the class definition file <computeroutput>ooDialog.cls</computeroutput>: + <programlisting> + <![CDATA[ + ::requires "ooDialog.cls" + ]]> + </programlisting> + </para> + </listitem></varlistentry> + <varlistentry><term>Methods:</term> + <listitem> + <para> + Instances of the UserMenuBar class implement the methods listed in the following table: + </para> + <table id="tblUserMenuBarMethods" frame="all"> + <title>UserMenuBar Instance Methods</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Method...</entry> + <entry>...on page</entry> + </row> + </thead> + <tbody> + <row> + <entry>new (Class method)</entry> + <entry><link linkend="mthNewClsUserMenuBar">new</link></entry> + </row> + </tbody></tgroup> + </table> + </listitem></varlistentry> +</variablelist> + +<section id="mthNewClsUserMenuBar"><title>new (Class)</title> +<indexterm><primary>new</primary> +<secondary>UserMenuBar class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--new(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> + +</section> <!-- End UserMenuBar class --> + +<!-- + Could be chapter, or section +--> +<section id="clsPopupMenu"><title>PopupMenu Class</title> +<indexterm><primary>PopupMenu class</primary></indexterm> +<para> + A ... is .. +</para> +<para> +</para> +<variablelist> + <varlistentry><term>Requires:</term> + <listitem> + <para> + The PopupMenu class requires the class definition file <computeroutput>ooDialog.cls</computeroutput>: + <programlisting> + <![CDATA[ + ::requires "ooDialog.cls" + ]]> + </programlisting> + </para> + </listitem></varlistentry> + <varlistentry><term>Methods:</term> + <listitem> + <para> + Instances of the PopupMenu class implement the methods listed in the following table: + </para> + <table id="tblPopupMenuMethods" frame="all"> + <title>PopupMenu Instance Methods</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Method...</entry> + <entry>...on page</entry> + </row> + </thead> + <tbody> + <row> + <entry>new (Class method)</entry> + <entry><link linkend="mthNewClsPopupMenu">new</link></entry> + </row> + </tbody></tgroup> + </table> + </listitem></varlistentry> +</variablelist> + +<section id="mthNewClsPopupMenu"><title>new (Class)</title> +<indexterm><primary>new</primary> +<secondary>PopupMenu class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--new(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> + +</section> <!-- End PopupMenu class --> + +<section id="clsMenu"><title>Menu (Mixin Class)</title> +<indexterm><primary>Menu class</primary></indexterm> +<para> + A ... is .. +</para> +<para> +</para> +<variablelist> + <varlistentry><term>Requires:</term> + <listitem> + <para> + The Menu class requires the class definition file <computeroutput>ooDialog.cls</computeroutput>: + <programlisting> + <![CDATA[ + ::requires "ooDialog.cls" + ]]> + </programlisting> + </para> + </listitem></varlistentry> + <varlistentry><term>Methods:</term> + <listitem> + <para> + Classes that inherit from the Menu class will inherit the methods listed in the following + table: + </para> + <table id="tblMenuMethods" frame="all"> + <title>Menu Methods</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Method...</entry> + <entry>...on page</entry> + </row> + </thead> + <tbody> + <row> + <entry>getCount</entry> + <entry><link linkend="mthGetCountClsMenu">getCount</link></entry> + </row> + </tbody></tgroup> + </table> + </listitem></varlistentry> +</variablelist> + +<section id="mthGetCountClsMenu"><title>getCount</title> +<indexterm><primary>getCount</primary> +<secondary>Menu class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--getCount(--+---------------+--)------------------------>< + +--menuHandle --+ + +]]> +</programlisting> + +<para> + Determines the number of menu items in a menu. By default, the number of items in this menu. + However, given a menu handle, this method will return the number of items in that menu. +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The only, optional, argument is : + <variablelist> + <varlistentry><term>menuHandle</term> + <listitem> + <para> + A pointer object containing a raw menu handle. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The number of menu items in the menu. + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + <programlisting> + <![CDATA[ + count = menuObj~count + say 'The menu has' count 'items.' + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> +</section> <!-- End Menu class --> + +<section id="clsMenuBar"><title>MenuBar (Mixin Class)</title> +<indexterm><primary>MenuBar class</primary></indexterm> +<para> + A ... is .. +</para> +<para> +</para> +<variablelist> + <varlistentry><term>Requires:</term> + <listitem> + <para> + The MenuBar class requires the class definition file <computeroutput>ooDialog.cls</computeroutput>: + <programlisting> + <![CDATA[ + ::requires "ooDialog.cls" + ]]> + </programlisting> + </para> + </listitem></varlistentry> + <varlistentry><term>Methods:</term> + <listitem> + <para> + Classes that inherit from the MenuBar class will inherit the methods listed in the following + table: + </para> + <table id="tblMenuBarMethods" frame="all"> + <title>MenuBar Methods</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Method...</entry> + <entry>...on page</entry> + </row> + </thead> + <tbody> + <row> + <entry>attachTo</entry> + <entry><link linkend="mthAttachToClsMenuBar">attachTo</link></entry> + </row> + </tbody></tgroup> + </table> + </listitem></varlistentry> +</variablelist> + +<section id="mthAttachToClsMenuBar"><title>attachTo</title> +<indexterm><primary>attachTo</primary> +<secondary>MenuBar class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--attachTo(--dlg--)-------------------------------------->< + +]]> +</programlisting> + +<para> + Attaches this menu bar to the specified dialog window. If the dialog window already has a menu + bar attached to it, this method will replace the current menu bar with this menu bar. +</para> +<note><title>Note</title> +<para> + <emphasis role="bold">This documents what should be, not what is.</emphasis> +</para> +</note> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The required argument is: + <variablelist> + <varlistentry><term>dlg</term> + <listitem> + <para> + The ooDialog dialog the menu is to be attached to. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>.nil</term> + <listitem> + <para> + Success, and there was no previous menu attached to the dialog. + </para> + </listitem></varlistentry> + <varlistentry><term>A menu object</term> + <listitem> + <para> + The previous menu object attached to the dialog. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> + +</section> <!-- End MenuBar class --> + +<section id="clsMenuTemplate"><title>MenuTemplate (Mixin Class)</title> +<indexterm><primary>MenuTemplate class</primary></indexterm> +<para> + The MenuTemplate mixin class provides methods to aid in constructing a menu in memory. It is + inherited by the UserMenuBar and the ScriptMenuBar classes to dynamically create a menu. Note + that it is easier and more reliable to use the <link + linkend="clsBinaryMenuBar">BinaryMenuBar</link> class to create dynamic menus. +</para> +<variablelist> + <varlistentry><term>Requires:</term> + <listitem> + <para> + The MenuTemplate class requires the class definition file <computeroutput>ooDialog.cls</computeroutput>: + <programlisting> + <![CDATA[ + ::requires "ooDialog.cls" + ]]> + </programlisting> + </para> + </listitem></varlistentry> + <varlistentry><term>Methods:</term> + <listitem> + <para> + Classes that inherit from the MenuTemplate class will inherit the methods listed in the + following table: + </para> + <table id="tblMenuTemplateMethods" frame="all"> + <title>MenuTemplate Methods</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Method...</entry> + <entry>...on page</entry> + </row> + </thead> + <tbody> + <row> + <entry>addPopup</entry> + <entry><link linkend="mthAddPopupClsMenuTemplate">new</link></entry> + </row> + </tbody></tgroup> + </table> + </listitem></varlistentry> +</variablelist> + +<section id="mthAddPopupClsMenuTemplate"><title>addPopup</title> +<indexterm><primary>addPopup</primary> +<secondary>MenuTemplate class</secondary></indexterm> +<programlisting> +<![CDATA[ + +--0---+ +--""---+ +----0-----+ +>>--addPopup(--name--+------+--+-------+--+----------+--)-->< + +-,-id-+ +-,-opt-+ +-,-helpID-+ +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>name</term> + <listitem> + <para> + The text label of the popup menu. + </para> + </listitem></varlistentry> + <varlistentry><term>id</term> + <listitem> + <para> + The menu item identifier. If the ID is not supplied than 0 will be used. + </para> + </listitem></varlistentry> + <varlistentry><term>opt</term> + <listitem> + <para> + A list of 0 or more of the folloiwing keywords, separated by spaces, that specify options + for the popup menu. Some options are not applicable for menus on the menu bar. They only + apply to menu items in a submenu that open another submenu. + <variablelist> + <varlistentry><term>CHECK</term> + <listitem> + <para> + The + </para> + </listitem></varlistentry> + <varlistentry><term>GRAY</term> + <listitem> + <para> + The + </para> + </listitem></varlistentry> + <varlistentry><term>DISABLE</term> + <listitem> + <para> + The + </para> + </listitem></varlistentry> + <varlistentry><term>HILITE</term> + <listitem> + <para> + The + </para> + </listitem></varlistentry> + <varlistentry><term>DEFAULT</term> + <listitem> + <para> + T + </para> + </listitem></varlistentry> + <varlistentry><term>END</term> + <listitem> + <para> + T + </para> + </listitem></varlistentry> + <varlistentry><term>SEPARATOR</term> + <listitem> + <para> + T + </para> + </listitem></varlistentry> + <varlistentry><term>RIGHT</term> + <listitem> + <para> + T + </para> + </listitem></varlistentry> + <varlistentry><term>RADIO</term> + <listitem> + <para> + T + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + This method always returns 0. + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> + +</section> <!-- End MenuTemplate class --> </chapter> Modified: docs/trunk/oodialog/resources.sgml =================================================================== --- docs/trunk/oodialog/resources.sgml 2008-12-27 21:13:35 UTC (rev 3814) +++ docs/trunk/oodialog/resources.sgml 2008-12-28 06:09:07 UTC (rev 3815) @@ -50,36 +50,36 @@ memory. (Which is common in ooDialog, for example a UserDialog.) </para> <para> - The data in standard resources describes things like: dialog boxes, icons, menus, cursors, - bitmaps, fonts, etc., familar to ooDialog programmers. Standard resources also include things - accelerator tables, string-table entries, message-table entries, and other resourcess that - ooDialog does not currently have support for, but may support in the future. + The data in standard resources describes things, familar to ooDialog programmers like: dialog + boxes, icons, menus, cursors, bitmaps, fonts, etc. The standard resources also include accelerator + tables, string-table entries, message-table entries, and other resourcess that ooDialog does not + currently have support for, but may support in the future. </para> <para> This chapter describes ooDialog classes that provide access to Windows resources. The classes allow the oodialog programmer to use and manipulate resources in their ooDialog programs. This is an - area of ooDialog is slated for future improvements. The classes listed in the following table are - documented in this chapter: + area of ooDialog that is slated for future improvements. The classes listed in the following + table are documented in this chapter: <table id="tblResourcesClasses" frame="all"> -<title>ooDialog Utilitiy Classes</title> +<title>ooDialog Resource Classes</title> <tgroup cols="2"> <thead> <row> <entry>Class</entry> -<entry>Description</entry> +<entry>Link to Description</entry> </row> </thead> <tbody> <row> -<entry>Image Class</entry> +<entry>Image</entry> <entry><link linkend="clsImage">Image Class</link></entry> </row> <row> -<entry>ImageList Class</entry> +<entry>ImageList</entry> <entry><link linkend="clsImageList">ImageList Class</link></entry> </row> <row> -<entry>ResourceImage Class</entry> +<entry>ResourceImage</entry> <entry><link linkend="clsResourceImage">ResourceImage Class</link></entry> </row> </tbody></tgroup> @@ -89,29 +89,32 @@ <section id="clsImage"><title>Image Class</title> <indexterm><primary>Image class</primary></indexterm> <para> - A ... is .. + The Image class is used to work with and manipulate images. Currently, the image types supported + include bitmaps, icons, cursors (cusors are a type of icon,) and enhanced metafiles. The enhanced + metafile support is very limited at this time. </para> <para> + The class supports loading images from files, from executable files (*.exe and + *.dll,) and from the generally available system resources. </para> <variablelist> -<varlistentry><term>Requires:</term> -<listitem><para>The Image class requires the class -definition file <computeroutput>ooDialog.cls</computeroutput>: +<varlistentry><term><emphasis role="bold">Requires:</emphasis></term> +<listitem><para>The Image class requires the class definition file +<computeroutput>ooDialog.cls</computeroutput>: <programlisting> <![CDATA[ ::requires "ooDialog" ]]> </programlisting> </para></listitem></varlistentry> -<varlistentry><term>Methods:</term> +<varlistentry><term><emphasis role="bold">Methods:</emphasis></term> <listitem> <para> - Instances of the Image class implement the methods listed in the following - table: + Instances of the Image class implement the methods listed in the following table: </para> <table id="tblImageMethods" frame="all"> -<title>Image Instance Methods</title> +<title>Methods of the .Image Class</title> <tgroup cols="2"> <thead> <row> @@ -121,110 +124,172 @@ </thead> <tbody> <row> -<entry>new (Class method)</entry> -<entry><link linkend="mthNewClsImage">new</link></entry> -</row> -<row> <entry>id (Class method)</entry> <entry><link linkend="mthIdClsImage">id</link></entry> </row> +<row> +<entry>getImage (Class method)</entry> +<entry><link linkend="mthGetImageClsImage">new</link></entry> +</row> +<row> +<entry>colorRef (Class method)</entry> +<entry><link linkend="mthColorRef">colorRef</link></entry> +</row> +<row> +<entry>getRValue (Class method)</entry> +<entry><link linkend="mthGetRValue">getRValue</link></entry> +</row> +<row> +<entry>getGValue (Class method)</entry> +<entry><link linkend="mthGetGValue">getGValue</link></entry> +</row> +<row> +<entry>getBValue (Class method)</entry> +<entry><link linkend="mthGetBValue">getBValue</link></entry> +</row> </tbody></tgroup> </table> </listitem></varlistentry> </variablelist> -<section id="mthNewClsImage"><title>new (Class method)</title> -<indexterm><primary>methodName</primary> -<secondary>ButtonControl class</secondary></indexterm> +<section id="mthIdClsImage"><title>id (Class method)</title> +<indexterm><primary>id</primary> +<secondary>Image class</secondary></indexterm> <programlisting> <![CDATA[ ->>-aButtonControl~methodName(--x--,--y--)------------------>< +>>--id(--symbolicName--)--------------------------------------->< ]]> </programlisting> -<para></para> +<para> + The id method is used to translate a symbolic name to its integer value. In general the symbolic + name is related to images or color. Many of the arguments to the methods of classes related to + images use the integer value of a symbolic ID in the Windows API. This method allows the + programmer to use the symbolic ID without knowing what the actual integer value is. +</para> +<para> + Take for example the task of retrieving the 'Question' icon resource from the system using the + <link linkend="mthGetImageClsImage">getImage()</link> method. The ooDialog programmer could + either use the numerical value of 32514 or use the id method as follows: + <programlisting> + <![CDATA[ + qIcon = .Image~getImage(.Image~id(IDI_QUESTION)) + ]]> + </programlisting> +</para> +<para> + The symbolic ID keywords are spelled exactly as Microsoft spells them in the <link + linkend="windowsdoc">MSDN library</link> which allows the ooDialog to easily look up the meaning + of any single ID while at the same time reducing the documentation task for the ooDialog + developers. The keywords are case sensitive and must be all in upper-case. +</para> <variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments are: -<variablelist> -<varlistentry><term>x</term> -<listitem><para>xx. -</para></listitem></varlistentry> -<varlistentry><term>y</term> -<listitem><para>yyy, -</para></listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para> + The single required argument is: + <variablelist> + <varlistentry><term>symbolicName</term> + <listitem> + <para> + The symbolic name whose numeric value is desired. There any number of symbolic names + and they are not listed here. Rathe the symbolic names are listed in the documentation + for the methods they are applicable to. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The return value is the numeric value of the symbol. + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <programlisting> + <![CDATA[ + say 'The numeric value of the IDI_WINLOGO symbol is:' .Image~id(IDI_WINLOGO) + /* + Output on the console would be: + + The numeric value of the IDI_WINLOGO symbol is: 32517 + */ + ]]> + </programlisting> + </listitem></varlistentry> </variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The possible return values are: -<variablelist> -<varlistentry><term>0</term> -<listitem><para>Success -</para></listitem></varlistentry> -<varlistentry><term>-1</term> -<listitem><para>Some error. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para>This example ... -<programlisting> -<![CDATA[ -x = y -return 0 -]]> -</programlisting> -</para></listitem></varlistentry> -</variablelist> </section> - -<section id="mthIdClsImage"><title>id</title> -<indexterm><primary>methodName</primary> -<secondary>ButtonControl class</secondary></indexterm> +<section id="mthGetImageClsImage"><title>getImage (Class method)</title> +<indexterm><primary>getImage</primary> +<secondary>Image class</secondary></indexterm> <programlisting> <![CDATA[ ->>-aButtonControl~methodName(--x--,--y--)------------------>< - +>>--getImage(--id--+--------+--+--------+--+---------+--)----->< + +-,-type-+ +-,-size-+ +-,-flags-+ ]]> </programlisting> -<para></para> +<para> +</para> <variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments are: -<variablelist> -<varlistentry><term>x</term> -<listitem><para>xx. -</para></listitem></varlistentry> -<varlistentry><term>y</term> -<listitem><para>yyy, -</para></listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para> + The arguments are: + <variablelist> + <varlistentry><term>id</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> </variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The possible return values are: -<variablelist> -<varlistentry><term>0</term> -<listitem><para>Success -</para></listitem></varlistentry> -<varlistentry><term>-1</term> -<listitem><para>Some error. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para>This example ... -<programlisting> -<![CDATA[ -x = y -return 0 -]]> -</programlisting> -</para></listitem></varlistentry> -</variablelist> </section> <section id="mthColorRef"><title>colorRef (Class Method)</title> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2008-12-28 23:41:52
|
Revision: 3821 http://oorexx.svn.sourceforge.net/oorexx/?rev=3821&view=rev Author: miesfeld Date: 2008-12-28 23:41:48 +0000 (Sun, 28 Dec 2008) Log Message: ----------- Incremental update to ooDialog doc Modified Paths: -------------- docs/trunk/oodialog/resources.sgml docs/trunk/oodialog/utilityclasses.sgml Modified: docs/trunk/oodialog/resources.sgml =================================================================== --- docs/trunk/oodialog/resources.sgml 2008-12-28 21:23:17 UTC (rev 3820) +++ docs/trunk/oodialog/resources.sgml 2008-12-28 23:41:48 UTC (rev 3821) @@ -45,21 +45,21 @@ <indexterm><primary>Resources</primary></indexterm> <para> In the Windows OS, a <emphasis role="italic">resource</emphasis>, is binary data used by a - Windows-based application. Usually, the binary data is attached to one of the applicatios's - executable files (*.exe or *.dll.) However, the binary data can also be generated dynamically in - memory. (Which is common in ooDialog, for example a UserDialog.) + Windows-based application. Usually, the binary data is attached to one of the application's executable + files (*.exe or *.dll.) However, the binary data can also be generated dynamically in memory. (Which + is common in ooDialog, for example a UserDialog.) </para> <para> - The data in standard resources describes things, familar to ooDialog programmers like: dialog - boxes, icons, menus, cursors, bitmaps, fonts, etc. The standard resources also include accelerator - tables, string-table entries, message-table entries, and other resourcess that ooDialog does not - currently have support for, but may support in the future. + The data in standard resources describes things familar to ooDialog programmers like: dialog boxes, + icons, menus, cursors, bitmaps, fonts, etc. The standard resources also include accelerator tables, + string-table entries, message-table entries, and other resourcess that ooDialog does not currently have + support for, but may support in the future. </para> <para> This chapter describes ooDialog classes that provide access to Windows resources. The classes allow - the oodialog programmer to use and manipulate resources in their ooDialog programs. This is an - area of ooDialog that is slated for future improvements. The classes listed in the following - table are documented in this chapter: + the oodialog programmer to use and manipulate resources in their ooDialog programs. This is an area of + ooDialog that is slated for future improvements. The classes listed in the following table are + documented in this chapter: <table id="tblResourcesClasses" frame="all"> <title>ooDialog Resource Classes</title> <tgroup cols="2"> @@ -94,8 +94,9 @@ metafile support is very limited at this time. </para> <para> - The class supports loading images from files, from executable files (*.exe and - *.dll,) and from the generally available system resources. + The class supports loading images from files, from resources contained in any executable files + (*.exe and *.dll,) from the files associated with the ooDialog program, and from the generally + available system resources. </para> <variablelist> <varlistentry><term><emphasis role="bold">Requires:</emphasis></term> @@ -124,35 +125,84 @@ </thead> <tbody> <row> -<entry>id (Class method)</entry> -<entry><link linkend="mthIdClsImage">id</link></entry> +<entry>colorRef (Class method)</entry> +<entry><link linkend="mthColorRef">colorRef</link></entry> </row> <row> -<entry>getImage (Class method)</entry> -<entry><link linkend="mthGetImageClsImage">new</link></entry> +<entry>fromFiles (Class method)</entry> +<entry><link linkend="mthFromFilesClsImage">fromFiles</link></entry> </row> <row> -<entry>colorRef (Class method)</entry> -<entry><link linkend="mthColorRef">colorRef</link></entry> +<entry>fromIDs (Class method)</entry> +<entry><link linkend="mthFromIDsClsImage">fromIDs</link></entry> </row> <row> -<entry>getRValue (Class method)</entry> -<entry><link linkend="mthGetRValue">getRValue</link></entry> +<entry>getBValue (Class method)</entry> +<entry><link linkend="mthGetBValue">getBValue</link></entry> </row> <row> <entry>getGValue (Class method)</entry> <entry><link linkend="mthGetGValue">getGValue</link></entry> </row> <row> -<entry>getBValue (Class method)</entry> -<entry><link linkend="mthGetBValue">getBValue</link></entry> +<entry>getImage (Class method)</entry> +<entry><link linkend="mthGetImageClsImage">getImage</link></entry> </row> +<row> +<entry>getRValue (Class method)</entry> +<entry><link linkend="mthGetRValue">getRValue</link></entry> +</row> +<row> +<entry>id (Class method)</entry> +<entry><link linkend="mthIdClsImage">id</link></entry> +</row> +<row> +<entry>new (Class method)</entry> +<entry><link linkend="mthNewClsImage">new</link></entry> +</row> +<row> +<entry>handle</entry> +<entry><link linkend="mthHandleClsImage">handle</link></entry> +</row> +<row> +<entry>isNull</entry> +<entry><link linkend="mthIsNullClsImage">isNull</link></entry> +</row> +<row> +<entry>release</entry> +<entry><link linkend="mthReleaseClsImage">release</link></entry> +</row> +<row> +<entry>systemErrorCode</entry> +<entry><link linkend="mthSystemErrorCodeClsImage">systemErrorCode</link></entry> +</row> </tbody></tgroup> </table> </listitem></varlistentry> </variablelist> +<section id="mthNewClsImage"><title>new (Class)</title> +<indexterm><primary>new</primary> +<secondary>Image class</secondary></indexterm> + +<para> + The Image class does not allow new Image objects to be instantiated from Rexx code using the new() + method. New Image objects are obtained through one of the other Image class methods or they are + returned from methods of other classes. +</para> +<para> + These methods are used to create new Image object(s). + <simplelist type='horiz' columns='1'> + <member>Image (class) method: <link linkend="mthGetImageClsImage">getImage()</link></member> + <member>Image (class) method: <link linkend="mthFromFilesClsImage">fromFiles()</link></member> + <member>Image (class) method: <link linkend="mthfromIDsClsImage">fromIDs()</link></member> + <member>ResourceImage (instance) method: <link linkend="mthGetImageClsResourceImage">getImage()</link></member> + <member>ResourceImage (instance) method: <link linkend="mthGetImagesClsResourceImage">getImages()</link></member> + </simplelist> +</para> +</section> <!-- End Image::new() [class method] --> + <section id="mthIdClsImage"><title>id (Class method)</title> <indexterm><primary>id</primary> <secondary>Image class</secondary></indexterm> @@ -173,12 +223,12 @@ Take for example the task of retrieving the 'Question' icon resource from the system using the <link linkend="mthGetImageClsImage">getImage()</link> method. The ooDialog programmer could either use the numerical value of 32514 or use the id method as follows: +</para> <programlisting> <![CDATA[ qIcon = .Image~getImage(.Image~id(IDI_QUESTION)) ]]> </programlisting> -</para> <para> The symbolic ID keywords are spelled exactly as Microsoft spells them in the <link linkend="windowsdoc">MSDN library</link> which allows the ooDialog to easily look up the meaning @@ -195,7 +245,7 @@ <listitem> <para> The symbolic name whose numeric value is desired. There any number of symbolic names - and they are not listed here. Rathe the symbolic names are listed in the documentation + and they are not listed here. Rather the symbolic names are listed in the documentation for the methods they are applicable to. </para> </listitem></varlistentry> @@ -222,7 +272,7 @@ </programlisting> </listitem></varlistentry> </variablelist> -</section> +</section> <!-- End Image::id() [class method] --> <section id="mthGetImageClsImage"><title>getImage (Class method)</title> <indexterm><primary>getImage</primary> @@ -235,14 +285,202 @@ </programlisting> <para> + Instantiates a new .Image object from either an image file or from one of the system images. When id + is a number then the corresponding system image is used. Otherwise, id is taken to be the name of an + image file. File names can be either relative or absolute. </para> <variablelist> + <varlistentry><term><emphasis role="bold">Details for this method:</emphasis></term> + <listitem> + <para> + Sets <link linkend="dotSystemErrorCode">.SystemErrorCode</link>. + </para> + <para> + Raises syntax errors when incorrect arguments are detected. + </para> + <para> + Pprovides an interface to the Win32 API: <computeroutput>LoadImage()</computeroutput>, when the API + is used to load an image from a file or to load one of the system images. Use the <link + linkend="windowsdoc">MSDN library</link> documentation to get more information on the arguments to + or usage of this method. + </para> + </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> + <variablelist> + <varlistentry><term>id</term> + <listitem> + <para> + If id is a number than it is taken to be the resource id of an image provided by the system. You + can use <link linkend="mthIdClsImage">.Image~id()</link> to get the correct numeric value for one + of the following symbols: + <simplelist type='vert' columns='4'> + <member>IDI_APPLICATION</member> + <member>IDI_HAND</member> + <member>IDI_QUESTION</member> + <member>IDI_EXCLAMATION</member> + <member>IDI_ASTERISK</member> + <member>IDI_WINLOGO</member> + <member></member> + <member></member> + <member></member> + <member></member> + <member></member> + <member></member> + <member></member> + <member>OCR_NORMAL</member> + <member>OCR_IBEAM</member> + <member>OCR_WAIT</member> + <member>OCR_CROSS</member> + <member>OCR_UP</member> + <member>OCR_SIZENWSE</member> + <member>OCR_SIZENESW</member> + <member>OCR_SIZEWE</member> + <member>OCR_SIZENS</member> + <member>OCR_SIZEALL</member> + <member>OCR_NO</member> + <member>OCR_HAND</member> + <member>OCR_APPSTARTING</member> + <member>OBM_CLOSE</member> + <member>OBM_UPARROW</member> + <member>OBM_DNARROW</member> + <member>OBM_RGARROW</member> + <member>OBM_LFARROW</member> + <member>OBM_REDUCE</member> + <member>OBM_ZOOM</member> + <member>OBM_RESTORE</member> + <member>OBM_REDUCED</member> + <member>OBM_ZOOMD</member> + <member>OBM_RESTORED</member> + <member>OBM_UPARROWD</member> + <member>OBM_DNARROWD</member> + <member>OBM_RGARROWD</member> + <member>OBM_LFARROWD</member> + <member>OBM_MNARROW</member> + <member>OBM_COMBO</member> + <member>OBM_UPARROWI</member> + <member>OBM_DNARROWI</member> + <member>OBM_RGARROWI</member> + <member>OBM_LFARROWI</member> + <member>OBM_SIZE</member> + <member>OBM_BTSIZE</member> + <member>OBM_CHECK</member> + <member>OBM_CHECKBOXES</member> + <member>OBM_BTNCORNERS</member> + </simplelist> + </para> + <para> + If not a number, then id must be the name of an image file. + </para> + </listitem></varlistentry> + <varlistentry><term>type</term> + <listitem> + <para> + Specifies the type of the image, bitmap, icon, cursor, or enhanced metafile. You can use <link + linkend="mthIdClsImage">.Image~id()</link> to get the correct numeric value for one of the + following symbols: + <simplelist type='horiz' columns='2'> + <member>IMAGE_BITMAP</member> <member>IMAGE_ICON</member> <member>IMAGE_CURSOR</member> + <member>IMAGE_ENHMETAFILE</member> + </simplelist> + </para> + <para> + The default is IMAGE_BITMAP. + </para> + </listitem></varlistentry> + <varlistentry><term>size</term> + <listitem> + <para> + A <link linkend="clsSize">.Size</link> object that specifies the size of the image. The default + is a size of 0x0. Under most circumstances this indicates that the actual size of the image + should be used. However, the <link linkend="windowsdoc">MSDN library</link> documentation should + be consulted for other meanings. + </para> + </listitem></varlistentry> + <varlistentry><term>flags</term> + <listitem> + <para> + The combined value of the load resource flags for the LoadImage() API. You can use <link + linkend="mthIdClsImage">.Image~id()</link> to get the correct numeric value for the following + symbols: + <simplelist type='horiz' columns='2'> + <member>LR_DEFAULTCOLOR</member> + <member>LR_CREATEDIBSECTION</member> + <member>LR_DEFAULTSIZE</member> + <member>LR_LOADFROMFILE</member> + <member>LR_LOADMAP3DCOLORS</member> + <member>LR_LOADTRANSPARENT</member> + <member>LR_MONOCHROME</member> + <member>LR_SHARED</member> + <member>LR_VGACOLOR</member> + </simplelist> + </para> + <para> + When id specifies a file name, the default flags are LR_LOADFROMFILE, othewise the default flags + are LR_SHARED | LR_DEFAULTSIZE. The <link linkend="mthOrClsDlgUtil">or()</link> method of the + <link linkend="clsDlgUtil">.DlgUtil</link> class can be used to combine more than one of the + symbols if needed. + </para> + </listitem></varlistentry> + </variablelist> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> <para> - The arguments are: - <variablelist> - <varlistentry><term>id</term> + A .Image object that represents the image specified. If an error happened, the object may not be + valid. Use the <link linkend="mthIsNullClsImage">isNull()</link> method to check if the image is + valid. If there was an error, <link linkend="dotSystemErrorCode">.SystemErrorCode</link> may help + to determine the error. + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <programlisting> + <![CDATA[ + flags = .DlgUtil~or(.Image~id(LR_DEFAULTSIZE), .Image~id(LR_SHARED), - + .Image~id(LR_LOADMAP3DCOLORS)) + + questionIcon = .Image~getImage(.Image~id(IDI_QUESTION), - + .Image~id(IMAGE_ICON), - + .Size~new(0, 0), flags) + if question~isNull then do + say 'Error getting the question icon. Error code:' .SystemErrorCode + end + + /* Note that you can always use the raw numeric value for the args. + * This works just as well: + */ + question = .Image~getImage(32514, 1, .Size~new(0, 0), 36928) + if question~isNull then do + say 'Error getting the question icon. Error code:' .SystemErrorCode + end + + ]]> + </programlisting> + </listitem></varlistentry> +</variablelist> +</section> <!-- End Image::getImage() [class method] --> + + +<section id="mthFromFilesClsImage"><title>fromFiles (Class method)</title> +<indexterm><primary>fromFiles</primary> +<secondary>Image class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--fromFiles(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> <listitem> <para> xx. @@ -254,7 +492,7 @@ yyy, </para> </listitem></varlistentry> - </variablelist> + </variablelist> </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> @@ -288,10 +526,11 @@ ]]> </programlisting> </para> - </listitem></varlistentry> + </listitem></varlistentry> </variablelist> -</section> +</section> <!-- End Image::fromFiles() [class method] --> + <section id="mthColorRef"><title>colorRef (Class Method)</title> <indexterm><primary>colorRef</primary></indexterm> <programlisting> @@ -343,22 +582,91 @@ <![CDATA[ ref = .Image~colorRef(245, 89, 255) - say 'A fancy puple:' ref '(0x' || ref~d2x~right(8, '0')')' + say 'A fancy purple:' ref '(0x' || ref~d2x~right(8, '0')')' say ::requires 'oodPlain.cls' /* Output: -A fancy puple: 16734709 (0x00FF59F5) +A fancy purple: 16734709 (0x00FF59F5) */ ]]> </programlisting> </para></listitem></varlistentry> </variablelist> -</section> +</section> <!-- End Image::colorRef() [class method] --> + +<section id="mthFromIDsClsImage"><title>fromIDs (Class method)</title> +<indexterm><primary>fromIDs</primary> +<secondary>Image class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--fromIDs(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End Image::fromIDs() [class method] --> + <section id="mthGetRValue"><title>getRValue (Class Method)</title> <indexterm><primary>getRValue</primary></indexterm> <programlisting> @@ -416,7 +724,7 @@ </programlisting> </para></listitem></varlistentry> </variablelist> -</section> +</section> <!-- End Image::getRValue() [class method] --> <section id="mthGetGValue"><title>getGValue (Class Method)</title> <indexterm><primary>getRValue</primary></indexterm> @@ -449,7 +757,7 @@ See the example for the <link linkend="exampleGetRValueClsImage">getRValue</link>() method. </para></listitem></varlistentry> </variablelist> -</section> +</section> <!-- End Image::getGValue() [class method] --> <section id="mthGetBValue"><title>getBValue (Class Method)</title> <indexterm><primary>getRValue</primary></indexterm> @@ -482,10 +790,286 @@ See the example for the <link linkend="exampleGetRValueClsImage">getRValue</link>() method. </para></listitem></varlistentry> </variablelist> -</section> +</section> <!-- End Image::getBValue() [class method] --> -</section> <!-- End Image class --> +<section id="mthHandleClsImage"><title>handle</title> +<indexterm><primary>handle</primary> +<secondary>Image class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--handle(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End Image::handle() --> + + +<section id="mthReleaseClsImage"><title>release</title> +<indexterm><primary>release</primary> +<secondary>Image class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--release(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End Image::release() --> + + +<section id="mthIsNullClsImage"><title>isNull</title> +<indexterm><primary>isNull</primary> +<secondary>Image class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--isNull(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End Image::isNull() --> + + +<section id="mthsystemErrorCodeClsImage"><title>systemErrorCode</title> +<indexterm><primary>systemErrorCode</primary> +<secondary>Image class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--systemErrorCode(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End Image::systemErrorCode() --> + +</section> <!-- End Image class --> + <section id="clsImageList"><title>ImageList Class</title> <indexterm><primary>ImageList class</primary></indexterm> <para> @@ -520,13 +1104,61 @@ </thead> <tbody> <row> +<entry>create (Class method)</entry> +<entry><link linkend="mthCreateClsImageList">id</link></entry> +</row> +<row> <entry>new (Class method)</entry> <entry><link linkend="mthNewClsImageList">new</link></entry> </row> <row> -<entry>create (Class method)</entry> -<entry><link linkend="mthCreateClsImageList">id</link></entry> +<entry>add</entry> +<entry><link linkend="mthAddClsImageList">add</link></entry> </row> +<row> +<entry>addMasked</entry> +<entry><link linkend="mthAddMaskedClsImageList">addMasked</link></entry> +</row> +<row> +<entry>addIcon</entry> +<entry><link linkend="mthAddIconClsImageList">addIcon</link></entry> +</row> +<row> +<entry>addImages</entry> +<entry><link linkend="mthAddImagesClsImageList">addImages</link></entry> +</row> +<row> +<entry>getCount</entry> +<entry><link linkend="mthGetCountClsImageList">getCount</link></entry> +</row> +<row> +<entry>getImageSize</entry> +<entry><link linkend="mthGetImageSizeClsImageList">getImageSize</link></entry> +</row> +<row> +<entry>duplicate</entry> +<entry><link linkend="mthDuplicateClsImageList">duplicate</link></entry> +</row> +<row> +<entry>remove</entry> +<entry><link linkend="mthRemoveClsImageList">remove</link></entry> +</row> +<row> +<entry>removeAll</entry> +<entry><link linkend="mthRemoveAllClsImageList">removeAll</link></entry> +</row> +<row> +<entry>release</entry> +<entry><link linkend="mthReleaseClsImageList">release</link></entry> +</row> +<row> +<entry>handle</entry> +<entry><link linkend="mthHandleClsImageList">handle</link></entry> +</row> +<row> +<entry>isNull</entry> +<entry><link linkend="mthIsNullClsImageList">isNull</link></entry> +</row> </tbody></tgroup> </table> </listitem></varlistentry> @@ -577,14 +1209,14 @@ </programlisting> </para></listitem></varlistentry> </variablelist> -</section> +</section> <!-- End ImageList::new() [class method] --> -<section id="mthCreateClsImageList"><title>id</title> -<indexterm><primary>methodName</primary> -<secondary>ButtonControl class</secondary></indexterm> +<section id="mthCreateClsImageList"><title>create (Class method)</title> +<indexterm><primary>create</primary> +<secondary>ImageList class</secondary></indexterm> <programlisting> <![CDATA[ ->>-aButtonControl~methodName(--x--,--y--)------------------>< +>>--create(------------------------------------------------>< ]]> </programlisting> @@ -623,10 +1255,838 @@ </programlisting> </para></listitem></varlistentry> </variablelist> -</section> +</section> <!-- End ImageList::create() [class method] --> -</section> <!-- End ImageList class --> +<section id="mthAddClsImageList"><title>add</title> +<indexterm><primary>add</primary> +<secondary>ImageList class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--add(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ImageList::add() --> + + +<section id="mthAddMaskedClsImageList"><title>addMasked</title> +<indexterm><primary>addMasked</primary> +<secondary>ImageList class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--addMasked(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ImageList::addMasked() --> + + +<section id="mthAddIconClsImageList"><title>addIcon</title> +<indexterm><primary>addIcon</primary> +<secondary>ImageList class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--addIcon(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ImageList::addIcon() --> + + +<section id="mthAddImagesClsImageList"><title>addImages</title> +<indexterm><primary>addImages</primary> +<secondary>ImageList class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--addImages(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ImageList::addImages() --> + + +<section id="mthGetCountClsImageList"><title>getCount</title> +<indexterm><primary>getCount</primary> +<secondary>ImageList class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--getCount(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ImageList::getCount() --> + + +<section id="mthGetImageSizeClsImageList"><title>getImageSize</title> +<indexterm><primary>getImageSize</primary> +<secondary>ImageList class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--getImageSize(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ImageList::getImageSize() --> + + +<section id="mthDuplicateClsImageList"><title>duplicate</title> +<indexterm><primary>duplicate</primary> +<secondary>ImageList class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--duplicate(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ImageList::duplicate() --> + + +<section id="mthRemoveClsImageList"><title>remove</title> +<indexterm><primary>remove</primary> +<secondary>ImageList class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--remove(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ImageList::remove() --> + + +<section id="mthRemoveAllClsImageList"><title>removeAll</title> +<indexterm><primary>removeAll</primary> +<secondary>ImageList class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--removeAll(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ImageList::removeAll() --> + + +<section id="mthReleaseClsImageList"><title>release</title> +<indexterm><primary>release</primary> +<secondary>ImageList class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--release(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ImageList::release() --> + + +<section id="mthHandleClsImageList"><title>handle</title> +<indexterm><primary>handle</primary> +<secondary>ImageList class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--handle(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ImageList::handle() --> + + +<section id="mthIsNullClsImageList"><title>isNull</title> +<indexterm><primary>isNull</primary> +<secondary>ImageList class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--isNull(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ImageList::isNull() --> + +</section> <!-- End ImageList class --> + <section id="clsResourceImage"><title>ResourceImage Class</title> <indexterm><primary>ResourceImage class</primary></indexterm> <para> @@ -668,18 +2128,38 @@ <entry>getImage</entry> <entry><link linkend="mthGetImageClsResourceImage">getImage</link></entry> </row> +<row> +<entry>getImages</entry> +<entry><link linkend="mthGetImagesClsResourceImage">getImages</link></entry> +</row> +<row> +<entry>handle</entry> +<entry><link linkend="mthHandleClsResourceImage">handle</link></entry> +</row> +<row> +<entry>isNull</entry> +<entry><link linkend="mthIsNullClsResourceImage">isNull</link></entry> +</row> +<row> +<entry>release</entry> +<entry><link linkend="mthReleaseClsResourceImage">release</link></entry> +</row> +<row> +<entry>systemErrorCode</entry> +<entry><link linkend="mthSystemErrorCodeClsResourceImage">systemErrorCode</link></entry> +</row> </tbody></tgroup> </table> </listitem></varlistentry> </variablelist> -<section id="mthNewClsResourceImage"><title>new</title> +<section id="mthNewClsResourceImage"><title>new (Class method)</title> <indexterm><primary>new</primary> <secondary>ResouceImage class</secondary></indexterm> <programlisting> <![CDATA[ ->>-aButtonControl~methodName(--x--,--y--)------------------>< +>>--new(--------------------------------------------------->< ]]> </programlisting> @@ -718,7 +2198,7 @@ </programlisting> </para></listitem></varlistentry> </variablelist> -</section> +</section> <!-- End Resource::new() [class method] --> <section id="mthGetImageClsResourceImage"><title>getImage</title> <indexterm><primary>getImage</primary> @@ -764,9 +2244,354 @@ </programlisting> </para></listitem></varlistentry> </variablelist> -</section> +</section> <!-- End ResourceImage::getImage() --> -</section> <!-- End ResourceImage class --> +<section id="mthGetImagesClsResourceImage"><title>getImages</title> +<indexterm><primary>getImages</primary> +<secondary>ResourceImage class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--getImages(--x--,--y--)--------------------------------------->< +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ResourceImage::getImages() --> + + +<section id="mthReleaseClsResourceImage"><title>release</title> +<indexterm><primary>release</primary> +<secondary>ResourceImage class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--release(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ResourceImage::release() --> + + +<section id="mthHandleClsResourceImage"><title>handle</title> +<indexterm><primary>handle</primary> +<secondary>ResourceImage class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--handle(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ResourceImage::handle() --> + + +<section id="mthIsNullClsResourceImage"><title>isNull</title> +<indexterm><primary>isNull</primary> +<secondary>ResourceImage class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--isNull(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ResourceImage::isNull() --> + + +<section id="mthSystemErrorCodeClsResourceImage"><title>systemErrorCode</title> +<indexterm><primary>systemErrorCode</primary> +<secondary>ResourceImage class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--systemErrorCode(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ResourceImage::systemErrorCode() --> + +</section> <!-- End ResourceImage class --> + + </chapter> Modified: docs/trunk/oodialog/utilityclasses.sgml =================================================================== --- docs/trunk/oodialog/utilityclasses.sgml 2008-12-28 21:23:17 UTC (rev 3820) +++ docs/trunk/oodialog/utilityclasses.sgml 2008-12-28 23:41:48 UTC (rev 3821) @@ -41,26 +41,31 @@ # ######################################################################### --> -<chapter id="utilityclasses"><title>Utility Classes</title> +<chapter id="utilityclasses"><title>Utility Classes and Objects</title> <indexterm><primary>Utility Classes</primary></indexterm> <para> - The ooDialog framework provides a number of utility classes that are useful - when writing more complex programs. These classes do not easily fit into the - category ... [truncated message content] |
From: <mie...@us...> - 2009-01-01 09:18:14
|
Revision: 3840 http://oorexx.svn.sourceforge.net/oorexx/?rev=3840&view=rev Author: miesfeld Date: 2009-01-01 09:18:08 +0000 (Thu, 01 Jan 2009) Log Message: ----------- Incremental update to ooDialog doc Modified Paths: -------------- docs/trunk/oodialog/resources.sgml docs/trunk/oodialog/termdef.sgml Modified: docs/trunk/oodialog/resources.sgml =================================================================== --- docs/trunk/oodialog/resources.sgml 2009-01-01 07:38:02 UTC (rev 3839) +++ docs/trunk/oodialog/resources.sgml 2009-01-01 09:18:08 UTC (rev 3840) @@ -41,7 +41,7 @@ # ######################################################################### --> -<chapter id="resources"><title>Resources</title> +<chapter id="chapResources"><title>Resources</title> <indexterm><primary>Resources</primary></indexterm> <para> In the Windows OS, a <emphasis role="italic">resource</emphasis>, is binary data used by a @@ -1228,11 +1228,21 @@ <para> The .ImageList object acts as an interface to the underlying operating system Image List, which Microsoft calls a control. Although Microsoft calls the Image List a control and documents it with the - other dialog controls, it is not a control in the same sense as button, edit, or list-view controls. - Use the <link linkend="windowsdoc">MSDN library</link> documentation to get more information on exactly - how Image Lists work. + other dialog controls, it is not a control in the same sense as button, edit, or list-view controls. It + is not a window, all dialog controls are windows. It does not send or recieve window messages. Use the + <link linkend="windowsdoc">MSDN library</link> documentation to get more information on exactly how + Image Lists work. </para> <para> + When an image list is no longer needed, it can be released. This frees up the system resources used + for the images and the image list. The programmer releases an image list by using the <link + linkend="mthReleaseClsImageList">release()</link> method. Once an image list is released it can no + longer be used. It is an error to inovke any method on the released object, except for the <link + linkend="mthIsNullClsImageList">isNull()</link> method. The isNull() method can be invoked any time to + test if an image list is valid or not. It should go without saying that a programmer should not release + an image list that is in use. +</para> +<para> Future versions of the .ImageList are intended to provide a complete interface to the underlying Image List control. At this time not all functionality is implemented. </para> @@ -1453,7 +1463,7 @@ <varlistentry><term><emphasis role="bold">Details</emphasis></term> <listitem> <para> - Raises syntax errors when incorrect arguments are detected. + Raises syntax errors when incorrect arguments are detected or if the image list is null. </para> <para> Provides an interface to the <computeroutput>ImageList_Add()</computeroutput> API. The <link @@ -1535,7 +1545,7 @@ <varlistentry><term><emphasis role="bold">Details</emphasis></term> <listitem> <para> - Raises syntax errors when incorrect arguments are detected. + Raises syntax errors when incorrect arguments are detected or if the image list is null. </para> <para> Provides an interface to the <computeroutput>ImageList_AddMasked()</computeroutput> API. The <link @@ -1621,7 +1631,7 @@ </programlisting> <para> - Adds an icon or cursor image to the image list. If this image list is masked, then both the image and + Adds an icon or cursor image to the image list. If the image list is masked, then both the image and mask bitmaps of the icon or cursor are copied. If it is not masked, then only the image bitmap is copied. </para> @@ -1630,13 +1640,16 @@ be released if it is not needed anymore. </para> <variablelist> + <varlistentry><term><emphasis role="bold">Details</emphasis></term> + <listitem> <para> - Raises syntax errors when incorrect arguments are detected. + Raises syntax errors when incorrect arguments are detected or if the image list is null. </para> <para> Provides an interface to the <computeroutput>ImageList_AddIcon()</computeroutput> API. The <link linkend="windowsdoc">MSDN library</link> documentation can provide more information on this method. </para> + </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> <para>The only argument is: @@ -1701,29 +1714,49 @@ <secondary>ImageList class</secondary></indexterm> <programlisting> <![CDATA[ ->>--addImages(--x--,--y--)--------------------------------------->< - +>>--addImages(--images--+---------+--)--------------------------->< + +-,-cRef--+ ]]> </programlisting> <para> - Description + Adds a number of images to the image list. The images are supplied in a non-sparse array and must all + be of the same type. </para> +<para> + The images are added to the image list in the same order as they exist in the array. If an error + occurs in the middle of processing the images, the method returns at that point. This means that + images prior to the error will exist in the image list, but no images in the array after the error will + be placed in the image list. Which images were placed in the image list can be determined by the + return value of this method. +</para> <variablelist> + <varlistentry><term><emphasis role="bold">Details</emphasis></term> + <listitem> + <para> + Raises syntax errors when incorrect arguments are detected or if the image list is null. + </para> + </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> <para>The arguments are: <variablelist> - <varlistentry><term>x</term> + <varlistentry><term>images</term> <listitem> <para> - xx. + An array of non-null .Image objects. The array must not be sparse, that is each index in the + array must contain an .Image ojbect. The images can be bitmaps, icons, or cursors, but each + image in the array must be the same type. (Remember that curors are icons, so that the array + can contain a mixture of icons and cursors.) Bitmaps can not be mixed with icons or cursors. </para> </listitem></varlistentry> - <varlistentry><term>y</term> + <varlistentry><term>cRef</term> <listitem> <para> - yyy, + A <link linkend="mthColorRef">COLORREF</link> that is used to generate the mask if the image + list is a masked image list. See the <link + linkend="mthAddMaskedClsImageList">addMasked()</link> method for more details on this argument. + This argument is ignored if the images are not bitmaps, or if the image list is not masked. </para> </listitem></varlistentry> </variablelist> @@ -1732,31 +1765,68 @@ <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - The possible return values are: - <variablelist> - <varlistentry><term>0</term> - <listitem> - <para> - Success - </para> - </listitem></varlistentry> - <varlistentry><term>-1</term> - <listitem> - <para> - Some error. - </para> - </listitem></varlistentry> - </variablelist> + This method returns the image list index of the last successfully added image, or -1 if no images + were added. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> <para> - This example ... + This example creates an image list from a number icons and then displays them in a list-view + control in a dialog. <programlisting> <![CDATA[ - x = y - return 0 + list = self~getListControl(IDC_LV_IMAGES) + + files1 = .array~new() + files1[ 1] = "Bee.ico" + files1[ 2] = "Camera.ico" + files1[ 3] = "Camera1.ico" + files1[ 4] = "Default.ico" + files1[ 5] = "Disabled.ico" + files1[ 6] = "Hot.ico" + files1[ 7] = "Lamp.ico" + files1[ 8] = "Mountain.ico" + files1[ 9] = "Normal.ico" + files1[10] = "Penquin.ico" + files1[11] = "Picture.ico" + files1[12] = "Pushed.ico" + files1[13] = "Question32.ico" + files1[14] = "Search32.ico" + files1[15] = "Skull.ico" + files1[16] = "Stolen.ico" + files1[17] = "Window.ico" + + size = .Size~new(32, 32) + + images = .Image~fromFiles(files1, .Image~id(IMAGE_ICON), size) + if images~items <> files1~items then do + say 'Error loading images.' + say ' System error:' .SystemErrorCode + say ' Message: ' SysGetErrorText(.SystemErrorCode) + return + end + + count = images~items + flags = .DlgUtil~or(.Image~id(ILC_COLOR24), .Image~id(ILC_MASK)) + + imageList = .ImageList~create(size, flags, 20, 10); + + lastAdded = imageList~addImages(images) + if lastAdded <> (count - 1) then do + -- Not all images were added. We just ignore this and display + -- in the list-view what was added. + end + + -- Set the image list for the list-view's normal icons. + list~setImageList(imageList, .Image~id(LVSIL_NORMAL)) + + -- Add an item to the list-view for each image. The + -- text for each item will be the icon file name and + -- the icon will be the image we loaded. + do i = 0 to lastAdded + list~add(files1[i + 1], i) + end ]]> </programlisting> </para> @@ -1770,65 +1840,52 @@ <secondary>ImageList class</secondary></indexterm> <programlisting> <![CDATA[ ->>--getCount(--x--,--y--)--------------------------------------->< +>>--getCount---------------------------------------------------->< ]]> </programlisting> <para> - Description + Determines the number of images in the image list. </para> <variablelist> + <varlistentry><term><emphasis role="bold">Details</emphasis></term> + <listitem> + <para> + Raises a syntax error if the image list is null. + </para> + <para> + Provides an interface to the <computeroutput>ImageList_ImageCount()</computeroutput> API. The <link + linkend="windowsdoc">MSDN library</link> documentation can provide more information on this method. + </para> + </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> - <para>The arguments are: - <variablelist> - <varlistentry><term>x</term> - <listitem> - <para> - xx. - </para> - </listitem></varlistentry> - <varlistentry><term>y</term> - <listitem> - <para> - yyy, - </para> - </listitem></varlistentry> - </variablelist> + <para> + There are no arguments. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - The possible return values are: - <variablelist> - <varlistentry><term>0</term> - <listitem> - <para> - Success - </para> - </listitem></varlistentry> - <varlistentry><term>-1</term> - <listitem> - <para> - Some error. - </para> - </listitem></varlistentry> - </variablelist> + Returns the number of images currently in the image list. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> - <para> - This example ... - <programlisting> - <![CDATA[ - x = y - return 0 - ]]> - </programlisting> - </para> + <programlisting> + <![CDATA[ + ::method displayImageListCount private + use strict arg imageList + say 'Image list:' imageList~handle 'has' imagelist~getCount 'images.' + + /* + Possible output on a Windows 64-bit system: + + Image list: 0x00000000000ED420 has 17 images. + */ + ]]> + </programlisting> </listitem></varlistentry> </variablelist> </section> <!-- End ImageList::getCount() --> @@ -1839,65 +1896,57 @@ <secondary>ImageList class</secondary></indexterm> <programlisting> <![CDATA[ ->>--getImageSize(--x--,--y--)--------------------------------------->< +>>--getImageSize---------------------------------------------------->< ]]> </programlisting> <para> - Description + Determines the size of the images in the image list. All images in any single image list have the same + size. </para> <variablelist> + <varlistentry><term><emphasis role="bold">Details</emphasis></term> + <listitem> + <para> + Raises a syntax error if the image list is null. + </para> + <para> + Provides an interface to the <computeroutput>ImageList_IconSize()</computeroutput> API. The <link + linkend="windowsdoc">MSDN library</link> documentation can provide more information on this method. + </para> + </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> - <para>The arguments are: - <variablelist> - <varlistentry><term>x</term> - <listitem> - <para> - xx. - </para> - </listitem></varlistentry> - <varlistentry><term>y</term> - <listitem> - <para> - yyy, - </para> - </listitem></varlistentry> - </variablelist> + <para>There are no arguments. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - The possible return values are: - <variablelist> - <varlistentry><term>0</term> - <listitem> - <para> - Success - </para> - </listitem></varlistentry> - <varlistentry><term>-1</term> - <listitem> - <para> - Some error. - </para> - </listitem></varlistentry> - </variablelist> + The size of the images in the image list is returned in a <link linkend="clsSize">.Size</link> + object. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> - <para> - This example ... - <programlisting> - <![CDATA[ - x = y - return 0 - ]]> - </programlisting> - </para> + <programlisting> + <![CDATA[ + ::method displayImageListSize private + use strict arg imageList + s = imageList~getImageSize + h = s~height 'pixels high' + w = s~width 'pixels wide' + say 'Image list:' imageList~handle 'contains images' h 'by' w + + /* + Possible output on a Windows 64-bit system: + + Image list: 0x00000000000DCB20 contains images 32 pixels high by 32 pixels wide + */ + + ]]> + </programlisting> </listitem></varlistentry> </variablelist> </section> <!-- End ImageList::getImageSize() --> @@ -1908,62 +1957,59 @@ <secondary>ImageList class</secondary></indexterm> <programlisting> <![CDATA[ ->>--duplicate(--x--,--y--)--------------------------------------->< +>>--duplicate---------------------------------------------------->< ]]> </programlisting> <para> - Description + Creates a duplicate image list. All information in the original image list is copied to the new image + list. (Overlay images are not copied, but ooDialog does not have support for image list overlay images + at this time.) The two image lists are independent. Adding, or removing, images from one image list + has no effect on the other. </para> <variablelist> + <varlistentry><term><emphasis role="bold">Details</emphasis></term> + <listitem> + <para> + Raises a syntax error if the image list is null. + </para> + <para> + Provides an interface to the <computeroutput>ImageList_Duplcate()</computeroutput> API. The <link + linkend="windowsdoc">MSDN library</link> documentation can provide more information on this method. + </para> + </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> - <para>The arguments are: - <variablelist> - <varlistentry><term>x</term> - <listitem> - <para> - xx. - </para> - </listitem></varlistentry> - <varlistentry><term>y</term> - <listitem> - <para> - yyy, - </para> - </listitem></varlistentry> - </variablelist> + <para> + There are no arguments. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - The possible return values are: - <variablelist> - <varlistentry><term>0</term> - <listitem> - <para> - Success - </para> - </listitem></varlistentry> - <varlistentry><term>-1</term> - <listitem> - <para> - Some error. - </para> - </listitem></varlistentry> - </variablelist> + The return is a copy of the image list. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> <para> - This example ... + This fictious example is from a point-of-sale application for a restaurant. The customer is + presented with a list-view of menu items, each list-view item has a colorful icon depicting the + selection. The customers place their orders through the application and wait-people then bring + them their meal when it is ready. The dinner menu has all the items that the lunch menu does, plus + some more. The customer can choose whether to order from the lunch menu or the dinner menu, so the + lunch menu image list has to remain unchanged. <programlisting> <![CDATA[ - x = y - return 0 + ::method getDinnerImageList private + use strict arg lunchImageList + + dinnerList = lunchImageList~duplicate + fileArray = self~getDinnerImageFiles + dinnerList~addImages(fileArray) + + return dinnerList ]]> </programlisting> </para> @@ -1977,61 +2023,71 @@ <secondary>ImageList class</secondary></indexterm> <programlisting> <![CDATA[ ->>--remove(--x--,--y--)--------------------------------------->< +>>--remove(--index--)----------------------------------------->< ]]> </programlisting> <para> - Description + Removes the image at <emphasis role="italic">index</emphasis> from the image list. When the image is + removed, all the indexes in the list are adjusted. I.e., if the image at index 2 is removed, the image + at index 3 becomes index 2, the image at index 4 becomes index 3, etc.. </para> <variablelist> + <varlistentry><term><emphasis role="bold">Details</emphasis></term> + <listitem> + <para> + Raises syntax errors when incorrect arguments are detected or if the image list is null. + </para> + <para> + Provides an interface to the <computeroutput>ImageList_Remove()</computeroutput> API. The <link + linkend="windowsdoc">MSDN library</link> documentation can provide more information on this method. + </para> + </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> - <para>The arguments are: + <para>The single argument is: <variablelist> - <varlistentry><term>x</term> + <varlistentry><term>index</term> <listitem> <para> - xx. + The index of the image to remove. </para> </listitem></varlistentry> - <varlistentry><term>y</term> - <listitem> - <para> - yyy, - </para> - </listitem></varlistentry> </variablelist> </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - The possible return values are: - <variablelist> - <varlistentry><term>0</term> - <listitem> - <para> - Success - </para> - </listitem></varlistentry> - <varlistentry><term>-1</term> - <listitem> - <para> - Some error. - </para> - </listitem></varlistentry> - </variablelist> + This method returns true on success, otherwise false. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> <para> - This example ... + This example comes from the fictious point-of-sale application for a restaurant. Sometimes the + chef runs out of a menu item and the item is then removed from the list-view so that the customers + can no longer order it. (Rigorous error checking is not done because the application was written + by one of the waiters.) <programlisting> <![CDATA[ - x = y + ::method removeFromMenu private + use strict arg index + + menu = self~getListControl(IDC_LV_MENU) + + bigIcons = menu~getImageList(.Image~id(LVSIL_NORMAL)) + bigIcons~remove(index) + + smallIcons = menu~getImageList(.Image~id(LVSIL_SMALL)) + smallIcons~remove(index) + + stateIcons = menu~getImageList(.Image~id(LVSIL_STATE)) + stateIcons~remove(index) + + menu~delete(index) + return 0 ]]> </programlisting> @@ -2046,62 +2102,66 @@ <secondary>ImageList class</secondary></indexterm> <programlisting> <![CDATA[ ->>--removeAll(--x--,--y--)--------------------------------------->< +>>--removeAll---------------------------------------------------->< ]]> </programlisting> <para> - Description + Removes all images from the image list. </para> <variablelist> + <varlistentry><term><emphasis role="bold">Details</emphasis></term> + <listitem> + <para> + Raises a syntax error if the image list is null. + </para> + <para> + Provides an interface to the <computeroutput>ImageList_RemoveAll()</computeroutput> API. The <link + linkend="windowsdoc">MSDN library</link> documentation can provide more information on this method. + </para> + </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> - <para>The arguments are: - <variablelist> - <varlistentry><term>x</term> - <listitem> - <para> - xx. - </para> - </listitem></varlistentry> - <varlistentry><term>y</term> - <listitem> - <para> - yyy, - </para> - </listitem></varlistentry> - </variablelist> + <para> + There are no arguments to this method. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - The possible return values are: - <variablelist> - <varlistentry><term>0</term> - <listitem> - <para> - Success - </para> - </listitem></varlistentry> - <varlistentry><term>-1</term> - <listitem> - <para> - Some error. - </para> - </listitem></varlistentry> - </variablelist> + The method returns true on success, false otherwise. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> <para> - This example ... + This example is a continuation of the fictious restaurant point-of-sale application. The waiter + that wrote the application did not like to work past the normal closing time. The application has + a feature that removes all the menu items as it gets near closing time to prevent customers from + ordering something they do not have time to finish eating. (However, the waiter noticed that he + often got huge tips from customers that had drinks after their meal.) <programlisting> <![CDATA[ - x = y + ::method stopOrders private + + menu = self~getListControl(IDC_LV_MENU) + + bigIcons = menu~getImageList(.Image~id(LVSIL_NORMAL)) + bigIcons~removeAll + + smallIcons = menu~getImageList(.Image~id(LVSIL_SMALL)) + smallIcons~removeAll + + stateIcons = menu~getImageList(.Image~id(LVSIL_STATE)) + stateIcons~removeAll + + menu~deleteAll + + self~addAfterDinnerDrinks(menu) + return 0 + ]]> </programlisting> </para> @@ -2115,62 +2175,52 @@ <secondary>ImageList class</secondary></indexterm> <programlisting> <![CDATA[ ->>--release(--x--,--y--)--------------------------------------->< +>>--release---------------------------------------------------->< ]]> </programlisting> <para> - Description + Releases the image list allowing the operating system to reclaim the resources used by the image list. + Once the image list has been released, it can no longer be used. </para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> - <para>The arguments are: - <variablelist> - <varlistentry><term>x</term> - <listitem> - <para> - xx. - </para> - </listitem></varlistentry> - <varlistentry><term>y</term> - <listitem> - <para> - yyy, - </para> - </listitem></varlistentry> - </variablelist> + <para> + There are no arguments to this method. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - The possible return values are: - <variablelist> - <varlistentry><term>0</term> - <listitem> - <para> - Success - </para> - </listitem></varlistentry> - <varlistentry><term>-1</term> - <listitem> - <para> - Some error. - </para> - </listitem></varlistentry> - </variablelist> + This method always returns 0. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> <para> - This example ... + This example comes from a program that runs continuously. During the life-cycle of the application + it displays and then closes a dialog that creates some image lists. The image lists are always + different depending on the state of things. Each time the dialog closes, it releases the image + lists it created to free up the operating system resources. <programlisting> <![CDATA[ - x = y - return 0 + ::method ok + self~cleanUp + return self~ok:super + + ::method cancel + self~cleanUp + return self~cancel:super + + ::method cleanUp private + expose coolTempImages warningImages buidingStatusImages + + if coolTempImages \== .nil then coolTempImages~release + if warningImages \== .nil then warningImages~release + if buildingStatusImages \== .nil then buildStatusImages~release + ]]> </programlisting> </para> @@ -2184,65 +2234,47 @@ <secondary>ImageList class</secondary></indexterm> <programlisting> <![CDATA[ ->>--handle(--x--,--y--)--------------------------------------->< +>>--handle---------------------------------------------------->< ]]> </programlisting> <para> - Description + Returns the Windows system handle to the image list this object represents. It is an error to invoke + this method if the image list is null, or after the image has been released. </para> +<para> + At this time, the handle is only useful for display. In the ooDialog framework, methods that use + image lists for arguments, use the .ImageList object, not the image list handle. +</para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> - <para>The arguments are: - <variablelist> - <varlistentry><term>x</term> - <listitem> - <para> - xx. - </para> - </listitem></varlistentry> - <varlistentry><term>y</term> - <listitem> - <para> - yyy, - </para> - </listitem></varlistentry> - </variablelist> + <para> + There is no argument to this method. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - The possible return values are: - <variablelist> - <varlistentry><term>0</term> - <listitem> - <para> - Success - </para> - </listitem></varlistentry> - <varlistentry><term>-1</term> - <listitem> - <para> - Some error. - </para> - </listitem></varlistentry> - </variablelist> + The return is the image list handle. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> - <para> - This example ... - <programlisting> - <![CDATA[ - x = y - return 0 - ]]> - </programlisting> - </para> + <programlisting> + <![CDATA[ + ::method displayImageList private + use strict arg imageList + say 'Currently using this image list:' imageList~handle + + /* + Possible output on a Windows 64-bit system: + + Currently using this image list: 0x00000000000DCB20 + */ + ]]> + </programlisting> </listitem></varlistentry> </variablelist> </section> <!-- End ImageList::handle() --> @@ -2253,62 +2285,52 @@ <secondary>ImageList class</secondary></indexterm> <programlisting> <![CDATA[ ->>--isNull(--x--,--y--)--------------------------------------->< +>>--isNull---------------------------------------------------->< ]]> </programlisting> <para> - Description + Used to check if an image list is valid. This method can be invoked on any image list, even after it + has been released. An image list will always be null after it has been released. It is conceivable + that, if an error occurs during an image list creation, the returned image list might be null. + However, this is extemely unlikely. Therefor, for all practical purposes, an image list will only be + null after it has been released. </para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> - <para>The arguments are: - <variablelist> - <varlistentry><term>x</term> - <listitem> - <para> - xx. - </para> - </listitem></varlistentry> - <varlistentry><term>y</term> - <listitem> - <para> - yyy, - </para> - </listitem></varlistentry> - </variablelist> + <para> + There are no arguments to this method. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - The possible return values are: - <variablelist> - <varlistentry><term>0</term> - <listitem> - <para> - Success - </para> - </listitem></varlistentry> - <varlistentry><term>-1</term> - <listitem> - <para> - Some error. - </para> - </listitem></varlistentry> - </variablelist> + This method returns true if the image list is null, otherwise false. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> <para> - This example ... + This example comes from some test code. <programlisting> <![CDATA[ - x = y - return 0 + -- See if we can create an image list with no size. + imageList = .ImageList~create(.Size~new(0, 0), .Image~id(ILC_COLOR24), 20, 10) + if imageList~isNull then do + say 'Can not create a 0 x 0 image list.' + return .false + end + + return .true + + /* + Output will be: + + Can not create a 0 x 0 image list. + + */ ]]> </programlisting> </para> @@ -2321,14 +2343,44 @@ <section id="clsResourceImage"><title>ResourceImage Class</title> <indexterm><primary>ResourceImage class</primary></indexterm> <para> - A ... is .. + Resource Images represent modules that contain resources. These modules are binary executable files, + which on Windows are for all practical purposes .exe and .dll files. Before an application can use a + resource in a module, the resource must be loaded from the module into memory. Once in memory, the + application needs a handle to the specific resource in order to work with it. </para> <para> + The ResourceImage class contains methods and function to assist in the loading of resources into memory + and obtaining handles to the desired resources. ooDialog has always provided, limited, access to + resources in modules through the <link linkend="clsResDialog">ResDialog</link> class. The + ResourceImage class expands that access, both improving it and making the access avaiable to any + ooDialog program. The class supports the loading of, and obtaining handles to, resources from any + binary executable file. </para> +<para> + The class provides the <link linkend="mthReleaseClsResourceImage">release()</link> method to free up + system resources if module containing the resources is no longer needed. The <link + linkend="paraClsImageRelease">general remarks</link> concerning freeing the <link + linkend="clsImage">.Image</link> class are applicable here. The release() method will ignore requests + to release the module when it is known absoulutely that the module should not be released, such as in + the case the module is the <computeroutput>oodialog.dll</computeroutput>. In other cases only the + programmer can know if the module should or shouldn't be released. In those cases, the ResourceImage + class will do as requested. As with the images that the .Image class represents, the system resources + used by the module the ResourceImage class represents will be automatically cleaned up when the + interpreter process ends. The <link linkend="paraClsImageRelease">comments</link> about why would a + programmer want to release resources in the .Image class remarks are equally apropos here. +</para> +<note><title>Note</title> +<para> + The ResourceImage class is new in ooDialog as of ooRexx version 4.0.0. Its first implementation + supports image resources and provides the basic framework upon which to expand in the future. +</para> +</note> <variablelist> <varlistentry><term>Requires:</term> -<listitem><para>The ResourceImage class requires the class definition file -<computeroutput>ooDialog.cls</computeroutput>: +<listitem> +<para> + The ResourceImage class requires the class definition file + <computeroutput>ooDialog.cls</computeroutput>: <programlisting> <![CDATA[ ::requires "ooDialog.cls" @@ -2347,7 +2399,7 @@ <thead> <row> <entry>Method...</entry> -<entry>...on page</entry> +<entry>...description</entry> </row> </thead> <tbody> @@ -2390,92 +2442,148 @@ <secondary>ResouceImage class</secondary></indexterm> <programlisting> <![CDATA[ ->>--new(--------------------------------------------------->< - +>>--new(--fileName--+--------+--)-------------------------->< + +-,-dlg--+ ]]> </programlisting> -<para></para> +<para> + Instantiates a new resource image that represents the module specified by <emphasis + role="italic">fileName</emphasis>. +</para> <variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments are: -<variablelist> -<varlistentry><term>x</term> -<listitem><para>xx. -</para></listitem></varlistentry> -<varlistentry><term>y</term> -<listitem><para>yyy, -</para></listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Details</emphasis></term> + <listitem> + <para> + Sets the <link linkend="dotSystemErrorCode">.SystemErrorCode</link> variable. + </para> + <para> + Raises syntax errors when incorrect arguments are detected. + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>fileName</term> + <listitem> + <para> + Specifies the file name of the module containing resources that the ooDialog program wants to + access. If the module is in the path, (or the current directory,) the file name alone is + sufficent. The operating system will search the path for the file as it normally does when a + program is executed. If the module is not in the path then a full, or relative, file name is + required. + </para> + </listitem></varlistentry> + <varlistentry><term>dlg</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para>The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para>This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> </variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The possible return values are: -<variablelist> -<varlistentry><term>0</term> -<listitem><para>Success -</para></listitem></varlistentry> -<varlistentry><term>-1</term> -<listitem><para>Some error. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para>This example ... -<programlisting> -<![CDATA[ -x = y -return 0 -]]> -</programlisting> -</para></listitem></varlistentry> -</variablelist> </section> <!-- End Resource::new() [class method] --> <section id="mthGetImageClsResourceImage"><title>getImage</title> <indexterm><primary>getImage</primary> -<secondary>ResouceImage class</secondary></indexterm> +<secondary>ResourceImage class</secondary></indexterm> <programlisting> <![CDATA[ ->>-aButtonControl~methodName(--x--,--y--)------------------>< +>>--getImage(--x--,--y--)--------------------------------------->< ]]> </programlisting> -<para></para> +<para> + Description +</para> <variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments are: -<variablelist> -<varlistentry><term>x</term> -<listitem><para>xx. -</para></listitem></varlistentry> -<varlistentry><term>y</term> -<listitem><para>yyy, -</para></listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> </variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The possible return values are: -<variablelist> -<varlistentry><term>0</term> -<listitem><para>Success -</para></listitem></varlistentry> -<varlistentry><term>-1</term> -<listitem><para>Some error. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para>This example ... -<programlisting> -<![CDATA[ -x = y -return 0 -]]> -</programlisting> -</para></listitem></varlistentry> -</variablelist> -</section> <!-- End ResourceImage::getImage() --> +</section> <!-- End ResourceImage::getImage() [class method?] --> <section id="mthGetImagesClsResourceImage"><title>getImages</title> Modified: docs/trunk/oodialog/termdef.sgml =================================================================== --- docs/trunk/oodialog/termdef.sgml 2009-01-01 07:38:02 UTC (rev 3839) +++ docs/trunk/oodialog/termdef.sgml 2009-01-01 09:18:08 UTC (rev 3840) @@ -60,19 +60,32 @@ where ever a numeric resource ID is needed. Symbolic names are easier to remember than numeric IDs and can make the code easier to understand. </para> -<para>The mechanism ooDialog provides for using symbolic IDs is the -<link linkend="constdir">ConstDir</link> attribute of the dialog classes. This -is a directory object where the indexes are symbolic IDs and the item at each -index is the numerical value of the ID. The symbolic IDs in the following table -are pre-defined by ooDialog and placed in the <computeroutput>ConstDir</computeroutput> -when an instance of a dialog class is created. +<para> + The mechanism ooDialog provides for using symbolic IDs is the <link linkend="constdir">ConstDir</link> + attribute of the dialog classes. This is a directory object where the indexes are symbolic IDs and the + item at each index is the numerical value of the ID. </para> +<para> + Some generic <link linkend="chapResources">resources</link> are bound to the oodialog.dll. They can be + used in any ooDialog program and are accessed using the <link + linkend="clsResourceImage">.ResourceImage</link> class. Programmers should always use their symbolic + ID rather than their numeric ID in case the numeric value changes in future versions. To allow for + future expansion, the ooDialog programmer should consider the resource IDs of 1 through 50 as reserved + for ooDialog. Programmers can avoid conflicts by using IDs greater than 50 for resource IDs they assign + in their programs. +</para> +<para> + The symbolic IDs in the following table are pre-defined by ooDialog and placed in the + <computeroutput>ConstDir</computeroutput> when an instance of a dialog class is created. All symbolic + names after IDC_STATIC in the table refer to resources bound to oodialog.dll for general use by the + ooDialog programmer. +</para> <table id="oodsymbolicids" frame="all"> <title>Symbolic IDs Used by ooDialog</title> <tgroup cols="3"> <thead> <row> -<entry>Numeric ID</entry> +<entry>Numeric ID or Symbol</entry> <entry>Symbolic ID</entry> <entry>ResourceType</entry> </row> @@ -99,23 +112,23 @@ <entry>Static Control</entry> </row> <row> -<entry>1</entry> <entry>IDI_DLG_OODIALOG</entry> +<entry>IDI_DLG_OODIALOG</entry> <entry>Icon</entry> </row> <row> -<entry>2</entry> <entry>IDI_DLG_APPICON</entry> +<entry>IDI_DLG_APPICON</entry> <entry>Icon</entry> </row> <row> -<entry>3</entry> <entry>IDI_DLG_APPICON2</entry> +<entry>IDI_DLG_APPICON2</entry> <entry>Icon</entry> </row> <row> -<entry>4</entry> <entry>IDI_DLG_OOREXX</entry> +<entry>IDI_DLG_OOREXX</entry> <entry>Icon</entry> </row> <row> @@ -172,45 +185,47 @@ can be retrieved from the system when needed. </para></listitem></varlistentry> <varlistentry><term id="dialogicon">dialog icon</term> -<listitem><para>The term <emphasis role="italic">dialog icon</emphasis> is used -in this documentation to refer to the icon that is displayed in the left hand -corner of the title bar of a dialog. In Windows this is often called the -<emphasis role="italic">application</emphasis> icon. The dialog icon is also -used for the Task Bar display and in the AltTab task switcher application.</para> -<para>The dialog icon for a specific dialog can be set when the dialog is run -using one of the execute methods. See the <link linkend="h000048">Execute</link> -or <link linkend="popup">Popup</link> methods for example. ooDialog provides four -pre-defined icons for use in dialogs. Custom icons can be used by including the -icon in a binary (compiled) resource, a resource script, or by using the -<link linkend="addicon">AddIcon</link> method of the UserDialog. The following -table shows the symbolic IDs of the pre-defined icons. Their numeric IDs should -be considered reserved. There is a fifth symbolic ID that represents the default -dialog icon. This ID can always be used where a dialog icon ID is needed. +<listitem> +<para> + The term <emphasis role="italic">dialog icon</emphasis> is used in this documentation to refer to the + icon that is displayed in the left hand corner of the title bar of a dialog. In Windows this is often + called the <emphasis role="italic">application</emphasis> icon. The dialog icon is also used for the + Task Bar display and in the AltTab task switcher application. </para> +<para> + The dialog icon for a specific dialog can be set when the dialog is run using one of the execute + methods. See the <link linkend="h000048">Execute</link> or <link linkend="popup">Popup</link> methods + for example. ooDialog provides four pre-defined icons for use in dialogs. Custom icons can be used by + including the icon in a binary (compiled) resource, a resource script, or by using the <link + linkend="addicon">AddIcon</link> method of the UserDialog. The following table shows the symbolic IDs + of the pre-defined icons. The symbolic ID should always be used in case the numeric value is changed + in the future. Their numeric IDs should be considered reserved. There is a fifth symbolic ID that + represents the default dialog icon. This ID can always be used where a dialog icon ID is needed. +</para> <table frame="all"> <title>ooDialog Supplied Icons</title> <tgroup cols="2"> <thead> <row> -<entry>Numeric ID</entry> +<entry>Description</entry> <entry>Symbolic ID</entry> </row> </thead> <tbody> <row> -<entry>1</entry> +<entry>The default, the letters OOD</entry> <entry>IDI_DLG_OODIALOG</entry> </row> <row> -<entry>2</entry> +<entry>Dialog box image</entry> <entry>IDI_DLG_APPICON</entry> </row> <row> -<entry>3</entry> +<entry>Fancier dialog box image</entry> <entry>IDI_DLG_APPICON2</entry> </row> <row> -<entry>4</entry> +<entry>The ooRexx image</entry> <entry>IDI_DLG_OOREXX</entry> </row> <row> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2009-01-03 06:24:52
|
Revision: 3855 http://oorexx.svn.sourceforge.net/oorexx/?rev=3855&view=rev Author: miesfeld Date: 2009-01-03 06:24:46 +0000 (Sat, 03 Jan 2009) Log Message: ----------- Incremental update to ooDialog doc Modified Paths: -------------- docs/trunk/oodialog/resdialog.sgml docs/trunk/oodialog/resources.sgml Modified: docs/trunk/oodialog/resdialog.sgml =================================================================== --- docs/trunk/oodialog/resdialog.sgml 2009-01-02 23:29:10 UTC (rev 3854) +++ docs/trunk/oodialog/resdialog.sgml 2009-01-03 06:24:46 UTC (rev 3855) @@ -43,115 +43,145 @@ --> <chapter id="resourcedialogs"><title>Resource File Dialogs</title> <indexterm><primary>Resource file dialogs</primary></indexterm> -<para>The resource definition for a dialog can either be constructed manually, -(see the <link linkend="clsUserDialog">UserDialog</link> Class,) or the definition can -be read from a file. ooDialog provides two main dialog classes that read their -dialog definitions from a file: the <link linkend="clsResDialog">ResDialog</link> -class and the <link linkend="clsRcDialog">RcDialog</link> class.</para> -<para>The <computeroutput>ResDialog</computeroutput> class uses a dialog -definition from a binary file and a <computeroutput>RcDialog</computeroutput> -class gets the definition from a resource script file. Resource script files -are plain text files. In general, both types of files are produced by resource -editors which allow the user to visually design the dialog in a "What You -See Is What You Get" manner. Since resource definitions are standardized, -resource editors that produce Windows compatible files can be used to define -dialogs for use with ooDialog.</para> +<para> + The resource definition for a dialog can either be constructed manually, (see the <link + linkend="clsUserDialog">UserDialog</link> Class,) or the definition can be read from a file. ooDialog + provides two main dialog classes that read their dialog definitions from a file: the <link + linkend="clsResDialog">ResDialog</link> class and the <link linkend="clsRcDialog">RcDialog</link> + class. +</para> +<para> + The <computeroutput>ResDialog</computeroutput> class uses a dialog definition from a binary file and a + <computeroutput>RcDialog</computeroutput> class gets the definition from a resource script file. + Resource script files are plain text files. In general, both types of files are produced by resource + editors which allow the user to visually design the dialog in a "What You See Is What You + Get" manner. Since resource definitions are standardized, resource editors that produce Windows + compatible files can be used to define dialogs for use with ooDialog. +</para> <section id="clsResDialog"><title>ResDialog Class</title> <indexterm><primary>Resource file dialogs</primary> <secondary>ResDialog class</secondary></indexterm> <indexterm><primary>ResDialog class</primary></indexterm> -<para>The ResDialog class is designed to be used together -with a binary (compiled) resource. A binary dialog resource is linked to a -DLL (that is, a file with the extension .DLL). </para> +<para> + The ResDialog class is designed to be used together with a binary (compiled) resource. Compiled + resources can be attached a <emphasis role="italic">module</emphasis>, which in Windows is a binary + executable file. (That is, a file with the extension .exe or .dll). It is possible to create a DLL + that has no executable code and attach compiled resources to it. The common term for this type of DLL + is a <emphasis role="italic">resource only</emphasis> DLL. A resource only DLL is the type of module + that makes the most sense to use with the ResDialog class. However, there is no reason why any DLL, + that has the compiled resource attached to it, could not be used. +</para> <variablelist> <varlistentry><term>Requires:</term> -<listitem><para><computeroutput>ResDlg.cls</computeroutput> is the source file -of this class. -<programlisting> -<![CDATA[ -::requires "oodialog.cls" -]]> -</programlisting> -</para></listitem></varlistentry> +<listitem> +<para> + <computeroutput>ResDlg.cls</computeroutput> is the source file of this class. + <programlisting> + <![CDATA[ + ::requires "oodialog.cls" + ]]> + </programlisting> +</para> +</listitem></varlistentry> <varlistentry><term>Subclass:</term> -<listitem><para>The ResDialog class is a subclass of -<link linkend="clsBaseDialog">BaseDialog</link> and therefore has all the -methods defined for that class. -</para></listitem></varlistentry> +<listitem> +<para> + The ResDialog class is a subclass of <link linkend="clsBaseDialog">BaseDialog</link> and therefore + inherits all the methods of that class. +</para> +</listitem></varlistentry> </variablelist> -<section id="h001491"><title>Init</title> -<indexterm><primary>Init</primary> +<section id="mthNewClsResDialog"><title>new (Class method)</title> +<indexterm><primary>new</primary> <secondary>ResDialog class</secondary></indexterm> <programlisting> <![CDATA[ ->>-aResDialog~Init(--Library--,--Resource--+-------------+--+----------+--)-->< - +-,--DlgData.-+ +-,--hFile-+ +>>--new(--module--,--id--+-------------+--+----------+--)------------>< + +-,--DlgData.-+ +-,--hFile-+ ]]> </programlisting> -<para>The Init method of the parent class, <computeroutput>BaseDialog</computeroutput>, -has been overridden.</para> +<para> + Instantiates a new ResDialog object. The dialog template for the object is taken from the specified + module, which normally is a resource only DLL. +</para> <variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments when creating a new dialog instance of this class -are: -<variablelist> -<varlistentry><term>Library</term> -<listitem><para>The file name of the DLL where the resource is located. -</para></listitem></varlistentry> -<varlistentry><term>Resource</term> -<listitem><para>The ID of the resource. This is an unique number, or <link -linkend="symbolicid">sybmbolic ID</link>, you assigned to the (dialog) resource -while creating it. -</para></listitem></varlistentry> -<varlistentry><term>DlgData.</term> -<listitem><para>A stem variable (don't forget the trailing period) that contains -initialization data. -</para></listitem></varlistentry> -<varlistentry><term>hFile</term> -<listitem><para>The file name of a <link linkend="headerfile">header file</link> -containing symbolic ID defines for resources. -</para></listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para> + The arguments when creating a new dialog instance of this class are: + <variablelist> + <varlistentry><term>module</term> + <listitem> + <para> + The file name of the DLL where the resource is located. + </para> + </listitem></varlistentry> + <varlistentry><term>id</term> + <listitem> + <para> + The ID of the resource. This is an unique number, or <link linkend="symbolicid">sybmbolic + ID</link> resolving to the unique number. This number is assigned to the dialog template + resource when it was created. + </para> + </listitem></varlistentry> + <varlistentry><term>DlgData.</term> + <listitem> + <para> + A stem variable (don't forget the trailing period) that contains initialization data. + </para> + </listitem></varlistentry> + <varlistentry><term>hFile</term> + <listitem> + <para> + The file name of a <link linkend="headerfile">header file</link> containing symbolic ID defines + for resources. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This sample code creates a new dialog object from the ResDialog class. It uses dialog resource 100 in + the <computeroutput>MYDLG.DLL</computeroutput> file. The dialog is initialized with the values of the + MyDlgData. stem variable. + <programlisting> + <![CDATA[ + MyDlgData.101="1" + MyDlgData.102="Please enter your password." + MyDlgData.103="" + + dlg = ResDialog~new("MYDLG.DLL", 100, MyDlgData.) + if dlg~initCode <> 0 then do + say 'The dialog could not be created' + return .false + /* Or some other error handling code. */ + end + ... + ]]> + </programlisting> + </para> + <para> + An additional <link linkend="basedialoginitexample">example</link> can be found under the + <computeroutput>Init</computeroutput> method, in the BaseDialog section, that shows the use of the + dialog data stem and header file arguments in more detail. + </para> + </listitem></varlistentry> </variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para>This sample code creates a new dialog object from the ResDialog class. -It uses dialog resource 100 in the <computeroutput>MYDLG.DLL</computeroutput> file. -The dialog is initialized with the values of the MyDlgData. stem variable. -<programlisting> -<![CDATA[ -MyDlgData.101="1" -MyDlgData.102="Please enter your password." -MyDlgData.103="" - -dlg = ResDialog~new("MYDLG.DLL", 100, MyDlgData.) -if dlg~initCode <> 0 then do - say 'The dialog could not be created' - return .false - /* Or some other error handling code. */ -end - ... -]]> -</programlisting> +<note><title>Note</title> +<para> + For a <computeroutput>ResDialog</computeroutput> the <computeroutput>InitCode</computeroutput> + attribute will be -1 after the dialog object is instantiated if the resource ID could not be + resolved. For other cases where initialization failed the value will be some other non-zero value. </para> -<para>An additional <link linkend="basedialoginitexample">example</link> can be -found under the <computeroutput>Init</computeroutput> method, in the BaseDialog -section, that shows the use of the dialog data stem and header file arguments in -more detail. -</para></listitem></varlistentry> -</variablelist> - -<note><title>Note</title><para> -For a <computeroutput>ResDialog</computeroutput> the -<computeroutput>InitCode</computeroutput> attribute will be -1 after the dialog -object is instantiated if the resource ID could not be resolved. For other -cases where initialization failed the value will be some other non-zero value. -</para></note> +</note> </section> <section id="h001501"><title>StartIt</title> Modified: docs/trunk/oodialog/resources.sgml =================================================================== --- docs/trunk/oodialog/resources.sgml 2009-01-02 23:29:10 UTC (rev 3854) +++ docs/trunk/oodialog/resources.sgml 2009-01-03 06:24:46 UTC (rev 3855) @@ -133,7 +133,7 @@ the dialogs were closed would make a difference in the long run. The operating system would not clean up the resources used by the images until the main Rexx program ended. If the main program ran for days, or maybe was never intended to be shut down, it would make sense to release images that were no - longer neede. + longer needed. </para> <variablelist> <varlistentry><term><emphasis role="bold">Requires:</emphasis></term> @@ -387,12 +387,12 @@ <varlistentry><term>type</term> <listitem> <para> - Specifies the type of the image: bitmap, icon, cursor, or enhanced metafile. You can use <link + Specifies the type of the image: bitmap, icon, or cursor. You can use <link linkend="mthIdClsImage">.Image~id()</link> to get the correct numeric value for one of the following symbols: <simplelist type='horiz' columns='2'> <member>IMAGE_BITMAP</member> <member>IMAGE_ICON</member> - <member>IMAGE_CURSOR</member> <member>IMAGE_ENHMETAFILE</member> + <member>IMAGE_CURSOR</member> </simplelist> </para> <para> @@ -521,12 +521,12 @@ <varlistentry><term>type</term> <listitem> <para> - Specifies the type of the image, bitmap, icon, cursor, or enhanced metafile. You can use <link + Specifies the type of the image, bitmap, icon, or cursor. You can use <link linkend="mthIdClsImage">.Image~id()</link> to get the correct numeric value for one of the following symbols: <simplelist type='horiz' columns='2'> <member>IMAGE_BITMAP</member> <member>IMAGE_ICON</member> - <member>IMAGE_CURSOR</member> <member>IMAGE_ENHMETAFILE</member> + <member>IMAGE_CURSOR</member> </simplelist> </para> <para> @@ -634,12 +634,12 @@ <varlistentry><term>type</term> <listitem> <para> - Specifies the type of the image: bitmap, icon, cursor, or enhanced metafile. You can use <link + Specifies the type of the image: bitmap, icon, or cursor. You can use <link linkend="mthIdClsImage">.Image~id()</link> to get the correct numeric value for one of the following symbols: <simplelist type='horiz' columns='2'> <member>IMAGE_BITMAP</member> <member>IMAGE_ICON</member> - <member>IMAGE_CURSOR</member> <member>IMAGE_ENHMETAFILE</member> + <member>IMAGE_CURSOR</member> </simplelist> </para> <para> @@ -2350,15 +2350,15 @@ </para> <para> The ResourceImage class contains methods and function to assist in the loading of resources into memory - and obtaining handles to the desired resources. ooDialog has always provided, limited, access to - resources in modules through the <link linkend="clsResDialog">ResDialog</link> class. The - ResourceImage class expands that access, both improving it and making the access avaiable to any - ooDialog program. The class supports the loading of, and obtaining handles to, resources from any - binary executable file. + and obtaining handles to the desired resources. ooDialog has always had, limited, access to resources + in modules through the <link linkend="clsResDialog">ResDialog</link> class. The ResourceImage class + expands that access, both improving it and making the access avaiable in any ooDialog program, with or + without ResDialog objects. The class supports the loading of, and obtaining handles to, resources from + any binary executable file. </para> <para> The class provides the <link linkend="mthReleaseClsResourceImage">release()</link> method to free up - system resources if module containing the resources is no longer needed. The <link + system resources if a module containing the resources is no longer needed. The <link linkend="paraClsImageRelease">general remarks</link> concerning freeing the <link linkend="clsImage">.Image</link> class are applicable here. The release() method will ignore requests to release the module when it is known absoulutely that the module should not be released, such as in @@ -2478,38 +2478,76 @@ <varlistentry><term>dlg</term> <listitem> <para> - yyy, + The second optional <emphasis role="italic">dlg</emphasis> argument is a dialog object in the + current program. It specifies that the module containing the resources that the ooDialog + program wants to acess is one of the modules already avalable to the program. That is, either + the <computeroutput>oodialog.dll</computeroutput> module, or the module used for a <link + linkend="mthNewClsResDialog">ResDialog</link>. </para> + <para> + To specify the <computeroutput>oodialog.dll</computeroutput> module, the file name must be + oodialog.dll and the dialog object can be any instantiated dialog in the current program. + </para> + <para> + To specify the module used with a ResDialog, the dialog object must be the instantiated + ResDialog dialog object. + </para> </listitem></varlistentry> </variablelist> </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> - <para>The possible return values are: - <variablelist> - <varlistentry><term>0</term> - <listitem> - <para> - Success - </para> - </listitem></varlistentry> - <varlistentry><term>-1</term> - <listitem> - <para> - Some error. - </para> - </listitem></varlistentry> - </variablelist> + <para> + Returns a new ResourceImage object. This object may be null if an error occurred. Use the <link + linkend="mthIsNullClsResourceImage">isNull()</link> method to check for this. Both the <link + linkend="dotSystemErrorCode">.SystemErrorCode</link> or the <link + linkend="mthSystemErrorCodeClsResourceImage">systemErrorCode()</link> method should contain an + error code if the object is null. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> - <para>This example ... + <para>This example instantiates a resource image using the oodialog.dll module and uses it to load + the generally available icon resources from that module. The icons are then displayed in a + list-view control. <programlisting> <![CDATA[ - x = y - return 0 + ::method initDialog + expose list + + list = self~getListControl(IDC_LV_IMAGES) + + ids = .array~new() + ids[1] = self~constDir[IDI_DLG_OODIALOG] + ids[2] = self~constDir[IDI_DLG_APPICON] + ids[3] = self~constDir[IDI_DLG_APPICON2] + ids[4] = self~constDir[IDI_DLG_OOREXX] + + SM_CXICON = 11 + SM_CYICON = 12 + + size = .Size~new(self~getSystemMetrics(SM_CXICON), self~getSystemMetrics(SM_CYICON)) + + oodModule = .ResourceImage~new("oodialog.dll", self) + icons = oodModule~getImages(ids, .Image~id(IMAGE_ICON), size) + + flags = .DlgUtil~or(.Image~id(ILC_COLOR24), .Image~id(ILC_MASK)) + imageList = .ImageList~create(size, flags, 4, 0) + imageList~addImages(icons) + + list~setImageList(imageList, .Image~id(LVSIL_NORMAL)) + + names = .array~new() + names[1] = "IDI_DLG_OODIALOG" + names[2] = "IDI_DLG_APPICON" + names[3] = "IDI_DLG_APPICON2" + names[4] = "IDI_DLG_OOREXX" + + do i = 1 to ids~items + list~add(names[i] '('ids[i]')', i - 1) + end + ]]> </programlisting> </para> @@ -2522,62 +2560,123 @@ <secondary>ResourceImage class</secondary></indexterm> <programlisting> <![CDATA[ ->>--getImage(--x--,--y--)--------------------------------------->< - +>>--getImage(--id--+--------+--+--------+--+---------+--)----->< + +-,-type-+ +-,-size-+ +-,-flags-+ ]]> </programlisting> <para> - Description + Loads the specified image resource in the module and returns a new <link + linkend="clsImage">.Image</link> object. + <note><title>Note</title><para> + <computeroutput>LoadImage()</computeroutput> is the underlying Windows API used here. This method is + very similar to the <link linkend="mthGetImageClsImage">getImage()</link> method of the .Image class. + The documentation for that method may provide additional insight. + </para></note> </para> <variablelist> + <varlistentry><term><emphasis role="bold">Details</emphasis></term> + <listitem> + <para> + Raises a syntax error if the resource image is null. + </para> + <para> + Sets the <link linkend="dotSystemErrorCode">.SystemErrorCode</link> variable. + </para> + <para> + Raises syntax errors when incorrect arguments are detected. + </para> + <para> + Provides an interface to the Win32 API: <computeroutput>LoadImage()</computeroutput>. Use the <link + linkend="windowsdoc">MSDN library</link> documentation to get more information on the arguments to + this method. + </para> + </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> <para>The arguments are: <variablelist> - <varlistentry><term>x</term> + <varlistentry><term>id</term> <listitem> <para> - xx. + The resource id of the image in the module. + <note><title>Note</title><para> + At this time symbolic IDs are not supported for this argument. That restriction may be + lifted in a furture version of ooDialog. + </para></note> </para> </listitem></varlistentry> - <varlistentry><term>y</term> + <varlistentry><term>type</term> <listitem> <para> - yyy, + Specifies the type of the image: bitmap, icon, or cursor. You can use <link + linkend="mthIdClsImage">.Image~id()</link> to get the correct numeric value for one of the + following symbols: + <simplelist type='horiz' columns='2'> + <member>IMAGE_BITMAP</member> <member>IMAGE_ICON</member> + <member>IMAGE_CURSOR</member> + </simplelist> </para> + <para> + The default is IMAGE_BITMAP + </para> </listitem></varlistentry> + <varlistentry><term>size</term> + <listitem> + <para> + A <link linkend="clsSize">.Size</link> object that specifies the size of the image. The default + is a size of 0x0. Under most circumstances this indicates that the actual size of the image + should be used. However, the <link linkend="windowsdoc">MSDN library</link> documentation for + <computeroutput>LoadImage()</computeroutput> should be consulted for other meanings. + </para> + </listitem></varlistentry> + <varlistentry><term>flags</term> + <listitem> + <para> + The load resource flags for the LoadImage() API. The flags are one or more of the following + symbols. You can use <link linkend="mthIdClsImage">.Image~id()</link> to get the correct numeric + value for any of the following symbols. The <link linkend="mthOrClsDlgUtil">or</link> method of + the <link linkend="clsDlgUtil">.DlgUtil</link> class can be used to combine more than one of the + symbols if needed. + <simplelist type='horiz' columns='2'> + <member>LR_DEFAULTCOLOR</member> <member>LR_CREATEDIBSECTION</member> + <member>LR_DEFAULTSIZE</member> <member>LR_LOADFROMFILE</member> + <member>LR_LOADMAP3DCOLORS</member> <member>LR_LOADTRANSPARENT</member> + <member>LR_MONOCHROME</member> <member>LR_SHARED</member> + <member>LR_VGACOLOR</member> + </simplelist> + </para> + <para> + The default is LR_SHARED. + </para> + </listitem></varlistentry> </variablelist> </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - The possible return values are: - <variablelist> - <varlistentry><term>0</term> - <listitem> - <para> - Success - </para> - </listitem></varlistentry> - <varlistentry><term>-1</term> - <listitem> - <para> - Some error. - </para> - </listitem></varlistentry> - </variablelist> + This method returns an .Image object that represents the specified image resource in the module. + The image may be null if an error occurred, for instance if no image resource was found. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> <para> - This example ... + This example uses a ResDialog with a static control that displays a bitmap image. The image for + the static control is obtained from the resource-only DLL used by the ResDialog. <programlisting> <![CDATA[ - x = y - return 0 + ::class SimpleDialog subclass ResDialog inherit AdvancedControls MessageExtensions + ... + + ::method initDialog + ... + resources = .ResourceImage~new("simpleImage.dll", self) + image = resources~getImage(self~constDir[ID_BMP_IMAGE1]) + ... + picture = self~getStaticControl(IDC_BMP_PICTURE) + oldImage = picture~setImage(image) ]]> </programlisting> </para> @@ -2591,62 +2690,190 @@ <secondary>ResourceImage class</secondary></indexterm> <programlisting> <![CDATA[ ->>--getImages(--x--,--y--)--------------------------------------->< - +>>--getImages(--ids,--+--------+--+--------+--+---------+--)----->< + +-,-type-+ +-,-size-+ +-,-flags-+ ]]> </programlisting> <para> - Description + Loads a number of image resources from the module. An array of resource IDs is used to specify which + image resources. All the image resources must have the same characteristics. That is they must all be + the same type and use the same flags. If the type is bitmap, and the flags include LR_DEFAULTSIZE, and + the size is 0 x 0, then the size of the image will be the actual resource size. Otherwise, all the + images also need to be the same size. + <note><title>Note</title><para> + <computeroutput>LoadImage()</computeroutput> is the underlying Windows API used here. This method is + very similar to the <link linkend="mthFromIDsClsImage">fromIDs()</link> method of the .Image class. + The documentation for that method can provide additional information. + </para></note> </para> <variablelist> + <varlistentry><term><emphasis role="bold">Details</emphasis></term> + <listitem> + <para> + Raises a syntax error if the resource image is null. + </para> + <para> + Sets the <link linkend="dotSystemErrorCode">.SystemErrorCode</link> variable. + </para> + <para> + Raises syntax errors when incorrect arguments are detected. + </para> + <para> + Provides an interface to the Win32 API: <computeroutput>LoadImage()</computeroutput>. You can use + the <link linkend="windowsdoc">MSDN library</link> documentation to get more information on the + interaction between the flags, size, and type arguments. + </para> + </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> <para>The arguments are: <variablelist> - <varlistentry><term>x</term> + <varlistentry><term>ids</term> <listitem> <para> - xx. + An array of the resource IDs of the image resources in the module. The array can contain + any number of IDs, but it can not be sparse. That is, each index of the array must contain a + number. If an incorrect item is detected in the array, then a syntax error is raised and no + images are returned. </para> + <para> + If there is an error with an individual image resource, then the index in the array for that + image is left empty. One way to check for this type of error is to compare the number of items + in the returned array with the number of items in ID array. + </para> </listitem></varlistentry> - <varlistentry><term>y</term> + <varlistentry><term>type</term> <listitem> <para> - yyy, + Specifies the type of the image: bitmap, icon, or cursor. You can use <link + linkend="mthIdClsImage">.Image~id()</link> to get the correct numeric value for one of the + following symbols: + <simplelist type='horiz' columns='2'> + <member>IMAGE_BITMAP</member> <member>IMAGE_ICON</member> + <member>IMAGE_CURSOR</member> + </simplelist> </para> + <para> + The default is IMAGE_BITMAP. + </para> </listitem></varlistentry> + <varlistentry><term>size</term> + <listitem> + <para> + A <link linkend="clsSize">.Size</link> object that specifies the size of the image. The default + is a size of 0x0. Under most circumstances this indicates that the actual size of the image + should be used. However, the <link linkend="windowsdoc">MSDN library</link> documentation should + be consulted for other meanings. + </para> + </listitem></varlistentry> + <varlistentry><term>flags</term> + <listitem> + <para> + The load resource flags for the LoadImage() API. The flags are one or more of the following + symbols. You can use <link linkend="mthIdClsImage">.Image~id()</link> to get the correct numeric + value for any of the following symbols. The <link linkend="mthOrClsDlgUtil">or</link> method of + the <link linkend="clsDlgUtil">.DlgUtil</link> class can be used to combine more than one of the + symbols if needed. + <simplelist type='horiz' columns='2'> + <member>LR_DEFAULTCOLOR</member> <member>LR_CREATEDIBSECTION</member> + <member>LR_DEFAULTSIZE</member> <member>LR_LOADFROMFILE</member> + <member>LR_LOADMAP3DCOLORS</member> <member>LR_LOADTRANSPARENT</member> + <member>LR_MONOCHROME</member> <member>LR_SHARED</member> + <member>LR_VGACOLOR</member> + </simplelist> + </para> + <para> + The default is LR_SHARED. + </para> + </listitem></varlistentry> </variablelist> </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - The possible return values are: - <variablelist> - <varlistentry><term>0</term> - <listitem> - <para> - Success - </para> - </listitem></varlistentry> - <varlistentry><term>-1</term> - <listitem> - <para> - Some error. - </para> - </listitem></varlistentry> - </variablelist> + The return will be an array of .Image objects, one for each resource ID specified in the + <computeroutput>ids</computeroutput> array, if there is no error. If there is an error loading the + image of any specified ID, the corresponding index in the returned array will be empty. </para> + <para> + If there is an error, both the <link linkend="dotSystemErrorCode">.SystemErrorCode</link> and the + <link linkend="mthSystemErrorCodeClsResourceImage">systemErrorCode</link> attribute of this + resource image will be set (to the same code.) It is conceivable that an error could occur where + the system does not set an error code, but unlikely. + </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> <para> - This example ... + The following is a complete working dialog. Four bitmap images are used. Each time the user + clicks the next button, the next image is displayed. + </para> + <para> + An array is constructed containing the resource IDs of the 4 images. A new resource image object + is instantiated from the <computeroutput>images.dll</computeroutput> module. The getImages() + method is then used to get an array of 4 .Image objects, using the array of resource IDs. <programlisting> <![CDATA[ - x = y + /* Simple Dialog to display some images */ + + dlg = .SimpleDialog~new( , 'simpleImage.h') + if dlg~initCode = 0 then do + dlg~createCenter(200, 247, "Simple Image Viewer", "", , "MS Shell Dlg 2", 8) + dlg~Execute("SHOWTOP", 14) + end + + dlg~Deinstall + return 0 + -- End of entry point. + + ::requires "oodWin32.cls" + + ::class SimpleDialog subclass UserDialog inherit AdvancedControls MessageExtensions + + ::method defineDialog + + self~addStatic(IDC_BMP_PICTURE, 10, 10, 20, 17, "BITMAP REALSIZEIMAGE") + self~addStatic(IDC_ST_DESCRIPTION, 14, 190, 176, 20, "TEXT LEFT", "Description") + self~addButton(IDC_PB_NEXT, 10, 223, 50, 14, "Next", onNext) + self~addButton(IDOK, 140, 223, 50, 14, "Ok", ok, "DEFAULT") + + ::method initDialog + expose picture images description descriptions nextImage + + ids = .array~new + ids[ 1] = self~constDir[ID_BMP_IMAGE1] + ids[ 2] = self~constDir[ID_BMP_IMAGE2] + ids[ 3] = self~constDir[ID_BMP_IMAGE3] + ids[ 4] = self~constDir[ID_BMP_IMAGE4] + + descriptions = .array~new + descriptions[1] = "Conrad, King of the Hill" + descriptions[2] = "Berk, Squint Eye" + descriptions[3] = "Cienna, Deer in the Headlights" + descriptions[4] = "Vail, The Flower Child" + + picture = self~getStaticControl(IDC_BMP_PICTURE) + description = self~getStaticControl(IDC_ST_DESCRIPTION) + self~connectButton(IDC_PB_NEXT, onNext) + + nextImage = 1 + module = .ResourceImage~new("images.dll") + images = module~getImages(ids) + + self~onNext + + ::method onNext + expose picture description images descriptions nextImage + + if nextImage > images~items then nextImage = 1 + + picture~setImage(images[nextImage]) + + description~setText(descriptions[nextImage]) + nextImage += 1 ]]> </programlisting> </para> @@ -2660,62 +2887,68 @@ <secondary>ResourceImage class</secondary></indexterm> <programlisting> <![CDATA[ ->>--release(--x--,--y--)--------------------------------------->< +>>--release---------------------------------------------------->< ]]> </programlisting> <para> - Description + Releases the resource module so that the operating system can reclaim the system resources. After the + resource image has been released it can no longer be used. The programmer should not release the + resource image while resources loaded from the module are still in use. </para> +<para> + If the resource image represents the <computeroutput>oodialog.dll</computeroutput> module, or the + module used for a ResDialog, then the resource image should never be released. The + <computeroutput>release()</computeroutput> method will ignore release requests in those sitautions. +</para> <variablelist> + <varlistentry><term><emphasis role="bold">Details</emphasis></term> + <listitem> + <para> + Raises a syntax error if the resource image is null. + </para> + <para> + Sets the <link linkend="dotSystemErrorCode">.SystemErrorCode</link> variable. + </para> + </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> - <para>The arguments are: - <variablelist> - <varlistentry><term>x</term> - <listitem> - <para> - xx. - </para> - </listitem></varlistentry> - <varlistentry><term>y</term> - <listitem> - <para> - yyy, - </para> - </listitem></varlistentry> - </variablelist> + <para>There are no arguments. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - The possible return values are: - <variablelist> - <varlistentry><term>0</term> - <listitem> - <para> - Success - </para> - </listitem></varlistentry> - <varlistentry><term>-1</term> - <listitem> - <para> - Some error. - </para> - </listitem></varlistentry> - </variablelist> + This method return the system error code, which will be zero if there is no error, and non-zero if + there is an error. The <link linkend="dotSystemErrorCode">.SystemErrorCode</link> is also set to + this value. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> <para> - This example ... + In this example, the images for an image list are loaded from a resource module. The resource + module is no longer needed after the image list is created. Since an image list makes a copy of the + images added to it, once the image list has all the images added to it, the resource image can be + released. <programlisting> <![CDATA[ - x = y - return 0 + ::method getImages private + use strict arg resourceIDs, size, ilFlags + + imageList = .ImageList~create(size, ilFlags, 20, 10); + + module = .ResourceImage~new("zooImages.dll") + images = module~getImages(resourceIDs) + imageList~addImages(images) + + do i = 1 to images~items + images[i]~release + end + module~release + + return imageList ]]> </programlisting> </para> @@ -2729,52 +2962,29 @@ <secondary>ResourceImage class</secondary></indexterm> <programlisting> <![CDATA[ ->>--handle(--x--,--y--)--------------------------------------->< +>>--handle---------------------------------------------------->< ]]> </programlisting> <para> - Description + Returns the Windows system handle for the resource module. It is an error to invoke this method if the + resource image is null, or after the resource image has been released. </para> +<para> + At this time, the handle is only useful for display. +</para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> - <para>The arguments are: - <variablelist> - <varlistentry><term>x</term> - <listitem> - <para> - xx. - </para> - </listitem></varlistentry> - <varlistentry><term>y</term> - <listitem> - <para> - yyy, - </para> - </listitem></varlistentry> - </variablelist> + <para> + There are no arguments. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - The possible return values are: - <variablelist> - <varlistentry><term>0</term> - <listitem> - <para> - Success - </para> - </listitem></varlistentry> - <varlistentry><term>-1</term> - <listitem> - <para> - Some error. - </para> - </listitem></varlistentry> - </variablelist> + The return is the handle for the module the resource image represents. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> @@ -2783,8 +2993,20 @@ This example ... <programlisting> <![CDATA[ - x = y - return 0 + ::method showHandles + + oodMod = .ResourceImage~new("oodialog.dll", self) + resMod = .ResourceImage~new("simpleImage.dll", self) + + say 'The oodialog.dll module handle is: ' oodMod~handle + say 'The resource module for this ResDialog is:' resMod~handle + + + /* The output, for a ResDialog, might be: + + The oodialog.dll module handle is: 0x009E0000 + The resource module for this ResDialog is: 0x00AF0000 + */ ]]> </programlisting> </para> @@ -2798,62 +3020,45 @@ <secondary>ResourceImage class</secondary></indexterm> <programlisting> <![CDATA[ ->>--isNull(--x--,--y--)--------------------------------------->< +>>--isNull---------------------------------------------------->< ]]> </programlisting> <para> - Description + Determines if the resource image is valid. <computeroutput>isNull()</computeroutput> will always + return <computeroutput>.true</computeroutput> after the resource image has been released. It will also + return <computeroutput>.true</computeroutput> if there was an error instantiating a new resource image + object. </para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> - <para>The arguments are: - <variablelist> - <varlistentry><term>x</term> - <listitem> - <para> - xx. - </para> - </listitem></varlistentry> - <varlistentry><term>y</term> - <listitem> - <para> - yyy, - </para> - </listitem></varlistentry> - </variablelist> + <para> + There are no arguments. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - The possible return values are: - <variablelist> - <varlistentry><term>0</term> - <listitem> - <para> - Success - </para> - </listitem></varlistentry> - <varlistentry><term>-1</term> - <listitem> - <para> - Some error. - </para> - </listitem></varlistentry> - </variablelist> + Returns <computeroutput>.true</computeroutput> if the object is null, otherwise + <computeroutput>.false</computeroutput>. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> <para> - This example ... + It is a good idea to check that a new resource image object is valid before using it. <programlisting> <![CDATA[ - x = y - return 0 + ::method initDialog + ... + resourceModule = .ResourceImage~new("simpleImage.dll", self) + if \ resourceModule~isNull the do + image = resources~getImage(self~constDir[ID_BMP_IMAGE1]) + else do + -- Some error handling here. + end ]]> </programlisting> </para> @@ -2867,62 +3072,54 @@ <secondary>ResourceImage class</secondary></indexterm> <programlisting> <![CDATA[ ->>--systemErrorCode(--x--,--y--)--------------------------------------->< +>>--systemErrorCode---------------------------------------------------->< ]]> </programlisting> <para> - Description + When a method for a resource image is invoked that sets the <link + linkend="dotSystemErrorCode">.SystemErrorCode</link>, the systemErrorCode attribute of the resource + image object is also set. This can be useful if the programmer wants to check for an error code at some + point when it is possible that .SystemErrorCode has been reset. </para> +<para> + This method can always be invoked, even if the resource image is null. It is very similar to the <link + linkend="mthSystemErrorCodeClsImage">systemErrorCode()</link> method of the .Image class and the + documentation for that method is generally applicable here. +</para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> - <para>The arguments are: - <variablelist> - <varlistentry><term>x</term> - <listitem> - <para> - xx. - </para> - </listitem></varlistentry> - <varlistentry><term>y</term> - <listitem> - <para> - yyy, - </para> - </listitem></varlistentry> - </variablelist> + <para> + This method does not take any arguments. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - The possible return values are: - <variablelist> - <varlistentry><term>0</term> - <listitem> - <para> - Success - </para> - </listitem></varlistentry> - <varlistentry><term>-1</term> - <listitem> - <para> - Some error. - </para> - </listitem></varlistentry> - </variablelist> + The return is a system error code, which will usually be 0, no error. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> <para> - This example ... + This example uses the <computeroutput>systemErrorCode</computeroutput> attribute to get more + information on a possbile error, rather than the <computeroutput>.SystemErrorCode</computeroutput>. <programlisting> <![CDATA[ - x = y - return 0 + ::method initDialog + ... + mod = .ResourceImage~new("simpleImage.dll", self) + if mod~isNull the do + self~writeToLog("Error with resource module simpleImage.dll") + self~writeToLog(" RC: " mod~systemErrorCode) + self~writeToLog(" msg:" SysGetErrorText(mod~systemErrorCode) + return + end + + image = resources~getImage(self~constDir[ID_BMP_IMAGE1]) + ... ]]> </programlisting> </para> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2009-01-04 06:25:45
|
Revision: 3860 http://oorexx.svn.sourceforge.net/oorexx/?rev=3860&view=rev Author: miesfeld Date: 2009-01-04 06:25:39 +0000 (Sun, 04 Jan 2009) Log Message: ----------- Continue ooDialog doc update Modified Paths: -------------- docs/trunk/oodialog/advcntlc.sgml docs/trunk/oodialog/buttoncontrols.sgml docs/trunk/oodialog/categorydialog.sgml docs/trunk/oodialog/comboboxc.sgml docs/trunk/oodialog/dialogcontrolc.sgml docs/trunk/oodialog/editcontrolc.sgml docs/trunk/oodialog/listboxc.sgml docs/trunk/oodialog/mesextcl.sgml docs/trunk/oodialog/oodialog.sgml docs/trunk/oodialog/plainuserdialogc.sgml docs/trunk/oodialog/scrollbarc.sgml docs/trunk/oodialog/staticcontrolc.sgml docs/trunk/oodialog/termdef.sgml docs/trunk/oodialog/userdialog.sgml docs/trunk/oodialog/utilityclasses.sgml Modified: docs/trunk/oodialog/advcntlc.sgml =================================================================== --- docs/trunk/oodialog/advcntlc.sgml 2009-01-04 05:44:19 UTC (rev 3859) +++ docs/trunk/oodialog/advcntlc.sgml 2009-01-04 06:25:39 UTC (rev 3860) @@ -41,7 +41,7 @@ # ######################################################################### --> -<chapter id="advcntlc"><title>AdvancedControls Class</title> +<chapter id="clsAdvancedControls"><title>AdvancedControls Class</title> <indexterm><primary>AdvancedControls class</primary></indexterm> <para>The AdvancedControls class provides methods to add and use the Win32 controls tree view control, list view control, tab Modified: docs/trunk/oodialog/buttoncontrols.sgml =================================================================== --- docs/trunk/oodialog/buttoncontrols.sgml 2009-01-04 05:44:19 UTC (rev 3859) +++ docs/trunk/oodialog/buttoncontrols.sgml 2009-01-04 06:25:39 UTC (rev 3860) @@ -107,7 +107,7 @@ <para> The ButtonControl class provides methods to query and modify push button controls. It inherits all methods of the <link - linkend="dialogcontrolc">DialogControl Class</link>. In addition, the class + linkend="clsDialogControl">DialogControl Class</link>. In addition, the class has methods that allow the ooRexx programmer to partially implement owner drawn buttons using bitmaps. </para> @@ -680,7 +680,7 @@ <varlistentry><term>NOTIFY</term> <listitem><para>Enables a button to send the kill focus and set focus messages. See the <link linkend="connectbuttonnotify">ConnectButtonNotify</link> method - of the <link linkend="mesextcl">MessageExtensions Class</link>. If the button + of the <link linkend="clsMessageExtensions">MessageExtensions Class</link>. If the button does not have this style, kill and set focus events will not be received, if the programmer does <computeroutput>connectButtonNotify()</computeroutput> to connect those events. @@ -1583,7 +1583,7 @@ and modify radio button controls. It inherits all methods of the ButtonControl and DialogControl classes (see <link linkend="buttoncontrolc">ButtonControl Class</link> -and <link linkend="dialogcontrolc">DialogControl Class</link>).</para> +and <link linkend="clsDialogControl">DialogControl Class</link>).</para> <para>Use the GetRadioControl (see <link linkend="getradiocontrol">GetRadioControl</link>) to retrieve an object of the RadioButton class.</para> @@ -1634,7 +1634,7 @@ </variablelist> <para>Events for instances of the RadioButton class may be captured using the <link linkend="connectbuttonnotify">ConnectButtonNotify</link> method of the -<link linkend="mesextcl">MessageExtensions Class</link>.</para> +<link linkend="clsMessageExtensions">MessageExtensions Class</link>.</para> <section id="ischecked"><title>IsChecked</title> <indexterm><primary>IsChecked</primary></indexterm> @@ -1724,7 +1724,7 @@ <listitem><para>The ButtonControl class (see <link linkend="buttoncontrolc">ButtonControl Class</link>)</para></listitem> <listitem><para>The DialogControl class (see -<link linkend="dialogcontrolc">DialogControl Class</link>) +<link linkend="clsDialogControl">DialogControl Class</link>) </para></listitem> </itemizedlist> <para>The CheckBox class requires the class definition @@ -1739,7 +1739,7 @@ to retrieve an object of the CheckBox class.</para> <para>Events for instances of the CheckBox class may be captured using the <link linkend="connectbuttonnotify">ConnectButtonNotify</link> method of the -<link linkend="mesextcl">MessageExtensions Class</link>.</para> +<link linkend="clsMessageExtensions">MessageExtensions Class</link>.</para> </section> <section id="groupboxc"><title>GroupBox Class</title> @@ -1759,7 +1759,7 @@ </para> <itemizedlist> <listitem><para>The DialogControl class (see -<link linkend="dialogcontrolc">DialogControl Class</link>) +<link linkend="clsDialogControl">DialogControl Class</link>) </para></listitem> </itemizedlist> <para>The GroupBox class requires the class definition file Modified: docs/trunk/oodialog/categorydialog.sgml =================================================================== --- docs/trunk/oodialog/categorydialog.sgml 2009-01-04 05:44:19 UTC (rev 3859) +++ docs/trunk/oodialog/categorydialog.sgml 2009-01-04 06:25:39 UTC (rev 3860) @@ -945,7 +945,7 @@ the category page as an extra parameter. </para></note> <para>Another way to directly address dialog items of a category -dialog is to retrieve an object of the DialogControl class (see page <link linkend="dialogcontrolc">DialogControl Class</link>) or one of its derivates that is associated +dialog is to retrieve an object of the DialogControl class (see page <link linkend="clsDialogControl">DialogControl Class</link>) or one of its derivates that is associated with the requested dialog control. To retrieve such an object, you can call one of the following methods depending on the requested control:</para> <itemizedlist> Modified: docs/trunk/oodialog/comboboxc.sgml =================================================================== --- docs/trunk/oodialog/comboboxc.sgml 2009-01-04 05:44:19 UTC (rev 3859) +++ docs/trunk/oodialog/comboboxc.sgml 2009-01-04 06:25:39 UTC (rev 3860) @@ -45,7 +45,7 @@ <indexterm><primary>ComboBox class</primary></indexterm> <para>The ComboBox class provides methods to query and modify combo box controls. It inherits all methods of the DialogControl class -(see <link linkend="dialogcontrolc">DialogControl Class</link>).</para> +(see <link linkend="clsDialogControl">DialogControl Class</link>).</para> <para>Use the GetComboBox method (see <link linkend="getcombobox">GetComboBox</link>) to retrieve an object of the ComboBox class.</para> <variablelist> Modified: docs/trunk/oodialog/dialogcontrolc.sgml =================================================================== --- docs/trunk/oodialog/dialogcontrolc.sgml 2009-01-04 05:44:19 UTC (rev 3859) +++ docs/trunk/oodialog/dialogcontrolc.sgml 2009-01-04 06:25:39 UTC (rev 3860) @@ -41,7 +41,7 @@ # ######################################################################### --> -<chapter id="dialogcontrolc"><title>DialogControl Class</title> +<chapter id="clsDialogControl"><title>DialogControl Class</title> <indexterm><primary>DialogControl class</primary></indexterm> <para> The DialogControl class provides methods that are common to all dialog controls. It is a generic Modified: docs/trunk/oodialog/editcontrolc.sgml =================================================================== --- docs/trunk/oodialog/editcontrolc.sgml 2009-01-04 05:44:19 UTC (rev 3859) +++ docs/trunk/oodialog/editcontrolc.sgml 2009-01-04 06:25:39 UTC (rev 3860) @@ -46,7 +46,7 @@ <para>The EditControl class provides methods to query and modify edit controls, which are also called entry lines in the ooDialog documentation. It inherits all methods of the DialogControl class (see page <link -linkend="dialogcontrolc">DialogControl Class</link>). +linkend="clsDialogControl">DialogControl Class</link>). </para> <para>Use the GetEditControl method (see page <link linkend="geteditcontrol">GetEditControl</link>) to retrieve an object of the Modified: docs/trunk/oodialog/listboxc.sgml =================================================================== --- docs/trunk/oodialog/listboxc.sgml 2009-01-04 05:44:19 UTC (rev 3859) +++ docs/trunk/oodialog/listboxc.sgml 2009-01-04 06:25:39 UTC (rev 3860) @@ -45,7 +45,7 @@ <indexterm><primary>ListBox class</primary></indexterm> <para>The ListBox class provides methods to query and modify list box controls. It inherits all methods of the DialogControl class -(see page <link linkend="dialogcontrolc">DialogControl Class</link>).</para> +(see page <link linkend="clsDialogControl">DialogControl Class</link>).</para> <para>Use the GetListBox method (see page <link linkend="getlistbox">GetListBox</link>) to retrieve an object of the ListBox class.</para> <variablelist> Modified: docs/trunk/oodialog/mesextcl.sgml =================================================================== --- docs/trunk/oodialog/mesextcl.sgml 2009-01-04 05:44:19 UTC (rev 3859) +++ docs/trunk/oodialog/mesextcl.sgml 2009-01-04 06:25:39 UTC (rev 3860) @@ -41,7 +41,7 @@ # ######################################################################### --> -<chapter id="mesextcl"><title>MessageExtensions Class</title> +<chapter id="clsMessageExtensions"><title>MessageExtensions Class</title> <indexterm><primary>MessageExtensions class</primary></indexterm> <para>To use the methods defined by the mixin class MessageExtensions you must inherit from this class by specifying the INHERIT option for the ::CLASS directive in the class declaration. For example:</para> @@ -112,6 +112,10 @@ <entry><link linkend="connectscrollbarnotify">ConnectScrollBarNotify</link></entry> </row> <row> +<entry>ConnectStaticNotify</entry> +<entry><link linkend="mthConnectStaticNotify">connectStaticNotify</link></entry> +</row> +<row> <entry>ConnectTabNotify</entry> <entry><link linkend="connecttabnotify">ConnectTabNotify</link></entry> </row> @@ -1221,6 +1225,170 @@ </note> </section> +<section id="mthConnectStaticNotify"><title>connectStaticNotify</title> +<indexterm><primary>connectStaticNotify</primary></indexterm> +<programlisting> +<![CDATA[ +>>--connectStaticNotify(--id--,--"event"--,-+---------------+--)-------->< + +-,--methodName-+ + +]]> +</programlisting> + +<para> + The connectStaticNotify connects a notification message from a static control to a method, defined by + the programmer, of the dialog. Normally, static controls do not send notification messages. A static + control will only send the messages when it has the SS_NOTIFY style. The notification messages inform + the dialog that an event has occurred with regard to the static control. +</para> +<para> + For user defined dialogs use the NOTIFY style keyword in the <link + linkend="sectAddStaticControls">Add...</link> static control methods when the control is defined. For + dialogs created from a compiled resource or a resource script file use the SS_NOTIFY style when + defining the control in a resource editor. +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para> + The arguments are: + <variablelist> + <varlistentry><term>id</term> + <listitem> + <para> + The resource ID of the static control. + </para> + </listitem></varlistentry> + <varlistentry><term>event</term> + <listitem> + <para> + A keyword specifying the event to be connected with a method: + <variablelist> + <varlistentry><term>CLICKED</term> + <listitem> + <para> + The static control has been clicked with the mouse. + </para> + </listitem></varlistentry> + <varlistentry><term>DBLCLK</term> + <listitem> + <para> + The static control has been double-clicked with the mouse. + </para> + </listitem></varlistentry> + <varlistentry><term>DISABLE</term> + <listitem> + <para> + The static control has been disabled. + </para> + </listitem></varlistentry> + <varlistentry><term>ENABLE</term> + <listitem> + <para> + The static control has been enabled. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term>methodNamd</term> + <listitem> + <para> + The method that is to be invoked whenever the specified notification is received from the static + control. The programmer defines this method. If this argument is omitted, a method name is + automatically generated that consists of the event keyword preceded by + <computeroutput>on</computeroutput>. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The return codes are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + No error detected. + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + The resource ID could not be resolved or the event argument is incorrect. + </para> + </listitem></varlistentry> + <varlistentry><term>1</term> + <listitem> + <para> + The message was not connected correctly. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + The following example comes from an application that displays employee statistics. A single click + on the employee number field advances the display to the next employee. A double click on either + the employee name or employee job duties alllows those fields to be edited. + </para> + <programlisting> + <![CDATA[ + ::method initDialog + + self~connectStaticNotify(IDC_ST_EMPNO, "CLICK", empLookup) + + self~connectStaticNotify(IDC_ST_EMPJOB, "DBLCLK", editStats) + self~connectStaticNotify(IDC_ST_EMPNAME, "DBLCLK", editStats) + + first = self~initDatabase + self~setStats(first) + ]]> + </programlisting> + </listitem></varlistentry> +</variablelist> + +<note><title>Notes</title> +<orderedlist> +<listitem> + <para> + The invocation of connectStaticNotify() can be placed in the <link linkend="h000025">init</link> or + <link linkend="mthInitDialog">initDialog</link> method. (Indeed the invocation can be done anywhere. + But, it makes most sense to have the connection made before the dialog starts executing.) If the + connection is made in the init() method, be sure that init:super() is invoked first. + </para> +</listitem> +<listitem> + <para> + The defined event-handling methods will receive two arguments: 1.) information about the specific + control and its event, 2.) the window handle of the static control. The low word of the first arg is + the control ID. The high word of the first arg is the event ID. In this example, (a continuation of + the above example,) the control ID determines if the user has double clicked on the employee job + duties field, or the employee name field. The event ID is not used, or needed. The same with the + window handle. + <programlisting> + <![CDATA[ + ::method editStats + use arg ctrlInfo, ctrlHwnd + + ctrlID = .DlgUtil~loWord(ctrlInfo) + eventID = .DlgUtil~hiWord(ctrlInfo) + + rec = self~getCurrentRecord + + if self~userUpdate(ctrlID, rec) then self~setStats(rec) + ]]> + </programlisting> + </para> +</listitem> +</orderedlist> +</note> +</section> + <section id="connecteditnotify"><title>ConnectEditNotify</title> <indexterm><primary>ConnectEditNotify</primary></indexterm> <programlisting> Modified: docs/trunk/oodialog/oodialog.sgml =================================================================== --- docs/trunk/oodialog/oodialog.sgml 2009-01-04 05:44:19 UTC (rev 3859) +++ docs/trunk/oodialog/oodialog.sgml 2009-01-04 06:25:39 UTC (rev 3860) @@ -1,39 +1,39 @@ <?xml version="1.0" standalone="no"> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.2//EN" [ -<!ENTITY legalstuff SYSTEM "../shared/legalstuff.sgml"> -<!ENTITY preface SYSTEM "preface.sgml"> -<!ENTITY reference SYSTEM "reference.sgml"> -<!ENTITY termdef SYSTEM "termdef.sgml"> -<!ENTITY basedialog SYSTEM "basedialog.sgml"> -<!ENTITY dialogcontrolc SYSTEM "dialogcontrolc.sgml"> -<!ENTITY userdialog SYSTEM "userdialog.sgml"> -<!ENTITY plainuserdialogc SYSTEM "plainuserdialogc.sgml"> -<!ENTITY resdialog SYSTEM "resdialog.sgml"> -<!ENTITY categorydialog SYSTEM "categorydialog.sgml"> -<!ENTITY standarddialog SYSTEM "standarddialog.sgml"> -<!ENTITY utilityclasses SYSTEM "utilityclasses.sgml"> -<!ENTITY mesextcl SYSTEM "mesextcl.sgml"> -<!ENTITY advcntlc SYSTEM "advcntlc.sgml"> -<!ENTITY staticcontrolc SYSTEM "staticcontrolc.sgml"> -<!ENTITY buttoncontrols SYSTEM "buttoncontrols.sgml"> -<!ENTITY editcontrolc SYSTEM "editcontrolc.sgml"> -<!ENTITY comboboxc SYSTEM "comboboxc.sgml"> -<!ENTITY listboxc SYSTEM "listboxc.sgml"> -<!ENTITY scrollbarc SYSTEM "scrollbarc.sgml"> -<!ENTITY listcontrolc SYSTEM "listcontrolc.sgml"> -<!ENTITY treecontrolc SYSTEM "treecontrolc.sgml"> -<!ENTITY slidercontrolc SYSTEM "slidercontrolc.sgml"> -<!ENTITY progressbarc SYSTEM "progressbarc.sgml"> -<!ENTITY tabcontrolc SYSTEM "tabcontrolc.sgml"> -<!ENTITY propertysheetc SYSTEM "propertysheetc.sgml"> -<!ENTITY resources SYSTEM "resources.sgml"> -<!ENTITY menuclasses SYSTEM "menus.sgml"> -<!ENTITY notices SYSTEM "../shared/notices.sgml"> -<!ENTITY cpl SYSTEM "../shared/CPLv1.0.sgml"> -<!ENTITY gethelp SYSTEM "../shared/gethelp.sgml"> -<!ENTITY genindex SYSTEM "genindex.sgml"> -<!ENTITY svnrev SYSTEM "svnrev.tmp"> +<!ENTITY legalstuff SYSTEM "../shared/legalstuff.sgml"> +<!ENTITY preface SYSTEM "preface.sgml"> +<!ENTITY reference SYSTEM "reference.sgml"> +<!ENTITY termdef SYSTEM "termdef.sgml"> +<!ENTITY basedialog SYSTEM "basedialog.sgml"> +<!ENTITY clsDialogControl SYSTEM "dialogcontrolc.sgml"> +<!ENTITY userdialog SYSTEM "userdialog.sgml"> +<!ENTITY plainuserdialogc SYSTEM "plainuserdialogc.sgml"> +<!ENTITY resdialog SYSTEM "resdialog.sgml"> +<!ENTITY categorydialog SYSTEM "categorydialog.sgml"> +<!ENTITY standarddialog SYSTEM "standarddialog.sgml"> +<!ENTITY utilityclasses SYSTEM "utilityclasses.sgml"> +<!ENTITY clsMessageExtensions SYSTEM "mesextcl.sgml"> +<!ENTITY clsAdvancedControls SYSTEM "advcntlc.sgml"> +<!ENTITY clsStaticControl SYSTEM "staticcontrolc.sgml"> +<!ENTITY buttoncontrols SYSTEM "buttoncontrols.sgml"> +<!ENTITY editcontrolc SYSTEM "editcontrolc.sgml"> +<!ENTITY comboboxc SYSTEM "comboboxc.sgml"> +<!ENTITY listboxc SYSTEM "listboxc.sgml"> +<!ENTITY scrollbarc SYSTEM "scrollbarc.sgml"> +<!ENTITY listcontrolc SYSTEM "listcontrolc.sgml"> +<!ENTITY treecontrolc SYSTEM "treecontrolc.sgml"> +<!ENTITY slidercontrolc SYSTEM "slidercontrolc.sgml"> +<!ENTITY progressbarc SYSTEM "progressbarc.sgml"> +<!ENTITY tabcontrolc SYSTEM "tabcontrolc.sgml"> +<!ENTITY propertysheetc SYSTEM "propertysheetc.sgml"> +<!ENTITY resources SYSTEM "resources.sgml"> +<!ENTITY menuclasses SYSTEM "menus.sgml"> +<!ENTITY notices SYSTEM "../shared/notices.sgml"> +<!ENTITY cpl SYSTEM "../shared/CPLv1.0.sgml"> +<!ENTITY gethelp SYSTEM "../shared/gethelp.sgml"> +<!ENTITY genindex SYSTEM "genindex.sgml"> +<!ENTITY svnrev SYSTEM "svnrev.tmp"> ]> <!--######################################################################### # @@ -89,38 +89,38 @@ </bookinfo> -&preface; <!-- About This Book --> +&preface; <!-- About This Book --> <!-- start of body --> -&reference; <!-- Reference --> -&termdef; <!-- Definition of Terms --> -&basedialog; <!-- BaseDialog Class --> -&dialogcontrolc; <!-- DialogControl Class --> -&userdialog; <!-- UserDialog Class --> -&plainuserdialogc; <!-- PlainUserDialog Class --> -&resdialog; <!-- ResDialog Class --> -&categorydialog; <!-- CategoryDialog Class --> -&standarddialog; <!-- Standard Dialogs, External Functions, and Public Routines --> -&utilityclasses; <!-- Utility Classess, DlgUtil, Point, DlgArea, etc.. --> -&mesextcl; <!-- MessageExtensions Class --> -&advcntlc; <!-- AdvancedControl Class --> -&staticcontrolc; <!-- StaticControl Class --> -&buttoncontrols; <!-- Button Controls --> -&editcontrolc; <!-- EditControl Class --> -&comboboxc; <!-- ComboBox Class --> -&listboxc; <!-- ListBox Class --> -&scrollbarc; <!-- ScrollBar Class --> -&listcontrolc; <!-- ListControl Class --> -&treecontrolc; <!-- TreeControl Class --> -&slidercontrolc; <!-- SliderControl Class --> -&progressbarc; <!-- ProgressBar Class --> -&tabcontrolc; <!-- TabControl Class --> -&propertysheetc; <!-- PropertySheet Class --> -&resources; <!-- Resources --> -&menuclasses; <!-- Menus --> +&reference; <!-- Reference --> +&termdef; <!-- Definition of Terms --> +&basedialog; <!-- BaseDialog Class --> +&clsDialogControl; <!-- DialogControl Class --> +&userdialog; <!-- UserDialog Class --> +&plainuserdialogc; <!-- PlainUserDialog Class --> +&resdialog; <!-- ResDialog Class --> +&categorydialog; <!-- CategoryDialog Class --> +&standarddialog; <!-- Standard Dialogs, External Functions, and Public Routines --> +&utilityclasses; <!-- Utility Classess, DlgUtil, Point, DlgArea, etc.. --> +&clsMessageExtensions; <!-- MessageExtensions Class --> +&clsAdvancedControls; <!-- AdvancedControl Class --> +&clsStaticControl; <!-- StaticControl Class --> +&buttoncontrols; <!-- Button Controls --> +&editcontrolc; <!-- EditControl Class --> +&comboboxc; <!-- ComboBox Class --> +&listboxc; <!-- ListBox Class --> +&scrollbarc; <!-- ScrollBar Class --> +&listcontrolc; <!-- ListControl Class --> +&treecontrolc; <!-- TreeControl Class --> +&slidercontrolc; <!-- SliderControl Class --> +&progressbarc; <!-- ProgressBar Class --> +&tabcontrolc; <!-- TabControl Class --> +&propertysheetc; <!-- PropertySheet Class --> +&resources; <!-- Resources --> +&menuclasses; <!-- Menus --> <!-- start of appendix --> -¬ices; <!-- Notices --> -&cpl; <!-- CPL --> +¬ices; <!-- Notices --> +&cpl; <!-- CPL --> -&genindex; <!-- Index --> +&genindex; <!-- Index --> </book> Modified: docs/trunk/oodialog/plainuserdialogc.sgml =================================================================== --- docs/trunk/oodialog/plainuserdialogc.sgml 2009-01-04 05:44:19 UTC (rev 3859) +++ docs/trunk/oodialog/plainuserdialogc.sgml 2009-01-04 06:25:39 UTC (rev 3860) @@ -142,12 +142,12 @@ <entry><link linkend="mthAddBitmapButton">AddBitmapButton</link></entry> </row> <row> -<entry>AddBlackFrame</entry> -<entry><link linkend="h001774">AddBlackFrame</link></entry> +<entry>addBlackFrame</entry> +<entry><link linkend="mthAddBlackFrame">addBlackFrame</link></entry> </row> <row> -<entry>AddBlackRect</entry> -<entry><link linkend="h001735">AddBlackRect</link></entry> +<entry>addBlackRect</entry> +<entry><link linkend="mthAddBlackRect">addBlackRect</link></entry> </row> <row> <entry>AddButton</entry> @@ -186,22 +186,30 @@ <entry><link linkend="mthAddEntryLine">AddEntryLine</link></entry> </row> <row> -<entry>AddGrayFrame</entry> -<entry><link linkend="h001761">AddGreyFrame</link></entry> +<entry>addEtchedFrame</entry> +<entry><link linkend="addEtchedFrame">addEtchedFrame</link></entry> </row> <row> -<entry>AddGrayRect</entry> -<entry><link linkend="h001722">AddGrayRect</link></entry> +<entry>addGrayFrame</entry> +<entry><link linkend="mthAddGrayFrame">addGreyFrame</link></entry> </row> <row> -<entry>AddGroupBox</entry> -<entry><link linkend="mthAddGroupBox">AddGroupBox</link></entry> +<entry>addGrayRect</entry> +<entry><link linkend="mthAddGrayRect">addGrayRect</link></entry> </row> <row> -<entry>AddIcon</entry> -<entry><link linkend="addicon">AddIcon</link></entry> +<entry>addGroupBox</entry> +<entry><link linkend="mthAddGroupBox">addGroupBox</link></entry> </row> <row> +<entry>addEtchedHorizontal</entry> +<entry><link linkend="addEtchedHorizontal">addEtchedHorizontal</link></entry> +</row> +<row> +<entry>addIcon</entry> +<entry><link linkend="mthAddIconClsUserDialog">addIcon</link></entry> +</row> +<row> <entry>AddInput</entry> <entry><link linkend="h001901">AddInput</link></entry> </row> @@ -270,22 +278,26 @@ <entry><link linkend="h001983">AddScrollBar</link></entry> </row> <row> -<entry>AddText</entry> -<entry><link linkend="mthAddText">AddText</link></entry> +<entry>addText</entry> +<entry><link linkend="mthAddText">addText</link></entry> </row> <row> <entry>AddUserMsg</entry> <entry><link linkend="h000141">AddUserMsg</link></entry> </row> <row> -<entry>AddWhiteFrame</entry> -<entry><link linkend="h001748">AddWhiteFrame</link></entry> +<entry>addEtchedVertical</entry> +<entry><link linkend="mthAddEtchedVertical">addEtchedVertical</link></entry> </row> <row> -<entry>AddWhiteRect</entry> -<entry><link linkend="mthAddWhiteRect">AddWhiteRect</link></entry> +<entry>addWhiteFrame</entry> +<entry><link linkend="mthAddWhiteFrame">addWhiteFrame</link></entry> </row> <row> +<entry>addWhiteRect</entry> +<entry><link linkend="mthAddWhiteRect">addWhiteRect</link></entry> +</row> +<row> <entry>AssignWindow</entry> <entry><link linkend="assignwindow">AssignWindow</link></entry> </row> Modified: docs/trunk/oodialog/scrollbarc.sgml =================================================================== --- docs/trunk/oodialog/scrollbarc.sgml 2009-01-04 05:44:19 UTC (rev 3859) +++ docs/trunk/oodialog/scrollbarc.sgml 2009-01-04 06:25:39 UTC (rev 3860) @@ -45,7 +45,7 @@ <indexterm><primary>ScrollBar class</primary></indexterm> <para>The ScrollBar class provides methods to query and modify scroll bars. It inherits all methods of the DialogControl class (see -page <link linkend="dialogcontrolc">DialogControl Class</link>).</para> +page <link linkend="clsDialogControl">DialogControl Class</link>).</para> <para>Use the <link linkend="getscrollbar">GetScrollBar</link> method to retrieve an object of the ScrollBar class.</para> <variablelist> Modified: docs/trunk/oodialog/staticcontrolc.sgml =================================================================== --- docs/trunk/oodialog/staticcontrolc.sgml 2009-01-04 05:44:19 UTC (rev 3859) +++ docs/trunk/oodialog/staticcontrolc.sgml 2009-01-04 06:25:39 UTC (rev 3860) @@ -41,28 +41,246 @@ # ######################################################################### --> -<chapter id="staticcontrolc"><title>StaticControl Class</title> +<chapter id="clsStaticControl"><title>StaticControl Class</title> <indexterm><primary>StaticControl class</primary></indexterm> <para> - The StaticControl class provides methods to query and modify static controls (static text, - rectangles, and frames.) It inherits all methods of the DialogControl class (see <link - linkend="dialogcontrolc">DialogControl Class</link>). By default, static controls are assigned a + The StaticControl class provides methods to query and modify static controls (static text, images, + rectangles, and frames.). By default, static controls are assigned a resource ID of -1. There is no way to query or modify static controls unless the control has a positive resource ID. Which in most circumstances is fine, usually static controls do not need to be modified. Be sure to assign a positive resource ID to statict controls that will be modified during the execution of a dialog. </para> <para> - The StaticControl class requires the class definition file - <computeroutput>oodWin32.cls</computeroutput>:</para> + More text? +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Requires:</emphasis></term> + <listitem> + <para> + The StaticControl class requires the class definition file <computeroutput>oodWin32.cls + </computeroutput>: + <programlisting> + <![CDATA[ + ::requires "oodWin32.cls" + ]]> + </programlisting> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Subclass of:</emphasis></term> + <listitem> + <para> + The static control class is a subclass of the <link linkend="clsDialogControl">DialogControl + Class</link> and therefore inherits all methods of that class. + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Mixin Class Inherits:</emphasis></term> + <listitem> + <para> + The static control class inherits from the following mixin classes, (indirectly through the + DialogControl class.) + </para> + <para> + The <emphasis role="bold">WindowBase</emphasis> + </para> + <para> + The <emphasis role="bold"> WindowExtensions</emphasis> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Instantiating:</emphasis></term> + <listitem> + <para> + Use the <link linkend="getstaticcontrol">getStaticControl()</link>) method to retrieve an object of + the static control class. To use this method, the static control must have a positive ID. + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Dynamically Defining:</emphasis></term> + <listitem> + <para> + To dynamically define a static control in a <link linkend="clsUserDialog">UserDialog</link> class, + use one of the <link linkend="sectAddStaticControls">Add Static Control</link> methods. + </para> + </listitem></varlistentry> + <varlistentry><term>Methods:</term> + <listitem> + <para> + Instances of the StaticControl class implement the methods listed in the following table: + </para> + <table id="tblStaticControlMethods" frame="all"> + <title>StaticControl Instance Methods</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Method...</entry> + <entry>...on page</entry> + </row> + </thead> + <tbody> + <row> + <entry>new (Class method)</entry> + <entry><link linkend="mthNewClsStaticControl">new</link></entry> + </row> + <row> + <entry>setIcon</entry> + <entry><link linkend="mthSetIconClsStaticControl">setIcon</link></entry> + </row> + <row> + <entry>setImage</entry> + <entry><link linkend="mthSetImageClsStaticControl">setImage</link></entry> + </row> + </tbody></tgroup> + </table> + </listitem></varlistentry> +</variablelist> + + +<section id="mthNewClsStaticControl"><title>new (Class method)</title> +<indexterm><primary>new</primary> +<secondary>StaticControl class</secondary></indexterm> +<para> + The static control class is not intended to be instantiated directly by the programmer using the new() + method. Rather the programmer should obtain a new static control object by using the <link + linkend="getstaticcontrol">getStaticControl()</link>) method of the <link + linkend="clsAdvancedControls">.AdvancedControls</link> class. +</para> +</section> <!-- End StaticControl::new() [class method] --> + + +<section id="mthSetIconClsStaticControl"><title>setIcon</title> +<indexterm><primary>setIcon</primary> +<secondary>StaticControl class</secondary></indexterm> <programlisting> <![CDATA[ -::requires "oodWin32.cls" +>>--setIcon(--x--,--y--)--------------------------------------->< + ]]> </programlisting> + <para> - Use the getStaticControl method (see <link linkend="getstaticcontrol">getStaticControl</link>) to - retrieve an object of the StaticControl class. To use this method, the static control must have a - positive ID. + Description </para> -</chapter> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End StaticControl::setIcon() --> + + +<section id="mthSetImageClsStaticControl"><title>setImage</title> +<indexterm><primary>setImage</primary> +<secondary>StaticControl class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--setImage(--x--,--y--)--------------------------------------->< + +]]> +</programlisting> + +<para> + Description +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The arguments are: + <variablelist> + <varlistentry><term>x</term> + <listitem> + <para> + xx. + </para> + </listitem></varlistentry> + <varlistentry><term>y</term> + <listitem> + <para> + yyy, + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The possible return values are: + <variablelist> + <varlistentry><term>0</term> + <listitem> + <para> + Success + </para> + </listitem></varlistentry> + <varlistentry><term>-1</term> + <listitem> + <para> + Some error. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example ... + <programlisting> + <![CDATA[ + x = y + return 0 + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End StaticControl::setImage() --> + +</chapter> <!-- End StaticControl class --> Modified: docs/trunk/oodialog/termdef.sgml =================================================================== --- docs/trunk/oodialog/termdef.sgml 2009-01-04 05:44:19 UTC (rev 3859) +++ docs/trunk/oodialog/termdef.sgml 2009-01-04 06:25:39 UTC (rev 3860) @@ -197,7 +197,7 @@ methods. See the <link linkend="h000048">Execute</link> or <link linkend="popup">Popup</link> methods for example. ooDialog provides four pre-defined icons for use in dialogs. Custom icons can be used by including the icon in a binary (compiled) resource, a resource script, or by using the <link - linkend="addicon">AddIcon</link> method of the UserDialog. The following table shows the symbolic IDs + linkend="mthAddIconClsUserDialog">addIcon</link> method of the UserDialog. The following table shows the symbolic IDs of the pre-defined icons. The symbolic ID should always be used in case the numeric value is changed in the future. Their numeric IDs should be considered reserved. There is a fifth symbolic ID that represents the default dialog icon. This ID can always be used where a dialog icon ID is needed. Modified: docs/trunk/oodialog/userdialog.sgml =================================================================== --- docs/trunk/oodialog/userdialog.sgml 2009-01-04 05:44:19 UTC (rev 3859) +++ docs/trunk/oodialog/userdialog.sgml 2009-01-04 06:25:39 UTC (rev 3860) @@ -59,7 +59,7 @@ <link linkend="clsBaseDialog">BaseDialog class</link>. </para></note> <para>Subclasses of the UserDialog can inherit the mixin -<link linkend="advcntlc">AdvancedControls</link> class. This class provides +<link linkend="clsAdvancedControls">AdvancedControls</link> class. This class provides methods to dynamically create a dialog with these additional elements: </para> <itemizedlist> @@ -172,12 +172,12 @@ <entry><link linkend="mthAddBitmapButton">AddBitmapButton</link></entry> </row> <row> -<entry>AddBlackFrame</entry> -<entry><link linkend="h001774">AddBlackFrame</link></entry> +<entry>addBlackFrame</entry> +<entry><link linkend="mthAddBlackFrame">addBlackFrame</link></entry> </row> <row> -<entry>AddBlackRect</entry> -<entry><link linkend="h001735">AddBlackRect</link></entry> +<entry>addBlackRect</entry> +<entry><link linkend="mthAddBlackRect">addBlackRect</link></entry> </row> <row> <entry>AddButton</entry> @@ -212,22 +212,30 @@ <entry><link linkend="mthAddEntryLine">AddEntryLine</link></entry> </row> <row> -<entry>AddGrayFrame</entry> -<entry><link linkend="h001761">AddGreyFrame</link></entry> +<entry>addEtchedFrame</entry> +<entry><link linkend="addEtchedFrame">addEtchedFrame</link></entry> </row> <row> -<entry>AddGrayRect</entry> -<entry><link linkend="h001722">AddGrayRect</link></entry> +<entry>addGrayFrame</entry> +<entry><link linkend="mthAddGrayFrame">addGreyFrame</link></entry> </row> <row> +<entry>addGrayRect</entry> +<entry><link linkend="mthAddGrayRect">addGrayRect</link></entry> +</row> +<row> <entry>addGroupBox</entry> <entry><link linkend="mthAddGroupBox">addGroupBox</link></entry> </row> <row> -<entry>AddIcon</entry> -<entry><link linkend="addicon">AddIcon</link></entry> +<entry>addEtchedHorizontal</entry> +<entry><link linkend="addEtchedHorizontal">addEtchedHorizontal</link></entry> </row> <row> +<entry>addIcon</entry> +<entry><link linkend="mthAddIconClsUserDialog">addIcon</link></entry> +</row> +<row> <entry>AddInput</entry> <entry><link linkend="h001901">AddInput</link></entry> </row> @@ -296,14 +304,18 @@ <entry><link linkend="h001983">AddScrollBar</link></entry> </row> <row> -<entry>AddText</entry> -<entry><link linkend="mthAddText">AddText</link></entry> +<entry>addText</entry> +<entry><link linkend="mthAddText">addText</link></entry> </row> <row> -<entry>AddWhiteFrame</entry> -<entry><link linkend="h001748">AddWhiteFrame</link></entry> +<entry>addEtchedVertical</entry> +<entry><link linkend="mthAddEtchedVertical">addEtchedVertical</link></entry> </row> <row> +<entry>addWhiteFrame</entry> +<entry><link linkend="mthAddWhiteFrame">addWhiteFrame</link></entry> +</row> +<row> <entry>addWhiteRect</entry> <entry><link linkend="mthAddWhiteRect">addWhiteRect</link></entry> </row> @@ -1245,17 +1257,17 @@ <listitem><para>A bitmap that is displayed if the button is focused. When a button is focused it receives the keyboard input and can be clicked by using the Enter or Space keys. Normally the focused button is surrounded by a dashed -frame. If this argument is ommitted, the <computeroutput>bmpNormal</computeroutput> +frame. If this argument is omitted, the <computeroutput>bmpNormal</computeroutput> bitmap is displayed for the focused state. </para></listitem></varlistentry> <varlistentry><term>bmpSelected</term> <listitem><para>A bitmap that is displayed while the button is clicked and held -down. If this argument is ommitted, the <computeroutput>bmpNormal</computeroutput> +down. If this argument is omitted, the <computeroutput>bmpNormal</computeroutput> bitmap is displayed for the selected state. </para></listitem></varlistentry> <varlistentry><term>bmpDisabled</term> <listitem><para>A bitmap that is displayed if the button is disabled. If this -argument is ommitted, the <computeroutput>bmpNormal</computeroutput> bitmap is +argument is omitted, the <computeroutput>bmpNormal</computeroutput> bitmap is displayed for the disabled state. </para></listitem></varlistentry> <varlistentry><term>style</term> @@ -1306,17 +1318,16 @@ <varlistentry><term>NOTAB</term> <listitem><para>Create the button without the <link linkend="wstabstop">tabstop</link> style. By default the button is created -with the tabstop style except in these conditions: the bmpFocused is ommitted, -and the bmpSelected is ommitted, and the FRAME style keyword is not used. +with the tabstop style except in these conditions: the bmpFocused is omitted, +and the bmpSelected is omitted, and the FRAME style keyword is not used. </para></listitem></varlistentry> <varlistentry><term>TAB</term> <listitem><para>Create the button with the <link linkend="wstabstop">tabstop</link> style. The button is normally created with the tabstop style and this keyword is not necessary. However, if the -bmpFocused argument is ommitted, and the bmpSelected argument is ommitted, and -the FRAME style keyword is not used, the button is created without the tabstop -style. In this case only, it is necessary to use the TAB keyword to change the -default behavior. +bmpFocused argument is omitted, and the bmpSelected argument is omitted, and the FRAME style keyword is +not used, the button is created without the tabstop style. In this case only, it is necessary to use the +TAB keyword to change the default behavior. </para></listitem></varlistentry> <varlistentry><term>BORDER</term> <listitem><para>Create the button with the <link @@ -1345,60 +1356,70 @@ </variablelist> </section> -<section id="addicon"><title>AddIcon</title> -<indexterm><primary>AddIcon</primary></indexterm> +<section id="mthAddIconClsUserDialog"><title>addIcon</title> +<indexterm><primary>addIcon</primary></indexterm> <programlisting> <![CDATA[ ->>-aUserDialog~AddIcon(--id--,--fileName--)-------------------->< - - +>>--addIcon(--id--,--fileName--)----------------------------------------------->< ]]> </programlisting> -<para>The AddIcon method adds an icon resource to the dialog. This is -equivalent to using the <computeroutput>ICON</computeroutput> statement in -a resource script.</para> +<para> + The addIcon method adds an icon resource to the dialog. This is equivalent to using the + <computeroutput>ICON</computeroutput> statement in a resource script. +</para> <variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The arguments are: -<variablelist> -<varlistentry><term>id</term> -<listitem><para>The resource ID for the icon. -</para></listitem></varlistentry> -<varlistentry><term>fileName</term> -<listitem><para>The file name of the icon. If the icon file is not in the -current directory, then a relative or fully qualified file name should be used. -</para></listitem></varlistentry> -</variablelist></para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para>The following example creates a very simple dialog that has -an OK button and a static text box. The <computeroutput>addIcon</computeroutput> -method is used to load an icon resource using the ID of 15. That icon is then -used in the <computeroutput>execute</computeroutput> method for the dialog icon. -(The <link linkend="dialogicon">dialog icon</link> is the icon shown in the title -bar of the dialog.) + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para> + The arguments are: + <variablelist> + <varlistentry><term>id</term> + <listitem> + <para> + The resource ID for the icon. + </para> + </listitem></varlistentry> + <varlistentry><term>fileName</term> + <listitem> + <para> + The file name of the icon. If the icon file is not in the current directory, then a relative + or fully qualified file name should be used. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + The following example creates a very simple dialog that has an OK button and a static text box. + The <computeroutput>addIcon</computeroutput> method is used to load an icon resource using the ID + of 15. That icon is then used in the <computeroutput>execute</computeroutput> method for the + dialog icon. (The <link linkend="dialogicon">dialog icon</link> is the icon shown in the title bar + of the dialog.) + </para> + <programlisting> + <![CDATA[ + dlg = .SimpleDialog~new + if dlg~initCode = 0 then do + dlg~create(30, 30, 150, 100, "The Simple Dialog", "VISIBLE") + dlg~execute("SHOWTOP", 15) + dlg~deinstall + end -<programlisting> -<![CDATA[ - dlg = .SimpleDialog~new - if dlg~initCode = 0 then do - dlg~create(30, 30, 150, 100, "The Simple Dialog", "VISIBLE") - dlg~execute("SHOWTOP", 15) - dlg~deinstall - end + ::requires "OODWin32.cls" -::requires "OODWin32.cls" + ::class SimpleDialog subclass UserDialog -::class SimpleDialog subclass UserDialog + ::method defineDialog -::method defineDialog - - self~addText(10, 20, 130, 30, "Simple message", "CENTER BORDER", 100) - self~addButton(IDOK, 105, 70, 35, 15, "OK") - self~addIcon(15, "MyAppIcon.ico") -]]> -</programlisting> -</para></listitem></varlistentry> + self~addText(10, 20, 130, 30, "Simple message", "CENTER BORDER", 100) + self~addButton(IDOK, 105, 70, 35, 15, "OK") + self~addIcon(15, "MyAppIcon.ico") + ]]> + </programlisting> + </listitem></varlistentry> </variablelist> </section> @@ -1408,7 +1429,6 @@ <![CDATA[ >>-dlg~addGroupBox(--x-,-y-,-cx-,-cy--+---------+-----------+--------+--)----->< +-,-text--+-,--style--+-,--id--+ - ]]> </programlisting> @@ -1492,25 +1512,24 @@ <section id="sectAddStaticControls"><title>Add Static Controls</title> <indexterm><primary>Add staic control methods</primary></indexterm> <para> - The methods in this section are all used to add a static control to the dialog. However, there is - no need to use a number of different methods to add static controls. The <link - linkend="mthAddStatic">addStatic</link> method is all that is needed. You control the appearance - and behavior of the static control in the same way as with other controls, by specifying the - appropriate control styles. Given the proper combination of style keywords, the + The methods in this section are all used to add a static control to the dialog. However, there is no + need to use a number of different methods to add static controls. The <link + linkend="mthAddStatic">addStatic</link> method is all that is needed. You control the appearance and + behavior of the static control in the same way as with other controls, by specifying the appropriate + control styles. Given the proper combination of style keywords, the <computeroutput>addStatic</computeroutput> method can create any static control that the other methods in this section create. </para> <para> - However, there are a large number of style keywords for the static control. Many of the keywords - have no meaning when used in combination with other keywords. For instance, the ENDELLIPIS - keyword has no meaning if used with the ICON keyword. The other methods in this section are - convenience methods where the number of style keywords are reduced to only those that make sense - in combination. + However, there are a large number of style keywords for the static control. Many of the keywords have + no meaning when used in combination with other keywords. For instance, the ENDELLIPIS keyword has no + meaning if used with the ICON keyword. The other methods in this section are convenience methods where + the number of style keywords are reduced to only those that make sense in combination. </para> <para> A word about frames and rectangles. In previous versions of the ooDialog reference frames and - rectangles were documented as though they were a type of separate controls. They are not, they - are just a static control with a particular style. The <link linkend="figFramesRects">Frames and + rectangles were documented as though they were a type of separate controls. They are not, they are + just a static control with a particular style. The <link linkend="figFramesRects">Frames and Rectangles</link> picture gives some idea of how the different types of static controls can appear. <figure id="figFramesRects"><title>Frames and Rectangles</title> @@ -1566,7 +1585,8 @@ <varlistentry><term>TEXT</term> <listitem> <para> - A static text control is created, this is the default. + A static text control is created, this is the default if no other static type is + specified. </para> </listitem></varlistentry> <varlistentry><term>BITMAP</term> @@ -1584,7 +1604,7 @@ <varlistentry><term>ICON</term> <listitem> <para> - A static image control that uses an icon will be created. + A static image control that uses an icon will be created. Cursors are also icons. </para> </listitem></varlistentry> <varlistentry><term>WHITERECT</term> @@ -1680,8 +1700,9 @@ <varlistentry><term>SIMPLE</term> <listitem> <para> - A single line of left-aligned text in the rectangle. The text line cannot be shortened - or altered in any way. If the control is disabled, the text is not grayed. + A single line of left-aligned text is in the rectangle defined by the control + coordinates. The text line cannot be shortened or altered in any way. If the control is + disabled, the text is not grayed. </para> </listitem></varlistentry> <varlistentry><term>LEFTNOWRAP</term> @@ -1694,68 +1715,106 @@ <varlistentry><term>NOTIFY</term> <listitem> <para> - keyword explanation + Causes the static control to send notification messages for the click, double click, + disabled, and enabled events. A static control without this style does not send + notification messages. See the <link + linkend="mthConnectStaticNotify">connectStaticNotify()</link> method of the <link + linkend="clsMessageExtensions">.MessageExtensions</link> class for further information. </para> </listitem></varlistentry> <varlistentry><term>SUNKEN</term> <listitem> <para> - keyword explanation + The control is drawn with a half-sunken border around it. </para> </listitem></varlistentry> <varlistentry><term>EDITCONTROL</term> <listitem> <para> - keyword explanation + The static control will act like a multi-line edit control when it displays text. This + consists of calculating the average character width in the same manner as the edit + control, and not displaying a partially visible last line. </para> </listitem></varlistentry> <varlistentry><term>ENDELLIPSIS</term> <listitem> <para> - keyword explanation + If the end of the text does not fit in the rectangle, it is truncated and ellipses are + added. If a word that is not at the end of the text goes beyond the limits of the + rectangle, it is truncated without ellipses. </para> </listitem></varlistentry> <varlistentry><term>NOPREFIX</term> <listitem> <para> - keyword explanation + Any ampersand (&) characters in the control's text are not interpreted as accelerator + prefix characters. The text is displayed with the ampersand removed and the next + character in the text underlined. </para> </listitem></varlistentry> <varlistentry><term>PATHELLIPSIS</term> <listitem> <para> - keyword explanation + If the text is to0 big for the specified rectangle, characters in the middle of the text + are replaced with ellipses so that the result fits in the rectangle. If the text + contains backslash (\) characters, this style preserves as much as possible of the text + after the last backslash. </para> </listitem></varlistentry> <varlistentry><term>WORDELLIPSIS</term> <listitem> <para> - keyword explanation + Any word that does not fit in the rectangle is truncated and ellipses are added. </para> </listitem></varlistentry> <varlistentry><term>CENTERIMAGE</term> <listitem> <para> - keyword explanation + Bitmaps are centered in the static control that contains it. The control is not resized, + so that a bitmap too large for the control will be clipped. If the static control + contains a single line of text, the text is centered vertically in the client area of the + control. </para> </listitem></varlistentry> <varlistentry><term>RIGHTJUST</term> <listitem> <para> - keyword explanation + The lower right corner of the static control with the BITMAP or ICON style remains fixed + when the control is resized. Only the top and left sides are adjusted to accommodate + a new bitmap or icon. </para> </listitem></varlistentry> <varlistentry><term>SIZECONTROL</term> <listitem> <para> - keyword explanation + Adjusts the bitmap to fit the size of the static control. For example, changing the + locale can change the system font, and thus controls might be resized. If a static + control had a bitmap, the bitmap would no longer fit the control. This style bit dictates + automatic redimensioning of bitmaps to fit their controls. </para> + <para> + If CENTERIMAGE is specified, the bitmap or icon is centered (and clipped if needed). If + CENTERIMAGE is not specified, the bitmap or icon is stretched or shrunk. + </para> + <para> + Note that the redimensioning in the two axes are independent, and the result may have a + changed aspect ratio. + </para> </listitem></varlistentry> <varlistentry><term>SIZEIMAGE</term> <listitem> <para> - keyword explanation + The actual resource width of the image is used. </para> + <para> + SIZEIMAGE is always used in conjunction with ICON. For icon images, the static + control is resized accordingly, but the icon remains aligned to the originally + specified left and top edges of the control. + </para> + <para> + Note that if CENTERIMAGE is also specified, the icon is centered within the control's + space rectangle. + </para> </listitem></varlistentry> <varlistentry><term>HIDDEN</term> <listitem> @@ -1790,186 +1849,1420 @@ </variablelist> </para> </listitem></varlistentry> + <varlistentry><term>text</term> + <listitem> + <para> + The text for the static control. If this argument is omitted then the empty string is used. + </para> + </listitem></varlistentry> </variablelist> </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + This method always returns 0. + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example adds a static image control and a static text control. + <programlisting> + <![CDATA[ + ::method defineDialog + + self~addStatic(IDC_BMP_PICTURE, 10, 10, 20, 17, "BITMAP REALSIZEIMAGE") + self~addStatic(IDC_ST_DESCRIPTION, 14, 190, 176, 20, "TEXT LEFT", "Description") + self~addButton(IDC_PB_NEXT, 10, 223, 50, 14, "Next", onNext) + self~addButton(IDOK, 140, 223, 50, 14, "Ok", ok, "DEFAULT") + ]]> + </programlisting> + </para> + </listitem></varlistentry> </variablelist> </section> +<section id="mthAddText"><title>addText</title> +<indexterm><primary>addText</primary></indexterm> +<programlisting> +<![CDATA[ + +-,-"LEFT"-+ +>>-addText(--x--,--y--+------+--+------+--+--------+--+----------+--+-------+--)-->< + +-,-cx-+ +-,-cy-+ +-,-text-+ +-,-style--+ +-,--id-+ +]]> +</programlisting> -<section id="mthAddWhiteRect"><title>addWhiteRect</title> -<indexterm><primary>addWhiteRect</primary></indexterm> +<para> + The addText method adds a static text control to the dialog. +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <variablelist> + <varlistentry><term>x, y, cx, cy</term> + <listitem> + <para> + The <link linkend="listCommonArguments">control coordinates</link>. When cx and cy are + omitted, then width and height of the control are calculated automatically based on the width + and height of the text string. + </para> + </listitem></varlistentry> + <varlistentry><term>text</term> + <listitem> + <para> + The text for the static control. If this argument is omitted then the empty string is used. + </para> + </listitem></varlistentry> + <varlistentry><term>style</term> + <listitem> + <para> + A list of 0 or more <link linkend="paraStyleExplanation">style</link> keywords separated by + spaces. If this argument is omitted LEFT is the default. + <variablelist> + <varlistentry><term>LEFT</term> + <listitem> + <para> + Left aligns the text. Lines are automatically word wrapped. Words longer than the width + of the control are truncated. This is the default if the style argument is omitted. + </para> + </listitem></varlist... [truncated message content] |
From: <mie...@us...> - 2009-01-04 19:35:03
|
Revision: 3864 http://oorexx.svn.sourceforge.net/oorexx/?rev=3864&view=rev Author: miesfeld Date: 2009-01-04 19:34:57 +0000 (Sun, 04 Jan 2009) Log Message: ----------- Continue ooDialog doc update Modified Paths: -------------- docs/trunk/oodialog/Makefile docs/trunk/oodialog/dialogcontrolc.sgml docs/trunk/oodialog/oodialog.sgml docs/trunk/oodialog/plainuserdialogc.sgml docs/trunk/oodialog/standarddialog.sgml docs/trunk/oodialog/staticcontrolc.sgml Added Paths: ----------- docs/trunk/oodialog/dialogcontrolCommon.sgml docs/trunk/oodialog/windowBaseCommon.sgml docs/trunk/oodialog/windowExtensionsCommon.sgml Modified: docs/trunk/oodialog/Makefile =================================================================== --- docs/trunk/oodialog/Makefile 2009-01-04 17:43:45 UTC (rev 3863) +++ docs/trunk/oodialog/Makefile 2009-01-04 19:34:57 UTC (rev 3864) @@ -49,10 +49,13 @@ SGML_FILES = advcntlc.sgml \ basedialog.sgml \ + windowBaseCommon.sgml \ + windowExtensionsCommon.sgml \ buttoncontrols.sgml \ categorydialog.sgml \ comboboxc.sgml \ dialogcontrolc.sgml \ + dialogcontrolCommon.sgml \ editcontrolc.sgml \ listboxc.sgml \ listcontrolc.sgml \ Added: docs/trunk/oodialog/dialogcontrolCommon.sgml =================================================================== --- docs/trunk/oodialog/dialogcontrolCommon.sgml (rev 0) +++ docs/trunk/oodialog/dialogcontrolCommon.sgml 2009-01-04 19:34:57 UTC (rev 3864) @@ -0,0 +1,64 @@ +<!--######################################################################### + # + # Description: Open Object Rexx: OODialog Reference SGML file. + # + # Copyright (c) 2008-2009, Rexx Language Association. All rights reserved. + # Portions Copyright (c) 2004, IBM Corporation. All rights reserved. + # + # This program and the accompanying materials are made available under + # the terms of the Common Public License v1.0 which accompanies this + # distribution. A copy is also available at the following address: + # http://www.oorexx.org/license.html + # + # Redistribution and use in source and binary forms, with or + # without modification, are permitted provided that the following + # conditions are met: + # + # Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # Redistributions in binary form must reproduce the above copyright + # notice, this list of conditions and the following disclaimer in + # the documentation and/or other materials provided with the distribution. + # + # Neither the name of Rexx Language Association nor the names + # of its contributors may be used to endorse or promote products + # derived from this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + # Author(s): + # W. David Ashley <da...@us...> + # + ######################################################################### +--> + + +<section><title>Value</title> +<programlisting> +<![CDATA[ +>>-aDialogControl~Value---------------------------------------->< +]]> +</programlisting> +<para><link linkend="value">DialogControl::value</link></para> +</section> + +<section><title>value=</title> +<programlisting> +<![CDATA[ +>>-aDialogControl~Value=--new_value---------------------------->< +]]> +</programlisting> +<para><link linkend="valuenew">DialogControl::value=</link></para> + +</section> + Modified: docs/trunk/oodialog/dialogcontrolc.sgml =================================================================== --- docs/trunk/oodialog/dialogcontrolc.sgml 2009-01-04 17:43:45 UTC (rev 3863) +++ docs/trunk/oodialog/dialogcontrolc.sgml 2009-01-04 19:34:57 UTC (rev 3864) @@ -810,7 +810,7 @@ </section> <section id="mthTabStop"><title>TabStop</title> -<indexterm><primary>abStop</primary></indexterm> +<indexterm><primary>tabStop</primary></indexterm> <programlisting> <![CDATA[ >>-aDialogControl~TabStop(--+-----------+--)-------------------->< @@ -4514,4 +4514,20 @@ </variablelist> </section> </section> + +<section id="methodsDialogControlInherited"><title>DialogControl Methods</title> +<indexterm><primary>DialogControl Methods</primary></indexterm> +<para> + The methods listed in this section are those directly implemented in the DialogControl class. (As + opposed to those implemented in the mixin classes that DialogControl inherits from: <link + linkend="clsWindowBase">WindowBase</link> and <link + linkend="clsWindowExtensions">WindowExtensions</link>.) The methods are fully documented in the + preceding sections. This section just lists the methods and provides a link to the method's + documentation. +</para> + +&dialogcontrolCommon; + +</section> + </chapter> Modified: docs/trunk/oodialog/oodialog.sgml =================================================================== --- docs/trunk/oodialog/oodialog.sgml 2009-01-04 17:43:45 UTC (rev 3863) +++ docs/trunk/oodialog/oodialog.sgml 2009-01-04 19:34:57 UTC (rev 3864) @@ -1,39 +1,42 @@ <?xml version="1.0" standalone="no"> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.2//EN" [ -<!ENTITY legalstuff SYSTEM "../shared/legalstuff.sgml"> -<!ENTITY preface SYSTEM "preface.sgml"> -<!ENTITY reference SYSTEM "reference.sgml"> -<!ENTITY termdef SYSTEM "termdef.sgml"> -<!ENTITY basedialog SYSTEM "basedialog.sgml"> -<!ENTITY clsDialogControl SYSTEM "dialogcontrolc.sgml"> -<!ENTITY userdialog SYSTEM "userdialog.sgml"> -<!ENTITY plainuserdialogc SYSTEM "plainuserdialogc.sgml"> -<!ENTITY resdialog SYSTEM "resdialog.sgml"> -<!ENTITY categorydialog SYSTEM "categorydialog.sgml"> -<!ENTITY standarddialog SYSTEM "standarddialog.sgml"> -<!ENTITY utilityclasses SYSTEM "utilityclasses.sgml"> -<!ENTITY clsMessageExtensions SYSTEM "mesextcl.sgml"> -<!ENTITY clsAdvancedControls SYSTEM "advcntlc.sgml"> -<!ENTITY clsStaticControl SYSTEM "staticcontrolc.sgml"> -<!ENTITY buttoncontrols SYSTEM "buttoncontrols.sgml"> -<!ENTITY editcontrolc SYSTEM "editcontrolc.sgml"> -<!ENTITY comboboxc SYSTEM "comboboxc.sgml"> -<!ENTITY listboxc SYSTEM "listboxc.sgml"> -<!ENTITY scrollbarc SYSTEM "scrollbarc.sgml"> -<!ENTITY listcontrolc SYSTEM "listcontrolc.sgml"> -<!ENTITY treecontrolc SYSTEM "treecontrolc.sgml"> -<!ENTITY slidercontrolc SYSTEM "slidercontrolc.sgml"> -<!ENTITY progressbarc SYSTEM "progressbarc.sgml"> -<!ENTITY tabcontrolc SYSTEM "tabcontrolc.sgml"> -<!ENTITY propertysheetc SYSTEM "propertysheetc.sgml"> -<!ENTITY resources SYSTEM "resources.sgml"> -<!ENTITY menuclasses SYSTEM "menus.sgml"> -<!ENTITY notices SYSTEM "../shared/notices.sgml"> -<!ENTITY cpl SYSTEM "../shared/CPLv1.0.sgml"> -<!ENTITY gethelp SYSTEM "../shared/gethelp.sgml"> -<!ENTITY genindex SYSTEM "genindex.sgml"> -<!ENTITY svnrev SYSTEM "svnrev.tmp"> +<!ENTITY legalstuff SYSTEM "../shared/legalstuff.sgml"> +<!ENTITY preface SYSTEM "preface.sgml"> +<!ENTITY reference SYSTEM "reference.sgml"> +<!ENTITY termdef SYSTEM "termdef.sgml"> +<!ENTITY basedialog SYSTEM "basedialog.sgml"> +<!ENTITY windowBaseCommon SYSTEM "windowBaseCommon.sgml"> +<!ENTITY clsDialogControl SYSTEM "dialogcontrolc.sgml"> +<!ENTITY windowExtensionsCommon SYSTEM "windowExtensionsCommon.sgml"> +<!ENTITY dialogcontrolCommon SYSTEM "dialogcontrolCommon.sgml"> +<!ENTITY userdialog SYSTEM "userdialog.sgml"> +<!ENTITY plainuserdialogc SYSTEM "plainuserdialogc.sgml"> +<!ENTITY resdialog SYSTEM "resdialog.sgml"> +<!ENTITY categorydialog SYSTEM "categorydialog.sgml"> +<!ENTITY standarddialog SYSTEM "standarddialog.sgml"> +<!ENTITY utilityclasses SYSTEM "utilityclasses.sgml"> +<!ENTITY clsMessageExtensions SYSTEM "mesextcl.sgml"> +<!ENTITY clsAdvancedControls SYSTEM "advcntlc.sgml"> +<!ENTITY clsStaticControl SYSTEM "staticcontrolc.sgml"> +<!ENTITY buttoncontrols SYSTEM "buttoncontrols.sgml"> +<!ENTITY editcontrolc SYSTEM "editcontrolc.sgml"> +<!ENTITY comboboxc SYSTEM "comboboxc.sgml"> +<!ENTITY listboxc SYSTEM "listboxc.sgml"> +<!ENTITY scrollbarc SYSTEM "scrollbarc.sgml"> +<!ENTITY listcontrolc SYSTEM "listcontrolc.sgml"> +<!ENTITY treecontrolc SYSTEM "treecontrolc.sgml"> +<!ENTITY slidercontrolc SYSTEM "slidercontrolc.sgml"> +<!ENTITY progressbarc SYSTEM "progressbarc.sgml"> +<!ENTITY tabcontrolc SYSTEM "tabcontrolc.sgml"> +<!ENTITY propertysheetc SYSTEM "propertysheetc.sgml"> +<!ENTITY resources SYSTEM "resources.sgml"> +<!ENTITY menuclasses SYSTEM "menus.sgml"> +<!ENTITY notices SYSTEM "../shared/notices.sgml"> +<!ENTITY cpl SYSTEM "../shared/CPLv1.0.sgml"> +<!ENTITY gethelp SYSTEM "../shared/gethelp.sgml"> +<!ENTITY genindex SYSTEM "genindex.sgml"> +<!ENTITY svnrev SYSTEM "svnrev.tmp"> ]> <!--######################################################################### # @@ -93,10 +96,10 @@ <!-- start of body --> &reference; <!-- Reference --> &termdef; <!-- Definition of Terms --> +&plainuserdialogc; <!-- PlainUserDialog Class --> &basedialog; <!-- BaseDialog Class --> &clsDialogControl; <!-- DialogControl Class --> &userdialog; <!-- UserDialog Class --> -&plainuserdialogc; <!-- PlainUserDialog Class --> &resdialog; <!-- ResDialog Class --> &categorydialog; <!-- CategoryDialog Class --> &standarddialog; <!-- Standard Dialogs, External Functions, and Public Routines --> Modified: docs/trunk/oodialog/plainuserdialogc.sgml =================================================================== --- docs/trunk/oodialog/plainuserdialogc.sgml 2009-01-04 17:43:45 UTC (rev 3863) +++ docs/trunk/oodialog/plainuserdialogc.sgml 2009-01-04 19:34:57 UTC (rev 3864) @@ -2,7 +2,7 @@ # # Description: Open Object Rexx: OODialog Reference SGML file. # - # Copyright (c) 2005-2007, Rexx Language Association. All rights reserved. + # Copyright (c) 2005-2009, Rexx Language Association. All rights reserved. # Portions Copyright (c) 2004, IBM Corporation. All rights reserved. # # This program and the accompanying materials are made available under @@ -41,36 +41,73 @@ # ######################################################################### --> -<chapter id="plainuserdialogc"><title>PlainUserDialog Class and PlainBaseDialog Class</title> +<chapter id="plainuserdialogc"><title>PlainBaseDialog, PlainUserDialog, Base Mixin Classes</title> +<indexterm><primary>PlainBaseDialog class</primary></indexterm> <indexterm><primary>PlainUserDialog class</primary></indexterm> -<para>The PlainUserDialog class subclasses from PlainBaseDialog class and provides -all the methods that normally are required to execute a dialog that is either -created dynamically or loaded from a resource script (.RC). In other words -it is a limited version of <link linkend="clsUserDialog">UserDialog Class</link>. -Use <computeroutput>::requires "OODPLAIN.CLS"</computeroutput> in your script -to get access to the PlainUserDialog class.</para> -<note><title>Note</title> -<para>If you use <computeroutput>::requires "OODWIN32.CLS"</computeroutput> you -do not need to specify the <computeroutput>::requires "OODIALOG.CLS"</computeroutput> -directive because OODIALOG.CLS is included from OODWIN32.CLS.</para> -</note> -<note><title>Note</title> -<para>If you use <computeroutput>::requires "OODIALOG.CLS"</computeroutput> you -do not need to specify the <computeroutput>::requires "OODPLAIN.CLS"</computeroutput> -directive because OODPLAIN.CLS is included from OODIALOG.CLS.</para> -</note> -<para>UserDialog includes all the methods PlainUserDialog does plus all the methods -defined in the DialogExtensions class. These are more specific methods that - cover asynchronous dialog execution, scroll bar support, resizing and repositioning, -bitmaps, graphics (device context related methods), scrolling text, and menus -(action bars).</para> -<para>The reason for splitting the functionality into two classes is to provide - a smaller package which requires less system resources for ordinary user -interfaces like the standard dialogs.</para> -<para>The following table lists all the methods that are provided by the PlainUserDialog -class. The individual methods are documented in -<link linkend="clsBaseDialog">BaseDialog Class</link> or -<link linkend="clsUserDialog">UserDialog Class</link>.</para> +<para> + PlainBaseDialog is the base class of all dialog classes in the ooDialog framework. It implements + methods that are common to every dialog. PlainBaseDialog should be considered an abstract class. + Although, a programmer could instantiate a new PlainBaseDialog object, the class does not implement all + the methods that are needed to execute a dialog. Therefore, not much can be done with a simple + PlainBaseDialog object. The ooDialog programmer uses subclasses of PlainBaseDialog to actually create + and execute a real dialog. +</para> +<para> + The PlainBaseDialog inherits from the WindowBase mixin class. The WindowBase mixin class implements + methods that are common to all windows. Since both dialogs and dialog controls are windows, the <link + linkend="clsDialogControl">DialogControl</link> class also inherits from WindowBase. +</para> +<para> + The PlainUserDialog class subclasses from PlainBaseDialog class and provides all the methods that + normally are required to execute a dialog that is either created dynamically or loaded from a resource + script (.RC). Its purpose is to provide a simpler class that can be used for ordinary user interfaces, + like the <link linkend="sectStandardDialogs">standard dialogs</link>. The ooDialog programmer can + subclass from the PlainUserDialog to produce straighforward, uncomplicated user interfaces. +</para> +<para> + The more advanced dialog classes, <link linkend="clsResDialog">ResDialog</link>, <link + linkend="clsRcDialog">RcDialog</link>, <link linkend="clsUserDialog">UserDialog</link>, subclass the + <link linkend="clsBaseDialog">BaseDialog</link> class. The BaseDialog class subclasses PlainBaseDialog, + and like PlainBaseDialog should be considered an abstract class. BaseDialog inherits from the + WindowExtensions and DialogExtensions mixin classes. These classes implement methods that cover + asynchronous dialog execution, scroll bar support, resizing and repositioning, bitmaps, graphics + (device context related methods), scrolling text, and menus (action bars). The ResDialog, RcDialog, + UserDialog classes, and their subclasses, allow the programmer to produce very sophisticated graphical + user interfaces. +</para> +<para> + Historically, the reason for providing the simpler PlainUserDialog class was to have a smaller package + that required less system resources for ordinary user interfaces like the standard dialogs. That + reason is probably not as valid in modern times as it was when ooDialog was being developed to run on + Windows 3.1. +</para> + +<section id="clsPlainUserDialog"><title>PlainUserDialog</title> +<indexterm><primary>PlainUserDialog</primary></indexterm> +<para> + PlainUserDialog is a limited version of the <link linkend="clsUserDialog">UserDialog</link> class. Use + <computeroutput>::requires "OODPLAIN.CLS"</computeroutput> in your script to get access to the + PlainUserDialog class. +</para> +<note><title>Note</title><para> + If you use <computeroutput>::requires "OODWIN32.CLS"</computeroutput> you do not need to specify the + <computeroutput>::requires "OODIALOG.CLS"</computeroutput> directive because OODIALOG.CLS is included + from OODWIN32.CLS. +</para></note> +<note><title>Note</title><para> + If you use <computeroutput>::requires "OODIALOG.CLS"</computeroutput> you do not need to specify the + <computeroutput>::requires "OODPLAIN.CLS"</computeroutput> directive because OODPLAIN.CLS is included + from OODIALOG.CLS. +</para></note> + +<section id="methodsPlainUserDialog"><title>Methods</title> +<indexterm><primary>PlainUserDialog Methods</primary></indexterm> +<para> + The following table lists all the methods that are provided by the PlainUserDialog class with links to + the full documentation. The individual methods are documented in <link + linkend="clsBaseDialog">BaseDialog Class</link> or <link linkend="clsUserDialog">UserDialog + Class</link>. +</para> <variablelist> <varlistentry><term>Attributes:</term> <listitem><para>Instances of the PlainUserDialog class have @@ -727,4 +764,33 @@ </row> </tbody></tgroup> </table> +</section> +</section> <!-- End PlainUserDialog class --> + + +<section id="clsWindowBase"><title>WindowBase Class</title> +<indexterm><primary>WindowBase Class</primary></indexterm> +<para> + WindowBase is a mixin class with methods that are common to all windows. It is inherited by both + dialog and dialog control classes. The class methods are listed here with links to the full + documentation for each method. +</para> + +&windowBaseCommon; + +</section> + +<section id="clsWindowExtensions"><title>WindowExtensions Class</title> +<indexterm><primary>WindowExtensions Class</primary></indexterm> +<para> + WindowExtensions is a mixin class with methods that are common to all windows. As the class name + implies, it is an extension of the WindowBase class, providing more sophisticated window methods. + It is inherited by both dialog and dialog control classes. The class methods are listed here with + links to the full documentation for each method. +</para> + +&windowExtensionsCommon; + +</section> + </chapter> Modified: docs/trunk/oodialog/standarddialog.sgml =================================================================== --- docs/trunk/oodialog/standarddialog.sgml 2009-01-04 17:43:45 UTC (rev 3863) +++ docs/trunk/oodialog/standarddialog.sgml 2009-01-04 19:34:57 UTC (rev 3864) @@ -239,7 +239,7 @@ </tbody></tgroup> </table> -<section id="sctStandardDialogs"><title>Standard Dialog Classes</title> +<section id="sectStandardDialogs"><title>Standard Dialog Classes</title> <indexterm><primary>standard dialogs</primary></indexterm> <para>The standard dialog classes are: </para> <itemizedlist> Modified: docs/trunk/oodialog/staticcontrolc.sgml =================================================================== --- docs/trunk/oodialog/staticcontrolc.sgml 2009-01-04 17:43:45 UTC (rev 3863) +++ docs/trunk/oodialog/staticcontrolc.sgml 2009-01-04 19:34:57 UTC (rev 3864) @@ -45,28 +45,25 @@ <indexterm><primary>StaticControl class</primary></indexterm> <para> The StaticControl class provides methods to query and modify static controls (static text, images, - rectangles, and frames.). By default, static controls are assigned a - resource ID of -1. There is no way to query or modify static controls unless the control has a - positive resource ID. Which in most circumstances is fine, usually static controls do not need to - be modified. Be sure to assign a positive resource ID to statict controls that will be modified - during the execution of a dialog. + rectangles, and frames.). By default, static controls are assigned a resource ID of -1. There is no + way to query or modify static controls unless the control has a positive resource ID. Which in most + circumstances is fine, usually static controls do not need to be modified. Be sure to assign a + positive resource ID to statict controls that will be modified during the execution of a dialog. </para> <para> More text? </para> <variablelist> <varlistentry><term><emphasis role="bold">Requires:</emphasis></term> - <listitem> - <para> - The StaticControl class requires the class definition file <computeroutput>oodWin32.cls - </computeroutput>: - <programlisting> - <![CDATA[ - ::requires "oodWin32.cls" - ]]> - </programlisting> - </para> - </listitem></varlistentry> +<listitem> +<para> +The StaticControl class requires the class definition file <computeroutput>oodWin32.cls</computeroutput>: +<programlisting> +<![CDATA[ +::requires "oodWin32.cls" +]]> +</programlisting> +</para></listitem></varlistentry> <varlistentry><term><emphasis role="bold">Subclass of:</emphasis></term> <listitem> <para> @@ -134,6 +131,19 @@ </variablelist> +<section><title>Inherited Methods - WindowBase</title> +&windowBaseCommon; +</section> + +<section><title>Inherited Methods - WindowExtensions</title> +&windowExtensionsCommon; +</section> + +<section><title>Inherited Methods - DialogControl</title> +&dialogcontrolCommon; +</section> + + <section id="mthNewClsStaticControl"><title>new (Class method)</title> <indexterm><primary>new</primary> <secondary>StaticControl class</secondary></indexterm> Added: docs/trunk/oodialog/windowBaseCommon.sgml =================================================================== --- docs/trunk/oodialog/windowBaseCommon.sgml (rev 0) +++ docs/trunk/oodialog/windowBaseCommon.sgml 2009-01-04 19:34:57 UTC (rev 3864) @@ -0,0 +1,62 @@ +<!--######################################################################### + # + # Description: Open Object Rexx: OODialog Reference SGML file. + # + # Copyright (c) 2008-2009, Rexx Language Association. All rights reserved. + # Portions Copyright (c) 2004, IBM Corporation. All rights reserved. + # + # This program and the accompanying materials are made available under + # the terms of the Common Public License v1.0 which accompanies this + # distribution. A copy is also available at the following address: + # http://www.oorexx.org/license.html + # + # Redistribution and use in source and binary forms, with or + # without modification, are permitted provided that the following + # conditions are met: + # + # Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # Redistributions in binary form must reproduce the above copyright + # notice, this list of conditions and the following disclaimer in + # the documentation and/or other materials provided with the distribution. + # + # Neither the name of Rexx Language Association nor the names + # of its contributors may be used to endorse or promote products + # derived from this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + # Author(s): + # W. David Ashley <da...@us...> + # + ######################################################################### +--> + +<section><title>enable</title> +<programlisting> +<![CDATA[ +>>--enable----------------------------------------------------->< +]]> +</programlisting> +<para><link linkend="enable">WindowBase::enable</link></para> +</section> + +<section><title>hide</title> +<programlisting> +<![CDATA[ +>>--hide------------------------------------------------------->< +]]> +</programlisting> +<para><link linkend="hide">DialogControl::hide</link></para> +</section> + Added: docs/trunk/oodialog/windowExtensionsCommon.sgml =================================================================== --- docs/trunk/oodialog/windowExtensionsCommon.sgml (rev 0) +++ docs/trunk/oodialog/windowExtensionsCommon.sgml 2009-01-04 19:34:57 UTC (rev 3864) @@ -0,0 +1,63 @@ +<!--######################################################################### + # + # Description: Open Object Rexx: OODialog Reference SGML file. + # + # Copyright (c) 2008-2009, Rexx Language Association. All rights reserved. + # Portions Copyright (c) 2004, IBM Corporation. All rights reserved. + # + # This program and the accompanying materials are made available under + # the terms of the Common Public License v1.0 which accompanies this + # distribution. A copy is also available at the following address: + # http://www.oorexx.org/license.html + # + # Redistribution and use in source and binary forms, with or + # without modification, are permitted provided that the following + # conditions are met: + # + # Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # Redistributions in binary form must reproduce the above copyright + # notice, this list of conditions and the following disclaimer in + # the documentation and/or other materials provided with the distribution. + # + # Neither the name of Rexx Language Association nor the names + # of its contributors may be used to endorse or promote products + # derived from this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + # Author(s): + # W. David Ashley <da...@us...> + # + ######################################################################### +--> + + +<section><title>hideFast</title> +<programlisting> +<![CDATA[ +>>--hideFast--------------------------------------------------->< +]]> +</programlisting> +<para><link linkend="hidefast">WindowExtension::hideFast</link></para> +</section> + +<section><title>showFast</title> +<programlisting> +<![CDATA[ +>>--showFast--------------------------------------------------->< +]]> +</programlisting> +<para><link linkend="showFast">WindowExtension::showFast</link></para> +</section> + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2009-01-04 20:45:59
|
Revision: 3865 http://oorexx.svn.sourceforge.net/oorexx/?rev=3865&view=rev Author: miesfeld Date: 2009-01-04 20:45:53 +0000 (Sun, 04 Jan 2009) Log Message: ----------- Incremental update of ooDialog doc Modified Paths: -------------- docs/trunk/oodialog/dialogcontrolCommon.sgml docs/trunk/oodialog/dialogcontrolc.sgml docs/trunk/oodialog/plainuserdialogc.sgml docs/trunk/oodialog/windowBaseCommon.sgml Modified: docs/trunk/oodialog/dialogcontrolCommon.sgml =================================================================== --- docs/trunk/oodialog/dialogcontrolCommon.sgml 2009-01-04 19:34:57 UTC (rev 3864) +++ docs/trunk/oodialog/dialogcontrolCommon.sgml 2009-01-04 20:45:53 UTC (rev 3865) @@ -43,10 +43,10 @@ --> -<section><title>Value</title> +<section><title>value</title> <programlisting> <![CDATA[ ->>-aDialogControl~Value---------------------------------------->< +>>--value------------------------------------------------------>< ]]> </programlisting> <para><link linkend="value">DialogControl::value</link></para> @@ -55,7 +55,7 @@ <section><title>value=</title> <programlisting> <![CDATA[ ->>-aDialogControl~Value=--new_value---------------------------->< +>>--value-=-newValue------------------------------------------->< ]]> </programlisting> <para><link linkend="valuenew">DialogControl::value=</link></para> Modified: docs/trunk/oodialog/dialogcontrolc.sgml =================================================================== --- docs/trunk/oodialog/dialogcontrolc.sgml 2009-01-04 19:34:57 UTC (rev 3864) +++ docs/trunk/oodialog/dialogcontrolc.sgml 2009-01-04 20:45:53 UTC (rev 3865) @@ -4515,19 +4515,36 @@ </section> </section> -<section id="methodsDialogControlInherited"><title>DialogControl Methods</title> -<indexterm><primary>DialogControl Methods</primary></indexterm> +<section id="dialogControlCrossReference"><title>Cross Reference</title> +<indexterm><primary>DialogControl Method Cross Reference</primary></indexterm> <para> + This section provides a complete listing of all methods of the DialogControl class. The methods are + divided into the specific classes they are implemented in and a link to the full documentation is + provided. +</para> + +<section id="methodsDialogControl"><title>DialogControl Class</title> +<indexterm><primary>DialogControl Class Methods</primary></indexterm> +<para> The methods listed in this section are those directly implemented in the DialogControl class. (As opposed to those implemented in the mixin classes that DialogControl inherits from: <link linkend="clsWindowBase">WindowBase</link> and <link - linkend="clsWindowExtensions">WindowExtensions</link>.) The methods are fully documented in the - preceding sections. This section just lists the methods and provides a link to the method's - documentation. + linkend="clsWindowExtensions">WindowExtensions</link>.) Each method has a link to the + method's documentation. </para> &dialogcontrolCommon; </section> +<section><title>WindowBase Mixin Class</title> +&windowBaseCommon; +</section> + +<section><title>WindowExtensions Mixin Class</title> +&windowExtensionsCommon; +</section> + +</section> + </chapter> Modified: docs/trunk/oodialog/plainuserdialogc.sgml =================================================================== --- docs/trunk/oodialog/plainuserdialogc.sgml 2009-01-04 19:34:57 UTC (rev 3864) +++ docs/trunk/oodialog/plainuserdialogc.sgml 2009-01-04 20:45:53 UTC (rev 3865) @@ -82,7 +82,7 @@ Windows 3.1. </para> -<section id="clsPlainUserDialog"><title>PlainUserDialog</title> +<section id="clsPlainUserDialog"><title>PlainUserDialog Class</title> <indexterm><primary>PlainUserDialog</primary></indexterm> <para> PlainUserDialog is a limited version of the <link linkend="clsUserDialog">UserDialog</link> class. Use @@ -100,13 +100,10 @@ from OODIALOG.CLS. </para></note> -<section id="methodsPlainUserDialog"><title>Methods</title> -<indexterm><primary>PlainUserDialog Methods</primary></indexterm> +<section id="attributesPlainUserDialog"><title>Attributes</title> +<indexterm><primary>PlainUserDialog Attributes</primary></indexterm> <para> - The following table lists all the methods that are provided by the PlainUserDialog class with links to - the full documentation. The individual methods are documented in <link - linkend="clsBaseDialog">BaseDialog Class</link> or <link linkend="clsUserDialog">UserDialog - Class</link>. + The following list briefly describes the attributes of the PlainUserDialog. </para> <variablelist> <varlistentry><term>Attributes:</term> @@ -153,14 +150,18 @@ </para></listitem></varlistentry> </variablelist> </para></listitem></varlistentry> -<varlistentry><term>Methods:</term> -<listitem><para>Instances of the PlainUserDialog class implement -the methods listed in -<link linkend="t9b">PlainUserDialog and PlainBaseDialog Class Methods</link> table. -</para></listitem></varlistentry> </variablelist> +</section> -<table id="t9b" frame="all"> +<section id="methodsPlainUserDialog"><title>Methods</title> +<indexterm><primary>PlainUserDialog Methods</primary></indexterm> +<para> + The following table lists all the methods that are provided by the PlainUserDialog class with links to + the full documentation. The individual methods are documented in <link + linkend="clsBaseDialog">BaseDialog Class</link> or <link linkend="clsUserDialog">UserDialog + Class</link>. +</para> +<table id="tblPlainUserDialogMethods" frame="all"> <title>PlainUserDialog and PlainBaseDialog Class Methods</title> <tgroup cols="2"> <thead> @@ -768,7 +769,7 @@ </section> <!-- End PlainUserDialog class --> -<section id="clsWindowBase"><title>WindowBase Class</title> +<section id="clsWindowBase"><title>WindowBase Mixin Class</title> <indexterm><primary>WindowBase Class</primary></indexterm> <para> WindowBase is a mixin class with methods that are common to all windows. It is inherited by both @@ -780,7 +781,7 @@ </section> -<section id="clsWindowExtensions"><title>WindowExtensions Class</title> +<section id="clsWindowExtensions"><title>WindowExtensions Mixin Class</title> <indexterm><primary>WindowExtensions Class</primary></indexterm> <para> WindowExtensions is a mixin class with methods that are common to all windows. As the class name Modified: docs/trunk/oodialog/windowBaseCommon.sgml =================================================================== --- docs/trunk/oodialog/windowBaseCommon.sgml 2009-01-04 19:34:57 UTC (rev 3864) +++ docs/trunk/oodialog/windowBaseCommon.sgml 2009-01-04 20:45:53 UTC (rev 3865) @@ -42,6 +42,15 @@ ######################################################################### --> +<section><title>disable</title> +<programlisting> +<![CDATA[ +>>--disable---------------------------------------------------->< +]]> +</programlisting> +<para><link linkend="disable">WindowBase::disable</link></para> +</section> + <section><title>enable</title> <programlisting> <![CDATA[ @@ -57,6 +66,14 @@ >>--hide------------------------------------------------------->< ]]> </programlisting> -<para><link linkend="hide">DialogControl::hide</link></para> +<para><link linkend="hide">WindowBase::hide</link></para> </section> +<section><title>show</title> +<programlisting> +<![CDATA[ +>>--show------------------------------------------------------->< +]]> +</programlisting> +<para><link linkend="showdc">WindowBase::show</link></para> +</section> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2009-01-04 22:06:34
|
Revision: 3866 http://oorexx.svn.sourceforge.net/oorexx/?rev=3866&view=rev Author: miesfeld Date: 2009-01-04 21:47:15 +0000 (Sun, 04 Jan 2009) Log Message: ----------- Incremental update of ooDialog doc Modified Paths: -------------- docs/trunk/oodialog/Makefile docs/trunk/oodialog/oodialog.sgml docs/trunk/oodialog/preface.sgml Added Paths: ----------- docs/trunk/oodialog/overview.sgml Removed Paths: ------------- docs/trunk/oodialog/reference.sgml docs/trunk/oodialog/termdef.sgml Modified: docs/trunk/oodialog/Makefile =================================================================== --- docs/trunk/oodialog/Makefile 2009-01-04 20:45:53 UTC (rev 3865) +++ docs/trunk/oodialog/Makefile 2009-01-04 21:47:15 UTC (rev 3866) @@ -66,7 +66,7 @@ preface.sgml \ progressbarc.sgml \ propertysheetc.sgml \ - reference.sgml \ + overview.sgml \ resdialog.sgml \ scrollbarc.sgml \ slidercontrolc.sgml \ @@ -74,7 +74,6 @@ resources.sgml \ menus.sgml \ tabcontrolc.sgml \ - termdef.sgml \ treecontrolc.sgml \ userdialog.sgml \ ../shared/notices.sgml \ Modified: docs/trunk/oodialog/oodialog.sgml =================================================================== --- docs/trunk/oodialog/oodialog.sgml 2009-01-04 20:45:53 UTC (rev 3865) +++ docs/trunk/oodialog/oodialog.sgml 2009-01-04 21:47:15 UTC (rev 3866) @@ -3,7 +3,7 @@ [ <!ENTITY legalstuff SYSTEM "../shared/legalstuff.sgml"> <!ENTITY preface SYSTEM "preface.sgml"> -<!ENTITY reference SYSTEM "reference.sgml"> +<!ENTITY overview SYSTEM "overview.sgml"> <!ENTITY termdef SYSTEM "termdef.sgml"> <!ENTITY basedialog SYSTEM "basedialog.sgml"> <!ENTITY windowBaseCommon SYSTEM "windowBaseCommon.sgml"> @@ -94,15 +94,14 @@ &preface; <!-- About This Book --> <!-- start of body --> -&reference; <!-- Reference --> -&termdef; <!-- Definition of Terms --> +&overview; <!-- Brief overview --> &plainuserdialogc; <!-- PlainUserDialog Class --> +&standarddialog; <!-- Standard Dialogs, External Functions, and Public Routines --> &basedialog; <!-- BaseDialog Class --> &clsDialogControl; <!-- DialogControl Class --> &userdialog; <!-- UserDialog Class --> &resdialog; <!-- ResDialog Class --> &categorydialog; <!-- CategoryDialog Class --> -&standarddialog; <!-- Standard Dialogs, External Functions, and Public Routines --> &utilityclasses; <!-- Utility Classess, DlgUtil, Point, DlgArea, etc.. --> &clsMessageExtensions; <!-- MessageExtensions Class --> &clsAdvancedControls; <!-- AdvancedControl Class --> Copied: docs/trunk/oodialog/overview.sgml (from rev 3860, docs/trunk/oodialog/reference.sgml) =================================================================== --- docs/trunk/oodialog/overview.sgml (rev 0) +++ docs/trunk/oodialog/overview.sgml 2009-01-04 21:47:15 UTC (rev 3866) @@ -0,0 +1,537 @@ +<!--######################################################################### + # + # Description: Open Object Rexx: OODialog Reference SGML file. + # + # Copyright (c) 2005-2007, Rexx Language Association. All rights reserved. + # Portions Copyright (c) 2004, IBM Corporation. All rights reserved. + # + # This program and the accompanying materials are made available under + # the terms of the Common Public License v1.0 which accompanies this + # distribution. A copy is also available at the following address: + # http://www.oorexx.org/license.html + # + # Redistribution and use in source and binary forms, with or + # without modification, are permitted provided that the following + # conditions are met: + # + # Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # Redistributions in binary form must reproduce the above copyright + # notice, this list of conditions and the following disclaimer in + # the documentation and/or other materials provided with the distribution. + # + # Neither the name of Rexx Language Association nor the names + # of its contributors may be used to endorse or promote products + # derived from this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + # Author(s): + # W. David Ashley <da...@us...> + # + ######################################################################### +--> +<chapter id="chapOverview"><title>Brief Overview</title> +<para> + This book is a reference to the ooDialog classes and the methods of those classes. There is little + documentation for the newcomer on how to get started using ooDialog. Until that type of documentation + can be written, the sample ooDialog programs that accompany the ooRexx distribution are probably the + best source of help in getting started. However, there are also numerous snippets of example code in + this book. +</para> + +<section id="reference"><title>OODialog Class Reference</title> +<para>The classes provided by OODialog form a hierarchy as shown in +<link linkend="fig52">The Hierarchy of OODialog Classes</link>.</para> + +<figure id="fig52"><title>The Hierarchy of OODialog Classes</title> +<mediaobject> +<imageobject> +<!-- Note! - if we include a /imagedata tag we get an error for DSSSL! --> +<imagedata fileref="rxou0s12.jpg" scale="40"> +</imageobject> +</mediaobject> +<mediaobject> +<imageobject> +<!-- Note! - if we include a /imagedata tag we get an error for DSSSL! --> +<imagedata fileref="rxou0s24.jpg" scale="40"> +</imageobject> +</mediaobject> +</figure> + +<para>The classes are: </para> +<variablelist> +<varlistentry><term>PlainBaseDialog, BaseDialog</term> +<listitem><para>Base methods regardless of whether the dialog is implemented as a binary +resource, a script, or dynamically. PlainBaseDialog provides limited functionality. +</para></listitem></varlistentry> +<varlistentry><term>PlainUserDialog</term> +<listitem><para>Subclass of PlainBaseDialog used to create a dialog with all its control +elements or to execute a dialog stored in a resource script (.RC). This class +has limited functionality. +</para></listitem></varlistentry> +<varlistentry><term>DynamicDialog, DialogExtensions, WindowBase, WindowExtensions</term> +<listitem><para>Internal mixin classes used to extend PlainBaseDialog, PlainUserDialog, +BaseDialog, UserDialog, and DialogControl. The methods provided by these classes +are not listed separately but are listed in BaseDialog or UserDialog. +</para></listitem></varlistentry> +<varlistentry><term>UserDialog</term> +<listitem><para>Subclass of BaseDialog used to create a dialog with all its control +elements, such as push buttons, check boxes, radio buttons, entry lines, and +list boxes. +</para></listitem></varlistentry> +<varlistentry><term>ResDialog</term> +<listitem><para>Subclass of BaseDialog for dialogs within a binary (compiled) resource +file (.DLL). +</para></listitem></varlistentry> +<varlistentry><term>CategoryDialog</term> +<listitem><para>Subclass of UserDialog used to create a dialog with several pages that +overlay each other. +</para></listitem></varlistentry> +<varlistentry><term>TimedMessage</term> +<listitem><para>Class to show a message window for a defined duration. +</para></listitem></varlistentry> +<varlistentry><term>InputBox</term> +<listitem><para>Class to dynamically define a dialog with a message, one entry line, +and two push buttons (OK, Cancel). +</para></listitem></varlistentry> +<varlistentry><term>PasswordBox</term> +<listitem><para>Similar to InputBox, but keystrokes in the entry line are shown as asterisks +(*). +</para></listitem></varlistentry> +<varlistentry><term>IntegerBox</term> +<listitem><para>Similar to InputBox, but only numeric data can be entered in the entry +line. +</para></listitem></varlistentry> +<varlistentry><term>MultiInputBox</term> +<listitem><para>Similar to InputBox, but with multiple entry lines. +</para></listitem></varlistentry> +<varlistentry><term>ListChoice</term> +<listitem><para>Class to dynamically define a dialog with a list box, where one line +can be selected and returned to the caller. +</para></listitem></varlistentry> +<varlistentry><term>MultiListChoice</term> +<listitem><para>Similar to ListChoice, but more than one line can be selected and returned +to the caller. +</para></listitem></varlistentry> +<varlistentry><term>CheckList</term> +<listitem><para>Class to dynamically define a dialog with a group of check boxes, which +can be selected and returned to the caller. +</para></listitem></varlistentry> +<varlistentry><term>SingleSelection</term> +<listitem><para>Class to dynamically define a dialog with a group of radio buttons, +where one can be selected and returned. +</para></listitem></varlistentry> +<varlistentry><term>Dialog</term> +<listitem><para>Subclass of UserDialog for simple dialogs. You can change the default +dialog style from UserDialog to ResDialog. +</para></listitem></varlistentry> +<varlistentry><term>AnimatedButton</term> +<listitem><para>Class to implement an animated button within a dialog. +</para></listitem></varlistentry> +<varlistentry><term>DialogControl</term> +<listitem><para>Class to implement methods that are common to all dialogs and dialog +controls. +</para></listitem></varlistentry> +<varlistentry><term>TreeControl</term> +<listitem><para>Class to implement a tree to display the list of items in a dialog in +a hierarchy. +</para></listitem></varlistentry> +<varlistentry><term>ListControl</term> +<listitem><para>Class to implement a list view to display the items in a dialog as a +collection. +</para></listitem></varlistentry> +<varlistentry><term>ProgressBar</term> +<listitem><para>Class to implement a progress indicator within a dialog. +</para></listitem></varlistentry> +<varlistentry><term>SliderControl</term> +<listitem><para>Class to implement a slider or trackbar within a dialog. +</para></listitem></varlistentry> +<varlistentry><term>TabControl</term> +<listitem><para>Class to implement tabs, which can be compared to dividers in a notebook +or labels in a file cabinet. +</para></listitem></varlistentry> +<varlistentry><term>StaticControl</term> +<listitem><para>Class to query and modify static controls, such as static text, group +boxes, and frames. +</para></listitem></varlistentry> +<varlistentry><term>EditControl</term> +<listitem><para>Class to query and modify edit controls, which are also called entry +lines. +</para></listitem></varlistentry> +<varlistentry><term>ButtonControl</term> +<listitem><para>Class to implement push buttons within a dialog. +</para></listitem></varlistentry> +<varlistentry><term>RadioButtonControl</term> +<listitem><para>Class to implement radio buttons within a dialog. +</para></listitem></varlistentry> +<varlistentry><term>CheckBoxControl</term> +<listitem><para>Class to implement check boxes within a dialog. +</para></listitem></varlistentry> +<varlistentry><term>ListBoxControl</term> +<listitem><para>Class to implement list boxes within a dialog. +</para></listitem></varlistentry> +<varlistentry><term>ComboBoxControl</term> +<listitem><para>Class to implement a combo box, which combines a list box with an edit +control. +</para></listitem></varlistentry> +<varlistentry><term>ScrollBarControl</term> +<listitem><para>Class to implement a scroll bar within a dialog. +</para></listitem></varlistentry> +<varlistentry><term>PropertySheetControl</term> +<listitem><para>Class to implement a property sheet, which is similar to a category +dialog that spreads its dialog items over several pages (categories), where +the individual pages are controlled by a tab control instead of radio buttons +or combo box lists. +</para></listitem></varlistentry> +</variablelist> +</section> + + +<section id="termdef"><title>Definition of Terms</title> +<variablelist> +<varlistentry><term id="resourceid">resource id</term> +<listitem><para>The identification number of a dialog resource. There are +several different types of dialog resources, menus, dialog controls, and bitmaps, +to name a few. You assign IDs when you create the resource definition for +your dialog. An ID can be either numerical (for example, 1) or symbolic (for +example, "IDOK"). +</para> +<para>IDs must be unique for each resource of the same type. Although two +resources of different types may have the same ID, when using symbolic IDs with +ooDialog, it is advisable to give all resources unique numerical IDs. +</para></listitem></varlistentry> +<varlistentry><term id="symbolicid">symbolic id</term> +<listitem><para>Defining a symbolic name for each numeric resource ID is often +useful in programs that work with resource IDs. The symbolic name is then used +where ever a numeric resource ID is needed. Symbolic names are easier to +remember than numeric IDs and can make the code easier to understand. +</para> +<para> + The mechanism ooDialog provides for using symbolic IDs is the <link linkend="constdir">ConstDir</link> + attribute of the dialog classes. This is a directory object where the indexes are symbolic IDs and the + item at each index is the numerical value of the ID. +</para> +<para> + Some generic <link linkend="chapResources">resources</link> are bound to the oodialog.dll. They can be + used in any ooDialog program and are accessed using the <link + linkend="clsResourceImage">.ResourceImage</link> class. Programmers should always use their symbolic + ID rather than their numeric ID in case the numeric value changes in future versions. To allow for + future expansion, the ooDialog programmer should consider the resource IDs of 1 through 50 as reserved + for ooDialog. Programmers can avoid conflicts by using IDs greater than 50 for resource IDs they assign + in their programs. +</para> +<para> + The symbolic IDs in the following table are pre-defined by ooDialog and placed in the + <computeroutput>ConstDir</computeroutput> when an instance of a dialog class is created. All symbolic + names after IDC_STATIC in the table refer to resources bound to oodialog.dll for general use by the + ooDialog programmer. +</para> +<table id="oodsymbolicids" frame="all"> +<title>Symbolic IDs Used by ooDialog</title> +<tgroup cols="3"> +<thead> +<row> +<entry>Numeric ID or Symbol</entry> +<entry>Symbolic ID</entry> +<entry>ResourceType</entry> +</row> +</thead> +<tbody> +<row> +<entry>1</entry> +<entry>IDOK</entry> +<entry>Button Control</entry> +</row> +<row> +<entry>2</entry> +<entry>IDCANCEL</entry> +<entry>Button Control</entry> +</row> +<row> +<entry>9</entry> +<entry>IDHELP</entry> +<entry>Button Control</entry> +</row> +<row> +<entry>-1</entry> +<entry>IDC_STATIC</entry> +<entry>Static Control</entry> +</row> +<row> +<entry>IDI_DLG_OODIALOG</entry> +<entry>IDI_DLG_OODIALOG</entry> +<entry>Icon</entry> +</row> +<row> +<entry>IDI_DLG_APPICON</entry> +<entry>IDI_DLG_APPICON</entry> +<entry>Icon</entry> +</row> +<row> +<entry>IDI_DLG_APPICON2</entry> +<entry>IDI_DLG_APPICON2</entry> +<entry>Icon</entry> +</row> +<row> +<entry>IDI_DLG_OOREXX</entry> +<entry>IDI_DLG_OOREXX</entry> +<entry>Icon</entry> +</row> +<row> +<entry>IDI_DLG_DEFAULT</entry> +<entry>IDI_DLG_DEFAULT</entry> +<entry>Icon</entry> +</row> +</tbody> +</tgroup> +</table> +</listitem></varlistentry> +<varlistentry><term id="pounddefine">#define statement</term> +<listitem><para>Define statements are often used in the C and C++ languages to +define symbolic names for numerical values. Because of this, it is common in +Windows programs with dialogs to define symbolic names for resource IDs. Most +Windows resource editors use symbolic IDs, (some to a limited degree, others +exclusively.) Often the define statements are put in a header file so they are +available both to the resource compiler and to the program code. The defines +take the form of: <computeroutput>#define symbolicName numericValue +</computeroutput> as in this example:</para> +<programlisting> +<![CDATA[ + +#define ID_PUSHBUTTON1 413 +#define ID_EDIT1 511 +#define ID_LISTBOX1 602 + +]]> +</programlisting> +<para>When ooDialog parses a resource script or a header file and finds a define +statement, it will add the symbolic ID to the <link linkend="constdir">ConstDir</link> +directory object of the dialog. Resource scripts are used by subclasses of the +<computeroutput>UserDialog</computeroutput> (see the <link linkend="h001613">Load</link> +method.) All the ooDialog dialog classes accept a header file as an optional +parameter when a new instance of a dialog object is created. (See for example +the <computeroutput>Init</computeroutput> method in the <link +linkend="h000025">BaseDialog</link> or <link linkend="h001531">UserDialog</link> +sections.) Symbolic IDs added to the <computeroutput>ConstDir</computeroutput> +can be used in any method of the ooDialog classes where a resource ID is needed. +</para></listitem></varlistentry> +<varlistentry><term id="headerfile">header file</term> +<listitem><para>A common practice when programming applications in Windows that +use dialogs and dialog resources is to place symbolic defines in a separate +file. These files often have a .h extension and are usually called header +files. Windows resource editors often manage a header file for the symbolic IDs +automatically. (For instance Microsoft's dialog editor creates, writes, and +reads the resource ID header file completely on its own. The user does not need +to take any action other than including the file in her program.) +</para></listitem></varlistentry> +<varlistentry><term>handle</term> +<listitem><para>A unique reference to a Windows object assigned by the system. +It can be a reference to a dialog, a particular dialog item, or a graphic +object (pen, brush, font). Handles are required for certain methods; they +can be retrieved from the system when needed. +</para></listitem></varlistentry> +<varlistentry><term id="dialogicon">dialog icon</term> +<listitem> +<para> + The term <emphasis role="italic">dialog icon</emphasis> is used in this documentation to refer to the + icon that is displayed in the left hand corner of the title bar of a dialog. In Windows this is often + called the <emphasis role="italic">application</emphasis> icon. The dialog icon is also used for the + Task Bar display and in the AltTab task switcher application. +</para> +<para> + The dialog icon for a specific dialog can be set when the dialog is run using one of the execute + methods. See the <link linkend="h000048">Execute</link> or <link linkend="popup">Popup</link> methods + for example. ooDialog provides four pre-defined icons for use in dialogs. Custom icons can be used by + including the icon in a binary (compiled) resource, a resource script, or by using the <link + linkend="mthAddIconClsUserDialog">addIcon</link> method of the UserDialog. The following table shows the symbolic IDs + of the pre-defined icons. The symbolic ID should always be used in case the numeric value is changed + in the future. Their numeric IDs should be considered reserved. There is a fifth symbolic ID that + represents the default dialog icon. This ID can always be used where a dialog icon ID is needed. +</para> +<table frame="all"> +<title>ooDialog Supplied Icons</title> +<tgroup cols="2"> +<thead> +<row> +<entry>Description</entry> +<entry>Symbolic ID</entry> +</row> +</thead> +<tbody> +<row> +<entry>The default, the letters OOD</entry> +<entry>IDI_DLG_OODIALOG</entry> +</row> +<row> +<entry>Dialog box image</entry> +<entry>IDI_DLG_APPICON</entry> +</row> +<row> +<entry>Fancier dialog box image</entry> +<entry>IDI_DLG_APPICON2</entry> +</row> +<row> +<entry>The ooRexx image</entry> +<entry>IDI_DLG_OOREXX</entry> +</row> +<row> +<entry>IDI_DLG_DEFAULT</entry> +<entry>IDI_DLG_DEFAULT</entry> +</row> +</tbody> +</tgroup> +</table> +</listitem></varlistentry> +<varlistentry><term>device context</term> +<listitem><para>Stores information about the graphic objects that are displayed, such +as bitmaps, lines, and pixels, and the tools used to display them, such as +pens, brushes, and fonts. A device context can be acquired for a dialog or +a button; it must be explicitly freed when the text or graphic operations +are completed. +</para></listitem></varlistentry> +<varlistentry><term id="comctl32">Common Controls Library (ComCtl32)</term> +<listitem> +<para> The dialog control windows used in dialogs, List-Views, Edit, + Tree-Views, etc., are supplied by Microsoft in the common controls library. + This is a DLL with the name comctl32.dll. Every version of Windows is + supplied with a common controls library. However, Microsoft has updated the + library a number of times to provide enhanced functionality and improved + features +</para> +<para> + Each new version of the library is backwards compatible with previous + versions, but will contain features not available in older versions. For + instance, some of the List-View <link linkend="listControlExtendedStyles"> + extended styles</link> are only available with a 6.0, or later, version of the + common controls library. ooDialog can only provide the features available in + the version of the common controls libray on the system ooDialog is running + on. +</para> +<para> + Therefore, an ooDialog program running on a Windows 2000 machine will not have + available some of the features that are available when ooDialog is running on + a XP service pack two system. The DlgUtil class provides a method, <link + linkend="mthComCtl32Version">comCtl32Version</link> that allows the programmer + to determine the exact version of the common controls library that ooDialog is + using. In the documentation for the ooDialog dialog control classes, features + that are not available in all versions of the common control library are + noted. The minimum version of the library that is needed is listed. In + general, at this time, all features of ooDialog are avaialable on Windows XP + or later. This may change in the future as Vista has common control features + not available on XP. +</para> +</listitem></varlistentry> +<varlistentry><term>pixel</term> +<listitem><para>Individual addressable point within a window. VGA screens support 640 +by 480 pixels, SVGA screens support higher resolutions, such as 800 by 600, +1024 by 768, 1280 by 1024, and 1600 by 1200. Pixel values in a dialog start +at the top left corner and include the window title and border. +</para></listitem></varlistentry> +<varlistentry><term>dialog unit</term> +<listitem><para>Used within dialog box templates to define the size and position of +the dialog box and its controls. There is a horizontal and a vertical dialog +base unit to convert width and height of dialog boxes and controls from dialog +units to pixels and vice versa. The value of these base units depend on the +screen resolution and the active system font; they are stored in attributes +of the UserDialog class. +<programlisting> +<![CDATA[ +xPixels = xDialogUnits * self~FactorX +]]> +</programlisting> +</para></listitem></varlistentry> +<varlistentry><term>color</term> +<listitem><para>Each color supported by the Windows operating system is assigned a +number. Sample color indexes are 0 (black), 1 (dark red), 2 (dark green), +3 (dark yellow), 4 (dark blue), 5 (purple), 6 (blue grey), 7 (light grey), +8 (pale green), 9 (light blue), 10 (white), 11 (grey), 12 (dark grey), 13 +(red), 14 (light green), 15 (yellow), 16 (blue), 17 (pink), 18 (turquoise). +</para></listitem></varlistentry> +<varlistentry><term>color palette</term> +<listitem><para>An array that contains color values identifying the colors that can +currently be displayed or drawn on the output device.</para> +<para>Color palettes are +used by devices that can generate many colors but can only display or draw +a subset of them at a time. For such devices, Windows maintains a system palette to +track and manage the current colors of the device.</para> +<para>Applications do not +have direct access to this system palette. Instead, Windows associates +a default palette with each device context. Applications can use the colors +in the default palette.</para> +<para>The default palette is an array of color values +identifying the colors that can be used with a device context by default. +Windows associates the default palette with a context whenever an application +creates a context for a device that supports color palettes. The default palette +ensures that colors are available for use by an application without any further +action. The default palette typically has 20 entries (colors), but the exact +number of entries can vary from device to device. The colors in the default +palette depend on the device. Display devices, for example, often use the +16 standard colors of the VGA display and 4 other colors defined by Windows. +</para></listitem></varlistentry> +<varlistentry><term id="windowsdoc">Windows documentation</term> +<listitem><para>The term <emphasis role="italic">Windows +documentation</emphasis> is used throughout the ooDialog reference to refer to +the Windows Operating System documentation provided by Microsoft. The +documentation is called the <emphasis role="bold">MSDN Library</emphasis>. The +library is provided online for anyone to access. In addition, since May 2006, +Microsoft has also provided free of charge the ISO images of the library +installation program. Anyone can download the ISOs, burn them to a CD and +install the library locally on their system. +</para> +<para>It is not necessary for the ooDialog programmer to know or understand the +underlying Windows API that ooDialog is built on. However, as programmers write +more sophisticated ooDialog applications, it may prove helpful to look up +certain details in the MSDN Library. The information below is provided to help +the ooDialog programmer locate the MSDN Library, if they would like to. All +things on the Internet change. The URLs listed here are accurate at the time of +this writing. +</para> +<para>The online MSDN Library is currently located at:</para> +<para>http://msdn2.microsoft.com/en-us/library/default.aspx.</para> +<para>Directions to the downloadable ISO images of the MSDN Library have been +posted on this blog entry:</para> +<para>http://blogs.msdn.com/robcaron/archive/2006/07/26/678897.aspx</para> +<para>A Google search using: <computeroutput>"Rob Caron" General Downloads MSDN +Library</computeroutput> should also turn up the blog entry. +</para></listitem></varlistentry> +<varlistentry><term id="platformsdk">Windows platform SDK</term> +<listitem><para>The <emphasis role="italic">Windows Platform SDK</emphasis> is +provided free of charge by Microsoft. The SDK is not needed to write ooDialog +programs. However, combining the use of the documentation in the MSDN Library +with the SDK allows very sophisticated ooDialog programs to be written. In +general, the ooDialog framework takes care of the low-level details needed to +work with the Windows API. However, there are a few generic ooDialog methods +that provide direct access to the Windows API. +</para> +<para>As an example, the <link linkend="h000141">AddUserMessage</link> method +allows the programmer to connect any Windows message sent to a dialog to a +method in his ooDialog class. To use this method, the programmer would go to +the MSDN library to look up details on the message and message parameters he is +interested in. He would then use the Platform SDK to determine the numeric +value of the Windows message and possibly the numeric values of its parameters. +</para> +<para>This link provides some good information on the Platform SDK in general +and also points the reader to where to get a SDK. +</para> +<para>http://en.wikipedia.org/wiki/Platform_SDK</para> +<para>Again, note that it is not at all necessary to obtain, or understand +details concerning, the Platform SDK. This information is provided for those +programmers that have reached the point where they think a method like +<computeroutput>AddUserMessage</computeroutput> might help them and need some +direction as to how to go about using it. +</para></listitem></varlistentry> +</variablelist> +</section> + +</chapter> Property changes on: docs/trunk/oodialog/overview.sgml ___________________________________________________________________ Added: svn:mergeinfo + Added: svn:eol-style + native Modified: docs/trunk/oodialog/preface.sgml =================================================================== --- docs/trunk/oodialog/preface.sgml 2009-01-04 20:45:53 UTC (rev 3865) +++ docs/trunk/oodialog/preface.sgml 2009-01-04 21:47:15 UTC (rev 3866) @@ -42,23 +42,40 @@ ######################################################################### --> <chapter id="preface"><title>About This Book</title> -<para>This book describes the OODialog class library in -Open Object Rexx on the <trademark class="registered">Windows</trademark> platform, -and how to use it to program user interfaces.</para> +<para> + This book describes the OODialog framework, which is implemented as an external library package, and + part of the Open Object Rexx distribution on the <trademark class="registered">Windows</trademark> + platform. It describes the classes in the framework and how to use the framework to program user + interfaces. +</para> <section id="whoshoulduse"><title>Who Should Use This Book</title> -<para>This book is intended for Object Rexx programmers who want to design graphical -user interfaces for their applications.</para> +<para> + This book is intended for Object Rexx programmers who want to design graphical user interfaces for + their applications. +</para> </section> <section id="bookstructure"><title>How This Book is Structured</title> -<para>This document used to be divided into two parts - a tutorial and a reference. -Unfortunately, the IBM Resource Workshop has not been contributed to the -open source community and is therefore not a part of the Open Object Rexx -project. So the tutorial section which covered the Resource Workshop has -been eliminated from this document.</para> -<para>However, the reference material which describes the classes and methods -in detail has been retained.</para> +<para> + This document should be divided into two parts - a tutorial and a reference. In the original + documentation accompanying IBM's Object Rexx, the documentation was in two parts. Unfortunately, the + tutorial portion mostly described how to use the IBM Resource Workshop. The Resource Workshop has not + been contributed to the open source community and is therefore not a part of the Open Object Rexx + project. Because the tutorial section was primarily directed towards using the Resource Workshop, it + does not make much sense in the current context. +</para> +<para> + This book is primarily a reference that describes the classes and methods in detail. There is no + tutorial. The tutorial portion needs to be written (or re-written depending on your point of view.) +</para> +<note><title><emphasis role="bold">Note</emphasis></title><para> + There is no loss of functionality in ooDialog because of the absence of the Resource Workshop. The + Windows resource format is well understood and there are any number of free or inexpensive resource + editors that do a better job of designing dialogs than the Resource Workshop did. (The Resource + Workshop was a 16-bit application with limited capacity for the newer features in the Windows user + interface.) ooDialog works fine with dialogs designed by any modern resource editor. +</para></note> </section> <section id="relinf"><title>Related Information</title> Deleted: docs/trunk/oodialog/reference.sgml =================================================================== --- docs/trunk/oodialog/reference.sgml 2009-01-04 20:45:53 UTC (rev 3865) +++ docs/trunk/oodialog/reference.sgml 2009-01-04 21:47:15 UTC (rev 3866) @@ -1,189 +0,0 @@ -<!--######################################################################### - # - # Description: Open Object Rexx: OODialog Reference SGML file. - # - # Copyright (c) 2005-2007, Rexx Language Association. All rights reserved. - # Portions Copyright (c) 2004, IBM Corporation. All rights reserved. - # - # This program and the accompanying materials are made available under - # the terms of the Common Public License v1.0 which accompanies this - # distribution. A copy is also available at the following address: - # http://www.oorexx.org/license.html - # - # Redistribution and use in source and binary forms, with or - # without modification, are permitted provided that the following - # conditions are met: - # - # Redistributions of source code must retain the above copyright - # notice, this list of conditions and the following disclaimer. - # Redistributions in binary form must reproduce the above copyright - # notice, this list of conditions and the following disclaimer in - # the documentation and/or other materials provided with the distribution. - # - # Neither the name of Rexx Language Association nor the names - # of its contributors may be used to endorse or promote products - # derived from this software without specific prior written permission. - # - # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # - # Author(s): - # W. David Ashley <da...@us...> - # - ######################################################################### ---> -<chapter id="reference"><title>OODialog Method Reference</title> -<para>The classes provided by OODialog form a hierarchy as shown in -<link linkend="fig52">The Hierarchy of OODialog Classes</link>.</para> - -<figure id="fig52"><title>The Hierarchy of OODialog Classes</title> -<mediaobject> -<imageobject> -<!-- Note! - if we include a /imagedata tag we get an error for DSSSL! --> -<imagedata fileref="rxou0s12.jpg" scale="40"> -</imageobject> -</mediaobject> -<mediaobject> -<imageobject> -<!-- Note! - if we include a /imagedata tag we get an error for DSSSL! --> -<imagedata fileref="rxou0s24.jpg" scale="40"> -</imageobject> -</mediaobject> -</figure> - -<para>The classes are: </para> -<variablelist> -<varlistentry><term>PlainBaseDialog, BaseDialog</term> -<listitem><para>Base methods regardless of whether the dialog is implemented as a binary -resource, a script, or dynamically. PlainBaseDialog provides limited functionality. -</para></listitem></varlistentry> -<varlistentry><term>PlainUserDialog</term> -<listitem><para>Subclass of PlainBaseDialog used to create a dialog with all its control -elements or to execute a dialog stored in a resource script (.RC). This class -has limited functionality. -</para></listitem></varlistentry> -<varlistentry><term>DynamicDialog, DialogExtensions, WindowBase, WindowExtensions</term> -<listitem><para>Internal mixin classes used to extend PlainBaseDialog, PlainUserDialog, -BaseDialog, UserDialog, and DialogControl. The methods provided by these classes -are not listed separately but are listed in BaseDialog or UserDialog. -</para></listitem></varlistentry> -<varlistentry><term>UserDialog</term> -<listitem><para>Subclass of BaseDialog used to create a dialog with all its control -elements, such as push buttons, check boxes, radio buttons, entry lines, and -list boxes. -</para></listitem></varlistentry> -<varlistentry><term>ResDialog</term> -<listitem><para>Subclass of BaseDialog for dialogs within a binary (compiled) resource -file (.DLL). -</para></listitem></varlistentry> -<varlistentry><term>CategoryDialog</term> -<listitem><para>Subclass of UserDialog used to create a dialog with several pages that -overlay each other. -</para></listitem></varlistentry> -<varlistentry><term>TimedMessage</term> -<listitem><para>Class to show a message window for a defined duration. -</para></listitem></varlistentry> -<varlistentry><term>InputBox</term> -<listitem><para>Class to dynamically define a dialog with a message, one entry line, -and two push buttons (OK, Cancel). -</para></listitem></varlistentry> -<varlistentry><term>PasswordBox</term> -<listitem><para>Similar to InputBox, but keystrokes in the entry line are shown as asterisks -(*). -</para></listitem></varlistentry> -<varlistentry><term>IntegerBox</term> -<listitem><para>Similar to InputBox, but only numeric data can be entered in the entry -line. -</para></listitem></varlistentry> -<varlistentry><term>MultiInputBox</term> -<listitem><para>Similar to InputBox, but with multiple entry lines. -</para></listitem></varlistentry> -<varlistentry><term>ListChoice</term> -<listitem><para>Class to dynamically define a dialog with a list box, where one line -can be selected and returned to the caller. -</para></listitem></varlistentry> -<varlistentry><term>MultiListChoice</term> -<listitem><para>Similar to ListChoice, but more than one line can be selected and returned -to the caller. -</para></listitem></varlistentry> -<varlistentry><term>CheckList</term> -<listitem><para>Class to dynamically define a dialog with a group of check boxes, which -can be selected and returned to the caller. -</para></listitem></varlistentry> -<varlistentry><term>SingleSelection</term> -<listitem><para>Class to dynamically define a dialog with a group of radio buttons, -where one can be selected and returned. -</para></listitem></varlistentry> -<varlistentry><term>Dialog</term> -<listitem><para>Subclass of UserDialog for simple dialogs. You can change the default -dialog style from UserDialog to ResDialog. -</para></listitem></varlistentry> -<varlistentry><term>AnimatedButton</term> -<listitem><para>Class to implement an animated button within a dialog. -</para></listitem></varlistentry> -<varlistentry><term>DialogControl</term> -<listitem><para>Class to implement methods that are common to all dialogs and dialog -controls. -</para></listitem></varlistentry> -<varlistentry><term>TreeControl</term> -<listitem><para>Class to implement a tree to display the list of items in a dialog in -a hierarchy. -</para></listitem></varlistentry> -<varlistentry><term>ListControl</term> -<listitem><para>Class to implement a list view to display the items in a dialog as a -collection. -</para></listitem></varlistentry> -<varlistentry><term>ProgressBar</term> -<listitem><para>Class to implement a progress indicator within a dialog. -</para></listitem></varlistentry> -<varlistentry><term>SliderControl</term> -<listitem><para>Class to implement a slider or trackbar within a dialog. -</para></listitem></varlistentry> -<varlistentry><term>TabControl</term> -<listitem><para>Class to implement tabs, which can be compared to dividers in a notebook -or labels in a file cabinet. -</para></listitem></varlistentry> -<varlistentry><term>StaticControl</term> -<listitem><para>Class to query and modify static controls, such as static text, group -boxes, and frames. -</para></listitem></varlistentry> -<varlistentry><term>EditControl</term> -<listitem><para>Class to query and modify edit controls, which are also called entry -lines. -</para></listitem></varlistentry> -<varlistentry><term>ButtonControl</term> -<listitem><para>Class to implement push buttons within a dialog. -</para></listitem></varlistentry> -<varlistentry><term>RadioButtonControl</term> -<listitem><para>Class to implement radio buttons within a dialog. -</para></listitem></varlistentry> -<varlistentry><term>CheckBoxControl</term> -<listitem><para>Class to implement check boxes within a dialog. -</para></listitem></varlistentry> -<varlistentry><term>ListBoxControl</term> -<listitem><para>Class to implement list boxes within a dialog. -</para></listitem></varlistentry> -<varlistentry><term>ComboBoxControl</term> -<listitem><para>Class to implement a combo box, which combines a list box with an edit -control. -</para></listitem></varlistentry> -<varlistentry><term>ScrollBarControl</term> -<listitem><para>Class to implement a scroll bar within a dialog. -</para></listitem></varlistentry> -<varlistentry><term>PropertySheetControl</term> -<listitem><para>Class to implement a property sheet, which is similar to a category -dialog that spreads its dialog items over several pages (categories), where -the individual pages are controlled by a tab control instead of radio buttons -or combo box lists. -</para></listitem></varlistentry> -</variablelist> -</chapter> Deleted: docs/trunk/oodialog/termdef.sgml =================================================================== --- docs/trunk/oodialog/termdef.sgml 2009-01-04 20:45:53 UTC (rev 3865) +++ docs/trunk/oodialog/termdef.sgml 2009-01-04 21:47:15 UTC (rev 3866) @@ -1,378 +0,0 @@ -<!--######################################################################### - # - # Description: Open Object Rexx: OODialog Reference SGML file. - # - # Copyright (c) 2005-2007, Rexx Language Association. All rights reserved. - # Portions Copyright (c) 2004, IBM Corporation. All rights reserved. - # - # This program and the accompanying materials are made available under - # the terms of the Common Public License v1.0 which accompanies this - # distribution. A copy is also available at the following address: - # http://www.oorexx.org/license.html - # - # Redistribution and use in source and binary forms, with or - # without modification, are permitted provided that the following - # conditions are met: - # - # Redistributions of source code must retain the above copyright - # notice, this list of conditions and the following disclaimer. - # Redistributions in binary form must reproduce the above copyright - # notice, this list of conditions and the following disclaimer in - # the documentation and/or other materials provided with the distribution. - # - # Neither the name of Rexx Language Association nor the names - # of its contributors may be used to endorse or promote products - # derived from this software without specific prior written permission. - # - # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # - # Author(s): - # W. David Ashley <da...@us...> - # - ######################################################################### ---> -<chapter id="termdef"><title>Definition of Terms</title> -<variablelist> -<varlistentry><term id="resourceid">resource id</term> -<listitem><para>The identification number of a dialog resource. There are -several different types of dialog resources, menus, dialog controls, and bitmaps, -to name a few. You assign IDs when you create the resource definition for -your dialog. An ID can be either numerical (for example, 1) or symbolic (for -example, "IDOK"). -</para> -<para>IDs must be unique for each resource of the same type. Although two -resources of different types may have the same ID, when using symbolic IDs with -ooDialog, it is advisable to give all resources unique numerical IDs. -</para></listitem></varlistentry> -<varlistentry><term id="symbolicid">symbolic id</term> -<listitem><para>Defining a symbolic name for each numeric resource ID is often -useful in programs that work with resource IDs. The symbolic name is then used -where ever a numeric resource ID is needed. Symbolic names are easier to -remember than numeric IDs and can make the code easier to understand. -</para> -<para> - The mechanism ooDialog provides for using symbolic IDs is the <link linkend="constdir">ConstDir</link> - attribute of the dialog classes. This is a directory object where the indexes are symbolic IDs and the - item at each index is the numerical value of the ID. -</para> -<para> - Some generic <link linkend="chapResources">resources</link> are bound to the oodialog.dll. They can be - used in any ooDialog program and are accessed using the <link - linkend="clsResourceImage">.ResourceImage</link> class. Programmers should always use their symbolic - ID rather than their numeric ID in case the numeric value changes in future versions. To allow for - future expansion, the ooDialog programmer should consider the resource IDs of 1 through 50 as reserved - for ooDialog. Programmers can avoid conflicts by using IDs greater than 50 for resource IDs they assign - in their programs. -</para> -<para> - The symbolic IDs in the following table are pre-defined by ooDialog and placed in the - <computeroutput>ConstDir</computeroutput> when an instance of a dialog class is created. All symbolic - names after IDC_STATIC in the table refer to resources bound to oodialog.dll for general use by the - ooDialog programmer. -</para> -<table id="oodsymbolicids" frame="all"> -<title>Symbolic IDs Used by ooDialog</title> -<tgroup cols="3"> -<thead> -<row> -<entry>Numeric ID or Symbol</entry> -<entry>Symbolic ID</entry> -<entry>ResourceType</entry> -</row> -</thead> -<tbody> -<row> -<entry>1</entry> -<entry>IDOK</entry> -<entry>Button Control</entry> -</row> -<row> -<entry>2</entry> -<entry>IDCANCEL</entry> -<entry>Button Control</entry> -</row> -<row> -<entry>9</entry> -<entry>IDHELP</entry> -<entry>Button Control</entry> -</row> -<row> -<entry>-1</entry> -<entry>IDC_STATIC</entry> -<entry>Static Control</entry> -</row> -<row> -<entry>IDI_DLG_OODIALOG</entry> -<entry>IDI_DLG_OODIALOG</entry> -<entry>Icon</entry> -</row> -<row> -<entry>IDI_DLG_APPICON</entry> -<entry>IDI_DLG_APPICON</entry> -<entry>Icon</entry> -</row> -<row> -<entry>IDI_DLG_APPICON2</entry> -<entry>IDI_DLG_APPICON2</entry> -<entry>Icon</entry> -</row> -<row> -<entry>IDI_DLG_OOREXX</entry> -<entry>IDI_DLG_OOREXX</entry> -<entry>Icon</entry> -</row> -<row> -<entry>IDI_DLG_DEFAULT</entry> -<entry>IDI_DLG_DEFAULT</entry> -<entry>Icon</entry> -</row> -</tbody> -</tgroup> -</table> -</listitem></varlistentry> -<varlistentry><term id="pounddefine">#define statement</term> -<listitem><para>Define statements are often used in the C and C++ languages to -define symbolic names for numerical values. Because of this, it is common in -Windows programs with dialogs to define symbolic names for resource IDs. Most -Windows resource editors use symbolic IDs, (some to a limited degree, others -exclusively.) Often the define statements are put in a header file so they are -available both to the resource compiler and to the program code. The defines -take the form of: <computeroutput>#define symbolicName numericValue -</computeroutput> as in this example:</para> -<programlisting> -<![CDATA[ - -#define ID_PUSHBUTTON1 413 -#define ID_EDIT1 511 -#define ID_LISTBOX1 602 - -]]> -</programlisting> -<para>When ooDialog parses a resource script or a header file and finds a define -statement, it will add the symbolic ID to the <link linkend="constdir">ConstDir</link> -directory object of the dialog. Resource scripts are used by subclasses of the -<computeroutput>UserDialog</computeroutput> (see the <link linkend="h001613">Load</link> -method.) All the ooDialog dialog classes accept a header file as an optional -parameter when a new instance of a dialog object is created. (See for example -the <computeroutput>Init</computeroutput> method in the <link -linkend="h000025">BaseDialog</link> or <link linkend="h001531">UserDialog</link> -sections.) Symbolic IDs added to the <computeroutput>ConstDir</computeroutput> -can be used in any method of the ooDialog classes where a resource ID is needed. -</para></listitem></varlistentry> -<varlistentry><term id="headerfile">header file</term> -<listitem><para>A common practice when programming applications in Windows that -use dialogs and dialog resources is to place symbolic defines in a separate -file. These files often have a .h extension and are usually called header -files. Windows resource editors often manage a header file for the symbolic IDs -automatically. (For instance Microsoft's dialog editor creates, writes, and -reads the resource ID header file completely on its own. The user does not need -to take any action other than including the file in her program.) -</para></listitem></varlistentry> -<varlistentry><term>handle</term> -<listitem><para>A unique reference to a Windows object assigned by the system. -It can be a reference to a dialog, a particular dialog item, or a graphic -object (pen, brush, font). Handles are required for certain methods; they -can be retrieved from the system when needed. -</para></listitem></varlistentry> -<varlistentry><term id="dialogicon">dialog icon</term> -<listitem> -<para> - The term <emphasis role="italic">dialog icon</emphasis> is used in this documentation to refer to the - icon that is displayed in the left hand corner of the title bar of a dialog. In Windows this is often - called the <emphasis role="italic">application</emphasis> icon. The dialog icon is also used for the - Task Bar display and in the AltTab task switcher application. -</para> -<para> - The dialog icon for a specific dialog can be set when the dialog is run using one of the execute - methods. See the <link linkend="h000048">Execute</link> or <link linkend="popup">Popup</link> methods - for example. ooDialog provides four pre-defined icons for use in dialogs. Custom icons can be used by - including the icon in a binary (compiled) resource, a resource script, or by using the <link - linkend="mthAddIconClsUserDialog">addIcon</link> method of the UserDialog. The following table shows the symbolic IDs - of the pre-defined icons. The symbolic ID should always be used in case the numeric value is changed - in the future. Their numeric IDs should be considered reserved. There is a fifth symbolic ID that - represents the default dialog icon. This ID can always be used where a dialog icon ID is needed. -</para> -<table frame="all"> -<title>ooDialog Supplied Icons</title> -<tgroup cols="2"> -<thead> -<row> -<entry>Description</entry> -<entry>Symbolic ID</entry> -</row> -</thead> -<tbody> -<row> -<entry>The default, the letters OOD</entry> -<entry>IDI_DLG_OODIALOG</entry> -</row> -<row> -<entry>Dialog box image</entry> -<entry>IDI_DLG_APPICON</entry> -</row> -<row> -<entry>Fancier dialog box image</entry> -<entry>IDI_DLG_APPICON2</entry> -</row> -<row> -<entry>The ooRexx image</entry> -<entry>IDI_DLG_OOREXX</entry> -</row> -<row> -<entry>IDI_DLG_DEFAULT</entry> -<entry>IDI_DLG_DEFAULT</entry> -</row> -</tbody> -</tgroup> -</table> -</listitem></varlistentry> -<varlistentry><term>device context</term> -<listitem><para>Stores information about the graphic objects that are displayed, such -as bitmaps, lines, and pixels, and the tools used to display them, such as -pens, brushes, and fonts. A device context can be acquired for a dialog or -a button; it must be explicitly freed when the text or graphic operations -are completed. -</para></listitem></varlistentry> -<varlistentry><term id="comctl32">Common Controls Library (ComCtl32)</term> -<listitem> -<para> The dialog control windows used in dialogs, List-Views, Edit, - Tree-Views, etc., are supplied by Microsoft in the common controls library. - This is a DLL with the name comctl32.dll. Every version of Windows is - supplied with a common controls library. However, Microsoft has updated the - library a number of times to provide enhanced functionality and improved - features -</para> -<para> - Each new version of the library is backwards compatible with previous - versions, but will contain features not available in older versions. For - instance, some of the List-View <link linkend="listControlExtendedStyles"> - extended styles</link> are only available with a 6.0, or later, version of the - common controls library. ooDialog can only provide the features available in - the version of the common controls libray on the system ooDialog is running - on. -</para> -<para> - Therefore, an ooDialog program running on a Windows 2000 machine will not have - available some of the features that are available when ooDialog is running on - a XP service pack two system. The DlgUtil class provides a method, <link - linkend="mthComCtl32Version">comCtl32Version</link> that allows the programmer - to determine the exact version of the common controls library that ooDialog is - using. In the documentation for the ooDialog dialog control classes, features - that are not available in all versions of the common control library are - noted. The minimum version of the library that is needed is listed. In - general, at this time, all features of ooDialog are avaialable on Windows XP - or later. This may change in the future as Vista has common control features - not available on XP. -</para> -</listitem></varlistentry> -<varlistentry><term>pixel</term> -<listitem><para>Individual addressable point within a window. VGA screens support 640 -by 480 pixels, SVGA screens support higher resolutions, such as 800 by 600, -1024 by 768, 1280 by 1024, and 1600 by 1200. Pixel values in a dialog start -at the top left corner and include the window title and border. -</para></listitem></varlistentry> -<varlistentry><term>dialog unit</term> -<listitem><para>Used within dialog box templates to define the size and position of -the dialog box and its controls. There is a horizontal and a vertical dialog -base unit to convert width and height of dialog boxes and controls from dialog -units to pixels and vice versa. The value of these base units depend on the -screen resolution and the active system font; they are stored in attributes -of the UserDialog class. -<programlisting> -<![CDATA[ -xPixels = xDialogUnits * self~FactorX -]]> -</programlisting> -</para></listitem></varlistentry> -<varlistentry><term>color</term> -<listitem><para>Each color supported by the Windows operating system is assigned a -number. Sample color indexes are 0 (black), 1 (dark red), 2 (dark green), -3 (dark yellow), 4 (dark blue), 5 (purple), 6 (blue grey), 7 (light grey), -8 (pale green), 9 (light blue), 10 (white), 11 (grey), 12 (dark grey), 13 -(red), 14 (light green), 15 (yellow), 16 (blue), 17 (pink), 18 (turquoise). -</para></listitem></varlistentry> -<varlistentry><term>color palette</term> -<listitem><para>An array that contains color values identifying the colors that can -currently be displayed or drawn on the output device.</para> -<para>Color palettes are -used by devices that can generate many colors but can only display or draw -a subset of them at a time. For such devices, Windows maintains a system palette to -track and manage the current colors of the device.</para> -<para>Applications do not -have direct access to this system palette. Instead, Windows associates -a default palette with each device context. Applications can use the colors -in the default palette.</para> -<para>The default palette is an array of color values -identifying the colors that can be used with a device context by default. -Windows associates the default palette with a context whenever an application -creates a context for a device that supports color palettes. The default palette -ensures that colors are available for use by an application without any further -action. The default palette typically has 20 entries (colors), but the exact -number of entries can vary from device to device. The colors in the default -palette depend on the device. Display devices, for example, often use the -16 standard colors of the VGA display and 4 other colors defined by Windows. -</para></listitem></varlistentry> -<varlistentry><term id="windowsdoc">Windows documentation</term> -<listitem><para>The term <emphasis role="italic">Windows -documentation</emphasis> is used throughout the ooDialog reference to refer to -the Windows Operating System documentation provided by Microsoft. The -documentation is called the <emphasis role="bold">MSDN Library</emphasis>. The -library is provided online for anyone to access. In addition, since May 2006, -Microsoft has also provided free of charge the ISO images of the library -installation program. Anyone can download the ISOs, burn them to a CD and -install the library locally on their system. -</para> -<para>It is not necessary for the ooDialog programmer to know or understand the -underlying Windows API that ooDialog is built on. However, as programmers write -more sophisticated ooDialog applications, it may prove helpful to look up -certain details in the MSDN Library. The information below is provided to help -the ooDialog programmer locate the MSDN Library, if they would like to. All -things on the Internet change. The URLs listed here are accurate at the time of -this writing. -</para> -<para>The online MSDN Library is currently located at:</para> -<para>http://msdn2.microsoft.com/en-us/library/default.aspx.</para> -<para>Directions to the downloadable ISO images of the MSDN Library have been -posted on this blog entry:</para> -<para>http://blogs.msdn.com/robcaron/archive/2006/07/26/678897.aspx</para> -<para>A Google search using: <computeroutput>"Rob Caron" General Downloads MSDN -Library</computeroutput> should also turn up the blog entry. -</para></listitem></varlistentry> -<varlistentry><term id="platformsdk">Windows platform SDK</term> -<listitem><para>The <emphasis role="italic">Windows Platform SDK</emphasis> is -provided free of charge by Microsoft. The SDK is not needed to write ooDialog -programs. However, combining the use of the documentation in the MSDN Library -with the SDK allows very sophisticated ooDialog programs to be written. In -general, the ooDialog framework takes care of the low-level details needed to -work with the Windows API. However, there are a few generic ooDialog methods -that provide direct access to the Windows API. -</para> -<para>As an example, the <link linkend="h000141">AddUserMessage</link> method -allows the programmer to connect any Windows message sent to a dialog to a -method in his ooDialog class. To use this method, the programmer would go to -the MSDN library to look up details on the message and message parameters... [truncated message content] |
From: <mie...@us...> - 2009-01-04 23:08:30
|
Revision: 3867 http://oorexx.svn.sourceforge.net/oorexx/?rev=3867&view=rev Author: miesfeld Date: 2009-01-04 23:08:22 +0000 (Sun, 04 Jan 2009) Log Message: ----------- Incremental update of ooDialog doc Modified Paths: -------------- docs/trunk/oodialog/basedialog.sgml docs/trunk/oodialog/dialogcontrolc.sgml docs/trunk/oodialog/plainuserdialogc.sgml docs/trunk/oodialog/windowBaseCommon.sgml Modified: docs/trunk/oodialog/basedialog.sgml =================================================================== --- docs/trunk/oodialog/basedialog.sgml 2009-01-04 21:47:15 UTC (rev 3866) +++ docs/trunk/oodialog/basedialog.sgml 2009-01-04 23:08:22 UTC (rev 3867) @@ -691,7 +691,7 @@ </row> <row> <entry>GetPos</entry> -<entry><link linkend="h001357">GetPos</link></entry> +<entry><link linkend="mthGetPos">GetPos</link></entry> </row> <row> <entry>GetRadioButton</entry> @@ -6267,27 +6267,47 @@ </variablelist> </section> -<section id="h001357"><title>GetPos</title> + +<section id="mthGetPos"><title>getPos</title> <indexterm><primary>GetPos</primary> +<secondary>DialogControl class</secondary></indexterm> +<indexterm><primary>GetPos</primary> <secondary>BaseDialog class</secondary></indexterm> <programlisting> <![CDATA[ ->>-aBaseDialog~GetPos----------------------------------------->< +>>--getPos----------------------------------------------------->< - ]]> </programlisting> -<para>The GetPos method returns the dialog window's position -in pixels. The values are returned in a string separated by blanks for parsing. </para> +<para> + The getPos method returns the coordinates of the upper left corner a window, either a dialog or a + dialog control, in dialog units. +</para> <variablelist> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem><para>The horizontal and vertical position, separated by a blank. +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example dialog control:</emphasis></term> +<listitem><para>The following example repositions the tree view control FILES to the +upper left corner of the window and displays the new position: +<programlisting> +<![CDATA[ +obj = MyDialog~GetTreeControl("FILES") +if obj = .Nil then return +obj~Move(1,1) +parse value obj~getPos with x y +say "New horizontal position of window is" x "and new vertical position is" y +]]> +</programlisting> +</para></listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example dialog:</emphasis></term> <listitem><para>The following example moves the window towards the top left of the screen. <programlisting> <![CDATA[ -parse value self~GetPos with px py -self~Move( px%self~FactorX - 10, py%self~FactorY - 10) +parse value self~getPos with px py +self~Move(px - 10, py - 10) ]]> </programlisting> </para></listitem></varlistentry> Modified: docs/trunk/oodialog/dialogcontrolc.sgml =================================================================== --- docs/trunk/oodialog/dialogcontrolc.sgml 2009-01-04 21:47:15 UTC (rev 3866) +++ docs/trunk/oodialog/dialogcontrolc.sgml 2009-01-04 23:08:22 UTC (rev 3867) @@ -294,7 +294,7 @@ </row> <row> <entry>GetPos</entry> -<entry><link linkend="getpos">GetPos</link></entry> +<entry><link linkend="mthGetPos">GetPos</link></entry> </row> <row> <entry>GetRect</entry> @@ -1326,29 +1326,6 @@ </variablelist> </section> -<section id="getpos"><title>GetPos</title> -<indexterm><primary>GetPos</primary> -<secondary>DialogControl class</secondary></indexterm> -<programlisting> -<![CDATA[ ->>-aDialogControl~GetPos--------------------------------------->< - - -]]> -</programlisting> - -<para>The GetPos method returns the coordinates of the -upper left corner of the dialog or dialog control, in dialog units.</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The horizontal and vertical position, separated by a blank. -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para>For an example, see <link linkend="move">Move</link>. -</para></listitem></varlistentry> -</variablelist> -</section> - <section id="getsize"><title>GetSize</title> <indexterm><primary>GetSize</primary></indexterm> <programlisting> Modified: docs/trunk/oodialog/plainuserdialogc.sgml =================================================================== --- docs/trunk/oodialog/plainuserdialogc.sgml 2009-01-04 21:47:15 UTC (rev 3866) +++ docs/trunk/oodialog/plainuserdialogc.sgml 2009-01-04 23:08:22 UTC (rev 3867) @@ -545,7 +545,7 @@ </row> <row> <entry>GetPos</entry> -<entry><link linkend="getpos">GetPos</link></entry> +<entry><link linkend="mthGetPos">GetPos</link></entry> </row> <row> <entry>GetRadioButton</entry> @@ -773,9 +773,14 @@ <indexterm><primary>WindowBase Class</primary></indexterm> <para> WindowBase is a mixin class with methods that are common to all windows. It is inherited by both - dialog and dialog control classes. The class methods are listed here with links to the full - documentation for each method. + dialog and dialog control classes. </para> +<para> + The WindowBase instance methods are listed here as a cross reference. This allows the programmer to + know exactly which methods are implemented by this class. The methods are fully documented in other + sections of this book. Each method listed has a link to the full documentation for that method and an + accurate syntax diagram. +</para> &windowBaseCommon; @@ -786,9 +791,14 @@ <para> WindowExtensions is a mixin class with methods that are common to all windows. As the class name implies, it is an extension of the WindowBase class, providing more sophisticated window methods. - It is inherited by both dialog and dialog control classes. The class methods are listed here with - links to the full documentation for each method. + It is inherited by both dialog and dialog control classes. </para> +<para> + The WindowExtensions instance methods are listed here as a cross reference. This allows the programmer + to know exactly which methods are implemented by this class. The methods are fully documented in other + sections of this book. Each method listed has a link to the full documentation for that method and an + accurate syntax diagram. +</para> &windowExtensionsCommon; Modified: docs/trunk/oodialog/windowBaseCommon.sgml =================================================================== --- docs/trunk/oodialog/windowBaseCommon.sgml 2009-01-04 21:47:15 UTC (rev 3866) +++ docs/trunk/oodialog/windowBaseCommon.sgml 2009-01-04 23:08:22 UTC (rev 3867) @@ -69,6 +69,24 @@ <para><link linkend="hide">WindowBase::hide</link></para> </section> +<section><title>getID</title> +<programlisting> +<![CDATA[ +>>--getID------------------------------------------------------>< +]]> +</programlisting> +<para><link linkend="getId">WindowBase::getID</link></para> +</section> + +<section><title>getPos</title> +<programlisting> +<![CDATA[ +>>--getPos----------------------------------------------------->< +]]> +</programlisting> +<para><link linkend="mthGetPos">WindowBase::getPos</link></para> +</section> + <section><title>show</title> <programlisting> <![CDATA[ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2009-01-05 04:17:19
|
Revision: 3870 http://oorexx.svn.sourceforge.net/oorexx/?rev=3870&view=rev Author: miesfeld Date: 2009-01-05 04:17:10 +0000 (Mon, 05 Jan 2009) Log Message: ----------- Incremental update to ooDialog doc Modified Paths: -------------- docs/trunk/oodialog/basedialog.sgml docs/trunk/oodialog/resources.sgml docs/trunk/oodialog/standarddialog.sgml docs/trunk/oodialog/utilityclasses.sgml docs/trunk/oodialog/windowBaseCommon.sgml Modified: docs/trunk/oodialog/basedialog.sgml =================================================================== --- docs/trunk/oodialog/basedialog.sgml 2009-01-04 23:57:54 UTC (rev 3869) +++ docs/trunk/oodialog/basedialog.sgml 2009-01-05 04:17:10 UTC (rev 3870) @@ -718,10 +718,6 @@ <entry><link linkend="getsize">GetSize</link></entry> </row> <row> -<entry>GetSystemMetrics</entry> -<entry><link linkend="mthGetSystemMetrics">GetSystemMetrics</link></entry> -</row> -<row> <entry>GetTextSize</entry> <entry><link linkend="gettextsize">GetTextSize</link></entry> </row> @@ -6370,91 +6366,14 @@ </variablelist> </section> -<section id="mthGetSystemMetrics"><title>GetSystemMetrics</title> -<indexterm><primary>GetSystemMetrics</primary></indexterm> -<programlisting> -<![CDATA[ ->>-aBaseDialog~GetSystemMetrics(--index--)-------------------->< - - -]]> -</programlisting> - -<para>Obtains the system metric value for the given index. -</para> -<variablelist> -<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> -<listitem><para>The only argument is: -<variablelist> -<varlistentry><term>index</term> -<listitem><para>The numeric index of the system metric. -</para> -<para>Good documentation on the system metrics is found in the MSDN Library -under the GetSystemMetrics function. This documentation contains both the -numeric value of the different indexes and information on what is returned for -each index. The documentation is easy to found using a Google search of -"GetSystemMetrics MSDN Library" -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The return value is dependent on the index queried. Consult the -MSDN library for information on the returned values. +<section><title>getSystemMetrics (deprecated)</title> <note><title>Note</title><para> -The OS will return 0 if an invalid index is used. Hoever, the return value for -some indexes is also 0. The programmer will need to determine from the context -if 0 is an error return or not. In addition, ooDialog will return -1 for some -invalid argument values. For instance, if the string "dog" was passed -in for the <computeroutput>index</computeroutput> argument, -1 would be -returned. + This method is deprecated. It is replaced by the functionally equivalent <link + linkend="mthGetSystemMetricsClsDlgUtil">getSystemMetrics()</link> method of the .DlgUtil class. Do not + use this method in new code. Try to migrate existing code to to the + <computeroutput>.DlgUtil~getSystemMetrics()</computeroutput> method. This method may not exist in + future versions of ooDialog. </para></note> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example:</emphasis></term> -<listitem><para> The following code snippet is from an application where the -user can have 5, 6, or more, independent dialogs open at one time. One of the -menu options is "Tile Dialogs." When the user selects this option all -the open dialogs are "tiled." -</para> -<para>All the open dialog objects are stored in a queue. In the -<computeroutput>onTile</computeroutput> method, which is invoked when the user -selects the menu item, each dialog is fetched in turn from the queue. Then the -dialog is repositioned at an offset from the preceding dialog. It is shifted to -the right the width of 2 scroll bars and shifted down the the width of the title -bar. (This width is the title bar width plus the thin border around the title -bar.) The height of the thin border, the height of the title bar, and the width -of a scroll bar are all determined by querying the system metrics. -<programlisting> <![CDATA[ - -::method onTile - expose offSetX offSetY dialogQueue - - -- SM_CXVSCROLL = 20 - -- SM_CYCAPTION = 4 - -- SM_CYBORDER = 6 - - if \ offSetX~datatype('W') then do - scrollBarX = self~getSystemMetrics(20) - titleBarY = self~getSystemMetrics(4) - windowBorderY = self~getSystemMetrics(6) - - offSetX = 2 * scrollBarX - offSetY = (2 * windowBorderY) + titleBarY - end - - parse value self~getWindowRect(self~dlgHandle) with x y . - - do dlg over dialogQueue - x = x + offSetX - y = y + offSetY - - self~setWindowRect(dlg~dlgHandle, x, y, 0, 0, "NOSIZE") - end - - -]]> -</programlisting> -</para></listitem></varlistentry> -</variablelist> </section> </section> Modified: docs/trunk/oodialog/resources.sgml =================================================================== --- docs/trunk/oodialog/resources.sgml 2009-01-04 23:57:54 UTC (rev 3869) +++ docs/trunk/oodialog/resources.sgml 2009-01-05 04:17:10 UTC (rev 3870) @@ -2527,7 +2527,7 @@ SM_CXICON = 11 SM_CYICON = 12 - size = .Size~new(self~getSystemMetrics(SM_CXICON), self~getSystemMetrics(SM_CYICON)) + size = .Size~new(.DlgUtil~getSystemMetrics(SM_CXICON), .DlgUtil~getSystemMetrics(SM_CYICON)) oodModule = .ResourceImage~new("oodialog.dll", self) icons = oodModule~getImages(ids, .Image~id(IMAGE_ICON), size) Modified: docs/trunk/oodialog/standarddialog.sgml =================================================================== --- docs/trunk/oodialog/standarddialog.sgml 2009-01-04 23:57:54 UTC (rev 3869) +++ docs/trunk/oodialog/standarddialog.sgml 2009-01-05 04:17:10 UTC (rev 3870) @@ -124,10 +124,6 @@ <entry><link linkend="fncGetScreenSize">GetScreenSize function</link></entry> </row> <row> -<entry>GetSysMetrics</entry> -<entry><link linkend="fncGetSysMetrics">GetSysMetrics function</link></entry> -</row> -<row> <entry>InfoMessage</entry> <entry><link linkend="fncInfoMessage">InfoMessage function</link></entry> </row> @@ -229,10 +225,6 @@ <entry><link linkend="rtnSingleSelection">SingleSelection routine</link></entry> </row> <row> -<entry>SystemMetrics</entry> -<entry><link linkend="rtnSystemMetrics">SystemMetrics routine</link></entry> -</row> -<row> <entry>TimedMessage</entry> <entry><link linkend="rtnTimedMessage">TimedMessage routine</link></entry> </row> @@ -1175,25 +1167,15 @@ </para> </section> -<section id="fncGetSysMetrics"><title>GetSysMetrics</title> -<indexterm><primary>GetSysMetrics</primary></indexterm> -<indexterm><primary>external functions</primary> -<secondary>GetSysMetrics</secondary></indexterm> -<para>Queries a system metric value: -<programlisting> -<![CDATA[ -SM_CMONITORS = 80 -metric = GetSysMetrics(SM_CMONITORS) -say 'There are' metric 'monitors connected to this system.' -]]> -</programlisting> -</para> -<para>The public routine, <link linkend="rtnSystemMetrics">SystemMetrics</link>, -provides an easy way to use this external routine without first creating an -ooDialog dialog or manually loading the C functions. Check the documentation -for the public routine for more detailed information on the system metrics in -Windows. -</para> +<section><title>getSysMetrics (deprecated)</title> +<note><title>Note</title><para> + This function is deprecated. It is replaced by the functionally equivalent <link + linkend="mthGetSystemMetricsClsDlgUtil">getSystemMetrics()</link> method of the .DlgUtil class. Do not + use this function in new code. Try to migrate existing code to to the + <computeroutput>.DlgUtil~getSystemMetrics()</computeroutput> method. This function may not exist in + future versions of ooDialog. +</para></note> + </section> <section id="fncPlaySoundFile"><title>PlaySoundFile</title> @@ -1732,79 +1714,14 @@ </variablelist> </section> -<section id="rtnSystemMetrics"><title>SystemMetrics Routine</title> -<indexterm><primary>SystemMetrics</primary></indexterm> -<indexterm><primary>public routines</primary> -<secondary>SystemMetrics</secondary></indexterm> -<para>Queries and returns one of the system metric values The system metric -values contain information that help the programmer write programs that work -correctly independent of the current system. They have information on system -configuration, such as the number of monitors connected, and metrics such as the -size in pixels of a dialog border or the width in pixels of a scrollbar. -</para> -<para>Good documentation on the system metrics is found in the MSDN Library -under the GetSystemMetrics function. This documentation contains both the -numeric value of the different indexes and information on what is returned for -each index. The documentation is easy to found using a Google search of -"GetSystemMetrics MSDN Library" - </para> -<programlisting> -<![CDATA[ ->>-SystemMetrics(--index--)----------------------------------->< -]]> -</programlisting> - -<para></para> -<variablelist> -<varlistentry><term><emphasis role="bold">Argument:</emphasis></term> -<listitem><para>The only argument is: -<variablelist> -<varlistentry><term>index</term> -<listitem><para>The numeric index of the metric to query. -</para></listitem></varlistentry> -</variablelist> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> -<listitem><para>The return value is dependent on the index queried. Consult the -MSDN library for information on the returned values. +<section><title>SystemMetrics Routine (deprecated)</title> <note><title>Note</title><para> -The OS will return 0 if an invalid index is used. Hoever, the return value for -some indexes is also 0. The programmer will need to determine from the context -if 0 is an error return or not. In addition, ooDialog will return -1 for some -invalid argument values. For instance, if the string "dog" was passed -in for the <computeroutput>index</computeroutput> argument, -1 would be -returned. + This routine is deprecated. It is replaced by the functionally equivalent <link + linkend="mthGetSystemMetricsClsDlgUtil">getSystemMetrics()</link> method of the .DlgUtil class. Do not + use this routine in new code. Try to migrate existing code to to the + <computeroutput>.DlgUtil~getSystemMetrics()</computeroutput> method. This routine may not exist in + future versions of ooDialog. </para></note> -</para></listitem></varlistentry> -<varlistentry><term><emphasis role="bold">Example</emphasis></term> -<listitem><para>Determine the number of mouse buttons and whether the mouse has -a scroll wheel. -<programlisting> -<![CDATA[ - /* detectMouse.rex Simple program to detect the user's mouse. */ - - SM_CMOUSEBUTTONS = 43 - SM_MOUSEWHEELPRESENT = 19 - - countMouseButtons = SystemMetrics(SM_CMOUSEBUTTONS) - haveMouseWheel = SystemMetrics(SM_MOUSEWHEELPRESENT) - - if countMouseButtons == 0 then do - say 'The system does not have a mouse attached' - end - else do - say 'The mouse has' countMouseButtons 'buttons' - if haveMouseWheel == 0 then say 'There is no mouse scroll wheel.' - else say 'The mouse has a scroll wheel.' - end - - return 0 - ::requires 'oodPlain.cls' - -]]> -</programlisting> -</para></listitem></varlistentry> -</variablelist> </section> <section id="rtnMSSleep"><title>MSSleep Routine</title> Modified: docs/trunk/oodialog/utilityclasses.sgml =================================================================== --- docs/trunk/oodialog/utilityclasses.sgml 2009-01-04 23:57:54 UTC (rev 3869) +++ docs/trunk/oodialog/utilityclasses.sgml 2009-01-05 04:17:10 UTC (rev 3870) @@ -511,9 +511,9 @@ <secondary>DlgUtil class</secondary></indexterm> <programlisting> <![CDATA[ - +-,-------+ - V | ->>--or(----number--+--)----------------------------------->< + +-,-------+ + V | +>>--.DlgUtil~or(----number--+--)----------------------------------->< ]]> </programlisting> @@ -560,8 +560,101 @@ </para> </listitem></varlistentry> </variablelist> -</section> <!-- End DlgUtil::or() [class method?] --> +</section> <!-- End DlgUtil::or() [class method] --> +<section id="mthGetSystemMetricsClsDlgUtil"><title>getSystemMetrics</title> +<indexterm><primary>getSystemMetrics</primary> +<secondary>DlgUtil class</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--.DlgUtil~GetSystemMetrics(--index--)----------------------->< + +]]> +</programlisting> + +<para> + Obtains the system metric value for the given index. +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para>The only argument is: + <variablelist> + <varlistentry><term>index</term> + <listitem> + <para> + The numeric index of the system metric. + </para> + <para> + Good documentation on the system metrics is found in the <link linkend="windowsdoc">MSDN + Library</link> under the GetSystemMetrics function. This documentation contains both the + numeric value of the different indexes and information on what is returned for each index. The + documentation is easy to found using a Google search of "GetSystemMetrics MSDN + library" + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The return value is dependent on the index queried. Consult the MSDN library for information on + the returned values. + <note><title>Note</title><para> + The OS will return 0 if an invalid index is used. Hoever, the return value for some indexes is + also 0. The programmer will need to determine from the context if 0 is an error return or not. + </para></note> + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + The following code snippet is from an application where the user can have 5, 6, or more, + independent dialogs open at one time. One of the menu options is "Tile Dialogs." When + the user selects this option all the open dialogs are "tiled." + </para> + <para> + All the open dialog objects are stored in a queue. In the <computeroutput>onTile</computeroutput> + method, which is invoked when the user selects the menu item, each dialog is fetched in turn from the + queue. Then the dialog is repositioned at an offset from the preceding dialog. It is shifted to the + right the width of 2 scroll bars and shifted down the the width of the title bar. (This width is the + title bar width plus the thin border around the title bar.) The height of the thin border, the + height of the title bar, and the width of a scroll bar are all determined by querying the system + metrics. + <programlisting> <![CDATA[ + + ::method onTile + expose offSetX offSetY dialogQueue + + -- SM_CXVSCROLL = 20 + -- SM_CYCAPTION = 4 + -- SM_CYBORDER = 6 + + if \ offSetX~datatype('W') then do + scrollBarX = .DlgUtil~getSystemMetrics(20) + titleBarY = .DlgUtil~getSystemMetrics(4) + windowBorderY = .DlgUtil~getSystemMetrics(6) + + offSetX = 2 * scrollBarX + offSetY = (2 * windowBorderY) + titleBarY + end + + parse value self~getWindowRect(self~dlgHandle) with x y . + + do dlg over dialogQueue + x = x + offSetX + y = y + offSetY + + self~setWindowRect(dlg~dlgHandle, x, y, 0, 0, "NOSIZE") + end + ]]> + </programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End DlgUtil::getSystemMetrics() [class method] --> + </section> <!-- End DlgUtil Class --> Modified: docs/trunk/oodialog/windowBaseCommon.sgml =================================================================== --- docs/trunk/oodialog/windowBaseCommon.sgml 2009-01-04 23:57:54 UTC (rev 3869) +++ docs/trunk/oodialog/windowBaseCommon.sgml 2009-01-05 04:17:10 UTC (rev 3870) @@ -87,6 +87,15 @@ <para><link linkend="mthGetPos">WindowBase::getPos</link></para> </section> +<section><title>getSize</title> +<programlisting> +<![CDATA[ +>>--getSize---------------------------------------------------->< +]]> +</programlisting> +<para><link linkend="getsize">WindowBase::getSize</link></para> +</section> + <section><title>show</title> <programlisting> <![CDATA[ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2009-01-05 23:21:25
|
Revision: 3875 http://oorexx.svn.sourceforge.net/oorexx/?rev=3875&view=rev Author: miesfeld Date: 2009-01-05 23:21:22 +0000 (Mon, 05 Jan 2009) Log Message: ----------- Incremental update to ooDialo doc Modified Paths: -------------- docs/trunk/oodialog/basedialog.sgml docs/trunk/oodialog/dialogcontrolc.sgml docs/trunk/oodialog/plainuserdialogc.sgml docs/trunk/oodialog/staticcontrolc.sgml docs/trunk/oodialog/windowBaseCommon.sgml Modified: docs/trunk/oodialog/basedialog.sgml =================================================================== --- docs/trunk/oodialog/basedialog.sgml 2009-01-05 19:15:04 UTC (rev 3874) +++ docs/trunk/oodialog/basedialog.sgml 2009-01-05 23:21:22 UTC (rev 3875) @@ -810,6 +810,10 @@ <entry><link linkend="h000721">IsDialogActive</link></entry> </row> <row> +<entry>isEnabled</entry> +<entry><link linkend="mthIsEnabled">isEnabled</link></entry> +</row> +<row> <entry>IsMaximized</entry> <entry><link linkend="mthIsMaximized">IsMaximized</link></entry> </row> @@ -818,8 +822,8 @@ <entry><link linkend="mthIsMinimized">IsMinimized</link></entry> </row> <row> -<entry>IsDialogActive</entry> -<entry><link linkend="h000721">IsDialogActive</link></entry> +<entry>isVisible</entry> +<entry><link linkend="mthIsVisible">isVisible</link></entry> </row> <row> <entry>ItemTitle</entry> @@ -1155,7 +1159,7 @@ </row> <row> <entry>Title=</entry> -<entry><link linkend="titlenew">Title=</link></entry> +<entry><link linkend="mthTitleEquals">Title=</link></entry> </row> <row> <entry>TransparentText</entry> Modified: docs/trunk/oodialog/dialogcontrolc.sgml =================================================================== --- docs/trunk/oodialog/dialogcontrolc.sgml 2009-01-05 19:15:04 UTC (rev 3874) +++ docs/trunk/oodialog/dialogcontrolc.sgml 2009-01-05 23:21:22 UTC (rev 3875) @@ -333,10 +333,18 @@ <entry><link linkend="hscrollpos">HScrollPos</link></entry> </row> <row> -<entry>IsMouseButtonDown</entry> -<entry><link linkend="ismousebuttondown">IsMouseButtonDown</link></entry> +<entry>isEnabled</entry> +<entry><link linkend="mthIsEnabled">isEnabled</link></entry> </row> <row> +<entry>isMouseButtonDown</entry> +<entry><link linkend="ismousebuttondown">isMouseButtonDown</link></entry> +</row> +<row> +<entry>isVisible</entry> +<entry><link linkend="mthIsVisible">isVisible</link></entry> +</row> +<row> <entry>LoadBitmap</entry> <entry><link linkend="h000667">LoadBitmap</link></entry> </row> @@ -470,7 +478,7 @@ </row> <row> <entry>Title=</entry> -<entry><link linkend="titlenew">Title=</link></entry> +<entry><link linkend="mthTitleEquals">Title=</link></entry> </row> <row> <entry>TransparentText</entry> @@ -701,6 +709,41 @@ </variablelist> </section> +<section id="mthIsVisible"><title>isVisible</title> +<indexterm><primary>isVisible</primary></indexterm> +<programlisting> +<![CDATA[ +>>--isVisible-------------------------------------------------->< +]]> +</programlisting> + +<para> + Tests if the window (dialog or dialog control) is visible. +</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem> +<para> + There are no arguments. +</para> +</listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem> +<para> + Returns .true if the window is visible, otherwise .false +</para> +</listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para> +<programlisting> +<![CDATA[ +if \ self~isVisible then self~show +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + <section id="enable"><title>Enable</title> <indexterm><primary>Enable</primary></indexterm> <programlisting> @@ -752,6 +795,46 @@ </variablelist> </section> +<section id="mthIsEnabled"><title>isEnabled</title> +<indexterm><primary>isEnabled</primary></indexterm> +<programlisting> +<![CDATA[ +>>--isEnabled-------------------------------------------------->< +]]> +</programlisting> + +<para> + Tests if the window (dialog or dialog control) is enabled +</para> +<variablelist> +<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> +<listitem> +<para> + There are no arguments. +</para> +</listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Return value:</emphasis></term> +<listitem> +<para> + Returns .true if the window is enabled, otherwise .false +</para> +</listitem></varlistentry> +<varlistentry><term><emphasis role="bold">Example:</emphasis></term> +<listitem><para> +<programlisting> +<![CDATA[ +::method toggleState private +listView = self~getListControl(IDC_LV_NAMES) +if listView~isEnabled then + listView~disable +else + listView~enable +]]> +</programlisting> +</para></listitem></varlistentry> +</variablelist> +</section> + <section id="mthGroup"><title>Group</title> <indexterm><primary>SetGroup</primary></indexterm> <programlisting> @@ -1554,7 +1637,7 @@ </variablelist> </section> -<section id="titlenew"><title>Title=</title> +<section id="mthTitleEquals"><title>Title=</title> <indexterm><primary>Title=</primary></indexterm> <programlisting> <![CDATA[ @@ -1611,7 +1694,7 @@ </programlisting> <para>The SetTitle method sets the title of the dialog -or dialog control. It is equal to <link linkend="titlenew">Title=</link>.</para> +or dialog control. It is equal to <link linkend="mthTitleEquals">Title=</link>.</para> </section> </section> Modified: docs/trunk/oodialog/plainuserdialogc.sgml =================================================================== --- docs/trunk/oodialog/plainuserdialogc.sgml 2009-01-05 19:15:04 UTC (rev 3874) +++ docs/trunk/oodialog/plainuserdialogc.sgml 2009-01-05 23:21:22 UTC (rev 3875) @@ -753,7 +753,7 @@ </row> <row> <entry>Title=</entry> -<entry><link linkend="titlenew">Title=</link></entry> +<entry><link linkend="mthTitleEquals">Title=</link></entry> </row> <row> <entry>Update</entry> @@ -776,11 +776,15 @@ dialog and dialog control classes. </para> <para> - The WindowBase instance methods are listed here as a cross reference. This allows the programmer to - know exactly which methods are implemented by this class. The methods are fully documented in other - sections of this book. Each method listed has a link to the full documentation for that method and an - accurate syntax diagram. + The instance methods implemented by the WindowBase class are listed here as a cross reference. The + methods are fully documented in other sections of this book. Each method listed has a link to the full + documentation for that method and an accurate syntax diagram. </para> +<para> + Both the PlainBaseDialog and the DialogControl classes inherit the WindowBase class. Since the + PlainBaseDialog is the base class for all dialogs and the DialogControl class is the base class for all + controls, every dialog object and every dialog control object have the instance methods listed here. +</para> &windowBaseCommon; @@ -794,11 +798,15 @@ It is inherited by both dialog and dialog control classes. </para> <para> - The WindowExtensions instance methods are listed here as a cross reference. This allows the programmer - to know exactly which methods are implemented by this class. The methods are fully documented in other - sections of this book. Each method listed has a link to the full documentation for that method and an - accurate syntax diagram. + The instance methods implemented by the WindowExtensions class are listed here as a cross reference. + The methods are fully documented in other sections of this book. Each method listed has a link to the + full documentation for that method and an accurate syntax diagram. </para> +<para> + Both the BaseDialog and the DialogControl classes inherit the WindowBase class. The DialogControl + class is the base class for all controls. Therefore, every dialog control object and every dialog + object that is a descendent class of the BaseDialog have the instance methods listed here. +</para> &windowExtensionsCommon; Modified: docs/trunk/oodialog/staticcontrolc.sgml =================================================================== --- docs/trunk/oodialog/staticcontrolc.sgml 2009-01-05 19:15:04 UTC (rev 3874) +++ docs/trunk/oodialog/staticcontrolc.sgml 2009-01-05 23:21:22 UTC (rev 3875) @@ -78,10 +78,10 @@ DialogControl class.) </para> <para> - The <emphasis role="bold">WindowBase</emphasis> + The <link linkend="clsWindowBase">WindowBase</link> </para> <para> - The <emphasis role="bold"> WindowExtensions</emphasis> + The <link linkend="clsWindowExtensions">WindowExtensions</link> </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Instantiating:</emphasis></term> @@ -131,19 +131,6 @@ </variablelist> -<section><title>Inherited Methods - WindowBase</title> -&windowBaseCommon; -</section> - -<section><title>Inherited Methods - WindowExtensions</title> -&windowExtensionsCommon; -</section> - -<section><title>Inherited Methods - DialogControl</title> -&dialogcontrolCommon; -</section> - - <section id="mthNewClsStaticControl"><title>new (Class method)</title> <indexterm><primary>new</primary> <secondary>StaticControl class</secondary></indexterm> @@ -293,4 +280,18 @@ </variablelist> </section> <!-- End StaticControl::setImage() --> + +<section><title>Inherited Methods - WindowBase</title> +&windowBaseCommon; +</section> + +<section><title>Inherited Methods - WindowExtensions</title> +&windowExtensionsCommon; +</section> + +<section><title>Inherited Methods - DialogControl</title> +&dialogcontrolCommon; +</section> + + </chapter> <!-- End StaticControl class --> Modified: docs/trunk/oodialog/windowBaseCommon.sgml =================================================================== --- docs/trunk/oodialog/windowBaseCommon.sgml 2009-01-05 19:15:04 UTC (rev 3874) +++ docs/trunk/oodialog/windowBaseCommon.sgml 2009-01-05 23:21:22 UTC (rev 3875) @@ -60,15 +60,6 @@ <para><link linkend="enable">WindowBase::enable</link></para> </section> -<section><title>hide</title> -<programlisting> -<![CDATA[ ->>--hide------------------------------------------------------->< -]]> -</programlisting> -<para><link linkend="hide">WindowBase::hide</link></para> -</section> - <section><title>getID</title> <programlisting> <![CDATA[ @@ -96,11 +87,107 @@ <para><link linkend="getsize">WindowBase::getSize</link></para> </section> +<section><title>getTextSize</title> +<programlisting> +<![CDATA[ +>>--gGetTextSize(--text--+---------------+---------------+-----------+--------->< + +--,--fontname--+--,--fontsize--+--,--hwnd--+ +]]> +</programlisting> +<para><link linkend="gettextsize">WindowBase::getTextSize()</link></para> +</section> + +<section><title>hide</title> +<programlisting> +<![CDATA[ +>>--hide------------------------------------------------------->< +]]> +</programlisting> +<para><link linkend="hide">WindowBase::hide</link></para> +</section> + +<section><title>isEnabled</title> +<programlisting> +<![CDATA[ +>>--isEnabled-------------------------------------------------->< +]]> +</programlisting> +<para><link linkend="mthIsEnabled">WindowBase::isEnabled</link></para> +</section> + +<section><title>isVisible</title> +<programlisting> +<![CDATA[ +>>--isVisible------------------------------------------------------------------>< +]]> +</programlisting> +<para><link linkend="mthIsVisible">WindowBase::isVisible</link></para> +</section> + +<section><title>move</title> +<programlisting> +<![CDATA[ +>>---move(--xPos--,--yPos--+----------------------+--)------------------------->< + +-,-"--showOptions--"--+ +]]> +</programlisting> +<para><link linkend="move">WindowBase::move()</link></para> +</section> + +<section><title>resize</title> +<programlisting> +<![CDATA[ +>>---resize(--width--,--height--+----------------------+--)-------------------->< + +-,-"--showOptions--"--+ +]]> +</programlisting> +<para><link linkend="resize">WindowBase::resize()</link></para> +</section> + +<section<title>setTitle</title> +<programlisting> +<![CDATA[ +>>--setTitle(--new_title--)------------------------------------>< +]]> +</programlisting> +<para><link linkend="settitle">WindowBase::setTitle()</link></para> +</section> + <section><title>show</title> +<note><title>Note</title><para> + The PlainBaseDialog overrides the show() method to take an optional argument. +</para></note> <programlisting> <![CDATA[ >>--show------------------------------------------------------->< ]]> </programlisting> -<para><link linkend="showdc">WindowBase::show</link></para> +<para><link linkend="showdc">DialogControl::show</link></para> + +<programlisting> +<![CDATA[ +>>-show(--"--+--------+--"--)--------------------------------->< + +--mode--+ +]]> +</programlisting> +<para><link linkend="show">PlainBaseDialog::show</link></para> </section> + +<section><title>title</title> +<programlisting> +<![CDATA[ +>>--title------------------------------------------------------>< +]]> +</programlisting> +<para><link linkend="title">WindowBase::title</link></para> +</section> + +<section><title>title=</title> +<programlisting> +<![CDATA[ +>>--title=--newTitle------------------------------------------->< +]]> +</programlisting> +<para><link linkend="mthTitleEquals">WindowBase::title=</link></para> +</section> + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mie...@us...> - 2009-01-06 19:22:55
|
Revision: 3879 http://oorexx.svn.sourceforge.net/oorexx/?rev=3879&view=rev Author: miesfeld Date: 2009-01-06 19:22:52 +0000 (Tue, 06 Jan 2009) Log Message: ----------- Incremental upate to ooDialog doc Modified Paths: -------------- docs/trunk/oodialog/dialogcontrolCommon.sgml docs/trunk/oodialog/windowBaseCommon.sgml docs/trunk/oodialog/windowExtensionsCommon.sgml Modified: docs/trunk/oodialog/dialogcontrolCommon.sgml =================================================================== --- docs/trunk/oodialog/dialogcontrolCommon.sgml 2009-01-06 16:23:09 UTC (rev 3878) +++ docs/trunk/oodialog/dialogcontrolCommon.sgml 2009-01-06 19:22:52 UTC (rev 3879) @@ -43,22 +43,15 @@ --> -<section><title>value</title> -<programlisting> -<![CDATA[ ->>--value------------------------------------------------------>< -]]> -</programlisting> -<para><link linkend="value">DialogControl::value</link></para> -</section> +<programlisting format='linespecific'> +>>--<link linkend="value">value</link>------------------------------------------------------>< -<section><title>value=</title> -<programlisting> -<![CDATA[ ->>--value-=-newValue------------------------------------------->< -]]> + </programlisting> -<para><link linkend="valuenew">DialogControl::value=</link></para> -</section> +<programlisting format='linespecific'> +>>--<link linkend="valuenew">value-=</link>-newValue------------------------------------------->< + +</programlisting> + Modified: docs/trunk/oodialog/windowBaseCommon.sgml =================================================================== --- docs/trunk/oodialog/windowBaseCommon.sgml 2009-01-06 16:23:09 UTC (rev 3878) +++ docs/trunk/oodialog/windowBaseCommon.sgml 2009-01-06 19:22:52 UTC (rev 3879) @@ -42,152 +42,121 @@ ######################################################################### --> -<section><title>disable</title> -<programlisting> -<![CDATA[ ->>--disable---------------------------------------------------->< -]]> +<programlisting format='linespecific'> +>>--<link linkend="disable">disable</link>---------------------------------------------------->< + + </programlisting> -<para><link linkend="disable">WindowBase::disable</link></para> -</section> -<section><title>enable</title> -<programlisting> -<![CDATA[ ->>--enable----------------------------------------------------->< -]]> + +<programlisting format='linespecific'> +>>--<link linkend="enable">enable</link>----------------------------------------------------->< + + </programlisting> -<para><link linkend="enable">WindowBase::enable</link></para> -</section> -<section><title>getID</title> -<programlisting> -<![CDATA[ ->>--getID------------------------------------------------------>< -]]> + +<programlisting format='linespecific'> +>>--<link linkend="getId">getID</link>------------------------------------------------------>< + + </programlisting> -<para><link linkend="getId">WindowBase::getID</link></para> -</section> -<section><title>getPos</title> -<programlisting> -<![CDATA[ ->>--getPos----------------------------------------------------->< -]]> + +<programlisting format='linespecific'> +>>--<link linkend="mthGetPos">getPos</link>----------------------------------------------------->< + + </programlisting> -<para><link linkend="mthGetPos">WindowBase::getPos</link></para> -</section> -<section><title>getSize</title> -<programlisting> -<![CDATA[ ->>--getSize---------------------------------------------------->< -]]> + +<programlisting format='linespecific'> +>>--<link linkend="getsize">getSize</link>---------------------------------------------------->< + + </programlisting> -<para><link linkend="getsize">WindowBase::getSize</link></para> -</section> -<section><title>getTextSize</title> -<programlisting> -<![CDATA[ ->>--gGetTextSize(--text--+---------------+---------------+-----------+--------->< - +--,--fontname--+--,--fontsize--+--,--hwnd--+ -]]> + +<programlisting format='linespecific'> +>>--<link linkend="gettextsize">getTextSize</link>(--text--+---------------+---------------+-----------+--)------>< + +--,--fontname--+--,--fontsize--+--,--hwnd--+ + </programlisting> -<para><link linkend="gettextsize">WindowBase::getTextSize()</link></para> -</section> -<section><title>hide</title> -<programlisting> -<![CDATA[ ->>--hide------------------------------------------------------->< -]]> + +<programlisting format='linespecific'> +>>--<link linkend="hide">hide</link>------------------------------------------------------->< + + </programlisting> -<para><link linkend="hide">WindowBase::hide</link></para> -</section> -<section><title>isEnabled</title> -<programlisting> -<![CDATA[ ->>--isEnabled-------------------------------------------------->< -]]> + +<programlisting format='linespecific'> +>>--<link linkend="mthIsEnabled">isEnabled</link>-------------------------------------------------->< + + </programlisting> -<para><link linkend="mthIsEnabled">WindowBase::isEnabled</link></para> -</section> -<section><title>isVisible</title> -<programlisting> -<![CDATA[ ->>--isVisible------------------------------------------------------------------>< -]]> + +<programlisting format='linespecific'> +>>--<link linkend="mthIsVisible">isVisible</link>------------------------------------------------------------------>< + + </programlisting> -<para><link linkend="mthIsVisible">WindowBase::isVisible</link></para> -</section> -<section><title>move</title> + <programlisting> -<![CDATA[ ->>---move(--xPos--,--yPos--+----------------------+--)------------------------->< +>>---<link linkend="move">move</link>(--xPos--,--yPos--+----------------------+--)------------------------->< +-,-"--showOptions--"--+ -]]> + + </programlisting> -<para><link linkend="move">WindowBase::move()</link></para> -</section> -<section><title>resize</title> -<programlisting> -<![CDATA[ ->>---resize(--width--,--height--+----------------------+--)-------------------->< + +<programlisting format='linespecific'> +>>---<link linkend="resize">resize</link>(--width--,--height--+----------------------+--)-------------------->< +-,-"--showOptions--"--+ -]]> + + </programlisting> -<para><link linkend="resize">WindowBase::resize()</link></para> -</section> -<section<title>setTitle</title> -<programlisting> -<![CDATA[ ->>--setTitle(--new_title--)------------------------------------>< -]]> + +<programlisting format='linespecific'> +>>--<link linkend="settitle">setTitle(--new_title--)</link>------------------------------------>< + + </programlisting> -<para><link linkend="settitle">WindowBase::setTitle()</link></para> -</section> -<section><title>show</title> -<note><title>Note</title><para> + +<note><title>Note</title> The PlainBaseDialog overrides the show() method to take an optional argument. -</para></note> -<programlisting> -<![CDATA[ ->>--show------------------------------------------------------->< -]]> +</note> + +<programlisting format='linespecific'> +>>--<link linkend="showdc">show</link>------------------------------------------------------->< + + </programlisting> -<para><link linkend="showdc">DialogControl::show</link></para> -<programlisting> -<![CDATA[ ->>-show(--"--+--------+--"--)--------------------------------->< + +<programlisting format='linespecific'> +>>-<link linkend="show">show</link>(--"--+--------+--"--)--------------------------------->< +--mode--+ -]]> + + </programlisting> -<para><link linkend="show">PlainBaseDialog::show</link></para> -</section> -<section><title>title</title> -<programlisting> -<![CDATA[ ->>--title------------------------------------------------------>< -]]> + +<programlisting format='linespecific'> +>>--<link linkend="title">title</link>------------------------------------------------------>< + + </programlisting> -<para><link linkend="title">WindowBase::title</link></para> -</section> -<section><title>title=</title> -<programlisting> -<![CDATA[ ->>--title=--newTitle------------------------------------------->< -]]> + +<programlisting format='linespecific'> +>>--<link linkend="mthTitleEquals">title=</link>--newTitle------------------------------------------->< + + </programlisting> -<para><link linkend="mthTitleEquals">WindowBase::title=</link></para> -</section> Modified: docs/trunk/oodialog/windowExtensionsCommon.sgml =================================================================== --- docs/trunk/oodialog/windowExtensionsCommon.sgml 2009-01-06 16:23:09 UTC (rev 3878) +++ docs/trunk/oodialog/windowExtensionsCommon.sgml 2009-01-06 19:22:52 UTC (rev 3879) @@ -43,38 +43,89 @@ --> <programlisting format='linespecific'> ->>--<link linkend="hidefast">hideFast</link>--------------------------------------------------->< +>>--<link linkend="absrect2logrect">absRect2LogRect</link>(--left--,--top--,--right--,--bottom--)-->< + </programlisting> + <programlisting format='linespecific'> ->>--<link linkend="showFast">showFast</link>--------------------------------------------------->< +>>--<link linkend="clienttoscreen">clientToScreen</link>(--x--,y--)-------------------->< + </programlisting> + <programlisting format='linespecific'> ->>--<link linkend="gettextsize">getTextSize</link>(--text--+---------------+---------------+-----------+--)------>< - +--,--fontname--+--,--fontsize--+--,--hwnd--+ +>>--<link linkend="h001026">createBrush</link>(--color--+-----------------+--)-------------------------------->< + +-,brushSpecifier-+ + </programlisting> +<programlisting format='linespecific'> +>>--<link linkend="createfont">createFont</link>(--+---------+--+---------+--+-------------+--+----------+--)---->< + +-,-fName-+ +-,-fSize-+ +-,"-fStyle-"-+ +-,-fWidth-+ -<section><title>hideFast</title> -<programlisting> -<![CDATA[ ->>--hideFast--------------------------------------------------->< -]]> + </programlisting> -<para><link linkend="hidefast">WindowExtension::hideFast</link></para> -</section> -<section><title>showFast</title> -<programlisting> -<![CDATA[ ->>--showFast--------------------------------------------------->< + +<programlisting format='linespecific'> +>>--<link linkend="h001035">createPen</link>(--+-------+--+---------------+--+-------+--)--------------------->< + +-width-+ +-,-"-+-style-"-+ +-color-+ + + +</programlisting> + + +<programlisting format='linespecific'> +>>-<link linkend="cursorappstarting">cursor_AppStarting</link>---------------------------------------------------------->< + + +</programlisting> + + +<programlisting format='linespecific'> +>>-<link linkend="cursorarrow">cursor_Arrow</link>---------------------------------------------------------->< + + +</programlisting> + + +<programlisting format='linespecific'> +>>-<link linkend="cursorcross">cursor_Cross</link>---------------------------------------------------------->< + + +</programlisting> + + +<programlisting format='linespecific'> +>>-<link linkend="cursorno">cursor_No</link>---------------------------------------------------------->< + + ]]> </programlisting> -<para><link linkend="showFast">WindowExtension::showFast</link></para> -</section> + +<programlisting format='linespecific'> +>>-<link linkend="cursorwait">cursor_Wait</link>---------------------------------------------------------->< + + +</programlisting> + + +<programlisting format='linespecific'> +>>--<link linkend="hidefast">hideFast</link>--------------------------------------------------->< + + +</programlisting> + + +<programlisting format='linespecific'> +>>--<link linkend="showFast">showFast</link>--------------------------------------------------->< + + +</programlisting> + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |