Version: 2.9.4
Public Member Functions
wxBitmapToggleButton Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/tglbtn.h>

Inheritance diagram for wxBitmapToggleButton:

Detailed Description

wxBitmapToggleButton is a wxToggleButton that contains a bitmap instead of text.

This class is not available in all ports currently (although it is available in the major ones), test for wxHAS_BITMAPTOGGLEBUTTON to determine whether it can be used (in addition for possibly testing for wxUSE_TOGGLEBTN which can be set to 0 to explicitly disable support for this class and wxToggleButton).

This control emits an update UI event.

Events emitted by this class

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxCommandEvent& event)

Event macros for events emitted by this class:

Library:  wxCore
Category:  Controls

Appearance:
wxMSW appearancewxGTK appearancewxMac appearance
wxMSW appearancewxGTK appearancewxMac appearance

Public Member Functions

 wxBitmapToggleButton ()
 Default constructor.
 wxBitmapToggleButton (wxWindow *parent, wxWindowID id, const wxBitmap &label, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxValidator &val=wxDefaultValidator, const wxString &name=wxCheckBoxNameStr)
 Constructor, creating and showing a toggle button with the bitmap label.
bool Create (wxWindow *parent, wxWindowID id, const wxBitmap &label, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxValidator &val=wxDefaultValidator, const wxString &name=wxCheckBoxNameStr)
 Create method for two-step construction.
virtual bool GetValue () const
 Gets the state of the toggle button.
virtual void SetValue (bool state)
 Sets the toggle button to the given state.

List of all members.


Constructor & Destructor Documentation

wxBitmapToggleButton::wxBitmapToggleButton ( )

Default constructor.

wxBitmapToggleButton::wxBitmapToggleButton ( wxWindow parent,
wxWindowID  id,
const wxBitmap label,
const wxPoint pos = wxDefaultPosition,
const wxSize size = wxDefaultSize,
long  style = 0,
const wxValidator val = wxDefaultValidator,
const wxString name = wxCheckBoxNameStr 
)

Constructor, creating and showing a toggle button with the bitmap label.

Internally calls Create().


Member Function Documentation

bool wxBitmapToggleButton::Create ( wxWindow parent,
wxWindowID  id,
const wxBitmap label,
const wxPoint pos = wxDefaultPosition,
const wxSize size = wxDefaultSize,
long  style = 0,
const wxValidator val = wxDefaultValidator,
const wxString name = wxCheckBoxNameStr 
)

Create method for two-step construction.

virtual bool wxBitmapToggleButton::GetValue ( ) const [virtual]

Gets the state of the toggle button.

Returns:
Returns true if it is pressed, false otherwise.

Reimplemented from wxToggleButton.

virtual void wxBitmapToggleButton::SetValue ( bool  state) [virtual]

Sets the toggle button to the given state.

This does not cause a EVT_TOGGLEBUTTON event to be emitted.

Parameters:
stateIf true, the button is pressed.

Reimplemented from wxToggleButton.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines