]>
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 | |
11 | @wxheader{statbmp.h} | |
7c913512 | 12 | |
23324ae1 FM |
13 | A static bitmap control displays a bitmap. It is meant for display of the |
14 | small icons in the dialog boxes and is not meant to be a general purpose image | |
15 | display control. In particular, under Windows 9x the size of bitmap is limited | |
16 | to 64*64 pixels and thus you should use your own control if you want to | |
17 | display larger images portably. | |
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: | |
28 | //@{ | |
29 | /** | |
30 | Constructor, creating and showing a static bitmap control. | |
3c4f71cc | 31 | |
7c913512 | 32 | @param parent |
4cc4bfaf | 33 | Parent window. Should not be @NULL. |
7c913512 | 34 | @param id |
4cc4bfaf | 35 | Control identifier. A value of -1 denotes a default value. |
7c913512 | 36 | @param label |
4cc4bfaf | 37 | Bitmap label. |
7c913512 | 38 | @param pos |
4cc4bfaf | 39 | Window position. |
7c913512 | 40 | @param size |
4cc4bfaf | 41 | Window size. |
7c913512 | 42 | @param style |
4cc4bfaf | 43 | Window style. See wxStaticBitmap. |
7c913512 | 44 | @param name |
4cc4bfaf | 45 | Window name. |
3c4f71cc | 46 | |
4cc4bfaf | 47 | @see Create() |
23324ae1 FM |
48 | */ |
49 | wxStaticBitmap(); | |
7c913512 FM |
50 | wxStaticBitmap(wxWindow* parent, wxWindowID id, |
51 | const wxBitmap& label, | |
52 | const wxPoint& pos = wxDefaultPosition, | |
53 | const wxSize& size = wxDefaultSize, | |
54 | long style = 0, | |
55 | const wxString& name = "staticBitmap"); | |
23324ae1 FM |
56 | //@} |
57 | ||
58 | /** | |
59 | Creation function, for two-step construction. For details see wxStaticBitmap(). | |
60 | */ | |
61 | bool Create(wxWindow* parent, wxWindowID id, | |
62 | const wxBitmap& label, | |
63 | const wxPoint& pos = wxDefaultPosition, | |
64 | const wxSize& size = wxDefaultSize, | |
65 | long style = 0, | |
66 | const wxString& name = "staticBitmap"); | |
67 | ||
68 | /** | |
69 | Returns the bitmap currently used in the control. Notice that this method can | |
70 | be called even if SetIcon() had been used. | |
3c4f71cc | 71 | |
4cc4bfaf | 72 | @see SetBitmap() |
23324ae1 | 73 | */ |
328f5751 | 74 | wxBitmap GetBitmap() const; |
23324ae1 FM |
75 | |
76 | /** | |
77 | Returns the icon currently used in the control. Notice that this method can | |
78 | only be called if SetIcon() had been used: an icon | |
7c913512 | 79 | can't be retrieved from the control if a bitmap had been set (using |
23324ae1 | 80 | wxStaticBitmap::SetBitmap). |
3c4f71cc | 81 | |
4cc4bfaf | 82 | @see SetIcon() |
23324ae1 | 83 | */ |
328f5751 | 84 | wxIcon GetIcon() const; |
23324ae1 FM |
85 | |
86 | /** | |
87 | Sets the bitmap label. | |
3c4f71cc | 88 | |
7c913512 | 89 | @param label |
4cc4bfaf | 90 | The new bitmap. |
3c4f71cc | 91 | |
4cc4bfaf | 92 | @see GetBitmap() |
23324ae1 FM |
93 | */ |
94 | virtual void SetBitmap(const wxBitmap& label); | |
95 | ||
96 | /** | |
97 | Sets the label to the given icon. | |
3c4f71cc | 98 | |
7c913512 | 99 | @param label |
4cc4bfaf | 100 | The new icon. |
23324ae1 FM |
101 | */ |
102 | virtual void SetIcon(const wxIcon& label); | |
103 | }; | |
e54c96f1 | 104 |