]> git.saurik.com Git - wxWidgets.git/blob - include/wx/palmos/bmpbuttn.h
reset g_SelectionBeforePopup sooner in gtk_popup_hide_callback() to ensure that GetSe...
[wxWidgets.git] / include / wx / palmos / bmpbuttn.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/bmpbuttn.h
3 // Purpose: wxBitmapButton class
4 // Author: William Osborne - minimal working wxPalmOS port
5 // Modified by:
6 // Created: 10/13/04
7 // RCS-ID: $Id$
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_BMPBUTTN_H_
13 #define _WX_BMPBUTTN_H_
14
15 #include "wx/button.h"
16 #include "wx/bitmap.h"
17
18 #define wxDEFAULT_BUTTON_MARGIN 4
19
20 class WXDLLEXPORT wxBitmapButton: public wxBitmapButtonBase
21 {
22 public:
23 wxBitmapButton()
24 { m_marginX = m_marginY = wxDEFAULT_BUTTON_MARGIN; }
25 wxBitmapButton(wxWindow *parent,
26 wxWindowID id,
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)
33 {
34 Create(parent, id, bitmap, pos, size, style, validator, name);
35 }
36
37 bool Create(wxWindow *parent,
38 wxWindowID id,
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);
45
46 // Implementation
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 );
51
52 protected:
53 virtual wxSize DoGetBestSize() const;
54
55 private:
56 DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapButton)
57 };
58
59 #endif
60 // _WX_BMPBUTTN_H_