1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxBitmapButton class
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_BMPBUTTN_H_
13 #define _WX_BMPBUTTN_H_
16 #pragma interface "bmpbuttn.h"
19 #include "wx/button.h"
21 WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr
;
23 #define wxDEFAULT_BUTTON_MARGIN 4
25 class WXDLLEXPORT wxBitmapButton
: public wxBitmapButtonBase
27 DECLARE_DYNAMIC_CLASS(wxBitmapButton
)
32 SetMargins(wxDEFAULT_BUTTON_MARGIN
, wxDEFAULT_BUTTON_MARGIN
);
35 wxBitmapButton(wxWindow
*parent
, wxWindowID id
, const wxBitmap
& bitmap
,
36 const wxPoint
& pos
= wxDefaultPosition
,
37 const wxSize
& size
= wxDefaultSize
, long style
= wxBU_AUTODRAW
,
38 const wxValidator
& validator
= wxDefaultValidator
,
39 const wxString
& name
= wxButtonNameStr
)
41 Create(parent
, id
, bitmap
, pos
, size
, style
, validator
, name
);
44 bool Create(wxWindow
*parent
, wxWindowID id
, const wxBitmap
& bitmap
,
45 const wxPoint
& pos
= wxDefaultPosition
,
46 const wxSize
& size
= wxDefaultSize
, long style
= wxBU_AUTODRAW
,
47 const wxValidator
& validator
= wxDefaultValidator
,
48 const wxString
& name
= wxButtonNameStr
);
50 virtual void SetBitmapLabel(const wxBitmap
& bitmap
);
53 // TODO: Implementation
54 virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
55 virtual void DrawFace( WXHDC dc, int left, int top, int right, int bottom, bool sel );
56 virtual void DrawButtonFocus( WXHDC dc, int left, int top, int right, int bottom, bool sel );
57 virtual void DrawButtonDisable( WXHDC dc, int left, int top, int right, int bottom, bool with_marg );