]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/bmpbuttn.h
started once again from stubs
[wxWidgets.git] / include / wx / gtk / bmpbuttn.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: 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 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "wx/defs.h"
19 #include "wx/object.h"
20 #include "wx/list.h"
21 #include "wx/control.h"
22
23 //-----------------------------------------------------------------------------
24 // classes
25 //-----------------------------------------------------------------------------
26
27 class wxBitmapButton;
28
29 //-----------------------------------------------------------------------------
30 // global data
31 //-----------------------------------------------------------------------------
32
33 extern const char *wxButtonNameStr;
34
35 //-----------------------------------------------------------------------------
36 // wxBitmapButton
37 //-----------------------------------------------------------------------------
38
39 class wxBitmapButton: public wxControl
40 {
41 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
42
43 public:
44 wxBitmapButton();
45 inline wxBitmapButton( wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
46 const wxPoint& pos = wxDefaultPosition,
47 const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
48 const wxValidator& validator = wxDefaultValidator,
49 const wxString& name = wxButtonNameStr )
50 {
51 Create(parent, id, bitmap, pos, size, style, validator, name);
52 }
53 bool Create( wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
54 const wxPoint& pos = wxDefaultPosition,
55 const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
56 const wxValidator& validator = wxDefaultValidator,
57 const wxString& name = wxButtonNameStr);
58 void SetDefault();
59
60 void SetLabel( const wxString &label );
61 wxString GetLabel() const;
62 virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); }
63
64 wxBitmap& GetBitmapDisabled() const { return (wxBitmap&) m_disabled; }
65 wxBitmap& GetBitmapFocus() const { return (wxBitmap&) m_focus; }
66 wxBitmap& GetBitmapLabel() const { return (wxBitmap&) m_bitmap; }
67 wxBitmap& GetBitmapSelected() const { return (wxBitmap&) m_selected; }
68
69 void SetBitmapDisabled( const wxBitmap& bitmap );
70 void SetBitmapFocus( const wxBitmap& bitmap );
71 void SetBitmapLabel( const wxBitmap& bitmap );
72 void SetBitmapSelected( const wxBitmap& bitmap );
73
74 virtual void Enable(const bool);
75
76 // implementation
77
78 void HasFocus();
79 void NotFocus();
80 void StartSelect();
81 void EndSelect();
82 void SetBitmap();
83 void ApplyWidgetStyle();
84
85 bool m_hasFocus;
86 bool m_isSelected;
87 wxBitmap m_bitmap;
88 wxBitmap m_disabled;
89 wxBitmap m_focus;
90 wxBitmap m_selected;
91 };
92
93 #endif // __BMPBUTTONH__