X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/70ffa79cc9a699085099d3e40d91d8a9d6e20f49..cbc855087fd939c5c480ef22b5f72b14302849b7:/docs/latex/wx/listctrl.tex

diff --git a/docs/latex/wx/listctrl.tex b/docs/latex/wx/listctrl.tex
index e27e2b56b8..123a760b85 100644
--- a/docs/latex/wx/listctrl.tex
+++ b/docs/latex/wx/listctrl.tex
@@ -9,10 +9,10 @@ A special case of report view quite different from the other modes of the list
 control is a virtual control in which the items data (including text, images
 and attributes) is managed by the main program and is requested by the control
 itself only when needed which allows to have controls with millions of items
-without consuming much memory. To use virtual list control you must use 
-\helpref{SetItemCount}{wxlistctrlsetitemcount} first and overload at least 
-\helpref{OnGetItemText}{wxlistctrlongetitemtext} (and optionally 
-\helpref{OnGetItemImage}{wxlistctrlongetitemimage} and 
+without consuming much memory. To use virtual list control you must use
+\helpref{SetItemCount}{wxlistctrlsetitemcount} first and overload at least
+\helpref{OnGetItemText}{wxlistctrlongetitemtext} (and optionally
+\helpref{OnGetItemImage}{wxlistctrlongetitemimage} and
 \helpref{OnGetItemAttr}{wxlistctrlongetitemattr}) to return the information
 about the items when the control requests it. Virtual list control can be used
 as a normal one except that no operations which can take time proportional to
@@ -42,17 +42,16 @@ in \helpref{wxListEvent}{wxlistevent}.
 
 \twocolwidtha{7cm}
 \begin{twocollist}\itemsep=0pt
-\twocolitem{\windowstyle{wxLC\_LIST}}{multicolumn list view, with optional small icons.
+\twocolitem{\windowstyle{wxLC\_LIST}}{Multicolumn list view, with optional small icons.
 Columns are computed automatically, i.e. you don't set columns as in wxLC\_REPORT. In other words,
 the list wraps, unlike a wxListBox.}
-\twocolitem{\windowstyle{wxLC\_REPORT}}{single or multicolumn report view, with optional header.}
-\twocolitem{\windowstyle{wxLC\_VIRTUAL}}{virtual control, may only be used with wxLC\_REPORT}
+\twocolitem{\windowstyle{wxLC\_REPORT}}{Single or multicolumn report view, with optional header.}
+\twocolitem{\windowstyle{wxLC\_VIRTUAL}}{The application provides items text on demand. May only be used with wxLC\_REPORT.}
 \twocolitem{\windowstyle{wxLC\_ICON}}{Large icon view, with optional labels.}
 \twocolitem{\windowstyle{wxLC\_SMALL\_ICON}}{Small icon view, with optional labels.}
 \twocolitem{\windowstyle{wxLC\_ALIGN\_TOP}}{Icons align to the top. Win32 default, Win32 only. }
 \twocolitem{\windowstyle{wxLC\_ALIGN\_LEFT}}{Icons align to the left. }
 \twocolitem{\windowstyle{wxLC\_AUTOARRANGE}}{Icons arrange themselves. Win32 only. }
-\twocolitem{\windowstyle{wxLC\_VIRTUAL}}{The application provides items text on demand.}
 \twocolitem{\windowstyle{wxLC\_EDIT\_LABELS}}{Labels are editable: the application will be notified when editing starts.}
 \twocolitem{\windowstyle{wxLC\_NO\_HEADER}}{No header in report mode. }
 \twocolitem{\windowstyle{wxLC\_SINGLE\_SEL}}{Single selection (default is multiple).}
@@ -104,7 +103,7 @@ functions that take a \helpref{wxListEvent}{wxlistevent} argument.
 \latexignore{\rtfignore{\wxheading{Members}}}
 
 
-\membersection{wxListCtrl::wxListCtrl}\label{wxlistctrlconstr}
+\membersection{wxListCtrl::wxListCtrl}\label{wxlistctrlctor}
 
 \func{}{wxListCtrl}{\void}
 
@@ -112,7 +111,7 @@ Default constructor.
 
 \func{}{wxListCtrl}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
 \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
-\param{long}{ style = wxLC\_ICON}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listCtrl"}}
+\param{long}{ style = wxLC\_ICON}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = wxListCtrlNameStr}}
 
 Constructor, creating and showing a list control.
 
