]>
Commit | Line | Data |
---|---|---|
6762286d SC |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: bmpbuttn.h | |
3 | // Purpose: wxBitmapButton class | |
4 | // Author: Stefan Csomor | |
5 | // Modified by: | |
6 | // Created: 1998-01-01 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Stefan Csomor | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
09219654 VZ |
12 | #ifndef _WX_OSX_BMPBUTTN_H_ |
13 | #define _WX_OSX_BMPBUTTN_H_ | |
6762286d SC |
14 | |
15 | #include "wx/button.h" | |
16 | ||
6762286d SC |
17 | #define wxDEFAULT_BUTTON_MARGIN 4 |
18 | ||
09219654 | 19 | class WXDLLIMPEXP_CORE wxBitmapButton : public wxBitmapButtonBase |
6762286d | 20 | { |
6762286d SC |
21 | public: |
22 | wxBitmapButton() | |
23 | { | |
24 | SetMargins(wxDEFAULT_BUTTON_MARGIN, wxDEFAULT_BUTTON_MARGIN); | |
25 | } | |
26 | ||
27 | wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, | |
28 | const wxPoint& pos = wxDefaultPosition, | |
29 | const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, | |
30 | const wxValidator& validator = wxDefaultValidator, | |
31 | const wxString& name = wxButtonNameStr) | |
32 | { | |
33 | Create(parent, id, bitmap, pos, size, style, validator, name); | |
34 | } | |
35 | ||
36 | bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, | |
37 | const wxPoint& pos = wxDefaultPosition, | |
38 | const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, | |
39 | const wxValidator& validator = wxDefaultValidator, | |
40 | const wxString& name = wxButtonNameStr); | |
41 | ||
6762286d SC |
42 | protected: |
43 | virtual wxSize DoGetBestSize() const; | |
09219654 VZ |
44 | |
45 | virtual void DoSetBitmap(const wxBitmap& bitmap, State which); | |
46 | ||
47 | DECLARE_DYNAMIC_CLASS(wxBitmapButton) | |
6762286d SC |
48 | }; |
49 | ||
09219654 | 50 | #endif // _WX_OSX_BMPBUTTN_H_ |