]>
Commit | Line | Data |
---|---|---|
23324ae1 FM |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: statbmp.h | |
e54c96f1 | 3 | // Purpose: interface of wxStaticBitmap |
23324ae1 FM |
4 | // Author: wxWidgets team |
5 | // RCS-ID: $Id$ | |
6 | // Licence: wxWindows license | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | /** | |
10 | @class wxStaticBitmap | |
7c913512 | 11 | |
a30e7029 VZ |
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 | If you want to display larger images portably, you may use generic | |
17 | implementation wxGenericStaticBitmap declared in <wx/generic/statbmpg.h>. | |
7c913512 | 18 | |
23324ae1 FM |
19 | @library{wxcore} |
20 | @category{ctrl} | |
0c7fe6f2 | 21 | <!-- @appearance{staticbitmap.png} --> |
7c913512 | 22 | |
e54c96f1 | 23 | @see wxStaticBitmap, wxStaticBox |
23324ae1 FM |
24 | */ |
25 | class wxStaticBitmap : public wxControl | |
26 | { | |
27 | public: | |
671600d8 RR |
28 | /** |
29 | Default constructor | |
30 | */ | |
31 | wxStaticBitmap(); | |
32 | ||
23324ae1 FM |
33 | /** |
34 | Constructor, creating and showing a static bitmap control. | |
3c4f71cc | 35 | |
7c913512 | 36 | @param parent |
4cc4bfaf | 37 | Parent window. Should not be @NULL. |
7c913512 | 38 | @param id |
4cc4bfaf | 39 | Control identifier. A value of -1 denotes a default value. |
7c913512 | 40 | @param label |
4cc4bfaf | 41 | Bitmap label. |
7c913512 | 42 | @param pos |
4cc4bfaf | 43 | Window position. |
7c913512 | 44 | @param size |
4cc4bfaf | 45 | Window size. |
7c913512 | 46 | @param style |
4cc4bfaf | 47 | Window style. See wxStaticBitmap. |
7c913512 | 48 | @param name |
4cc4bfaf | 49 | Window name. |
3c4f71cc | 50 | |
4cc4bfaf | 51 | @see Create() |
23324ae1 | 52 | */ |
7c913512 FM |
53 | wxStaticBitmap(wxWindow* parent, wxWindowID id, |
54 | const wxBitmap& label, | |
55 | const wxPoint& pos = wxDefaultPosition, | |
56 | const wxSize& size = wxDefaultSize, | |
57 | long style = 0, | |
58 | const wxString& name = "staticBitmap"); | |
23324ae1 FM |
59 | |
60 | /** | |
61 | Creation function, for two-step construction. For details see wxStaticBitmap(). | |
62 | */ | |
63 | bool Create(wxWindow* parent, wxWindowID id, | |
64 | const wxBitmap& label, | |
65 | const wxPoint& pos = wxDefaultPosition, | |
66 | const wxSize& size = wxDefaultSize, | |
67 | long style = 0, | |
68 | const wxString& name = "staticBitmap"); | |
69 | ||
70 | /** | |
71 | Returns the bitmap currently used in the control. Notice that this method can | |
72 | be called even if SetIcon() had been used. | |
3c4f71cc | 73 | |
4cc4bfaf | 74 | @see SetBitmap() |
23324ae1 | 75 | */ |
328f5751 | 76 | wxBitmap GetBitmap() const; |
23324ae1 FM |
77 | |
78 | /** | |
79 | Returns the icon currently used in the control. Notice that this method can | |
80 | only be called if SetIcon() had been used: an icon | |
7c913512 | 81 | can't be retrieved from the control if a bitmap had been set (using |
23324ae1 | 82 | wxStaticBitmap::SetBitmap). |
3c4f71cc | 83 | |
4cc4bfaf | 84 | @see SetIcon() |
23324ae1 | 85 | */ |
328f5751 | 86 | wxIcon GetIcon() const; |
23324ae1 FM |
87 | |
88 | /** | |
89 | Sets the bitmap label. | |
3c4f71cc | 90 | |
7c913512 | 91 | @param label |
4cc4bfaf | 92 | The new bitmap. |
3c4f71cc | 93 | |
4cc4bfaf | 94 | @see GetBitmap() |
23324ae1 FM |
95 | */ |
96 | virtual void SetBitmap(const wxBitmap& label); | |
97 | ||
98 | /** | |
99 | Sets the label to the given icon. | |
3c4f71cc | 100 | |
7c913512 | 101 | @param label |
4cc4bfaf | 102 | The new icon. |
23324ae1 FM |
103 | */ |
104 | virtual void SetIcon(const wxIcon& label); | |
105 | }; | |
e54c96f1 | 106 |