Diff of /docs/trunk/oodialog/en-US/listview.xml [r9763] .. [r9764] Maximize Restore

  Switch to side-by-side view

--- a/docs/trunk/oodialog/en-US/listview.xml
+++ b/docs/trunk/oodialog/en-US/listview.xml
@@ -886,9 +886,9 @@
 
   list = self~newListView(IDC_LIST_REP)
   if list \= .nil then do
-    imageList = .ImageList~create(.Size~new(16), .Image~toID(ILC_COLOR24), 9, 0)
+    imageList = .ImageList~create(.Size~new(16), COLOR24, 9, 0)
     imageList~add(.Image~getImage("E:\oodlist\oodlist.BMP"))
-    list~setImageList(imageList, .Image~toID(LVSIL_SMALL))
+    list~setImageList(imageList, SMALL)
 
     list~insertColumn(0,"First Name",50)
     list~insertColumn(1,"Last Name",50)
@@ -3261,49 +3261,50 @@
 <variablelist>
   <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
   <listitem>
-    <para>The single optional argument is:
-    <variablelist>
-      <varlistentry><term>type</term>
-      <listitem>
-        <para>
-          Optional. Specifies which image list to retrieve. You can use the <xref linkend="mthToIDClsImage"/> method of the
-          <xref linkend="clsImage"/> class to get the correct numeric value for one of the following symbols:
-          <simplelist type='horiz' columns='2'>
-          <member>LVSIL_NORMAL</member>
-          <member>LVSIL_SMALL </member>
-          <member>LVSIL_STATE </member>
-          </simplelist>
-          or use the correct numeric value itself. Note that there is also a LVSIL_GROUPHEADER symbol,
-          but ooDialog does not yet support it.
-        </para>
-        <para>
-          The default is LVSIL_NORMAL.
-        </para>
-      </listitem></varlistentry>
-    </variablelist>
+  <para>The single argument is:
+  <variablelist>
+    <varlistentry><term>type [optional]</term>
+    <listitem>
+    <para>
+      Specifies which image list to retrieve. The list-view maintains 4 different image lists. One for the normal icons, one
+      for the small icons, one for the state icons, and one for the group header icons. However, ooDialog does not yet have
+      support for list-view groups, or the group header image list.
+    </para>
+    <para>
+      The following keywords are used to specify which image list is to be retrieved, case is not significant:
+      <simplelist type='horiz' columns='2'>
+      <member>NORMAL for the normal icon image list.</member>
+      <member>SMALL for the small icon image list.</member>
+      <member>STATE for the state image list.</member>
+      </simplelist>
+    </para>
+    <para>
+      The default value if this argument is omittied is NORMAl.
     </para>
     </listitem></varlistentry>
+  </variablelist>
+  </para>
+  </listitem></varlistentry>
   <varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
   <listitem>
-    <para>
-      This method returns the current image <xref linkend="clsImageList"/>, if there is one.
-      <computeroutput>.nil</computeroutput> is returned if there is no current image list of the type
-      specified.
-    </para>
+  <para>
+    This method returns the current <xref linkend="clsImageList"/>, if there is one, or
+    <computeroutput>.nil</computeroutput> if there is no current image list of the type specified.
+  </para>
   </listitem></varlistentry>
   <varlistentry><term><emphasis role="bold">Details:</emphasis></term>
   <listitem>
-    <para>
-      Raises syntax errors when incorrect arguments are detected.
-    </para>
+  <para>
+    Raises syntax errors when incorrect arguments are detected.
+  </para>
   </listitem></varlistentry>
   <varlistentry><term><emphasis role="bold">Example:</emphasis></term>
   <listitem>
-    <para>
-      This example comes from a complex application that opens and closes a large number of dialogs and
-      uses many list-view controls. All the list-view controls share the same image lists. When the last
-      dialog is closed, the shared image lists are released to free up system resources as the
-      application enters its next phase.
+  <para>
+    This example comes from a complex application that opens and closes a large number of dialogs and
+    uses many list-view controls. All the list-view controls share the same image lists. When the last
+    dialog is closed, the shared image lists are released to free up system resources as the
+    application enters its next phase.
 <programlisting>
 <![CDATA[
 ::method ok
@@ -3317,8 +3318,8 @@
 ::method checkImageLists
   expose list
 
-  if self~amLastDialog then do
-    types = .array~of(LVSIL_NORMAL, LVSIL_SMALL, LVSIL_STATE)
+  if self~isLastDialog then do
+    types = .array~of('NORMAL', 'SMALL', 'STATE')
 
     do type over types
       il = list~getImageList(type)
@@ -3328,7 +3329,7 @@
 
 ]]>
 </programlisting>
