]> git.saurik.com Git - wxWidgets.git/blame - include/wx/statbmp.h
fix memory leak; allocate the DC before SetFont() is called on the status bar
[wxWidgets.git] / include / wx / statbmp.h
CommitLineData
1e6feb95
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/statbmp.h
3// Purpose: wxStaticBitmap class interface
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 25.08.00
7// RCS-ID: $Id$
8// Copyright: (c) 2000 Vadim Zeitlin
65571936 9// Licence: wxWindows licence
1e6feb95
VZ
10/////////////////////////////////////////////////////////////////////////////
11
34138703
JS
12#ifndef _WX_STATBMP_H_BASE_
13#define _WX_STATBMP_H_BASE_
c801d85f 14
997176a3
VZ
15#include "wx/defs.h"
16
1e6feb95
VZ
17#if wxUSE_STATBMP
18
19#include "wx/control.h"
20#include "wx/bitmap.h"
a44fb285 21#include "wx/icon.h"
1e6feb95 22
53a2db12 23extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBitmapNameStr[];
1e6feb95
VZ
24
25// a control showing an icon or a bitmap
53a2db12 26class WXDLLIMPEXP_CORE wxStaticBitmapBase : public wxControl
1e6feb95 27{
fc7a2a60
VZ
28public:
29 wxStaticBitmapBase() { }
799ea011 30 virtual ~wxStaticBitmapBase();
d775fa82 31
1e6feb95
VZ
32 // our interface
33 virtual void SetIcon(const wxIcon& icon) = 0;
34 virtual void SetBitmap(const wxBitmap& bitmap) = 0;
35 virtual wxBitmap GetBitmap() const = 0;
a44fb285
VZ
36 virtual wxIcon GetIcon() const /* = 0 -- should be pure virtual */
37 {
38 // stub it out here for now as not all ports implement it (but they
39 // should)
40 return wxIcon();
41 }
1e6feb95
VZ
42
43 // overriden base class virtuals
d775fa82 44 virtual bool AcceptsFocus() const { return false; }
60acae65 45 virtual bool HasTransparentBackground() { return true; }
1e6feb95
VZ
46
47protected:
dc797d8e
JS
48 // choose the default border for this window
49 virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
50
b3fcfa4d 51 virtual wxSize DoGetBestSize() const;
fc7a2a60 52
c0c133e1 53 wxDECLARE_NO_COPY_CLASS(wxStaticBitmapBase);
1e6feb95
VZ
54};
55
56#if defined(__WXUNIVERSAL__)
57 #include "wx/univ/statbmp.h"
58#elif defined(__WXMSW__)
59 #include "wx/msw/statbmp.h"
2049ba38 60#elif defined(__WXMOTIF__)
1e6feb95 61 #include "wx/motif/statbmp.h"
1be7a35c 62#elif defined(__WXGTK20__)
1e6feb95 63 #include "wx/gtk/statbmp.h"
1be7a35c
MR
64#elif defined(__WXGTK__)
65 #include "wx/gtk1/statbmp.h"
34138703 66#elif defined(__WXMAC__)
ef0e9220 67 #include "wx/osx/statbmp.h"
e64df9bc
DE
68#elif defined(__WXCOCOA__)
69 #include "wx/cocoa/statbmp.h"
1777b9bb 70#elif defined(__WXPM__)
1e6feb95 71 #include "wx/os2/statbmp.h"
c801d85f
KB
72#endif
73
1e6feb95
VZ
74#endif // wxUSE_STATBMP
75
c801d85f 76#endif
34138703 77 // _WX_STATBMP_H_BASE_