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