]>
Commit | Line | Data |
---|---|---|
ffecfa5a | 1 | ///////////////////////////////////////////////////////////////////////////// |
e1d63b79 | 2 | // Name: wx/palmos/bmpbuttn.h |
ffecfa5a | 3 | // Purpose: wxBitmapButton class |
e1d63b79 | 4 | // Author: William Osborne - minimal working wxPalmOS port |
ffecfa5a JS |
5 | // Modified by: |
6 | // Created: 10/13/04 | |
e1d63b79 | 7 | // RCS-ID: $Id$ |
ffecfa5a JS |
8 | // Copyright: (c) William Osborne |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_BMPBUTTN_H_ | |
13 | #define _WX_BMPBUTTN_H_ | |
14 | ||
ffecfa5a JS |
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(); | |
ffecfa5a JS |
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; | |
5445a26c | 54 | |
ffecfa5a JS |
55 | private: |
56 | DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapButton) | |
57 | }; | |
58 | ||
59 | #endif | |
60 | // _WX_BMPBUTTN_H_ |