@@ -138,7 +137,7 @@ appropriately.}
 \helpref{wxListCtrl::Create}{wxlistctrlcreate}, \helpref{wxValidator}{wxvalidator}
 
 
-\membersection{wxListCtrl::\destruct{wxListCtrl}}
+\membersection{wxListCtrl::\destruct{wxListCtrl}}\label{wxlistctrldtor}
 
 \func{void}{\destruct{wxListCtrl}}{\void}
 
@@ -164,7 +163,7 @@ Arranges the items in icon or small icon view. This only has effect on Win32. {\
 
 \func{void}{AssignImageList}{\param{wxImageList*}{ imageList}, \param{int }{which}}
 
-Sets the image list associated with the control and 
+Sets the image list associated with the control and
 takes ownership of it (i.e. the control will, unlike when using
 SetImageList, delete the list when destroyed). {\it which} is one of
 wxIMAGE\_LIST\_NORMAL, wxIMAGE\_LIST\_SMALL, wxIMAGE\_LIST\_STATE (the last is unimplemented).
@@ -185,9 +184,9 @@ Deletes all items and all columns.
 
 \func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
 \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
-\param{long}{ style = wxLC\_ICON}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listCtrl"}}
+\param{long}{ style = wxLC\_ICON}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = wxListCtrlNameStr}}
 
-Creates the list control. See \helpref{wxListCtrl::wxListCtrl}{wxlistctrlconstr} for further details.
+Creates the list control. See \helpref{wxListCtrl::wxListCtrl}{wxlistctrlctor} for further details.
 
 
 \membersection{wxListCtrl::DeleteAllItems}\label{wxlistctrldeleteallitems}
@@ -252,7 +251,7 @@ the beginning if 'start' is -1.
 
 \func{long}{FindItem}{\param{long }{start}, \param{const wxPoint\& }{pt}, \param{int }{direction}}
 
-Find an item nearest this position in the specified direction, starting from 
+Find an item nearest this position in the specified direction, starting from
 {\it start} or the beginning if {\it start} is -1.
 
 \pythonnote{In place of a single overloaded method name, wxPython
@@ -521,7 +520,7 @@ list or report view.
 
 
 
-\membersection{wxRect}{wxListCtrl::GetViewRect}\label{wxlistctrlgetviewrect}
+\membersection{wxListCtrl::GetViewRect}\label{wxlistctrlgetviewrect}
 
 \constfunc{wxRect}{GetViewRect}{\void}
 
@@ -539,7 +538,9 @@ list or report views (this is a limitation of the native Win32 control).
 \func{long}{HitTest}{\param{const wxPoint\& }{point}, \param{int\& }{flags}}
 
 Determines which item (if any) is at the specified point,
-giving details in {\it flags}. {\it flags} will be a combination of the following flags:
+giving details in {\it flags}. Returns index of the item or {\tt wxNOT\_FOUND}
+if no item is at the specified point.
+{\it flags} will be a combination of the following flags:
 
 \twocolwidtha{5cm}
 \begin{twocollist}\itemsep=0pt
@@ -578,8 +579,8 @@ implements the following methods:\par
 \indented{2cm}{\begin{twocollist}
 \twocolitem{{\bf InsertColumn(col, heading, format=wxLIST\_FORMAT\_LEFT,
 width=-1)}}{Creates a column using a header string only.}
-\twocolitem{{\bf InsertColumnInfo(col, item)}}{Creates a column using a
-wxListInfo.}
+\twocolitem{{\bf InsertColumnItem(col, item)}}{Creates a column using a
+wxListItem.}
 \end{twocollist}}
 }
 
@@ -639,7 +640,7 @@ method:\par
 
 \func{virtual wxListItemAttr *}{OnGetItemAttr}{\param{long }{item}}
 
-This function may be overloaded in the derived class for a control with 
+This function may be overloaded in the derived class for a control with
 {\tt wxLC\_VIRTUAL} style. It should return the attribute for the
 for the specified {\tt item} or {\tt NULL} to use the default appearance
 parameters.
@@ -656,8 +657,8 @@ The base class version always returns {\tt NULL}.
 
 \func{virtual int}{OnGetItemImage}{\param{long }{item}}
 
-This function must be overloaded in the derived class for a control with 
-{\tt wxLC\_VIRTUAL} style having an \helpref{image list}{wxlistctrlsetimagelist} 
+This function must be overloaded in the derived class for a control with
+{\tt wxLC\_VIRTUAL} style having an \helpref{image list}{wxlistctrlsetimagelist}
 (if the control doesn't have an image list, it is not necessary to overload
  it). It should return the index of the items image in the controls image list
 or $-1$ for no image.
