]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/bmpbuttn.h
Minor changes to some comments
[wxWidgets.git] / include / wx / motif / bmpbuttn.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/bmpbuttn.h
3 // Purpose: wxBitmapButton class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 17/09/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_BMPBUTTN_H_
13 #define _WX_BMPBUTTN_H_
14
15 #include "wx/motif/bmpmotif.h"
16
17 #define wxDEFAULT_BUTTON_MARGIN 4
18
19 class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase
20 {
21 public:
22 wxBitmapButton();
23 virtual ~wxBitmapButton();
24 wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
25 const wxPoint& pos = wxDefaultPosition,
26 const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
27 const wxValidator& validator = wxDefaultValidator,
28 const wxString& name = wxButtonNameStr)
29 {
30 Create(parent, id, bitmap, pos, size, style, validator, name);
31 }
32
33 bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
34 const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
36 const wxValidator& validator = wxDefaultValidator,
37 const wxString& name = wxButtonNameStr);
38
39 // Implementation
40 virtual void ChangeBackgroundColour();
41
42 protected:
43 virtual wxSize DoGetBestSize() const;
44
45 virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
46 virtual void OnSetBitmap();
47
48 // original bitmaps may be different from the ones we were initialized with
49 // if they were changed to reflect button background colour
50 wxBitmap m_bitmapsOriginal[State_Max];
51
52 wxBitmapCache m_bitmapCache;
53
54 WXPixmap m_insensPixmap;
55
56 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
57 };
58
59 #endif // _WX_BMPBUTTN_H_