]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/bmpbuttn.h
Work around wxFinite() definition conflict with <cmath>.
[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
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
925f7740 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_BMPBUTTN_H_
13#define _WX_BMPBUTTN_H_
14
aae91497
MB
15#include "wx/motif/bmpmotif.h"
16
9b6dbb09
JS
17#define wxDEFAULT_BUTTON_MARGIN 4
18
53a2db12 19class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase
9b6dbb09 20{
83df96d6
JS
21public:
22 wxBitmapButton();
d3c7fc99 23 virtual ~wxBitmapButton();
ea9868e8 24 wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
83df96d6
JS
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 }
925f7740 32
83df96d6
JS
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);
925f7740 38
83df96d6 39 // Implementation
83df96d6 40 virtual void ChangeBackgroundColour();
925f7740 41
83df96d6 42protected:
2352862a
VZ
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];
aae91497
MB
51
52 wxBitmapCache m_bitmapCache;
53
83df96d6 54 WXPixmap m_insensPixmap;
2352862a
VZ
55
56 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
9b6dbb09
JS
57};
58
2352862a 59#endif // _WX_BMPBUTTN_H_