]>
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__
19 #include "wx/object.h"
21 #include "wx/control.h"
22 #include "wx/bitmap.h"
24 //-----------------------------------------------------------------------------
26 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
32 //-----------------------------------------------------------------------------
34 extern const char *wxButtonNameStr
;
36 //-----------------------------------------------------------------------------
38 //-----------------------------------------------------------------------------
40 class wxBitmapButton
: public wxControl
42 DECLARE_DYNAMIC_CLASS(wxBitmapButton
)
46 inline wxBitmapButton( wxWindow
*parent
, wxWindowID id
, const wxBitmap
& bitmap
,
47 const wxPoint
& pos
= wxDefaultPosition
,
48 const wxSize
& size
= wxDefaultSize
, long style
= wxBU_AUTODRAW
,
49 const wxValidator
& validator
= wxDefaultValidator
,
50 const wxString
& name
= wxButtonNameStr
)
52 Create(parent
, id
, bitmap
, pos
, size
, style
, validator
, name
);
54 bool Create( wxWindow
*parent
, wxWindowID id
, const wxBitmap
& bitmap
,
55 const wxPoint
& pos
= wxDefaultPosition
,
56 const wxSize
& size
= wxDefaultSize
, long style
= wxBU_AUTODRAW
,
57 const wxValidator
& validator
= wxDefaultValidator
,
58 const wxString
& name
= wxButtonNameStr
);
61 void SetLabel( const wxString
&label
);
62 wxString
GetLabel() const;
63 virtual void SetLabel( const wxBitmap
& bitmap
) { SetBitmapLabel(bitmap
); }
65 wxBitmap
& GetBitmapDisabled() const { return (wxBitmap
&) m_disabled
; }
66 wxBitmap
& GetBitmapFocus() const { return (wxBitmap
&) m_focus
; }
67 wxBitmap
& GetBitmapLabel() const { return (wxBitmap
&) m_bitmap
; }
68 wxBitmap
& GetBitmapSelected() const { return (wxBitmap
&) m_selected
; }
70 void SetBitmapDisabled( const wxBitmap
& bitmap
);
71 void SetBitmapFocus( const wxBitmap
& bitmap
);
72 void SetBitmapLabel( const wxBitmap
& bitmap
);
73 void SetBitmapSelected( const wxBitmap
& bitmap
);
75 virtual void Enable(const bool);
84 void ApplyWidgetStyle();
94 #endif // __BMPBUTTONH__