X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eaaa6a06a25774c18d10bb8182cc1934ed0ed9aa..20e85460c40ebc4dcc9577928771adb264cc998f:/docs/latex/wx/listctrl.tex?ds=inline

diff --git a/docs/latex/wx/listctrl.tex b/docs/latex/wx/listctrl.tex
index c7f85fa14b..7d7a0873bb 100644
--- a/docs/latex/wx/listctrl.tex
+++ b/docs/latex/wx/listctrl.tex
@@ -12,6 +12,10 @@ To intercept events from a list control, use the event table macros described in
 \helpref{wxEvtHandler}{wxevthandler}\\
 \helpref{wxObject}{wxobject}
 
+\wxheading{Include files}
+
+<wx/listctrl.h>
+
 \wxheading{Window styles}
 
 \twocolwidtha{5cm}
@@ -35,6 +39,28 @@ the list wraps, unlike a wxListBox.}
 
 See also \helpref{window styles overview}{windowstyles}.
 
+\wxheading{Event handling}
+
+To process input from a list control, use these event handler macros to direct input to member
+functions that take a \helpref{wxListEvent}{wxlistevent} argument.
+
+\twocolwidtha{7cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf EVT\_LIST\_BEGIN\_DRAG(id, func)}}{Begin dragging with the left mouse button.}
+\twocolitem{{\bf EVT\_LIST\_BEGIN\_RDRAG(id, func)}}{Begin dragging with the right mouse button.}
+\twocolitem{{\bf EVT\_LIST\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label.}
+\twocolitem{{\bf EVT\_LIST\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label.}
+\twocolitem{{\bf EVT\_LIST\_DELETE\_ITEM(id, func)}}{Delete an item.}
+\twocolitem{{\bf EVT\_LIST\_DELETE\_ALL\_ITEMS(id, func)}}{Delete all items.}
+\twocolitem{{\bf EVT\_LIST\_GET\_INFO(id, func)}}{Request information from the application, usually the item text.}
+\twocolitem{{\bf EVT\_LIST\_SET\_INFO(id, func)}}{Information is being supplied (not implemented).}
+\twocolitem{{\bf EVT\_LIST\_ITEM\_SELECTED(id, func)}}{The item has been selected.}
+\twocolitem{{\bf EVT\_LIST\_ITEM\_DESELECTED(id, func)}}{The item has been deselected.}
+\twocolitem{{\bf EVT\_LIST\_KEY\_DOWN(id, func)}}{A key has been pressed.}
+\twocolitem{{\bf EVT\_LIST\_INSERT\_ITEM(id, func)}}{An item has been inserted.}
+\twocolitem{{\bf EVT\_LIST\_COL\_CLICK(id, func)}}{A column ({\bf m\_col}) has been left-clicked.}
+\end{twocollist}%
+
 \wxheading{See also}
 
 \helpref{wxListCtrl overview}{wxlistctrloverview}, \helpref{wxListBox}{wxlistbox}, \helpref{wxTreeCtrl}{wxtreectrl},\rtfsp
@@ -150,6 +176,15 @@ the beginning if 'start' is -1.
 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.
 
+\pythonnote{In place of a single overloaded method name, wxPython
+implements the following methods:\par
+\indented{2cm}{\begin{twocollist}
+\twocolitem{\bf{FindItem(start, str, partial=FALSE)}}{}
+\twocolitem{\bf{FindItemData(start, data)}}{}
+\twocolitem{\bf{FindItemAtPos(start, point, direction)}}{}
+\end{twocollist}}
+}
+
 \membersection{wxListCtrl::GetColumn}\label{wxlistctrlgetcolumn}
 
 \constfunc{bool}{GetColumn}{\param{int }{col}, \param{wxListItem\& }{item}}
@@ -198,6 +233,10 @@ Returns the specified image list. {\it which} may be one of:
 Gets information about the item. See \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem} for more
 information.
 
+\pythonnote{The wxPython version of this method takes a parameter
+representing the item ID, and returns the wxListItem object.
+}
+
 \membersection{wxListCtrl::GetItemData}\label{wxlistctrlgetitemdata}
 
 \constfunc{long}{GetItemData}{\param{long }{item}}
@@ -210,6 +249,9 @@ Gets the application-defined data associated with this item.
 
 Returns the position of the item, in icon or small icon view.
 
+\pythonnote{The wxPython version of this method accempts only the item
+ID and returns the wxPoint.}
+
 \membersection{wxListCtrl::GetItemRect}\label{wxlistctrlgetitemrect}
 
 \constfunc{bool}{GetItemRect}{\param{long }{item}, \param{wxRect\& }{rect}, \param{int }{code = wxLIST\_RECT\_BOUNDS}}
@@ -218,6 +260,9 @@ Returns the rectangle representing the item's size and position, in client coord
 
 {\it code} is one of wxLIST\_RECT\_BOUNDS, wxLIST\_RECT\_ICON, wxLIST\_RECT\_LABEL.
 
+\pythonnote{The wxPython version of this method accempts only the item
+ID and returns the wxRect.}
+
 \membersection{wxListCtrl::GetItemState}\label{wxlistctrlgetitemstate}
 
 \constfunc{int}{GetItemState}{\param{long }{item}, \param{long }{stateMask}}
@@ -329,6 +374,16 @@ For list view mode (only), inserts a column. For more details, see \helpref{wxLi
 
 For list view mode (only), inserts a column. For more details, see \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem}.
 
+\pythonnote{In place of a single overloaded method name, wxPython
+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.}
+\end{twocollist}}
+}
+
 \membersection{wxListCtrl::InsertItem}\label{wxlistctrlinsertitem}
 
 \func{long}{InsertItem}{\param{wxListItem\& }{info}}