-    </para>
+  </para>
   </listitem></varlistentry>
 </variablelist>
 </section>  <!-- End ListControl::getImageList() -->
@@ -6583,16 +6584,15 @@
 
   list  = self~newListView(IDC_LV_VIEWS)
 
-  flags = .Image~toID(ILC_COLOR24)
-  imageList = .ImageList~create(.Size~new(16), flags, 7, 0)
+  imageList = .ImageList~create(.Size~new(16), COLOR24, 7, 0)
 
   imageList~add(.Image~getImage("iconList_16.bmp"))
-  list~setImageList(imageList, .Image~toID(LVSIL_SMALL))
+  list~setImageList(imageList, SMALL)
 
   imageList = .ImageList~create(.Size~new(32), flags, 7, 0)
 
   imageList~add(.Image~getImage("iconList_32.bmp"))
-  list~setImageList(imageList, .Image~toID(LVSIL_NORMAL))
+  list~setImageList(imageList, NORMAL)
 
   self~populateList(list)
 
@@ -7179,146 +7179,145 @@
 </programlisting>
 
 <para>
-  Assigns, or removes, an image list for the list-view control. Using
-  <computeroutput>.nil</computeroutput> for the first argument removes the current image list.
-</para>
-<para>
-  The list-view control uses image lists for a number of things, the large icons, the small icons, the
-  state images, and the group header images. (ooDialog does not yet support list-view groups.) The
-  <emphasis role="italic">src</emphasis> argument can be either an
- <xref linkend="clsImageList"/> object, or a single bitmap.
-</para>
-<para>
-  Using an image list object is the most flexible option. The programmer creates the image list in the
-  manner most suitable to the program. When the program is enhanced or changed it is easy to change the
-  image list.
-</para>
-<para>
-  When <emphasis role="italic">src</emphasis> is a single bitmap it is used in this way: A single bitmap
-  is created that consists of all the images for the image list. All the images must be the same width
-  and height. The images are arranged in the bitmap in a row, side-by-side, in the order they should
-  appear in the image list. ooDialog uses this bitmap to create a <emphasis
-  role="italic">.ImageList</emphasis> object and assigns it to the list-view. The <emphasis
-  role="italic">src</emphasis> argument can be either the file name of the bitmap or a bitmap
- <xref linkend="clsImage"/> object.
-</para>
-<para>
-  Although using a single bitmap will allow the programmer to save a couple of lines of code, it has a
-  number of disadvantages. The image list is created with the exact number of images in the bitmap and no
-  extra room to add images. The image list is created as an unmasked image list, with a color of 8 bit
-  per pixel. If the program is enhanced or changed in a way that requires even a slight change
-  to the image list, the single bitmap would need to be re-created.
-</para>
-<para>
-  When using a single bitmap, if the system fails to create the image list from the details supplied by
-  ooDialog, the method of informing the programmer of the error is not as robust as it is when the
-  programmer creates the image list herself. However, ooDialog will set the
-  <xref linkend="dotSystemErrorCode"/> for any cases where the operating system
-  reports an error. Also note that when using a single bitmap, ooDialog will instantiate a <emphasis
-  role="italic">.ImageList</emphasis> object. The programmer can retrieve this object using the
- <xref linkend="mthGetImageListClsListView"/>() method and then manipulate it using the
-  methods of the <xref linkend="clsImageList"/> class.
-</para>
-<para>
-  Unless a list-view has the LVS_SHAREIMAGELISTS style, (corresponds to the SHAREIMAGES style in the
- <xref linkend="mthCreateListView"/>() method,) the list-view control will handle
-  releasing the image list(s). When the share image lists style is used, ownership of the image list
-  remains with the programmer. The <xref linkend="clsImageList"/> and
- <xref linkend="clsImage"/> classes are used to manage image lists and images in ooDialog. The
-  documentation on both classes discusses when and why the programmer may want to release image lists.
-  The Image class documentation has the most detail on this subject.
-</para>
-<variablelist>
-  <varlistentry><term><emphasis role="bold">Details:</emphasis></term>
-  <listitem>
+  Assigns, or removes, the specified image list for the list-view control. Using <computeroutput>.nil</computeroutput> for
+  the first argument removes the current image list if any. The list-view control uses image lists for a number of things,
+  the large icons, the small icons, the state images, and the group header images. (ooDialog does not yet support list-view
+  groups.)
+</para>
+<variablelist>
+  <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
+  <listitem>
+  <para>The arguments are:
+  <variablelist>
+    <varlistentry><term>src [required]</term>
+    <listitem>
     <para>
-      Sets the <xref linkend="dotSystemErrorCode"/>.
+      The source for the image list. This can be an <xref linkend="clsImageList"/> object to assign to the list-view, a
+      bitmap <xref linkend="clsImage"/> object, or the file name of the bitmap. When <emphasis role="italic">src</emphasis>
+      is a bitmap, the ooDialog framework internally creates an image list from the bitmap as explained in the Remarks
+      section.
     </para>
     <para>
-      Raises syntax errors when incorrect arguments are detected.
+      If this argument is the <computeroutput>.nil</computeroutput> object, the existing image list, if any, is
+      removed.
     </para>
-  </listitem></varlistentry>
-  <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
-  <listitem>
-    <para>The arguments are:
-    <variablelist>
-      <varlistentry><term>src</term>
-      <listitem>
-        <para>
-          The source for the image list. The most flexible way to use this method is to provide an
-          image <xref linkend="clsImageList"/> object to assign to the list-view.
-        </para>
-        <para>
-          However, as explained above, this argument can also be a single bitmap from which the image
-          list is to be created. In this case, the argument can be either the file name of the bitmap or
-          a bitmap <xref linkend="clsImage"/> object.
-        </para>
-        <para>
-          If this argument is <computeroutput>.nil</computeroutput> the existing image list, if any, is
-          removed.
-        </para>
-      </listitem></varlistentry>
-      <varlistentry><term>typeOrWidth</term>
-      <listitem>
-        <para>
-          Optional.
-        </para>
-        <para>
-          <emphasis role="bold">type</emphasis>: When <emphasis role="italic">src</emphasis> is an
-          <computeroutput>ImageList</computeroutput> object, this argument specifies which image list to
-          assign, (or remove.) You can use the <xref linkend="mthToIDClsImage"/> method of the <xref linkend="clsImage"/>
-          class to get the correct numeric value for one of the following symbols:
-          <simplelist type='horiz' columns='2'>
-          <member>LVSIL_NORMAL</member>
-          <member>LVSIL_SMALL </member>
-          <member>LVSIL_STATE </member>
-          </simplelist>
-          or use the correct numeric value itself.  Note that there is also a LVSIL_GROUPHEADER symbol,
-          but ooDialog does not yet support it. The default is LVSIL_NORMAL.
-        </para>
-        <para>
-          <emphasis role="bold">width</emphasis>: When <emphasis role="italic">src</emphasis> is a
-          single bitmap, this argument can be used to specify the width of a single image in the bitmap.
-          The default is the actual height of the bitmap.
-        </para>
-      </listitem></varlistentry>
-      <varlistentry><term>height</term>
-      <listitem>
-        <para>
-          Optional. This argument is only used when <emphasis role="italic">src</emphasis> is a single
-          bitmap. In that case <emphasis role="italic">height</emphasis> specifies the height of an image
-          in the bitmap. The default is to use the actual height of the bitmap.
-        </para>
-      </listitem></varlistentry>
-      <varlistentry><term>ilType</term>
-      <listitem>
-        <para>
-          Optional. This argument is only used when <emphasis role="italic">src</emphasis> is a single
-          bitmap. It is used to specify which image list is being assigned. Its usage is exactly the same
-          as is documented for the <emphasis role="italic">type</emphasis> role of the <emphasis
-          role="italic">typeOrWidth</emphasis> argument above. If omitted, the default is LVSIL_NORMAL.
-        </para>
-      </listitem></varlistentry>
-    </variablelist>
+    </listitem></varlistentry>
+    <varlistentry><term>typeOrWidth [optional]</term>
+    <listitem>
+    <para>
+      <emphasis role="bold">type</emphasis>: When <emphasis role="italic">src</emphasis> is an
+      <computeroutput>ImageList</computeroutput> object, this argument specifies which image list to
+      assign, (or remove.) The following keywords are used to specify the type, case is not significant:
     </para>
+    <para>
+      <simplelist type='horiz' columns='2'>
+      <member>NORMAL</member>
+      <member>SMALL </member>
+      <member>STATE </member>
+      </simplelist>
+    </para>
+    <para>
+      The default is NORMAL.
+    </para>
+    <para>
+      <emphasis role="bold">width</emphasis>: When <emphasis role="italic">src</emphasis> is a
+      single bitmap, this argument can be used to specify the width of a single image in the bitmap.
+      The default is the actual height of the bitmap.
+    </para>
+    </listitem></varlistentry>
+    <varlistentry><term>height [optional]</term>
+    <listitem>
+    <para>
+      This argument is only used when <emphasis role="italic">src</emphasis> is a single bitmap. In that case <emphasis
+      role="italic">height</emphasis> specifies the height of an image in the bitmap. The default is to use the actual height
+      of the bitmap.
+    </para>
+    </listitem></varlistentry>
+    <varlistentry><term>ilType [optional]</term>
+    <listitem>
+    <para>
+      This argument is only used when <emphasis role="italic">src</emphasis> is a single bitmap. It is used to specify which
+      image list is being assigned. Its usage is exactly the same as is documented for the <emphasis
+      role="italic">type</emphasis> role of the <emphasis role="italic">typeOrWidth</emphasis> argument above. If omitted,
+      the default is NORMAL.
+    </para>
+    </listitem></varlistentry>
+  </variablelist>
+  </para>
   </listitem></varlistentry>
   <varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
   <listitem>
-    <para>
-      The existing image list is returned, if there is one. Otherwise,
-      <computeroutput>.nil</computeroutput> is returned.
-    </para>
+  <para>
+    The existing image list is returned, if there is one. Otherwise, the <computeroutput>.nil</computeroutput> object is
+    returned.
+  </para>
+  </listitem></varlistentry>
+  <varlistentry><term><emphasis role="bold">Remarks</emphasis></term>
+  <listitem>
+  <para>
+    Note that the MSDN documentation states that the appropriate dimensions for the normal and small icons should be used. It
+    has been observed that if the size of the small icons is not appropriate, there can be drawing problems with the icons in
+    report view. Especially if check boxes are enabled. The <xref linkend="atrCxSmaIcon"/> and <xref
+    linkend="atrCySmlIcon"/> attributes of the <xref linkend="clsSM"/> class reflect the dimensions that should be used for
+    the small icons.  The <emphasis role="italic">cxIcon</emphasis> and <emphasis role="italic">cyIcon</emphasis> attributes
+    of the same class reflect the appropriate dimensions for the normal icons.
+  </para>
+  <para>
+    As noted above the <emphasis role="italic">src</emphasis> argument can be either an <xref linkend="clsImageList"/>
+    object, or a single bitmap. Using an image list object is the most flexible option. The programmer creates the image list
+    in the manner most suitable to the program. When the program is enhanced or changed it is easy to change the image list.
+  </para>
+  <para>
+    When <emphasis role="italic">src</emphasis> is a single bitmap it is used in this way: A single bitmap is created that
+    consists of all the images for the image list. All the images must be the same width and height. The images are arranged
+    in the bitmap in a row, side-by-side, in the order they should appear in the image list. ooDialog uses this bitmap to
+    create an <emphasis role="italic">.ImageList</emphasis> object and assigns it to the list-view. The <emphasis
+    role="italic">src</emphasis> argument can be either the file name of the bitmap or a bitmap <xref linkend="clsImage"/>
+    object.
+  </para>
+  <para>
+    Although using a single bitmap will allow the programmer to save a couple of lines of code, it has a number of
+    disadvantages. The image list is created with the exact number of images in the bitmap and no extra room to add images.
+    The image list is created as an unmasked image list, with a color of 8 bit per pixel. If the program is enhanced or
+    changed in a way that requires even a slight change to the image list, the single bitmap would need to be re-created.
+  </para>
+  <para>
+    When using a single bitmap, if the system fails to create the image list from the details supplied by ooDialog, the
+    method of informing the programmer of the error is not as robust as it is when the programmer creates the image list
+    herself. However, ooDialog will set the <xref linkend="dotSystemErrorCode"/> for any cases where the operating system
+    reports an error. Also note that when using a single bitmap, ooDialog will instantiate a <emphasis
+    role="italic">.ImageList</emphasis> object. The programmer can retrieve this object using the
+   <xref linkend="mthGetImageListClsListView"/>() method and then manipulate it using the methods of the <xref
+   linkend="clsImageList"/> class.
+  </para>
+  <para>
+    Unless a list-view has the LVS_SHAREIMAGELISTS style, (corresponds to the SHAREIMAGES style in the
+   <xref linkend="mthCreateListView"/>() method,) the list-view control will handle releasing the image list(s). When the
+    share image lists style is used, ownership of the image list remains with the programmer. The <xref
+    linkend="clsImageList"/> and <xref linkend="clsImage"/> classes are used to manage image lists and images in ooDialog.
+    The documentation on both classes discusses when and why the programmer may want to release image lists.
+    The Image class documentation has the most detail on this subject.
+  </para>
+  </listitem></varlistentry>
+  <varlistentry><term><emphasis role="bold">Details:</emphasis></term>
+  <listitem>
+  <para>
+    Sets the <xref linkend="dotSystemErrorCode"/>.
+  </para>
+  <para>
+    Raises syntax errors when incorrect arguments are detected.
+  </para>
   </listitem></varlistentry>
   <varlistentry><term><emphasis role="bold">Example:</emphasis></term>
   <listitem>
