]>
Commit | Line | Data |
---|---|---|
2bda0e17 KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: bmpbuttn.h | |
3 | // Purpose: wxBitmapButton class | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
bbcdf8bc | 8 | // Copyright: (c) Julian Smart |
65571936 | 9 | // Licence: wxWindows licence |
2bda0e17 KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
bbcdf8bc JS |
12 | #ifndef _WX_BMPBUTTN_H_ |
13 | #define _WX_BMPBUTTN_H_ | |
2bda0e17 | 14 | |
12028905 | 15 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
2bda0e17 KB |
16 | #pragma interface "bmpbuttn.h" |
17 | #endif | |
18 | ||
19 | #include "wx/button.h" | |
1e7215e6 | 20 | #include "wx/bitmap.h" |
a6c255cb | 21 | #include "wx/brush.h" |
2bda0e17 | 22 | |
2bda0e17 KB |
23 | #define wxDEFAULT_BUTTON_MARGIN 4 |
24 | ||
1e6feb95 | 25 | class WXDLLEXPORT wxBitmapButton: public wxBitmapButtonBase |
2bda0e17 | 26 | { |
0655ad29 | 27 | public: |
1e6feb95 VZ |
28 | wxBitmapButton() |
29 | { m_marginX = m_marginY = wxDEFAULT_BUTTON_MARGIN; } | |
30 | wxBitmapButton(wxWindow *parent, | |
31 | wxWindowID id, | |
32 | const wxBitmap& bitmap, | |
33 | const wxPoint& pos = wxDefaultPosition, | |
34 | const wxSize& size = wxDefaultSize, | |
35 | long style = wxBU_AUTODRAW, | |
36 | const wxValidator& validator = wxDefaultValidator, | |
37 | const wxString& name = wxButtonNameStr) | |
0655ad29 VZ |
38 | { |
39 | Create(parent, id, bitmap, pos, size, style, validator, name); | |
40 | } | |
41 | ||
1e6feb95 VZ |
42 | bool Create(wxWindow *parent, |
43 | wxWindowID id, | |
44 | const wxBitmap& bitmap, | |
45 | const wxPoint& pos = wxDefaultPosition, | |
46 | const wxSize& size = wxDefaultSize, | |
47 | long style = wxBU_AUTODRAW, | |
48 | const wxValidator& validator = wxDefaultValidator, | |
49 | const wxString& name = wxButtonNameStr); | |
2bda0e17 | 50 | |
0655ad29 | 51 | // Implementation |
d50dbf7c | 52 | virtual bool SetBackgroundColour(const wxColour& colour); |
0655ad29 VZ |
53 | virtual void SetDefault(); |
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 ); | |
58 | ||
c046274e RD |
59 | protected: |
60 | virtual wxSize DoGetBestSize() const; | |
fcf90ee1 | 61 | |
d50dbf7c VZ |
62 | wxBrush m_brushDisabled; |
63 | ||
fc7a2a60 | 64 | DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapButton) |
2bda0e17 KB |
65 | }; |
66 | ||
67 | #endif | |
bbcdf8bc | 68 | // _WX_BMPBUTTN_H_ |