]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | ///////////////////////////////////////////////////////////////////////////// |
8ef94bfc | 2 | // Name: wx/gtk1/bmpbutton.h |
c801d85f KB |
3 | // Purpose: |
4 | // Author: Robert Roebling | |
dbf858b5 | 5 | // Id: $Id$ |
01111366 | 6 | // Copyright: (c) 1998 Robert Roebling |
65571936 | 7 | // Licence: wxWindows licence |
c801d85f KB |
8 | ///////////////////////////////////////////////////////////////////////////// |
9 | ||
10 | ||
11 | #ifndef __BMPBUTTONH__ | |
12 | #define __BMPBUTTONH__ | |
13 | ||
1e6feb95 | 14 | // ---------------------------------------------------------------------------- |
c801d85f | 15 | // wxBitmapButton |
1e6feb95 | 16 | // ---------------------------------------------------------------------------- |
c801d85f | 17 | |
20123d49 | 18 | class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase |
151ccd11 | 19 | { |
43a18898 | 20 | public: |
c3dfaa10 VZ |
21 | wxBitmapButton() { Init(); } |
22 | ||
1e6feb95 VZ |
23 | wxBitmapButton(wxWindow *parent, |
24 | wxWindowID id, | |
25 | const wxBitmap& bitmap, | |
26 | const wxPoint& pos = wxDefaultPosition, | |
27 | const wxSize& size = wxDefaultSize, | |
28 | long style = wxBU_AUTODRAW, | |
29 | const wxValidator& validator = wxDefaultValidator, | |
30 | const wxString& name = wxButtonNameStr) | |
738f9e5a | 31 | { |
c3dfaa10 VZ |
32 | Init(); |
33 | ||
738f9e5a RR |
34 | Create(parent, id, bitmap, pos, size, style, validator, name); |
35 | } | |
c3dfaa10 | 36 | |
1e6feb95 VZ |
37 | bool Create(wxWindow *parent, |
38 | wxWindowID id, | |
39 | const wxBitmap& bitmap, | |
40 | const wxPoint& pos = wxDefaultPosition, | |
41 | const wxSize& size = wxDefaultSize, | |
42 | long style = wxBU_AUTODRAW, | |
43 | const wxValidator& validator = wxDefaultValidator, | |
44 | const wxString& name = wxButtonNameStr); | |
45 | ||
738f9e5a | 46 | void SetLabel( const wxString &label ); |
738f9e5a | 47 | virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); } |
29149a64 | 48 | |
c3dfaa10 VZ |
49 | virtual void SetDefault(); |
50 | virtual bool Enable(bool enable = TRUE); | |
51 | ||
20e05ffb RR |
52 | // implementation |
53 | // -------------- | |
29149a64 | 54 | |
738f9e5a RR |
55 | void HasFocus(); |
56 | void NotFocus(); | |
57 | void StartSelect(); | |
58 | void EndSelect(); | |
f40fdaa3 | 59 | void DoApplyWidgetStyle(GtkRcStyle *style); |
29149a64 | 60 | |
c3dfaa10 VZ |
61 | bool m_hasFocus:1; |
62 | bool m_isSelected:1; | |
29149a64 | 63 | |
f6bcfd97 | 64 | protected: |
1e6feb95 | 65 | virtual void OnSetBitmap(); |
e0aeebed | 66 | virtual wxSize DoGetBestSize() const; |
f6bcfd97 | 67 | |
c3dfaa10 VZ |
68 | void Init(); |
69 | ||
738f9e5a RR |
70 | private: |
71 | DECLARE_DYNAMIC_CLASS(wxBitmapButton) | |
151ccd11 | 72 | }; |
43a18898 | 73 | |
c801d85f | 74 | #endif // __BMPBUTTONH__ |