]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/statbmp.h
Added configure test for const_cast<>(), and enabled it
[wxWidgets.git] / include / wx / motif / statbmp.h
CommitLineData
9b6dbb09
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: statbmp.h
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
31528cd3 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_STATBMP_H_
13#define _WX_STATBMP_H_
14
15#ifdef __GNUG__
16#pragma interface "statbmp.h"
17#endif
18
19#include "wx/control.h"
b1519886 20#include "wx/icon.h"
9b6dbb09
JS
21
22WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr;
23
bfc6fde4 24class WXDLLEXPORT wxStaticBitmap : public wxControl
9b6dbb09 25{
83df96d6
JS
26 DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
27
bfc6fde4
VZ
28public:
29 wxStaticBitmap() { }
30 ~wxStaticBitmap();
83df96d6 31
bfc6fde4 32 wxStaticBitmap(wxWindow *parent, wxWindowID id,
83df96d6
JS
33 const wxBitmap& label,
34 const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize,
36 long style = 0,
37 const wxString& name = wxStaticBitmapNameStr)
bfc6fde4
VZ
38 {
39 Create(parent, id, label, pos, size, style, name);
40 }
83df96d6 41
bfc6fde4 42 bool Create(wxWindow *parent, wxWindowID id,
83df96d6
JS
43 const wxBitmap& label,
44 const wxPoint& pos = wxDefaultPosition,
45 const wxSize& size = wxDefaultSize,
46 long style = 0,
47 const wxString& name = wxStaticBitmapNameStr);
48
bfc6fde4 49 virtual void SetBitmap(const wxBitmap& bitmap);
83df96d6 50
31528cd3
VZ
51 virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
52 {
53 return FALSE;
54 }
83df96d6 55
bfc6fde4 56 wxBitmap& GetBitmap() const { return (wxBitmap&) m_messageBitmap; }
83df96d6 57
b1519886
VZ
58 // for compatibility with wxMSW
59 const wxIcon& GetIcon() const
60 {
61 // don't use wxDynamicCast, icons and bitmaps are really the same thing
62 return (const wxIcon &)m_messageBitmap;
63 }
83df96d6 64
b1519886
VZ
65 // for compatibility with wxMSW
66 void SetIcon(const wxIcon& icon)
67 {
68 SetBitmap( icon );
69 }
83df96d6 70
bfc6fde4
VZ
71 // overriden base class virtuals
72 virtual bool AcceptsFocus() const { return FALSE; }
83df96d6 73
bfc6fde4
VZ
74 // Implementation
75 virtual void ChangeFont(bool keepOriginalSize = TRUE);
76 virtual void ChangeBackgroundColour();
77 virtual void ChangeForegroundColour();
83df96d6 78
7af68c66
MB
79protected:
80 void DoSetBitmap();
81
bfc6fde4
VZ
82protected:
83 wxBitmap m_messageBitmap;
7af68c66 84 wxBitmap m_messageBitmapOriginal;
9b6dbb09
JS
85};
86
87#endif
83df96d6 88// _WX_STATBMP_H_