]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/choice.tex
silence gcc warnings about values not handled in switch
[wxWidgets.git] / docs / latex / wx / choice.tex
index 09209f4b0d2d64c3ce8cc13b904746daa26efcff..43ec4d0ae64d8521fc356e8992df817e51edb3ea 100644 (file)
@@ -1,3 +1,14 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Name:        treectrl.tex
+%% Purpose:     wxChoice documentation
+%% Author:      wxWidgets Team
+%% Modified by:
+%% Created:
+%% RCS-ID:      $Id$
+%% Copyright:   (c) wxWidgets Team
+%% License:     wxWindows license
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
 \section{\class{wxChoice}}\label{wxchoice}
 
 A choice item is used to select one of a list of strings. Unlike a
 \section{\class{wxChoice}}\label{wxchoice}
 
 A choice item is used to select one of a list of strings. Unlike a
@@ -37,7 +48,8 @@ when an item on the list is selected.}
 
 \latexignore{\rtfignore{\wxheading{Members}}}
 
 
 \latexignore{\rtfignore{\wxheading{Members}}}
 
-\membersection{wxChoice::wxChoice}\label{wxchoiceconstr}
+
+\membersection{wxChoice::wxChoice}\label{wxchoicector}
 
 \func{}{wxChoice}{\void}
 
 
 \func{}{wxChoice}{\void}
 
@@ -48,6 +60,11 @@ Default constructor.
 \param{int}{ n}, \param{const wxString }{choices[]},\rtfsp
 \param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``choice"}}
 
 \param{int}{ n}, \param{const wxString }{choices[]},\rtfsp
 \param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``choice"}}
 
+\func{}{wxChoice}{\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 = ``choice"}}
+
 Constructor, creating and showing a choice.
 
 \wxheading{Parameters}
 Constructor, creating and showing a choice.
 
 \wxheading{Parameters}
@@ -82,30 +99,30 @@ a list of strings.}
 \perlnote{In wxPerl there is just an array reference in place of {\tt n}
 and {\tt choices}.}
 
 \perlnote{In wxPerl there is just an array reference in place of {\tt n}
 and {\tt choices}.}
 
-\membersection{wxChoice::\destruct{wxChoice}}
+
+\membersection{wxChoice::\destruct{wxChoice}}\label{wxchoicedtor}
 
 \func{}{\destruct{wxChoice}}{\void}
 
 Destructor, destroying the choice item.
 
 
 \func{}{\destruct{wxChoice}}{\void}
 
 Destructor, destroying the choice item.
 
+
 \membersection{wxChoice::Create}\label{wxchoicecreate}
 
 \func{bool}{Create}{\param{wxWindow *}{parent}, \param{wxWindowID}{ id},\rtfsp
 \param{const wxPoint\& }{pos}, \param{const wxSize\&}{ size},\rtfsp
 \param{int}{ n}, \param{const wxString }{choices[]},\rtfsp
 \membersection{wxChoice::Create}\label{wxchoicecreate}
 
 \func{bool}{Create}{\param{wxWindow *}{parent}, \param{wxWindowID}{ id},\rtfsp
 \param{const wxPoint\& }{pos}, \param{const wxSize\&}{ size},\rtfsp
 \param{int}{ n}, \param{const wxString }{choices[]},\rtfsp
-\param{long}{ style = 0}, \param{const wxString\& }{name = ``choice"}}
-
-Creates the choice for two-step construction. See \helpref{wxChoice::wxChoice}{wxchoiceconstr}.
-
-\membersection{wxChoice::Delete}\label{wxchoicedelete}
-
-\func{void}{Delete}{\param{int }{n}}
+\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
+\param{const wxString\& }{name = ``choice"}}
 
 
-Deletes the item with the given index from the control.
+\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},\rtfsp
+\param{const wxString\& }{name = ``choice"}}
 
 
-\wxheading{Parameters}
+Creates the choice for two-step construction. See \helpref{wxChoice::wxChoice}{wxchoicector}.
 
 
-\docparam{n}{The item to delete.}
 
 \membersection{wxChoice::GetColumns}\label{wxchoicegetcolumns}
 
 
 \membersection{wxChoice::GetColumns}\label{wxchoicegetcolumns}
 
@@ -118,6 +135,23 @@ Gets the number of columns in this choice item.
 This is implemented for Motif only and always returns $1$ for the other
 platforms.
 
 This is implemented for Motif only and always returns $1$ for the other
 platforms.
 
+
+\membersection{wxChoice::GetCurrentSelection}\label{wxchoicegetcurrentselection}
+
+\constfunc{int}{GetCurrentSelection}{\void}
+
+Unlike \helpref{GetSelection}{wxcontrolwithitemsgetselection} which only
+returns the accepted selection value, i.e. the selection in the control once
+the user closes the dropdown list, this function returns the current selection.
+That is, while the dropdown list is shown, it returns the currently selected
+item in it. When it is not shown, its result is the same as for the other
+function.
+
+\newsince{2.6.2} (before this version
+\helpref{GetSelection}{wxcontrolwithitemsgetselection} itself behaved like
+this).
+
+
 \membersection{wxChoice::SetColumns}\label{wxchoicesetcolumns}
 
 \func{void}{SetColumns}{\param{int}{ n = 1}}
 \membersection{wxChoice::SetColumns}\label{wxchoicesetcolumns}
 
 \func{void}{SetColumns}{\param{int}{ n = 1}}
@@ -132,4 +166,3 @@ Sets the number of columns in this choice item.
 
 This is implemented for Motif only and doesn't do anything under other
 platforms.
 
 This is implemented for Motif only and doesn't do anything under other
 platforms.
-