]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/bmpbuttn.h
added helper Is{Col,Row}Shown()
[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 8// Copyright: (c) David Webster
65571936 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 17
53a2db12 18WXDLLIMPEXP_DATA_CORE(extern const char) wxButtonNameStr[];
0e320a79
DW
19
20#define wxDEFAULT_BUTTON_MARGIN 4
21
53a2db12 22class WXDLLIMPEXP_CORE 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 //
db16e5c3 69 virtual bool OS2OnDraw(WXDRAWITEMSTRUCT* pItem);
0e320a79 70
db16e5c3 71private:
0e320a79 72
db16e5c3
DW
73 virtual void DrawFace( wxClientDC& rDC
74 ,bool bSel
75 );
76 virtual void DrawButtonFocus(wxClientDC& rDC);
77 virtual void DrawButtonDisable( wxClientDC& rDC
78 ,wxBitmap& rBmp
79 );
80 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
0e320a79 81
db16e5c3
DW
82 virtual void SetLabel(const wxString& rsString)
83 {
84 wxButton::SetLabel(rsString);
85 }
86}; // end of CLASS wxBitmapButton
0e320a79 87
db16e5c3 88#endif // _WX_BMPBUTTN_H_
0e320a79 89