]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/statbmp.h
New drawing test code.
[wxWidgets.git] / include / wx / gtk1 / statbmp.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: statbmp.h
3// Purpose:
4// Author: Robert Roebling
58614078
RR
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
7f24bd19 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
10
11#ifndef __GTKSTATICBITMAPH__
12#define __GTKSTATICBITMAPH__
13
14#ifdef __GNUG__
15#pragma interface
16#endif
17
18#include "wx/defs.h"
dcf924a3
RR
19
20#if wxUSE_STATBMP
21
c801d85f 22#include "wx/object.h"
c801d85f 23#include "wx/control.h"
ac57418f 24#include "wx/bitmap.h"
2df7be7f 25#include "wx/icon.h"
c801d85f
KB
26
27//-----------------------------------------------------------------------------
28// classes
29//-----------------------------------------------------------------------------
30
31class wxStaticBitmap;
32
1a56f55c
RR
33//-----------------------------------------------------------------------------
34// global data
35//-----------------------------------------------------------------------------
36
37extern const char* wxStaticBitmapNameStr;
38
c801d85f
KB
39//-----------------------------------------------------------------------------
40// wxStaticBitmap
41//-----------------------------------------------------------------------------
42
1a56f55c
RR
43class wxStaticBitmap: public wxControl
44{
7f24bd19
VZ
45 DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
46
47public:
48 wxStaticBitmap();
49 wxStaticBitmap( wxWindow *parent,
50 wxWindowID id,
51 const wxBitmap& label,
52 const wxPoint& pos = wxDefaultPosition,
53 const wxSize& size = wxDefaultSize,
54 long style = 0,
55 const wxString& name = wxStaticBitmapNameStr );
56 bool Create( wxWindow *parent,
57 wxWindowID id,
58 const wxBitmap& label,
59 const wxPoint& pos = wxDefaultPosition,
60 const wxSize& size = wxDefaultSize,
61 long style = 0,
62 const wxString& name = wxStaticBitmapNameStr);
63
1a56f55c 64 virtual void SetBitmap( const wxBitmap& bitmap );
7f24bd19
VZ
65
66 wxBitmap& GetBitmap() { return m_bitmap; }
67 const wxBitmap& GetBitmap() const { return m_bitmap; }
68
69 // for compatibility with wxMSW
c35414db
VZ
70 const wxIcon& GetIcon() const
71 {
72 // don't use wxDynamicCast, icons and bitmaps are really the same thing
73 // in wxGTK
74 return (const wxIcon &)m_bitmap;
75 }
7f24bd19
VZ
76
77private:
32d4bfd1
VZ
78 // creates the new pixmap widget
79 void CreatePixmapWidget();
80
7f24bd19 81 wxBitmap m_bitmap;
1a56f55c
RR
82};
83
dcf924a3
RR
84#endif
85
c801d85f 86#endif // __GTKSTATICBITMAPH__