]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk1/statbmp.h
Added wxCountingStream for measuring the size of streamed data
[wxWidgets.git] / include / wx / gtk1 / 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#include "wx/icon.h"
26
27//-----------------------------------------------------------------------------
28// classes
29//-----------------------------------------------------------------------------
30
31class wxStaticBitmap;
32
33//-----------------------------------------------------------------------------
34// global data
35//-----------------------------------------------------------------------------
36
37extern const char* wxStaticBitmapNameStr;
38
39//-----------------------------------------------------------------------------
40// wxStaticBitmap
41//-----------------------------------------------------------------------------
42
43class wxStaticBitmap: public wxControl
44{
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
64 virtual void SetBitmap( const wxBitmap& bitmap );
65
66 wxBitmap& GetBitmap() { return m_bitmap; }
67 const wxBitmap& GetBitmap() const { return m_bitmap; }
68
69 // for compatibility with wxMSW
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 }
76
77 // for compatibility with wxMSW
78 void SetIcon(const wxIcon& icon)
79 {
80 SetBitmap( icon );
81 }
82
83private:
84 // creates the new pixmap widget
85 void CreatePixmapWidget();
86
87 wxBitmap m_bitmap;
88};
89
90#endif
91
92#endif // __GTKSTATICBITMAPH__