1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxBitmapButton class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_BMPBUTTN_H_
13 #define _WX_BMPBUTTN_H_
15 #include "wx/button.h"
17 WXDLLEXPORT_DATA(extern const wxChar
) wxButtonNameStr
[];
19 #define wxDEFAULT_BUTTON_MARGIN 4
21 class WXDLLEXPORT wxBitmapButton
: public wxBitmapButtonBase
23 DECLARE_DYNAMIC_CLASS(wxBitmapButton
)
28 SetMargins(wxDEFAULT_BUTTON_MARGIN
, wxDEFAULT_BUTTON_MARGIN
);
31 wxBitmapButton(wxWindow
*parent
, wxWindowID id
, const wxBitmap
& bitmap
,
32 const wxPoint
& pos
= wxDefaultPosition
,
33 const wxSize
& size
= wxDefaultSize
, long style
= wxBU_AUTODRAW
,
34 const wxValidator
& validator
= wxDefaultValidator
,
35 const wxString
& name
= wxButtonNameStr
)
37 Create(parent
, id
, bitmap
, pos
, size
, style
, validator
, name
);
40 bool Create(wxWindow
*parent
, wxWindowID id
, const wxBitmap
& bitmap
,
41 const wxPoint
& pos
= wxDefaultPosition
,
42 const wxSize
& size
= wxDefaultSize
, long style
= wxBU_AUTODRAW
,
43 const wxValidator
& validator
= wxDefaultValidator
,
44 const wxString
& name
= wxButtonNameStr
);
46 virtual void SetBitmapLabel(const wxBitmap
& bitmap
);
49 // TODO: Implementation
50 virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
51 virtual void DrawFace( WXHDC dc, int left, int top, int right, int bottom, bool sel );
52 virtual void DrawButtonFocus( WXHDC dc, int left, int top, int right, int bottom, bool sel );
53 virtual void DrawButtonDisable( WXHDC dc, int left, int top, int right, int bottom, bool with_marg );
57 virtual wxSize
DoGetBestSize() const;