]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/motif/statbmp.h
removed C++ comment added by last commit
[wxWidgets.git] / include / wx / motif / statbmp.h
... / ...
CommitLineData
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
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_STATBMP_H_
13#define _WX_STATBMP_H_
14
15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16#pragma interface "statbmp.h"
17#endif
18
19#include "wx/motif/bmpmotif.h"
20#include "wx/icon.h"
21
22class WXDLLEXPORT wxStaticBitmap : public wxStaticBitmapBase
23{
24 DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
25
26public:
27 wxStaticBitmap() { }
28 ~wxStaticBitmap();
29
30 wxStaticBitmap(wxWindow *parent, wxWindowID id,
31 const wxBitmap& label,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize,
34 long style = 0,
35 const wxString& name = wxStaticBitmapNameStr)
36 {
37 Create(parent, id, label, pos, size, style, name);
38 }
39
40 bool Create(wxWindow *parent, wxWindowID id,
41 const wxBitmap& label,
42 const wxPoint& pos = wxDefaultPosition,
43 const wxSize& size = wxDefaultSize,
44 long style = 0,
45 const wxString& name = wxStaticBitmapNameStr);
46
47 virtual void SetBitmap(const wxBitmap& bitmap);
48
49 virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
50 {
51 return false;
52 }
53
54 wxBitmap GetBitmap() const { return m_messageBitmap; }
55
56 // for compatibility with wxMSW
57 wxIcon GetIcon() const
58 {
59 // don't use wxDynamicCast, icons and bitmaps are really the same thing
60 return *(wxIcon*)&m_messageBitmap;
61 }
62
63 // for compatibility with wxMSW
64 void SetIcon(const wxIcon& icon)
65 {
66 SetBitmap( icon );
67 }
68
69 // Implementation
70 virtual void ChangeBackgroundColour();
71 virtual void ChangeForegroundColour();
72
73protected:
74 void DoSetBitmap();
75
76protected:
77 wxBitmap m_messageBitmap;
78 wxBitmap m_messageBitmapOriginal;
79 wxBitmapCache m_bitmapCache;
80};
81
82#endif
83// _WX_STATBMP_H_