]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/bmpbuttn.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __BMPBUTTONH__
12 #define __BMPBUTTONH__
22 #include "wx/object.h"
24 #include "wx/control.h"
25 #include "wx/bitmap.h"
27 //-----------------------------------------------------------------------------
29 //-----------------------------------------------------------------------------
33 //-----------------------------------------------------------------------------
35 //-----------------------------------------------------------------------------
37 extern const wxChar
*wxButtonNameStr
;
39 //-----------------------------------------------------------------------------
41 //-----------------------------------------------------------------------------
43 class wxBitmapButton
: public wxControl
45 DECLARE_DYNAMIC_CLASS(wxBitmapButton
)
49 inline wxBitmapButton( wxWindow
*parent
, wxWindowID id
, const wxBitmap
& bitmap
,
50 const wxPoint
& pos
= wxDefaultPosition
,
51 const wxSize
& size
= wxDefaultSize
, long style
= wxBU_AUTODRAW
,
52 const wxValidator
& validator
= wxDefaultValidator
,
53 const wxString
& name
= wxButtonNameStr
)
55 Create(parent
, id
, bitmap
, pos
, size
, style
, validator
, name
);
57 bool Create( wxWindow
*parent
, wxWindowID id
, const wxBitmap
& bitmap
,
58 const wxPoint
& pos
= wxDefaultPosition
,
59 const wxSize
& size
= wxDefaultSize
, long style
= wxBU_AUTODRAW
,
60 const wxValidator
& validator
= wxDefaultValidator
,
61 const wxString
& name
= wxButtonNameStr
);
64 void SetLabel( const wxString
&label
);
65 wxString
GetLabel() const;
66 virtual void SetLabel( const wxBitmap
& bitmap
) { SetBitmapLabel(bitmap
); }
68 wxBitmap
& GetBitmapDisabled() const { return (wxBitmap
&) m_disabled
; }
69 wxBitmap
& GetBitmapFocus() const { return (wxBitmap
&) m_focus
; }
70 wxBitmap
& GetBitmapLabel() const { return (wxBitmap
&) m_bitmap
; }
71 wxBitmap
& GetBitmapSelected() const { return (wxBitmap
&) m_selected
; }
73 void SetBitmapDisabled( const wxBitmap
& bitmap
);
74 void SetBitmapFocus( const wxBitmap
& bitmap
);
75 void SetBitmapLabel( const wxBitmap
& bitmap
);
76 void SetBitmapSelected( const wxBitmap
& bitmap
);
78 virtual bool Enable(bool enable
);
87 void ApplyWidgetStyle();
99 #endif // __BMPBUTTONH__