]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/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
)
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
);
59 void SetDefault(void);
60 void SetLabel( const wxString
&label
);
61 wxString
GetLabel(void) const;
62 virtual void SetLabel(const wxBitmap
& bitmap
) { SetBitmapLabel(bitmap
); }
63 virtual void SetBitmapLabel( const wxBitmap
& bitmap
);
64 wxBitmap
& GetBitmapLabel(void) const { return (wxBitmap
&) m_bitmap
; }
68 void ApplyWidgetStyle();
75 #endif // __BMPBUTTONH__