]>
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$ | |
526954c5 | 6 | // Licence: wxWindows licence |
23324ae1 FM |
7 | ///////////////////////////////////////////////////////////////////////////// |
8 | ||
9 | /** | |
10 | @class wxStaticBitmap | |
7c913512 | 11 | |
4701dc09 FM |
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 | |
a30e7029 VZ |
14 | boxes. In particular, under Windows 9x the size of bitmap is limited |
15 | to 64*64 pixels. | |
4701dc09 FM |
16 | |
17 | If you want to display larger images portably, you may use generic | |
18 | implementation wxGenericStaticBitmap declared in \<wx/generic/statbmpg.h\>. | |
7c913512 | 19 | |
05942059 VZ |
20 | Notice that for the best results, the size of the control should be the |
21 | same as the size of the image displayed in it, as happens by default if | |
22 | if it's not resized explicitly. Otherwise, behaviour depends on the | |
23 | platform: under MSW, the bitmap is drawn centred inside the control, while | |
24 | elsewhere it is drawn at the origin of the control. | |
25 | ||
23324ae1 FM |
26 | @library{wxcore} |
27 | @category{ctrl} | |
ce154616 | 28 | @appearance{staticbitmap} |
7c913512 | 29 | |
e54c96f1 | 30 | @see wxStaticBitmap, wxStaticBox |
23324ae1 FM |
31 | */ |
32 | class wxStaticBitmap : public wxControl | |
33 | { | |
34 | public: | |
671600d8 RR |
35 | /** |
36 | Default constructor | |
37 | */ | |
38 | wxStaticBitmap(); | |
4701dc09 | 39 | |
23324ae1 FM |
40 | /** |
41 | Constructor, creating and showing a static bitmap control. | |
3c4f71cc | 42 | |
7c913512 | 43 | @param parent |
4cc4bfaf | 44 | Parent window. Should not be @NULL. |
7c913512 | 45 | @param id |
4cc4bfaf | 46 | Control identifier. A value of -1 denotes a default value. |
7c913512 | 47 | @param label |
4cc4bfaf | 48 | Bitmap label. |
7c913512 | 49 | @param pos |
4cc4bfaf | 50 | Window position. |
7c913512 | 51 | @param size |
4cc4bfaf | 52 | Window size. |
7c913512 | 53 | @param style |
4cc4bfaf | 54 | Window style. See wxStaticBitmap. |
7c913512 | 55 | @param name |
4cc4bfaf | 56 | Window name. |
3c4f71cc | 57 | |
4cc4bfaf | 58 | @see Create() |
23324ae1 | 59 | */ |
7c913512 FM |
60 | wxStaticBitmap(wxWindow* parent, wxWindowID id, |
61 | const wxBitmap& label, | |
62 | const wxPoint& pos = wxDefaultPosition, | |
63 | const wxSize& size = wxDefaultSize, | |
64 | long style = 0, | |
11e3af6e | 65 | const wxString& name = wxStaticBitmapNameStr); |
23324ae1 FM |
66 | |
67 | /** | |
68 | Creation function, for two-step construction. For details see wxStaticBitmap(). | |
69 | */ | |
43c48e1e | 70 | bool Create(wxWindow* parent, wxWindowID id, const wxBitmap& label, |
23324ae1 | 71 | const wxPoint& pos = wxDefaultPosition, |
43c48e1e FM |
72 | const wxSize& size = wxDefaultSize, long style = 0, |
73 | const wxString& name = wxStaticBitmapNameStr); | |
23324ae1 FM |
74 | |
75 | /** | |
4701dc09 FM |
76 | Returns the bitmap currently used in the control. |
77 | Notice that this method can be called even if SetIcon() had been used. | |
3c4f71cc | 78 | |
4cc4bfaf | 79 | @see SetBitmap() |
23324ae1 | 80 | */ |
adaaa686 | 81 | virtual wxBitmap GetBitmap() const; |
23324ae1 FM |
82 | |
83 | /** | |
4701dc09 FM |
84 | Returns the icon currently used in the control. |
85 | Notice that this method can only be called if SetIcon() had been used: an icon | |
86 | can't be retrieved from the control if a bitmap had been set | |
87 | (using wxStaticBitmap::SetBitmap). | |
3c4f71cc | 88 | |
4cc4bfaf | 89 | @see SetIcon() |
23324ae1 | 90 | */ |
adaaa686 | 91 | virtual wxIcon GetIcon() const; |
23324ae1 FM |
92 | |
93 | /** | |
94 | Sets the bitmap label. | |
3c4f71cc | 95 | |
7c913512 | 96 | @param label |
4cc4bfaf | 97 | The new bitmap. |
3c4f71cc | 98 | |
4cc4bfaf | 99 | @see GetBitmap() |
23324ae1 FM |
100 | */ |
101 | virtual void SetBitmap(const wxBitmap& label); | |
102 | ||
103 | /** | |
104 | Sets the label to the given icon. | |
3c4f71cc | 105 | |
7c913512 | 106 | @param label |
4cc4bfaf | 107 | The new icon. |
23324ae1 FM |
108 | */ |
109 | virtual void SetIcon(const wxIcon& label); | |
110 | }; | |
e54c96f1 | 111 |