X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cc81d32f2bf8c159f3b1bf6ddaf62e6d77720209..669b0c0a0b5a3d529104256f678d985105a8a276:/docs/latex/wx/listbox.tex diff --git a/docs/latex/wx/listbox.tex b/docs/latex/wx/listbox.tex index fe981c44f2..de3946a513 100644 --- a/docs/latex/wx/listbox.tex +++ b/docs/latex/wx/listbox.tex @@ -10,7 +10,7 @@ selections). List box elements are numbered from zero. Their number is limited in some platforms (e.g. ca. 2000 on GTK). -A listbox callback gets an event wxEVT\_COMMAND\_LISTBOX\_SELECT for single clicks, and +A listbox callback gets an event wxEVT\_COMMAND\_LISTBOX\_SELECTED for single clicks, and wxEVT\_COMMAND\_LISTBOX\_DOUBLE\_CLICKED for double clicks. \wxheading{Derived from} @@ -63,7 +63,7 @@ when the listbox is double-clicked.} \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxListBox::wxListBox}\label{wxlistboxconstr} +\membersection{wxListBox::wxListBox}\label{wxlistboxctor} \func{}{wxListBox}{\void} @@ -71,7 +71,12 @@ Default constructor. \func{}{wxListBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp -\param{int}{ n}, \param{const wxString }{choices[] = NULL},\rtfsp +\param{int}{ n = 0}, \param{const wxString }{choices[] = NULL},\rtfsp +\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listBox"}} + +\func{}{wxListBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp +\param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size},\rtfsp +\param{const wxArrayString\& }{choices},\rtfsp \param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listBox"}} Constructor, creating and showing a list box. @@ -108,7 +113,7 @@ a list of strings.} \perlnote{In wxPerl there is just an array reference in place of {\tt n} and {\tt choices}.} -\membersection{wxListBox::\destruct{wxListBox}} +\membersection{wxListBox::\destruct{wxListBox}}\label{wxlistboxdtor} \func{void}{\destruct{wxListBox}}{\void} @@ -121,7 +126,12 @@ Destructor, destroying the list box. \param{int}{ n}, \param{const wxString }{choices[] = NULL},\rtfsp \param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listBox"}} -Creates the listbox for two-step construction. See \helpref{wxListBox::wxListBox}{wxlistboxconstr}\rtfsp +\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp +\param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size},\rtfsp +\param{const wxArrayString\& }{choices},\rtfsp +\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listBox"}} + +Creates the listbox for two-step construction. See \helpref{wxListBox::wxListBox}{wxlistboxctor}\rtfsp for further details. \membersection{wxListBox::Deselect}\label{wxlistboxdeselect} @@ -170,7 +180,9 @@ selected items as a list.} \membersection{wxListBox::InsertItems}\label{wxlistboxinsertitems} -\func{void}{InsertItems}{\param{int}{ nItems}, \param{const wxString}{ *items}, \param{int}{ pos}} +\func{void}{InsertItems}{\param{int}{ nItems}, \param{const wxString}{ *items}, \param{unsigned int}{ pos}} + +\func{void}{InsertItems}{\param{const wxArrayString\&}{ nItems}, \param{unsigned int}{ pos}} Insert the given number of strings before the specified position. @@ -189,9 +201,28 @@ parameter for wxPython, which is a list of strings.} \perlnote{In wxPerl there is just an array reference in place of {\tt nItems} and {\tt items}.} -\membersection{wxListBox::Selected}\label{wxlistboxselected} +\membersection{wxListBox::HitTest}\label{wxlistboxhittest} + +\constfunc{int}{HitTest}{\param{const wxPoint&}{ point}} + +Returns the item located at \arg{point}, or \texttt{wxNOT\_FOUND} if there +is no item located at \arg{point}. + +\newsince{2.7.0}. It is currently implemented for wxMSW, wxMac and wxGTK2 +ports. + +\wxheading{Parameters} + +\docparam{point}{Point of item (in client coordinates) to obtain} + +\wxheading{Return value} + +Item located at \arg{point}, or \texttt{wxNOT\_FOUND} if unimplemented +or the item does not exist. + +\membersection{wxListBox::IsSelected}\label{wxlistboxisselected} -\constfunc{bool}{Selected}{\param{int}{ n}} +\constfunc{bool}{IsSelected}{\param{int}{ n}} Determines whether an item is selected.