@@ -348,6 +403,26 @@ Inserts an image item.
 
 Insert an image/string item.
 
+\wxheading{Parameters}
+
+\docparam{info}{wxListItem object}
+
+\docparam{index}{Index of the new item, supplied by the application}
+
+\docparam{label}{String label}
+
+\docparam{imageIndex}{index into the image list associated with this control and view style}
+
+\pythonnote{In place of a single overloaded method name, wxPython
+implements the following methods:\par
+\indented{2cm}{\begin{twocollist}
+\twocolitem{\bf{InsertItem(item)}}{Inserts an item using a wxListItem.}
+\twocolitem{\bf{InsertStringItem(index, label)}}{Inserts a string item.}
+\twocolitem{\bf{InsertImageItem(index, imageIndex)}}{Inserts an image item.}
+\twocolitem{\bf{InsertImageStringItem(index, label, imageIndex)}}{Insert an image/string item.}
+\end{twocollist}}
+}
+
 \membersection{wxListCtrl::ScrollList}\label{wxlistctrlscrolllist}
 
 \func{bool}{ScrollList}{\param{int }{dx}, \param{int }{dy}}
@@ -377,10 +452,12 @@ information.
 
 \func{bool}{SetColumnWidth}{\param{int }{col}, \param{int }{width}}
 
-Sets the column width (report view only).
+Sets the column width.
 
 {\it width} can be a width in pixels or wxLIST\_AUTOSIZE (-1) or wxLIST\_AUTOSIZE\_USEHEADER (-2).
 
+In small or normal icon view, {\it col} must be -1, and the column width is set for all columns.
+
 \membersection{wxListCtrl::SetImageList}\label{wxlistctrlsetimagelist}
 
 \func{void}{SetImageList}{\param{wxImageList*}{ imageList}, \param{int }{which}}
@@ -438,6 +515,16 @@ The {\bf m\_stateMask} and {\bf m\_state} members take flags from the following:
 
 Sets a string field at a particular column.
 
+\pythonnote{In place of a single overloaded method name, wxPython
+implements the following methods:\par
+\indented{2cm}{\begin{twocollist}
+\twocolitem{\bf{SetItem(item)}}{Sets information about the given wxListItem.}
+\twocolitem{\bf{SetStringItem(index, col, label, imageId)}}{Sets a
+string or image at a given location.}
+\end{twocollist}}
+}
+
+
 \membersection{wxListCtrl::SetItemData}\label{wxlistctrlsetitemdata}
 
 \func{bool}{SetItemData}{\param{long }{item}, \param{long }{data}}
