]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/bmpbuttn.h
compilation fix
[wxWidgets.git] / include / wx / os2 / bmpbuttn.h
CommitLineData
0e320a79
DW
1/////////////////////////////////////////////////////////////////////////////
2// Name: bmpbuttn.h
3// Purpose: wxBitmapButton class
37f214d5 4// Author: David Webster
0e320a79 5// Modified by:
37f214d5 6// Created: 10/13/99
0e320a79 7// RCS-ID: $Id$
37f214d5
DW
8// Copyright: (c) David Webster
9// Licence: wxWindows licence
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_BMPBUTTN_H_
13#define _WX_BMPBUTTN_H_
14
0e320a79 15#include "wx/button.h"
9cd03633 16#include "wx/dcclient.h"
0e320a79
DW
17
18WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr;
19
20#define wxDEFAULT_BUTTON_MARGIN 4
21
210a651b 22class WXDLLEXPORT wxBitmapButton: public wxBitmapButtonBase
0e320a79 23{
db16e5c3
DW
24public:
25 inline wxBitmapButton()
26 {
27 m_marginX = wxDEFAULT_BUTTON_MARGIN;
28 m_marginY = wxDEFAULT_BUTTON_MARGIN;
29 }
30 inline wxBitmapButton( wxWindow* pParent
31 ,wxWindowID vId
32 ,const wxBitmap& rBitmap
33 ,const wxPoint& rPos = wxDefaultPosition
34 ,const wxSize& rSize = wxDefaultSize
35 ,long lStyle = wxBU_AUTODRAW
db16e5c3 36 ,const wxValidator& rValidator = wxDefaultValidator
db16e5c3
DW
37 ,const wxString& rsName = wxButtonNameStr
38 )
39 {
40 Create( pParent
41 ,vId
42 ,rBitmap
43 ,rPos
44 ,rSize
45 ,lStyle
db16e5c3 46 ,rValidator
db16e5c3
DW
47 ,rsName
48 );
49 }
0e320a79 50
db16e5c3
DW
51 bool Create( wxWindow* pParent
52 ,wxWindowID vId
53 ,const wxBitmap& rBitmap
54 ,const wxPoint& rPos = wxDefaultPosition
55 ,const wxSize& rSize = wxDefaultSize
56 ,long lStyle = wxBU_AUTODRAW
db16e5c3 57 ,const wxValidator& rValidator = wxDefaultValidator
db16e5c3
DW
58 ,const wxString& rsName = wxButtonNameStr
59 );
0e320a79 60
db16e5c3
DW
61 virtual void SetLabel(const wxBitmap& rBitmap)
62 {
63 SetBitmapLabel(rBitmap);
64 }
0e320a79 65
db16e5c3
DW
66 //
67 // Implementation
68 //
69 virtual void SetDefault();
70 virtual bool OS2OnDraw(WXDRAWITEMSTRUCT* pItem);
0e320a79 71
db16e5c3 72private:
0e320a79 73
db16e5c3
DW
74 virtual void DrawFace( wxClientDC& rDC
75 ,bool bSel
76 );
77 virtual void DrawButtonFocus(wxClientDC& rDC);
78 virtual void DrawButtonDisable( wxClientDC& rDC
79 ,wxBitmap& rBmp
80 );
81 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
0e320a79 82
db16e5c3
DW
83 virtual void SetLabel(const wxString& rsString)
84 {
85 wxButton::SetLabel(rsString);
86 }
87}; // end of CLASS wxBitmapButton
0e320a79 88
db16e5c3 89#endif // _WX_BMPBUTTN_H_
0e320a79 90