]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/gtk/bmpbutton.h | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
5 | // Id: $Id$ | |
6 | // Copyright: (c) 1998 Robert Roebling | |
7 | // Licence: wxWindows licence | |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | #ifndef _WX_GTK_BMPBUTTON_H_ | |
11 | #define _WX_GTK_BMPBUTTON_H_ | |
12 | ||
13 | // ---------------------------------------------------------------------------- | |
14 | // wxBitmapButton | |
15 | // ---------------------------------------------------------------------------- | |
16 | ||
17 | class WXDLLIMPEXP_CORE wxBitmapButton : public wxBitmapButtonBase | |
18 | { | |
19 | public: | |
20 | wxBitmapButton() { } | |
21 | ||
22 | wxBitmapButton(wxWindow *parent, | |
23 | wxWindowID id, | |
24 | const wxBitmap& bitmap, | |
25 | const wxPoint& pos = wxDefaultPosition, | |
26 | const wxSize& size = wxDefaultSize, | |
27 | long style = 0, | |
28 | const wxValidator& validator = wxDefaultValidator, | |
29 | const wxString& name = wxButtonNameStr) | |
30 | { | |
31 | Create(parent, id, bitmap, pos, size, style, validator, name); | |
32 | } | |
33 | ||
34 | bool Create(wxWindow *parent, | |
35 | wxWindowID id, | |
36 | const wxBitmap& bitmap, | |
37 | const wxPoint& pos = wxDefaultPosition, | |
38 | const wxSize& size = wxDefaultSize, | |
39 | long style = 0, | |
40 | const wxValidator& validator = wxDefaultValidator, | |
41 | const wxString& name = wxButtonNameStr) | |
42 | { | |
43 | if ( !wxBitmapButtonBase::Create(parent, id, "", | |
44 | pos, size, | |
45 | style | wxBU_NOTEXT, | |
46 | validator, name) ) | |
47 | return false; | |
48 | ||
49 | SetBitmapLabel(bitmap); | |
50 | ||
51 | return true; | |
52 | } | |
53 | ||
54 | DECLARE_DYNAMIC_CLASS(wxBitmapButton) | |
55 | }; | |
56 | ||
57 | #endif // _WX_GTK_BMPBUTTON_H_ |