Version: 2.9.4
Public Member Functions
wxBitmapButton Class Reference

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

Inheritance diagram for wxBitmapButton:

Detailed Description

A bitmap button is a control that contains a bitmap.

Notice that since wxWidgets 2.9.1 bitmap display is supported by the base wxButton class itself and the only tiny advantage of using this class is that it allows to specify the bitmap in its constructor, unlike wxButton. Please see the base class documentation for more information about images support in wxButton.

Styles

This class supports the following styles:

Note that the wxBU_EXACTFIT style supported by wxButton is not used by this class as bitmap buttons don't have any minimal standard size by default.

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
参照:
wxButton

Public Member Functions

 wxBitmapButton ()
 Default ctor.
 wxBitmapButton (wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxBU_AUTODRAW, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxButtonNameStr)
 Constructor, creating and showing a button.
bool Create (wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxBU_AUTODRAW, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxButtonNameStr)
 Button creation function for two-step creation.

List of all members.


Constructor & Destructor Documentation

wxBitmapButton::wxBitmapButton ( )

Default ctor.

wxBitmapButton::wxBitmapButton ( wxWindow parent,
wxWindowID  id,
const wxBitmap bitmap,
const wxPoint pos = wxDefaultPosition,
const wxSize size = wxDefaultSize,
long  style = wxBU_AUTODRAW,
const wxValidator validator = wxDefaultValidator,
const wxString name = wxButtonNameStr 
)

Constructor, creating and showing a button.

Parameters:
parentParent window. Must not be NULL.
idButton identifier. The value wxID_ANY indicates a default value.
bitmapBitmap to be displayed.
posButton position. If wxDefaultPosition is specified then a default position is chosen.
sizeButton size. If wxDefaultSize is specified then the button is sized appropriately for the bitmap.
styleWindow style. See wxBitmapButton.
validatorWindow validator.
nameWindow name.
注意:
The bitmap parameter is normally the only bitmap you need to provide, and wxWidgets will draw the button correctly in its different states. If you want more control, call any of the functions SetBitmapPressed(), SetBitmapFocus(), SetBitmapDisabled().
参照:
Create(), wxValidator

Member Function Documentation

bool wxBitmapButton::Create ( wxWindow parent,
wxWindowID  id,
const wxBitmap bitmap,
const wxPoint pos = wxDefaultPosition,
const wxSize size = wxDefaultSize,
long  style = wxBU_AUTODRAW,
const wxValidator validator = wxDefaultValidator,
const wxString name = wxButtonNameStr 
)

Button creation function for two-step creation.

For more details, see wxBitmapButton().

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines