]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/bmpbuttn.h
Add @onlyfor tag to wxToolBar::SetBitmapResource() documentation.
[wxWidgets.git] / interface / wx / bmpbuttn.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: bmpbuttn.h
e54c96f1 3// Purpose: interface of wxBitmapButton
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
526954c5 6// Licence: wxWindows licence
23324ae1
FM
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxBitmapButton
7c913512 11
23324ae1 12 A bitmap button is a control that contains a bitmap.
8024723d 13
2352862a
VZ
14 Notice that since wxWidgets 2.9.1 bitmap display is supported by the base
15 wxButton class itself and the only tiny advantage of using this class is
16 that it allows to specify the bitmap in its constructor, unlike wxButton.
17 Please see the base class documentation for more information about images
18 support in wxButton.
7c913512 19
23324ae1 20 @beginStyleTable
8c6791e4 21 @style{wxBU_LEFT}
0f5fe332 22 Left-justifies the bitmap label.
8c6791e4 23 @style{wxBU_TOP}
8024723d 24 Aligns the bitmap label to the top of the button.
8c6791e4 25 @style{wxBU_RIGHT}
0f5fe332 26 Right-justifies the bitmap label.
8c6791e4 27 @style{wxBU_BOTTOM}
8024723d 28 Aligns the bitmap label to the bottom of the button.
23324ae1 29 @endStyleTable
7c913512 30
8024723d
FM
31 Note that the wxBU_EXACTFIT style supported by wxButton is not used by this
32 class as bitmap buttons don't have any minimal standard size by default.
33
3051a44a 34 @beginEventEmissionTable{wxCommandEvent}
8c6791e4 35 @event{EVT_BUTTON(id, func)}
3a194bda 36 Process a @c wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.
23324ae1 37 @endEventTable
7c913512 38
23324ae1
FM
39 @library{wxcore}
40 @category{ctrl}
7e59b885 41 @appearance{bitmapbutton.png}
7c913512 42
e54c96f1 43 @see wxButton
23324ae1
FM
44*/
45class wxBitmapButton : public wxButton
46{
47public:
8024723d
FM
48 /**
49 Default ctor.
50 */
51 wxBitmapButton();
52
23324ae1
FM
53 /**
54 Constructor, creating and showing a button.
8024723d 55
7c913512 56 @param parent
4cc4bfaf 57 Parent window. Must not be @NULL.
7c913512 58 @param id
4cc4bfaf 59 Button identifier. The value wxID_ANY indicates a default value.
7c913512 60 @param bitmap
4cc4bfaf 61 Bitmap to be displayed.
7c913512 62 @param pos
4cc4bfaf 63 Button position.
dc1b07fd 64 If ::wxDefaultPosition is specified then a default position is chosen.
7c913512 65 @param size
dc1b07fd
FM
66 Button size.
67 If ::wxDefaultSize is specified then the button is sized appropriately
68 for the bitmap.
7c913512 69 @param style
4cc4bfaf 70 Window style. See wxBitmapButton.
7c913512 71 @param validator
4cc4bfaf 72 Window validator.
7c913512 73 @param name
4cc4bfaf 74 Window name.
8024723d
FM
75
76 @remarks The bitmap parameter is normally the only bitmap you need to provide,
77 and wxWidgets will draw the button correctly in its different states.
2352862a 78 If you want more control, call any of the functions SetBitmapPressed(),
8024723d
FM
79 SetBitmapFocus(), SetBitmapDisabled().
80
4cc4bfaf 81 @see Create(), wxValidator
23324ae1 82 */
7c913512
FM
83 wxBitmapButton(wxWindow* parent, wxWindowID id,
84 const wxBitmap& bitmap,
85 const wxPoint& pos = wxDefaultPosition,
86 const wxSize& size = wxDefaultSize,
87 long style = wxBU_AUTODRAW,
88 const wxValidator& validator = wxDefaultValidator,
a6052817 89 const wxString& name = wxButtonNameStr);
23324ae1 90
23324ae1 91 /**
8024723d
FM
92 Button creation function for two-step creation.
93 For more details, see wxBitmapButton().
23324ae1
FM
94 */
95 bool Create(wxWindow* parent, wxWindowID id,
96 const wxBitmap& bitmap,
a6052817 97 const wxPoint& pos = wxDefaultPosition,
23324ae1 98 const wxSize& size = wxDefaultSize,
a6052817
FM
99 long style = wxBU_AUTODRAW,
100 const wxValidator& validator = wxDefaultValidator,
101 const wxString& name = wxButtonNameStr);
23324ae1 102};
e54c96f1 103