]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/bmpbuttn.h
wxImageHistogram needs WXDLLEXPORT
[wxWidgets.git] / include / wx / motif / bmpbuttn.h
CommitLineData
9b6dbb09
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: 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#ifdef __GNUG__
16#pragma interface "bmpbuttn.h"
17#endif
18
9b6dbb09
JS
19WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr;
20
21#define wxDEFAULT_BUTTON_MARGIN 4
22
ea9868e8 23class WXDLLEXPORT wxBitmapButton: public wxBitmapButtonBase
9b6dbb09 24{
83df96d6
JS
25 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
26public:
27 wxBitmapButton();
28 ~wxBitmapButton();
ea9868e8 29 wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
83df96d6
JS
30 const wxPoint& pos = wxDefaultPosition,
31 const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
32 const wxValidator& validator = wxDefaultValidator,
33 const wxString& name = wxButtonNameStr)
34 {
35 Create(parent, id, bitmap, pos, size, style, validator, name);
36 }
37
38 bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
41 const wxValidator& validator = wxDefaultValidator,
42 const wxString& name = wxButtonNameStr);
43
44 virtual void SetLabel(const wxBitmap& bitmap)
45 {
46 SetBitmapLabel(bitmap);
47 }
48 virtual void SetLabel(const wxString& label)
49 {
50 wxControl::SetLabel(label);
51 }
52
53 virtual void SetBitmapLabel(const wxBitmap& bitmap);
54
83df96d6
JS
55 void SetBitmapSelected(const wxBitmap& sel);
56 void SetBitmapFocus(const wxBitmap& focus);
57 void SetBitmapDisabled(const wxBitmap& disabled);
58
83df96d6
JS
59 // Implementation
60 void DoSetBitmap();
61 virtual void ChangeBackgroundColour();
401eb3de 62 virtual wxSize DoGetBestSize() const;
83df96d6
JS
63
64protected:
ea9868e8 65 wxBitmap m_bmpNormalOriginal; // May be different from m_buttonBitmap
83df96d6
JS
66 // if m_buttonBitmap has been changed
67 // to reflect button background colour
ea9868e8
MB
68 wxBitmap m_bmpSelectedOriginal;
69 wxBitmap m_bmpDisabledOriginal;
83df96d6
JS
70
71 WXPixmap m_insensPixmap;
9b6dbb09
JS
72};
73
74#endif
83df96d6 75// _WX_BMPBUTTN_H_