1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/bmpbuttn.h
3 // Purpose: wxBitmapButton class
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_BMPBUTTN_H_
13 #define _WX_BMPBUTTN_H_
15 #include "wx/button.h"
16 #include "wx/bitmap.h"
18 #define wxDEFAULT_BUTTON_MARGIN 4
20 class WXDLLEXPORT wxBitmapButton
: public wxBitmapButtonBase
24 { m_marginX
= m_marginY
= wxDEFAULT_BUTTON_MARGIN
; }
25 wxBitmapButton(wxWindow
*parent
,
27 const wxBitmap
& bitmap
,
28 const wxPoint
& pos
= wxDefaultPosition
,
29 const wxSize
& size
= wxDefaultSize
,
30 long style
= wxBU_AUTODRAW
,
31 const wxValidator
& validator
= wxDefaultValidator
,
32 const wxString
& name
= wxButtonNameStr
)
34 Create(parent
, id
, bitmap
, pos
, size
, style
, validator
, name
);
37 bool Create(wxWindow
*parent
,
39 const wxBitmap
& bitmap
,
40 const wxPoint
& pos
= wxDefaultPosition
,
41 const wxSize
& size
= wxDefaultSize
,
42 long style
= wxBU_AUTODRAW
,
43 const wxValidator
& validator
= wxDefaultValidator
,
44 const wxString
& name
= wxButtonNameStr
);
47 virtual void SetDefault();
48 virtual void DrawFace( WXHDC dc
, int left
, int top
, int right
, int bottom
, bool sel
);
49 virtual void DrawButtonFocus( WXHDC dc
, int left
, int top
, int right
, int bottom
, bool sel
);
50 virtual void DrawButtonDisable( WXHDC dc
, int left
, int top
, int right
, int bottom
, bool with_marg
);
53 virtual wxSize
DoGetBestSize() const;
56 DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapButton
)