]>
Commit | Line | Data |
---|---|---|
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 | ||
12 | #ifndef _WX_BMPBUTTN_H_ | |
13 | #define _WX_BMPBUTTN_H_ | |
14 | ||
15 | #include "wx/button.h" | |
16 | ||
17 | WXDLLEXPORT_DATA(extern const wxChar) wxButtonNameStr[]; | |
18 | ||
19 | #define wxDEFAULT_BUTTON_MARGIN 4 | |
20 | ||
21 | class WXDLLEXPORT wxBitmapButton: public wxBitmapButtonBase | |
22 | { | |
23 | DECLARE_DYNAMIC_CLASS(wxBitmapButton) | |
24 | ||
25 | public: | |
26 | wxBitmapButton() | |
27 | { | |
28 | SetMargins(wxDEFAULT_BUTTON_MARGIN, wxDEFAULT_BUTTON_MARGIN); | |
29 | } | |
30 | ||
31 | wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, | |
32 | const wxPoint& pos = wxDefaultPosition, | |
33 | const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, | |
34 | const wxValidator& validator = wxDefaultValidator, | |
35 | const wxString& name = wxButtonNameStr) | |
36 | { | |
37 | Create(parent, id, bitmap, pos, size, style, validator, name); | |
38 | } | |
39 | ||
40 | bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, | |
41 | const wxPoint& pos = wxDefaultPosition, | |
42 | const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, | |
43 | const wxValidator& validator = wxDefaultValidator, | |
44 | const wxString& name = wxButtonNameStr); | |
45 | ||
46 | virtual void SetBitmapLabel(const wxBitmap& bitmap); | |
47 | ||
48 | protected: | |
49 | virtual wxSize DoGetBestSize() const; | |
50 | }; | |
51 | ||
52 | #endif | |
53 | // _WX_BMPBUTTN_H_ |