]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/bmpbuttn.h
add wxPosixPermissions enumeration; it provides more readable synonims for wxS_I...
[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
21 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
22public:
23 wxBitmapButton();
d3c7fc99 24 virtual ~wxBitmapButton();
ea9868e8 25 wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
83df96d6
JS
26 const wxPoint& pos = wxDefaultPosition,
27 const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
28 const wxValidator& validator = wxDefaultValidator,
29 const wxString& name = wxButtonNameStr)
30 {
31 Create(parent, id, bitmap, pos, size, style, validator, name);
32 }
925f7740 33
83df96d6
JS
34 bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
35 const wxPoint& pos = wxDefaultPosition,
36 const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
37 const wxValidator& validator = wxDefaultValidator,
38 const wxString& name = wxButtonNameStr);
925f7740 39
83df96d6
JS
40 virtual void SetLabel(const wxBitmap& bitmap)
41 {
42 SetBitmapLabel(bitmap);
43 }
44 virtual void SetLabel(const wxString& label)
45 {
46 wxControl::SetLabel(label);
47 }
925f7740 48
83df96d6 49 virtual void SetBitmapLabel(const wxBitmap& bitmap);
925f7740 50
83df96d6
JS
51 void SetBitmapSelected(const wxBitmap& sel);
52 void SetBitmapFocus(const wxBitmap& focus);
53 void SetBitmapDisabled(const wxBitmap& disabled);
925f7740 54
83df96d6
JS
55 // Implementation
56 void DoSetBitmap();
57 virtual void ChangeBackgroundColour();
401eb3de 58 virtual wxSize DoGetBestSize() const;
925f7740 59
83df96d6 60protected:
ea9868e8 61 wxBitmap m_bmpNormalOriginal; // May be different from m_buttonBitmap
83df96d6
JS
62 // if m_buttonBitmap has been changed
63 // to reflect button background colour
925f7740 64 wxBitmap m_bmpSelectedOriginal;
ea9868e8 65 wxBitmap m_bmpDisabledOriginal;
aae91497
MB
66
67 wxBitmapCache m_bitmapCache;
68
83df96d6 69 WXPixmap m_insensPixmap;
9b6dbb09
JS
70};
71
72#endif
83df96d6 73// _WX_BMPBUTTN_H_