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