X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/90e572f1e5af1e51fd14e2e1e6f64fa3e258e590..8fa8d158bd6aadab98b40fc85a30425ada252ff4:/docs/latex/wx/listctrl.tex diff --git a/docs/latex/wx/listctrl.tex b/docs/latex/wx/listctrl.tex index ecdcbdd43f..1d8039bb5d 100644 --- a/docs/latex/wx/listctrl.tex +++ b/docs/latex/wx/listctrl.tex @@ -23,7 +23,7 @@ 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 +\helpref{OnGetItemImage}{wxlistctrlongetitemimage} or \helpref{OnGetItemColumnImage}{wxlistctrlongetitemcolumnimage} 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 @@ -204,7 +204,7 @@ Creates the list control. See \helpref{wxListCtrl::wxListCtrl}{wxlistctrlctor} f \func{bool}{DeleteAllItems}{} -Deletes all the items in the list control. +Deletes all items in the list control. {\bf NB:} This function does {\it not} send the {\tt wxEVT\_COMMAND\_LIST\_DELETE\_ITEM} event because deleting many items @@ -664,11 +664,15 @@ This function may be overloaded in the derived class for a control with for the specified {\tt item} or {\tt NULL} to use the default appearance parameters. +wxListCtrl will not delete the pointer or keep a reference of it. You can +return the same wxListItemAttr pointer for every OnGetItemAttr call. + The base class version always returns {\tt NULL}. \wxheading{See also} \helpref{OnGetItemImage}{wxlistctrlongetitemimage},\\ +\helpref{OnGetItemColumnImage}{wxlistctrlongetitemcolumnimage},\\ \helpref{OnGetItemText}{wxlistctrlongetitemtext} @@ -681,14 +685,33 @@ This function must be overloaded in the derived class for a control with (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. +In a control with {\tt wxLC\_REPORT} style, OnGetItemImage only gets called for +the first column of each line. The base class version always returns $-1$. \wxheading{See also} \helpref{OnGetItemText}{wxlistctrlongetitemtext},\\ +\helpref{OnGetItemColumnImage}{wxlistctrlongetitemcolumnimage},\\ \helpref{OnGetItemAttr}{wxlistctrlongetitemattr} +\membersection{wxListCtrl::OnGetItemColumnImage}\label{wxlistctrlongetitemcolumnimage} + +\constfunc{virtual int}{OnGetItemColumnImage}{\param{long }{item}, \param{long }{column}} + +Overload this function in the derived class for a control with +{\tt wxLC\_VIRTUAL} and {\tt wxLC\_REPORT} styles in order to specify the image +index for the given line and column. + +The base class version always calls OnGetItemImage for the first column, else +it returns $-1$. + +\wxheading{See also} + +\helpref{OnGetItemText}{wxlistctrlongetitemtext},\\ +\helpref{OnGetItemImage}{wxlistctrlongetitemimage},\\ +\helpref{OnGetItemAttr}{wxlistctrlongetitemattr} \membersection{wxListCtrl::OnGetItemText}\label{wxlistctrlongetitemtext} @@ -702,6 +725,7 @@ the given {\it column} for the specified {\tt item}. \helpref{SetItemCount}{wxlistctrlsetitemcount},\\ \helpref{OnGetItemImage}{wxlistctrlongetitemimage},\\ +\helpref{OnGetItemColumnImage}{wxlistctrlongetitemcolumnimage},\\ \helpref{OnGetItemAttr}{wxlistctrlongetitemattr} @@ -896,7 +920,8 @@ Sets the item's font. \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. +image list associated with the list control. In report view, this only sets +the image for the first column. \func{bool}{SetItemImage}{\param{long }{item}, \param{int }{image}, \param{int }{selImage}} @@ -905,6 +930,14 @@ image list associated with the list control. This form is deprecated: {\it selIm used. +\membersection{wxListCtrl::SetItemColumnImage}\label{wxlistctrlsetitemcolumnimage} + +\func{bool}{SetItemImage}{\param{long }{item}, \param{long }{column}\param{int }{image}} + +Sets the image associated with the item. In report view, you can specify the column. +The image is an index into the image list associated with the list control. + + \membersection{wxListCtrl::SetItemPosition}\label{wxlistctrlsetitemposition} \func{bool}{SetItemPosition}{\param{long }{item}, \param{const wxPoint\& }{pos}} @@ -996,5 +1029,6 @@ SortItems with a reference to a callable object that expects two parameters.} \perlnote{In wxPerl the comparison function must take just two parameters; - however, you may use a closure to achieve an effect similar to the - SortItems third parameter.} +however, you may use a closure to achieve an effect similar to the +SortItems third parameter.} +