Version: 2.9.4
Public Member Functions
wxAnyButton Class Reference

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

Inheritance diagram for wxAnyButton:

Detailed Description

A class for common button functionality used as the base for the various button classes.

Public Member Functions

 wxAnyButton ()
 ~wxAnyButton ()
wxBitmap GetBitmap () const
 Return the bitmap shown by the button.
wxBitmap GetBitmapCurrent () const
 Returns the bitmap used when the mouse is over the button, which may be invalid.
wxBitmap GetBitmapDisabled () const
 Returns the bitmap for the disabled state, which may be invalid.
wxBitmap GetBitmapFocus () const
 Returns the bitmap for the focused state, which may be invalid.
wxBitmap GetBitmapLabel () const
 Returns the bitmap for the normal state.
wxBitmap GetBitmapPressed () const
 Returns the bitmap for the pressed state, which may be invalid.
void SetBitmap (const wxBitmap &bitmap, wxDirection dir=wxLEFT)
 Sets the bitmap to display in the button.
void SetBitmapCurrent (const wxBitmap &bitmap)
 Sets the bitmap to be shown when the mouse is over the button.
void SetBitmapDisabled (const wxBitmap &bitmap)
 Sets the bitmap for the disabled button appearance.
void SetBitmapFocus (const wxBitmap &bitmap)
 Sets the bitmap for the button appearance when it has the keyboard focus.
void SetBitmapLabel (const wxBitmap &bitmap)
 Sets the bitmap label for the button.
void SetBitmapPressed (const wxBitmap &bitmap)
 Sets the bitmap for the selected (depressed) button appearance.
wxSize GetBitmapMargins ()
 Get the margins between the bitmap and the text of the button.
void SetBitmapPosition (wxDirection dir)
 Set the position at which the bitmap is displayed.
void SetBitmapMargins (wxCoord x, wxCoord y)
 Set the margins between the bitmap and the text of the button.
void SetBitmapMargins (const wxSize &sz)
 Set the margins between the bitmap and the text of the button.

List of all members.


Constructor & Destructor Documentation

wxAnyButton::wxAnyButton ( )
wxAnyButton::~wxAnyButton ( )

Member Function Documentation

wxBitmap wxAnyButton::GetBitmap ( ) const

Return the bitmap shown by the button.

The returned bitmap may be invalid only if the button doesn't show any images.

参照:
SetBitmap()
Since:
2.9.1
wxBitmap wxAnyButton::GetBitmapCurrent ( ) const

Returns the bitmap used when the mouse is over the button, which may be invalid.

参照:
SetBitmapCurrent()
Since:
2.9.1 (available as wxBitmapButton::GetBitmapHover() in previous versions)
wxBitmap wxAnyButton::GetBitmapDisabled ( ) const

Returns the bitmap for the disabled state, which may be invalid.

参照:
SetBitmapDisabled()
Since:
2.9.1 (available in wxBitmapButton only in previous versions)
wxBitmap wxAnyButton::GetBitmapFocus ( ) const

Returns the bitmap for the focused state, which may be invalid.

参照:
SetBitmapFocus()
Since:
2.9.1 (available in wxBitmapButton only in previous versions)
wxBitmap wxAnyButton::GetBitmapLabel ( ) const

Returns the bitmap for the normal state.

This is exactly the same as GetBitmap() but uses a name backwards-compatible with wxBitmapButton.

参照:
SetBitmap(), SetBitmapLabel()
Since:
2.9.1 (available in wxBitmapButton only in previous versions)
wxSize wxAnyButton::GetBitmapMargins ( )

Get the margins between the bitmap and the text of the button.

参照:
SetBitmapMargins()
Since:
2.9.1
wxBitmap wxAnyButton::GetBitmapPressed ( ) const

Returns the bitmap for the pressed state, which may be invalid.

参照:
SetBitmapPressed()
Since:
2.9.1 (available as wxBitmapButton::GetBitmapSelected() in previous versions)
void wxAnyButton::SetBitmap ( const wxBitmap bitmap,
wxDirection  dir = wxLEFT 
)

Sets the bitmap to display in the button.

The bitmap is displayed together with the button label. This method sets up a single bitmap which is used in all button states, use SetBitmapDisabled(), SetBitmapPressed(), SetBitmapCurrent() or SetBitmapFocus() to change the individual images used in different states.

Parameters:
bitmapThe bitmap to display in the button. May be invalid to remove any currently displayed bitmap.
dirThe position of the bitmap inside the button. By default it is positioned to the left of the text, near to the left button border. Other possible values include wxRIGHT, wxTOP and wxBOTTOM.
参照:
SetBitmapPosition(), SetBitmapMargins()
Since:
2.9.1
void wxAnyButton::SetBitmapCurrent ( const wxBitmap bitmap)

Sets the bitmap to be shown when the mouse is over the button.

参照:
GetBitmapCurrent()
Since:
2.9.1 (available as wxBitmapButton::SetBitmapHover() in previous versions)
void wxAnyButton::SetBitmapDisabled ( const wxBitmap bitmap)

Sets the bitmap for the disabled button appearance.

参照:
GetBitmapDisabled(), SetBitmapLabel(), SetBitmapPressed(), SetBitmapFocus()
Since:
2.9.1 (available in wxBitmapButton only in previous versions)
void wxAnyButton::SetBitmapFocus ( const wxBitmap bitmap)

Sets the bitmap for the button appearance when it has the keyboard focus.

参照:
GetBitmapFocus(), SetBitmapLabel(), SetBitmapPressed(), SetBitmapDisabled()
Since:
2.9.1 (available in wxBitmapButton only in previous versions)
void wxAnyButton::SetBitmapLabel ( const wxBitmap bitmap)

Sets the bitmap label for the button.

注意:
This is the bitmap used for the unselected state, and for all other states if no other bitmaps are provided.
参照:
SetBitmap(), GetBitmapLabel()
Since:
2.9.1 (available in wxBitmapButton only in previous versions)
void wxAnyButton::SetBitmapMargins ( wxCoord  x,
wxCoord  y 
)

Set the margins between the bitmap and the text of the button.

This method is currently only implemented under MSW. If it is not called, default margin is used around the bitmap.

参照:
SetBitmap(), SetBitmapPosition()
Since:
2.9.1
void wxAnyButton::SetBitmapMargins ( const wxSize sz)

Set the margins between the bitmap and the text of the button.

This method is currently only implemented under MSW. If it is not called, default margin is used around the bitmap.

参照:
SetBitmap(), SetBitmapPosition()
Since:
2.9.1
void wxAnyButton::SetBitmapPosition ( wxDirection  dir)

Set the position at which the bitmap is displayed.

This method should only be called if the button does have an associated bitmap.

Since:
2.9.1
Parameters:
dirDirection in which the bitmap should be positioned, one of wxLEFT, wxRIGHT, wxTOP or wxBOTTOM.
void wxAnyButton::SetBitmapPressed ( const wxBitmap bitmap)

Sets the bitmap for the selected (depressed) button appearance.

Since:
2.9.1 (available as wxBitmapButton::SetBitmapSelected() in previous versions)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines