From: <mie...@us...> - 2013-01-13 23:57:04
|
Revision: 8835 http://sourceforge.net/p/oorexx/code-0/8835 Author: miesfeld Date: 2013-01-13 23:57:01 +0000 (Sun, 13 Jan 2013) Log Message: ----------- Feature Requests: #513 Need access to the ListView_GetItemRect ListView_GetIndexItemRect See ticket [Feature-requests:#513] Modified Paths: -------------- docs/trunk/oodialog/en-US/listview.xml Modified: docs/trunk/oodialog/en-US/listview.xml =================================================================== --- docs/trunk/oodialog/en-US/listview.xml 2013-01-13 22:59:16 UTC (rev 8834) +++ docs/trunk/oodialog/en-US/listview.xml 2013-01-13 23:57:01 UTC (rev 8835) @@ -395,10 +395,18 @@ <entry>Retrieves the client area coordinates of an item in this list-view control as a <computeroutput>Point</computeroutput> object.</entry> </row> <row> +<entry><xref linkend="mthGetItemRect"/></entry> +<entry>Gets the bounding <xref linkend="ovvRectangleCoordinates"/> for all or part of an item in the current view.</entry> +</row> +<row> <entry><xref linkend="mthGetSubitem"/></entry> <entry>Receives some, or all, of the information of a subitem of a list-view item. The information is returned as a <link linkend="clsLvSubItem">LvSubItem</link> object.</entry> </row> <row> +<entry><xref linkend="mthGetSubitemRect"/></entry> +<entry>Gets the bounding <xref linkend="ovvRectangleCoordinates"/> for all or part of a subitem in the current view of this list-view control.</entry> +</row> +<row> <entry><xref linkend="mthGetToolTipsClsListview"/></entry> <entry>Retrieves the child <link linkend="clsToolTip">ToolTip</link> control used by this list-view.</entry> </row> @@ -758,7 +766,7 @@ <xref linkend="chpDialogObject"/> object. The basic syntax is: <programlisting> <![CDATA[ ->>-connectListViewEvent(--id--,--event--+---------------+--)------------------->< +>>-connectListViewEvent(--id--,--event--+---------------+--)---->< +-,--methodName-+ ]]> </programlisting> @@ -1304,7 +1312,7 @@ <![CDATA[ +-------------------+ V | ->>-aListControl~addStyle(--"----+-ICON----------+-+--"--)------>< +>>-aListControl~addStyle(--"----+-ICON----------+-+--"--)------->< +-SMALLICON-----+ +-LIST----------+ +-REPORT--------+ @@ -2050,7 +2058,7 @@ <programlisting> <![CDATA[ +-0-+ ->>-aListControl~ensureVisible(--item--,--+---+--)-------------->< +>>-aListControl~ensureVisible(--item--,--+---+--)--------------->< +-1-+ @@ -2105,7 +2113,7 @@ <programlisting> <![CDATA[ +- -1--+ +-0-+ ->>-aListControl~find(--text--,--+------+--,--+---+--)---------->< +>>-aListControl~find(--text--,--+------+--,--+---+--)----------->< +-item-+ +-1-+ @@ -2141,7 +2149,7 @@ <indexterm><primary>findNearestXY</primary></indexterm> <programlisting> <![CDATA[ ->>-aListControl~findNearestXY(--x--,--y--+--------------------+--)->< +>>-aListControl~findNearestXY(--x--,--y--+--------------------+--)------------->< | +-DOWN--+ | +-,--"--+-UP----+--"-+ +-LEFT--+ @@ -2179,7 +2187,7 @@ <programlisting> <![CDATA[ +- -1--+ +-0-+ ->>-aListControl~findPartial(--text--,--+------+--,--+---+--)--->< +>>-aListControl~findPartial(--text--,--+------+--,--+---+--)---->< +-item-+ +-1-+ @@ -3675,6 +3683,122 @@ </variablelist> </section> <!-- End ListView::getItemPos() --> +<section id="mthGetItemRect" xreflabel="getItemRect"><title>getItemRect</title> +<indexterm><primary>getItemRect</primary></indexterm> +<indexterm><primary>ListView class</primary><secondary>getItemRect</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--getItemRect(--index--+---------+--)---------->< + +-,-part--+ +]]> +</programlisting> + +<para> + Gets the bounding <xref linkend="ovvRectangleCoordinates"/> for all or part of an item in the current view. +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para> + The arguments are: + </para> + <variablelist> + <varlistentry><term>index [required]</term> + <listitem> + <para> + The index of the list-view item that contains the subitem whose bounding rectangle is to be retrieved. + </para> + </listitem></varlistentry> + <varlistentry><term>part [optional]</term> + <listitem> + <para> + Keyword indicating which part of the item rectangle is sought. Use exactly one of the following keywords, case is not + significant: + </para> + <para> + <simplelist type='vert' columns='3'> + <member>BOUNDS </member> + <member>ICON </member> + <member>LABEL </member> + <member>SELECTBOUNDS</member> + </simplelist> + <variablelist> + <varlistentry><term>BOUNDS</term> + <listitem> + <para> + Returns the bounding rectangle of the entire item, including the icon and label. This is the default if this + argument is omitted. + </para> + </listitem></varlistentry> + <varlistentry><term>ICON</term> + <listitem> + <para> + Returns the bounding rectangle of the icon or small icon. + </para> + </listitem></varlistentry> + <varlistentry><term>LABEL</term> + <listitem> + <para> + Returns the bounding rectangle of the item text. + </para> + </listitem></varlistentry> + <varlistentry><term>SELECTBOUNDS</term> + <listitem> + <para> + Returns the union of the ICON and LABEL rectangles, but excludes columns in report view. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + </variablelist> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The specified bounding rectangle, as a <xref linkend="clsRect"/> object, on success, the + <computeroutput>nil</computeroutput> object on error. + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Remarks:</emphasis></term> + <listitem> + <para> + Note that a bounding <xref linkend="ovvRectangleCoordinates"/> is different than a <emphasis + role="italic">point / size</emphasis> rectangle. + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Details</emphasis></term> + <listitem> + <para> + Raises syntax errors when incorrect usage is detected. + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example is a snippet of code that overlays a combo box on top of a list-view. The combo box is sized to occupy the + area of the label of the list-view item at <emphasis role="italic">itemIndex</emphasis>. Note that the combo box's height + is set to 4 times the hit of the list-view item. When the combo box is first shown, it does not show the drop-down list + and its height is very close to the height of the list-view item. However, its height is restricted to the height of the + item, the drop-down list will not show when the user clicks on the down arrow icon. Setting its height larger allows the + drop-down list to open and show 3 items: +<programlisting> +<![CDATA[ + + ... + + r = list~getItemRect(itemIndex, 'LABEL') + ret = cb~setWindowPos(list~hwnd, r~left, r~top, r~right - r~left, 4 * (r~bottom - r~top), "SHOWWINDOW NOZORDERCHANGE") + cbVisible = .true + cb~assignFocus + +]]> +</programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ListView::getItemRect() --> + <section id="mthGetSubitem" xreflabel="getSubitem"><title>getSubitem</title> <indexterm><primary>getSubitem</primary><secondary>ListView class</secondary></indexterm> <indexterm><primary>ListView class</primary><secondary>getSubitem</secondary></indexterm> @@ -3792,7 +3916,124 @@ </variablelist> </section> <!-- End ListView::getSubitem() --> +<section id="mthGetSubitemRect" xreflabel="getSubitemRect"><title>getSubitemRect</title> +<indexterm><primary>getSubitemRect</primary></indexterm> +<indexterm><primary>ListView class</primary><secondary>getSubitemRect</secondary></indexterm> +<programlisting> +<![CDATA[ +>>--getSubitemRect(--index-,-subitemIdx--+---------+--)--------->< + +-,-part--+ +]]> +</programlisting> +<para> + Gets the bounding <xref linkend="ovvRectangleCoordinates"/> for all or part of a subitem in the current view + of this list-view control. +</para> +<variablelist> + <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> + <listitem> + <para> + The arguments are: + </para> + <variablelist> + <varlistentry><term>index [required]</term> + <listitem> + <para> + The index of the list-view item that contains the subitem whose bounding rectangle is to be retrieved. + </para> + </listitem></varlistentry> + <varlistentry><term>subitemIdx [required]</term> + <listitem> + <para> + The index of the list-view subitem that contains the subitem whose bounding rectangle is to be retrieved. + </para> + </listitem></varlistentry> + <varlistentry><term>part [optional]</term> + <listitem> + <para> + Keyword indicating which part of the item rectangle is sought. Use exactly one of the following keywords, case is not + significant: + </para> + <para> + <simplelist type='vert' columns='3'> + <member>BOUNDS </member> + <member>ICON </member> + <member>LABEL </member> + </simplelist> + <variablelist> + <varlistentry><term>BOUNDS</term> + <listitem> + <para> + Returns the bounding rectangle of the entire subitem, including the icon and label. This is the default if this + argument is omitted. + </para> + </listitem></varlistentry> + <varlistentry><term>ICON</term> + <listitem> + <para> + Returns the bounding rectangle of the icon or small icon of the subitem. + </para> + </listitem></varlistentry> + <varlistentry><term>LABEL</term> + <listitem> + <para> + Returns the bounding rectangle of the subitem text. + </para> + </listitem></varlistentry> + </variablelist> + </para> + </listitem></varlistentry> + </variablelist> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> + <listitem> + <para> + The specified bounding rectangle, as a <xref linkend="clsRect"/> object, on success, the + <computeroutput>nil</computeroutput> object on error. + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Remarks:</emphasis></term> + <listitem> + <para> + Note that a bounding <xref linkend="ovvRectangleCoordinates"/> is different than a <emphasis + role="italic">point / size</emphasis> rectangle. + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Details</emphasis></term> + <listitem> + <para> + Raises syntax errors when incorrect usage is detected. + </para> + </listitem></varlistentry> + <varlistentry><term><emphasis role="bold">Example:</emphasis></term> + <listitem> + <para> + This example is a snippet of code that overlays a combo box on top of a list-view. The combo box is sized to occupy the + area of the label of the list-view subitem at the specified item index and subitem index. Note that the combo box's + height is set to 4 times the hit of the list-view subitem. When the combo box is first shown, it does not show the + drop-down list and its height is very close to the height of the list-view subitem. However, its height is restricted to + the height of the subitem, the drop-down list will not show when the user clicks on the down arrow icon. Setting its + height larger than the subitme allows the drop-down list to open and show 3 items: +<programlisting> +<![CDATA[ + + ... + + if columnIndex > 0 then do + r = list~getSubitemRect(itemIndex, columnIndex, 'LABEL') + ret = cb~setWindowPos(list~hwnd, r~left, r~top, r~right - r~left, 4 * (r~bottom - r~top), "SHOWWINDOW NOZORDERCHANGE") + cbVisible = .true + cb~assignFocus + end + +]]> +</programlisting> + </para> + </listitem></varlistentry> +</variablelist> +</section> <!-- End ListView::getSubitemRect() --> + <section id="mthGetToolTipsClsListview" xreflabel="getToolTips"><title>getToolTips</title> <indexterm><primary>getToolTips</primary><secondary>ListView class</secondary></indexterm> <indexterm><primary>ListView class</primary><secondary>getToolTips</secondary></indexterm> @@ -4223,7 +4464,7 @@ <secondary>ListView class</secondary></indexterm> <programlisting> <![CDATA[ ->>--insert(--+------+--,--+---------+--,--text--+--------+--)------------------>< +>>--insert(--+------+--,--+---------+--,--text--+--------+--)--->< +-item-+ +-subitem-+ +-,-icon-+ ]]> @@ -4905,7 +5146,7 @@ <programlisting> <![CDATA[ +-0------+ ->>-aListControl~itemText(--item--,--+--------+--)-------------->< +>>-aListControl~itemText(--item--,--+--------+--)--------------->< +-column-+ @@ -4976,7 +5217,7 @@ <secondary>ListView class</secondary></indexterm> <programlisting> <![CDATA[ ->>--modify(--+------+--,--+---------+--,--text--+--------+--)------------------>< +>>--modify(--+------+--,--+---------+--,--text--+--------+--)--->< +-item-+ +-subitem-+ +-,-icon-+ ]]> </programlisting> @@ -5082,7 +5323,7 @@ >>-aListControl~modifyColumn(--column--,--+------+--,--width----> +-text-+ ->--+---------------------+--)---------------------------------->< +>--+---------------------+--)----------------------------------->< | +-LEFT---+ | +-,--"--+-CENTER-+--"-+ +-RIGHT--+ @@ -6034,7 +6275,7 @@ <![CDATA[ +-------------------+ V | ->>-aListControl~removeStyle(--"----+-ICON----------+-+--"--)--->< +>>-aListControl~removeStyle(--"----+-ICON----------+-+--"--)---->< +-SMALLICON-----+ +-LIST----------+ +-REPORT--------+ @@ -6520,7 +6761,7 @@ <indexterm><primary>setColumnWidth</primary></indexterm> <programlisting> <![CDATA[ ->>-aListControl~setColumnWidth(--column--+----------+--)------->< +>>-aListControl~setColumnWidth(--column--+----------+--)-------->< +-,--width-+ @@ -6781,7 +7022,7 @@ <indexterm><primary>setHoverTime</primary></indexterm> <programlisting> <![CDATA[ ->>-aListControl~setHoverTime(--+------+--)--------------------->< +>>-aListControl~setHoverTime(--+------+--)---------------------->< +-time-+ ]]> @@ -7136,7 +7377,7 @@ <programlisting> <![CDATA[ +-0-+ +-0-+ ->>-aListControl~setItemPos(--item--,--+---+--,--+---+--)------->< +>>-aListControl~setItemPos(--item--,--+---+--,--+---+--)-------->< +-x-+ +-y-+ @@ -7272,7 +7513,7 @@ <indexterm><primary>setItemText</primary></indexterm> <programlisting> <![CDATA[ ->>--setItemText(--item--,--+-----------+--,--text--)-->< +>>--setItemText(--item--,--+-----------+--,--text--)------------>< +--subitem--+ ]]> @@ -9412,9 +9653,9 @@ <indexterm><primary>LvFullRow class</primary><secondary>userData</secondary></indexterm> <programlisting> <![CDATA[ ->>--userData----------------------------------------------------->< +>>--userData---------------------------------------------------->< ->>--userData = varName------------------------------------------->< +>>--userData = varName------------------------------------------>< ]]> </programlisting> @@ -10554,7 +10795,7 @@ <![CDATA[ >>--columns-------------------------------------->< ->>--columns = varName----------------------------->< +>>--columns = varName---------------------------->< ]]> </programlisting> |