added wxToggleButton docs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -79,6 +79,7 @@ that are not static can have \helpref{validators}{wxvalidator} associated with t
|
||||
\twocolitem{\helpref{wxControl}{wxcontrol}}{The base class for controls}
|
||||
\twocolitem{\helpref{wxButton}{wxbutton}}{Push button control, displaying text}
|
||||
\twocolitem{\helpref{wxBitmapButton}{wxbitmapbutton}}{Push button control, displaying a bitmap}
|
||||
\twocolitem{\helpref{wxToggleButton}{wxtogglebutton}}{A button which stays pressed when clicked by user.}
|
||||
\twocolitem{\helpref{wxCalendarCtrl}{wxcalendarctrl}}{Date picker control}
|
||||
\twocolitem{\helpref{wxCheckBox}{wxcheckbox}}{Checkbox control}
|
||||
\twocolitem{\helpref{wxCheckListBox}{wxchecklistbox}}{A listbox with a checkbox to the left of each item}
|
||||
|
@@ -309,6 +309,7 @@
|
||||
\input timer.tex
|
||||
\input tipprov.tex
|
||||
\input tipwin.tex
|
||||
\input tglbtn.tex
|
||||
\input toolbar.tex
|
||||
\input tooltip.tex
|
||||
\input treectrl.tex
|
||||
|
124
docs/latex/wx/tglbtn.tex
Normal file
124
docs/latex/wx/tglbtn.tex
Normal file
@@ -0,0 +1,124 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% Name: tglbtn.tex
|
||||
%% Purpose: wxToggleButton documentation
|
||||
%% Author: Vadim Zeitlin
|
||||
%% Modified by:
|
||||
%% Created: 20.11.01
|
||||
%% RCS-ID: $Id$
|
||||
%% Copyright: (c) 2001 Vadim Zeitlin
|
||||
%% License: wxWindows license
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\section{\class{wxToggleButton}}\label{wxtogglebutton}
|
||||
|
||||
wxToggleButton is a button which stays pressed when clicked by the user. In
|
||||
other words, it is more similar to \helpref{wxCheckBox}{wxcheckbox} in
|
||||
functionality but looks like a \helpref{wxButton}{wxbutton}.
|
||||
|
||||
You can see wxToggleButton in action in the sixth page of the
|
||||
\helpref{controls}{samplecontrols} sample.
|
||||
|
||||
{\bf NB: } This class is only available under wxMSW and wxGTK currently.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxControl}{wxcontrol}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/tglbtn.h>
|
||||
|
||||
\wxheading{Window styles}
|
||||
|
||||
There are no special styles for wxToggleButton.
|
||||
|
||||
See also \helpref{window styles overview}{windowstyles}.
|
||||
|
||||
\wxheading{Event handling}
|
||||
|
||||
\twocolwidtha{7cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf EVT\_TOGGLEBUTTON(id, func)}}{Handles button click event.}
|
||||
\end{twocollist}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxCheckBox}{wxcheckbox}, \helpref{wxButton}{wxbutton}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxToggleButton::wxToggleButton}\label{wxtogglebuttonconstr}
|
||||
|
||||
\func{}{wxToggleButton}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxToggleButton}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
|
||||
\param{const wxString\& }{label}, \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
|
||||
\param{const wxSize\& }{size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp
|
||||
\param{const wxValidator\& }{val}, \param{const wxString\& }{name = ``checkBox"}}
|
||||
|
||||
Constructor, creating and showing a toggle button.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{parent}{Parent window. Must not be {\tt NULL}.}
|
||||
|
||||
\docparam{id}{Toggle button identifier. A value of $-1$ indicates a default value.}
|
||||
|
||||
\docparam{label}{Text to be displayed next to the toggle button.}
|
||||
|
||||
\docparam{pos}{Toggle button position. If the position $(-1, -1)$ is specified then a default position is chosen.}
|
||||
|
||||
\docparam{size}{Toggle button size. If the default size $(-1, -1)$ is specified then a default size is chosen.}
|
||||
|
||||
\docparam{style}{Window style. See \helpref{wxToggleButton}{wxtogglebutton}.}
|
||||
|
||||
\docparam{validator}{Window validator.}
|
||||
|
||||
\docparam{name}{Window name.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxToggleButton::Create}{wxtogglebuttoncreate}, \helpref{wxValidator}{wxvalidator}
|
||||
|
||||
\membersection{wxToggleButton::\destruct{wxToggleButton}}
|
||||
|
||||
\func{}{\destruct{wxToggleButton}}{\void}
|
||||
|
||||
Destructor, destroying the toggle button.
|
||||
|
||||
\membersection{wxToggleButton::Create}\label{wxtogglebuttoncreate}
|
||||
|
||||
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
|
||||
\param{const wxString\& }{label}, \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
|
||||
\param{const wxSize\& }{size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp
|
||||
\param{const wxValidator\& }{val}, \param{const wxString\& }{name = ``checkBox"}}
|
||||
|
||||
Creates the toggle button for two-step construction. See \helpref{wxToggleButton::wxToggleButton}{wxtogglebuttonconstr}\rtfsp
|
||||
for details.
|
||||
|
||||
\membersection{wxToggleButton::GetValue}\label{wxtogglebuttongetvalue}
|
||||
|
||||
\constfunc{bool}{GetValue}{\void}
|
||||
|
||||
Gets the state of the toggle button.
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
Returns {\tt TRUE} if it is pressed, {\tt FALSE} otherwise.
|
||||
|
||||
\membersection{wxToggleButton::SetValue}\label{wxtogglebuttonsetvalue}
|
||||
|
||||
\func{void}{SetValue}{\param{const bool}{ state}}
|
||||
|
||||
Sets the toggle button to the given state. This does not cause a
|
||||
{\tt EVT\_TOGGLEBUTTON} event to get emitted.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{state}{If {\tt TRUE}, the button is pressed.}
|
||||
|
Reference in New Issue
Block a user