]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/statbmp.h
wxPython 2.1b1 for wxMSW (wxGTK coming soon)
[wxWidgets.git] / include / wx / gtk / statbmp.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: statbmp.h
3// Purpose:
4// Author: Robert Roebling
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10
11#ifndef __GTKSTATICBITMAPH__
12#define __GTKSTATICBITMAPH__
13
14#ifdef __GNUG__
15#pragma interface
16#endif
17
18#include "wx/defs.h"
19
20#if wxUSE_STATBMP
21
22#include "wx/object.h"
23#include "wx/control.h"
24#include "wx/bitmap.h"
25
26//-----------------------------------------------------------------------------
27// classes
28//-----------------------------------------------------------------------------
29
30class wxStaticBitmap;
31
32//-----------------------------------------------------------------------------
33// global data
34//-----------------------------------------------------------------------------
35
36extern const char* wxStaticBitmapNameStr;
37
38//-----------------------------------------------------------------------------
39// wxStaticBitmap
40//-----------------------------------------------------------------------------
41
42class wxStaticBitmap: public wxControl
43{
44 DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
45
46public:
47 wxStaticBitmap();
48 wxStaticBitmap( wxWindow *parent,
49 wxWindowID id,
50 const wxBitmap& label,
51 const wxPoint& pos = wxDefaultPosition,
52 const wxSize& size = wxDefaultSize,
53 long style = 0,
54 const wxString& name = wxStaticBitmapNameStr );
55 bool Create( wxWindow *parent,
56 wxWindowID id,
57 const wxBitmap& label,
58 const wxPoint& pos = wxDefaultPosition,
59 const wxSize& size = wxDefaultSize,
60 long style = 0,
61 const wxString& name = wxStaticBitmapNameStr);
62
63 virtual void SetBitmap( const wxBitmap& bitmap );
64
65 wxBitmap& GetBitmap() { return m_bitmap; }
66 const wxBitmap& GetBitmap() const { return m_bitmap; }
67
68 // for compatibility with wxMSW
69 wxIcon& GetIcon()
70 { return *(wxDynamicCast(&m_bitmap, wxIcon)); }
71
72private:
73 wxBitmap m_bitmap;
74};
75
76#endif
77
78#endif // __GTKSTATICBITMAPH__