]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/gtk1/bmpbutton.h | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
5 | // Id: $Id$ | |
6 | // Copyright: (c) 1998 Robert Roebling | |
7 | // Licence: wxWindows licence | |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | ||
11 | #ifndef __BMPBUTTONH__ | |
12 | #define __BMPBUTTONH__ | |
13 | ||
14 | // ---------------------------------------------------------------------------- | |
15 | // wxBitmapButton | |
16 | // ---------------------------------------------------------------------------- | |
17 | ||
18 | class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase | |
19 | { | |
20 | public: | |
21 | wxBitmapButton() { Init(); } | |
22 | ||
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) | |
31 | { | |
32 | Init(); | |
33 | ||
34 | Create(parent, id, bitmap, pos, size, style, validator, name); | |
35 | } | |
36 | ||
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 | ||
46 | void SetLabel( const wxString &label ); | |
47 | virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); } | |
48 | ||
49 | virtual bool Enable(bool enable = TRUE); | |
50 | ||
51 | // implementation | |
52 | // -------------- | |
53 | ||
54 | void HasFocus(); | |
55 | void NotFocus(); | |
56 | void StartSelect(); | |
57 | void EndSelect(); | |
58 | void DoApplyWidgetStyle(GtkRcStyle *style); | |
59 | ||
60 | bool m_hasFocus:1; | |
61 | bool m_isSelected:1; | |
62 | ||
63 | protected: | |
64 | virtual void OnSetBitmap(); | |
65 | virtual wxSize DoGetBestSize() const; | |
66 | ||
67 | void Init(); | |
68 | ||
69 | private: | |
70 | DECLARE_DYNAMIC_CLASS(wxBitmapButton) | |
71 | }; | |
72 | ||
73 | #endif // __BMPBUTTONH__ |