]>
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"
23 //-----------------------------------------------------------------------------
25 //-----------------------------------------------------------------------------
29 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 extern const char *wxButtonNameStr
;
35 //-----------------------------------------------------------------------------
37 //-----------------------------------------------------------------------------
39 class wxBitmapButton
: public wxControl
41 DECLARE_DYNAMIC_CLASS(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
)
51 Create(parent
, id
, bitmap
, pos
, size
, style
, validator
, name
);
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
);
60 void SetLabel( const wxString
&label
);
61 wxString
GetLabel() const;
62 virtual void SetLabel( const wxBitmap
& bitmap
) { SetBitmapLabel(bitmap
); }
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
; }
69 void SetBitmapDisabled( const wxBitmap
& bitmap
);
70 void SetBitmapFocus( const wxBitmap
& bitmap
);
71 void SetBitmapLabel( const wxBitmap
& bitmap
);
72 void SetBitmapSelected( const wxBitmap
& bitmap
);
74 virtual void Enable(const bool);
83 void ApplyWidgetStyle();
93 #endif // __BMPBUTTONH__