-    <para>
-      This is a complete working example. It creates an image list using the application icons that
-      ooDialog makes available for general use. The image list is assigned as the normal icon image list.
+  <para>
+    This is a complete working example. It creates an image list using the application icons that ooDialog makes available
+    for general use. The image list is assigned as the normal icon image list.
 <programlisting>
 <![CDATA[
 
   dlg = .ImageDisplay~new
-  if dlg~initCode = 0 then do
+  if dlg~initCode == 0 then do
     dlg~constDir[IDC_LV_IMAGES] = 100
     dlg~create(30, 30, 320, 155, "ooDialog Icon Resources", , , "Tahoma")
     dlg~execute("SHOWTOP", IDI_DLG_OOREXX)
@@ -7326,11 +7325,11 @@
 
 ::requires "ooDialog.cls"
 
-::class 'ImageDisplay' subclass UserDialog inherit AdvancedControls
+::class 'ImageDisplay' subclass UserDialog
 
 ::method defineDialog
 
-  self~addListControl(IDC_LV_IMAGES, , 10, 10, 300, 135, "ICON SINGLESEL");
+  self~createListView(IDC_LV_IMAGES, 10, 10, 300, 135, "ICON SINGLESEL");
 
 ::method initDialog
 
@@ -7346,27 +7345,24 @@
   ids[3] = self~constDir[IDI_DLG_APPICON2]
   ids[4] = self~constDir[IDI_DLG_OOREXX]
 
-  SM_CXICON = 11
-  SM_CYICON = 12
-
-  size = .Size~new(.DlgUtil~getSystemMetrics(SM_CXICON), .DlgUtil~getSystemMetrics(SM_CYICON))
-
-  oodModule = .ResourceImage~new("oodialog.dll", self)
-  icons = oodModule~getImages(ids, .Image~toID(IMAGE_ICON), size)
-
-  flags = .DlgUtil~or(.Image~toID(ILC_COLOR24), .Image~toID(ILC_MASK))
-  imageList = .ImageList~create(size, flags, 4, 0)
+  size = .Size~new(.SM~cxIcon, .SM~cyIcon)
+
+  oodModule = .ResourceImage~new(self)
+  icons = oodModule~getImages(ids, 'ICON', size)
+
+  imageList = .ImageList~create(size, 'COLOR24 MASK', 4, 0)
   imageList~addImages(icons)
 
   list = self~newListView(IDC_LV_IMAGES)
-  list~setImageList(imageList, .Image~toID(LVSIL_NORMAL))
+  list~setImageList(imageList, 'NORMAL')
 
   do i = 1 to ids~items
     list~add(names[i] '('ids[i]')', i - 1)
   end
-]]>
-</programlisting>
-    </para>
+
+]]>
+</programlisting>
+  </para>
   </listitem></varlistentry>
 </variablelist>
 </section>  <!-- End ListView::setImageList() -->