X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/97c611f84745e193ac2b156a92dd127aaa9c7d51..13220cca727ed74c2998b4fb89a4d80aacf28e68:/docs/latex/wx/listctrl.tex diff --git a/docs/latex/wx/listctrl.tex b/docs/latex/wx/listctrl.tex index a8398da8a2..67aa6b07c3 100644 --- a/docs/latex/wx/listctrl.tex +++ b/docs/latex/wx/listctrl.tex @@ -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} @@ -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} @@ -187,7 +186,7 @@ Deletes all items and all columns. \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"}} -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} @@ -242,18 +241,18 @@ Ensures this item is visible. \func{long}{FindItem}{\param{long }{start}, \param{const wxString\& }{str}, \param{const bool }{partial = false}} -Find an item whose label matches this string, starting from the item after {\it start} or +Find an item whose label matches this string, starting from {\it start} or the beginning if {\it start} is -1. \func{long}{FindItem}{\param{long }{start}, \param{long }{data}} -Find an item whose data matches this data, starting from the item after {\it start} or +Find an item whose data matches this data, starting from {\it start} or 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 -the item after {\it start} or the beginning if {\it start} is -1. +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 implements the following methods:\par @@ -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 @@ -672,7 +673,7 @@ 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 {\tt wxLC\_VIRTUAL} style. It should return the string containing the text of @@ -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. @@ -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} @@ -923,8 +930,7 @@ Sets the text colour of the list control. \func{void}{SetWindowStyleFlag}{\param{long }{style}} -Sets the whole window style. - +Sets the whole window style, deleting all items. \membersection{wxListCtrl::SortItems}\label{wxlistctrlsortitems}