]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/statbmp.h
Set/GetTitle out of wxWindowBase, forked and put to gtk/window.h and mgl/window.h...
[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{
bfc6fde4
VZ
26DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
27
28public:
29 wxStaticBitmap() { }
30 ~wxStaticBitmap();
31
32 wxStaticBitmap(wxWindow *parent, wxWindowID id,
33 const wxBitmap& label,
34 const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize,
36 long style = 0,
37 const wxString& name = wxStaticBitmapNameStr)
38 {
39 Create(parent, id, label, pos, size, style, name);
40 }
41
42 bool Create(wxWindow *parent, wxWindowID id,
43 const wxBitmap& label,
44 const wxPoint& pos = wxDefaultPosition,
45 const wxSize& size = wxDefaultSize,
46 long style = 0,
47 const wxString& name = wxStaticBitmapNameStr);
48
49 virtual void SetBitmap(const wxBitmap& bitmap);
50
31528cd3
VZ
51 virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
52 {
53 return FALSE;
54 }
bfc6fde4
VZ
55
56 wxBitmap& GetBitmap() const { return (wxBitmap&) m_messageBitmap; }
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 }
64
65 // for compatibility with wxMSW
66 void SetIcon(const wxIcon& icon)
67 {
68 SetBitmap( icon );
69 }
70
bfc6fde4
VZ
71 // overriden base class virtuals
72 virtual bool AcceptsFocus() const { return FALSE; }
73
74 // Implementation
75 virtual void ChangeFont(bool keepOriginalSize = TRUE);
76 virtual void ChangeBackgroundColour();
77 virtual void ChangeForegroundColour();
78
79protected:
80 wxBitmap m_messageBitmap;
9b6dbb09
JS
81};
82
83#endif
84 // _WX_STATBMP_H_