]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/statbmp.h
Document that throwing exceptions from wxTimer::Notify() is unsupported.
[wxWidgets.git] / interface / wx / statbmp.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: statbmp.h
3 // Purpose: interface of wxStaticBitmap
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxStaticBitmap
11
12 A static bitmap control displays a bitmap. Native implementations on some
13 platforms are only meant for display of the small icons in the dialog
14 boxes. In particular, under Windows 9x the size of bitmap is limited
15 to 64*64 pixels.
16
17 If you want to display larger images portably, you may use generic
18 implementation wxGenericStaticBitmap declared in \<wx/generic/statbmpg.h\>.
19
20 @library{wxcore}
21 @category{ctrl}
22 @appearance{staticbitmap.png}
23
24 @see wxStaticBitmap, wxStaticBox
25 */
26 class wxStaticBitmap : public wxControl
27 {
28 public:
29 /**
30 Default constructor
31 */
32 wxStaticBitmap();
33
34 /**
35 Constructor, creating and showing a static bitmap control.
36
37 @param parent
38 Parent window. Should not be @NULL.
39 @param id
40 Control identifier. A value of -1 denotes a default value.
41 @param label
42 Bitmap label.
43 @param pos
44 Window position.
45 @param size
46 Window size.
47 @param style
48 Window style. See wxStaticBitmap.
49 @param name
50 Window name.
51
52 @see Create()
53 */
54 wxStaticBitmap(wxWindow* parent, wxWindowID id,
55 const wxBitmap& label,
56 const wxPoint& pos = wxDefaultPosition,
57 const wxSize& size = wxDefaultSize,
58 long style = 0,
59 const wxString& name = wxStaticBitmapNameStr);
60
61 /**
62 Creation function, for two-step construction. For details see wxStaticBitmap().
63 */
64 bool Create(wxWindow* parent, wxWindowID id, const wxBitmap& label,
65 const wxPoint& pos = wxDefaultPosition,
66 const wxSize& size = wxDefaultSize, long style = 0,
67 const wxString& name = wxStaticBitmapNameStr);
68
69 /**
70 Returns the bitmap currently used in the control.
71 Notice that this method can be called even if SetIcon() had been used.
72
73 @see SetBitmap()
74 */
75 virtual wxBitmap GetBitmap() const;
76
77 /**
78 Returns the icon currently used in the control.
79 Notice that this method can only be called if SetIcon() had been used: an icon
80 can't be retrieved from the control if a bitmap had been set
81 (using wxStaticBitmap::SetBitmap).
82
83 @see SetIcon()
84 */
85 virtual wxIcon GetIcon() const;
86
87 /**
88 Sets the bitmap label.
89
90 @param label
91 The new bitmap.
92
93 @see GetBitmap()
94 */
95 virtual void SetBitmap(const wxBitmap& label);
96
97 /**
98 Sets the label to the given icon.
99
100 @param label
101 The new icon.
102 */
103 virtual void SetIcon(const wxIcon& label);
104 };
105