Patch from Tim Kosse to add supoprt for wxListCtrl::OnGetItemColumnImage

which enables images to be specified for columns other than zero in
virtual list controls.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-01-25 23:29:02 +00:00
parent 0a6f92b85c
commit 208458a7f5
9 changed files with 87 additions and 10 deletions

View File

@@ -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
@@ -672,6 +672,7 @@ The base class version always returns {\tt NULL}.
\wxheading{See also}
\helpref{OnGetItemImage}{wxlistctrlongetitemimage},\\
\helpref{OnGetItemColumnImage}{wxlistctrlongetitemcolumnimage},\\
\helpref{OnGetItemText}{wxlistctrlongetitemtext}
@@ -684,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}
@@ -705,6 +725,7 @@ the given {\it column} for the specified {\tt item}.
\helpref{SetItemCount}{wxlistctrlsetitemcount},\\
\helpref{OnGetItemImage}{wxlistctrlongetitemimage},\\
\helpref{OnGetItemColumnImage}{wxlistctrlongetitemcolumnimage},\\
\helpref{OnGetItemAttr}{wxlistctrlongetitemattr}