@@ -672,9 +673,9 @@ The base class version always returns $-1$.
 
 \membersection{wxListCtrl::OnGetItemText}\label{wxlistctrlongetitemtext}
 
-\func{virtual wxString}{OnGetItemText}{\param{long }{item}, \param{long }{column}}
+\constfunc{virtual wxString}{OnGetItemText}{\param{long }{item}, \param{long }{column}}
 
-This function {\bf must} be overloaded in the derived class for a control with 
+This function {\bf must} be overloaded in the derived class for a control with
 {\tt wxLC\_VIRTUAL} style. It should return the string containing the text of
 the given {\it column} for the specified {\tt item}.
 
@@ -715,8 +716,8 @@ virtual list controls.
 
 \func{bool}{ScrollList}{\param{int }{dx}, \param{int }{dy}}
 
-Scrolls the list control. If in icon, small icon or report view mode, 
-{\it dx} specifies the number of pixels to scroll. If in list view mode, 
+Scrolls the list control. If in icon, small icon or report view mode,
+{\it dx} specifies the number of pixels to scroll. If in list view mode,
 {\it dx} specifies the number of columns to scroll. {\it dy} always specifies
 the number of pixels to scroll vertically.
 
@@ -807,12 +808,6 @@ The {\bf m\_mask} member contains a bitlist specifying which of the other fields
 
 The {\bf m\_stateMask} and {\bf m\_state} members take flags from the following:
 
-The wxListItem object can also contain item-specific colour and font
-information: for this you need to call one of SetTextColour(),
-SetBackgroundColour() or SetFont() functions on it passing it the colour/font
-to use. If the colour/font is not specified, the default list control
-colour/font is used.
-
 \twocolwidtha{5cm}
 \begin{twocollist}\itemsep=0pt
 \twocolitem{wxLIST\_STATE\_DONTCARE}{Don't care what the state is. Win32 only. }
@@ -822,6 +817,12 @@ colour/font is used.
 \twocolitem{wxLIST\_STATE\_CUT}{The item is in the cut state. Win32 only. }
 \end{twocollist}
 
+The wxListItem object can also contain item-specific colour and font
+information: for this you need to call one of SetTextColour(),
+SetBackgroundColour() or SetFont() functions on it passing it the colour/font
+to use. If the colour/font is not specified, the default list control
+colour/font is used.
+
 \func{long}{SetItem}{\param{long }{index}, \param{int }{col}, \param{const wxString\& }{label}, \param{int }{imageId = -1}}
 
 Sets a string field at a particular column.
@@ -841,7 +842,7 @@ string or image at a given location.}
 
 Sets the background colour for this item. This function only works in report view.
 
-The colour can be retrieved using 
+The colour can be retrieved using
 \helpref{GetItemBackgroundColour}{wxlistctrlgetitembackgroundcolour}.
 
 
@@ -866,17 +867,23 @@ Associates application-defined data with this item.
 
 \membersection{wxListCtrl::SetItemImage}\label{wxlistctrlsetitemimage}
 
+\func{bool}{SetItemImage}{\param{long }{item}, \param{int }{image}}
+
+Sets the image associated with the item. The image is an index into the
+image list associated with the list control.
+
 \func{bool}{SetItemImage}{\param{long }{item}, \param{int }{image}, \param{int }{selImage}}
 
 Sets the unselected and selected images associated with the item. The images are indices into the
-image list associated with the list control.
+image list associated with the list control. This form is deprecated: {\it selImage} is not
+used.
 
 
 \membersection{wxListCtrl::SetItemPosition}\label{wxlistctrlsetitemposition}
 
 \func{bool}{SetItemPosition}{\param{long }{item}, \param{const wxPoint\& }{pos}}
 
-Sets the position of the item, in icon or small icon view.
+Sets the position of the item, in icon or small icon view. Windows only.
 
 
 \membersection{wxListCtrl::SetItemState}\label{wxlistctrlsetitemstate}
@@ -901,7 +908,7 @@ Sets the item text for this item.
 
 Sets the colour for this item. This function only works in report view.
 
-The colour can be retrieved using 
+The colour can be retrieved using
 \helpref{GetItemTextColour}{wxlistctrlgetitemtextcolour}.
 
 
