]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/motif/bmpbuttn.h
rename wxFileList to wxFileListCtrl
[wxWidgets.git] / include / wx / motif / bmpbuttn.h
... / ...
CommitLineData
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
19class WXDLLEXPORT wxBitmapButton: public wxBitmapButtonBase
20{
21 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
22public:
23 wxBitmapButton();
24 virtual ~wxBitmapButton();
25 wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
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 }
33
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);
39
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 }
48
49 virtual void SetBitmapLabel(const wxBitmap& bitmap);
50
51 void SetBitmapSelected(const wxBitmap& sel);
52 void SetBitmapFocus(const wxBitmap& focus);
53 void SetBitmapDisabled(const wxBitmap& disabled);
54
55 // Implementation
56 void DoSetBitmap();
57 virtual void ChangeBackgroundColour();
58 virtual wxSize DoGetBestSize() const;
59
60protected:
61 wxBitmap m_bmpNormalOriginal; // May be different from m_buttonBitmap
62 // if m_buttonBitmap has been changed
63 // to reflect button background colour
64 wxBitmap m_bmpSelectedOriginal;
65 wxBitmap m_bmpDisabledOriginal;
66
67 wxBitmapCache m_bitmapCache;
68
69 WXPixmap m_insensPixmap;
70};
71
72#endif
73// _WX_BMPBUTTN_H_