]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/statbmp.h
made wxUSE_UNICODE=1 the default
[wxWidgets.git] / include / wx / motif / statbmp.h
CommitLineData
9b6dbb09 1/////////////////////////////////////////////////////////////////////////////
925f7740 2// Name: wx/motif/statbmp.h
9b6dbb09
JS
3// Purpose: wxStaticBitmap class
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_STATBMP_H_
13#define _WX_STATBMP_H_
14
aae91497 15#include "wx/motif/bmpmotif.h"
b1519886 16#include "wx/icon.h"
9b6dbb09 17
9a595736 18class WXDLLEXPORT wxStaticBitmap : public wxStaticBitmapBase
9b6dbb09 19{
83df96d6 20 DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
925f7740 21
bfc6fde4
VZ
22public:
23 wxStaticBitmap() { }
d3c7fc99 24 virtual ~wxStaticBitmap();
925f7740 25
bfc6fde4 26 wxStaticBitmap(wxWindow *parent, wxWindowID id,
83df96d6
JS
27 const wxBitmap& label,
28 const wxPoint& pos = wxDefaultPosition,
29 const wxSize& size = wxDefaultSize,
30 long style = 0,
31 const wxString& name = wxStaticBitmapNameStr)
bfc6fde4
VZ
32 {
33 Create(parent, id, label, pos, size, style, name);
34 }
925f7740 35
bfc6fde4 36 bool Create(wxWindow *parent, wxWindowID id,
83df96d6
JS
37 const wxBitmap& label,
38 const wxPoint& pos = wxDefaultPosition,
39 const wxSize& size = wxDefaultSize,
40 long style = 0,
41 const wxString& name = wxStaticBitmapNameStr);
925f7740 42
bfc6fde4 43 virtual void SetBitmap(const wxBitmap& bitmap);
925f7740 44
31528cd3
VZ
45 virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
46 {
96be256b 47 return false;
31528cd3 48 }
925f7740 49
9a595736 50 wxBitmap GetBitmap() const { return m_messageBitmap; }
925f7740 51
b1519886 52 // for compatibility with wxMSW
9a595736 53 wxIcon GetIcon() const
b1519886
VZ
54 {
55 // don't use wxDynamicCast, icons and bitmaps are really the same thing
9a595736 56 return *(wxIcon*)&m_messageBitmap;
b1519886 57 }
925f7740 58
b1519886
VZ
59 // for compatibility with wxMSW
60 void SetIcon(const wxIcon& icon)
61 {
62 SetBitmap( icon );
63 }
925f7740 64
bfc6fde4 65 // Implementation
bfc6fde4
VZ
66 virtual void ChangeBackgroundColour();
67 virtual void ChangeForegroundColour();
925f7740 68
7af68c66
MB
69protected:
70 void DoSetBitmap();
71
bfc6fde4
VZ
72protected:
73 wxBitmap m_messageBitmap;
7af68c66 74 wxBitmap m_messageBitmapOriginal;
aae91497 75 wxBitmapCache m_bitmapCache;
9b6dbb09
JS
76};
77
78#endif
83df96d6 79// _WX_STATBMP_H_