Document wxBitmapToggleButton, add update UI event in Base class for all toggle buttons

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2007-12-08 10:36:59 +00:00
parent 7e325fb635
commit 10ff9c616e
9 changed files with 179 additions and 28 deletions

View File

@@ -0,0 +1,86 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: bitmaptglbtn.tex
%% Purpose: wxBitmapToggleButton documentation
%% Author: Robert Roebling
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxBitmapToggleButton}}\label{wxbitmaptogglebutton}
wxBitmapToggleButton is a a \helpref{wxToggleButton}{wxtogglebutton}
that contains a bitmap instead of text.
This control emits a update UI event.
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/tglbtn.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Window styles}
There are no special styles for wxBitmapToggleButton.
\wxheading{Event handling}
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_TOGGLEBUTTON(id, func)}}{Handles a toggle button click event.}
\end{twocollist}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBitmapToggleButton::wxBitmapToggleButton}\label{wxbitmaptogglebuttonconstr}
\func{}{wxBitmapToggleButton}{\void}
Default constructor.
\func{}{wxBitmapToggleButton}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxBitmap\& }{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 with the bitmap {\it label}.
Internally calls Create().
\membersection{wxBitmapToggleButton::Create}\label{wxbitmaptogglebuttoncreate}
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxBitmap\& }{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"}}
Create method for two-step construction.
\membersection{wxBitmapToggleButton::GetValue}\label{wxbitmaptogglebuttongetvalue}
\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{wxBitmapToggleButton::SetValue}\label{wxbitmaptogglebuttonsetvalue}
\func{void}{SetValue}{\param{bool}{ state}}
Sets the toggle button to the given state. This does not cause a
{\tt EVT\_TOGGLEBUTTON} event to be emitted.
\wxheading{Parameters}
\docparam{state}{If {\tt true}, the button is pressed.}

View File

@@ -93,6 +93,7 @@ that are not static can have \helpref{validators}{wxvalidator} associated with t
\twocolitem{\helpref{wxBitmapButton}{wxbitmapbutton}}{Push button control, displaying a bitmap}
\twocolitem{\helpref{wxBitmapComboBox}{wxbitmapcombobox}}{A combobox with bitmaps next to text items}
\twocolitem{\helpref{wxToggleButton}{wxtogglebutton}}{A button which stays pressed when clicked by user.}
\twocolitem{\helpref{wxBitmapToggleButton}{wxbitmaptogglebutton}}{A toggle button with bitmaps.}
\twocolitem{\helpref{wxCalendarCtrl}{wxcalendarctrl}}{Control showing an entire calendar month}
\twocolitem{\helpref{wxCheckBox}{wxcheckbox}}{Checkbox control}
\twocolitem{\helpref{wxCheckListBox}{wxchecklistbox}}{A listbox with a checkbox to the left of each item}

View File

@@ -27,6 +27,7 @@
\input autoobj.tex
\input bitmap.tex
\input bitmapcombobox.tex
\input bitmaptgnbtn.tex
\input bbutton.tex
\input bmpdatob.tex
\input bmphand.tex

View File

@@ -15,6 +15,8 @@ wxToggleButton is a button that stays pressed when clicked by the user. In
other words, it is similar to \helpref{wxCheckBox}{wxcheckbox} in
functionality but looks like a \helpref{wxButton}{wxbutton}.
Since wxWidgets version 2.9.0 this control emits a update UI event.
You can see wxToggleButton in action in the sixth page of the
\helpref{controls}{samplecontrols} sample.
@@ -48,7 +50,8 @@ See also \helpref{window styles overview}{windowstyles}.
\wxheading{See also}
\helpref{wxCheckBox}{wxcheckbox}, \helpref{wxButton}{wxbutton}
\helpref{wxCheckBox}{wxcheckbox}, \helpref{wxButton}{wxbutton},
\helpref{wxToggleBitmapButton}{wxtogglebitmapbutton}
\latexignore{\rtfignore{\wxheading{Members}}}
@@ -123,3 +126,4 @@ Sets the toggle button to the given state. This does not cause a
\wxheading{Parameters}
\docparam{state}{If {\tt true}, the button is pressed.}