]>
Commit | Line | Data |
---|---|---|
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 | @wxheader{statbmp.h} | |
12 | ||
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. | |
18 | ||
19 | @library{wxcore} | |
20 | @category{ctrl} | |
21 | @appearance{staticbitmap.png} | |
22 | ||
23 | @see wxStaticBitmap, wxStaticBox | |
24 | */ | |
25 | class wxStaticBitmap : public wxControl | |
26 | { | |
27 | public: | |
28 | //@{ | |
29 | /** | |
30 | Constructor, creating and showing a static bitmap control. | |
31 | ||
32 | @param parent | |
33 | Parent window. Should not be @NULL. | |
34 | @param id | |
35 | Control identifier. A value of -1 denotes a default value. | |
36 | @param label | |
37 | Bitmap label. | |
38 | @param pos | |
39 | Window position. | |
40 | @param size | |
41 | Window size. | |
42 | @param style | |
43 | Window style. See wxStaticBitmap. | |
44 | @param name | |
45 | Window name. | |
46 | ||
47 | @see Create() | |
48 | */ | |
49 | wxStaticBitmap(); | |
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"); | |
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. | |
71 | ||
72 | @see SetBitmap() | |
73 | */ | |
74 | wxBitmap GetBitmap() const; | |
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 | |
79 | can't be retrieved from the control if a bitmap had been set (using | |
80 | wxStaticBitmap::SetBitmap). | |
81 | ||
82 | @see SetIcon() | |
83 | */ | |
84 | wxIcon GetIcon() const; | |
85 | ||
86 | /** | |
87 | Sets the bitmap label. | |
88 | ||
89 | @param label | |
90 | The new bitmap. | |
91 | ||
92 | @see GetBitmap() | |
93 | */ | |
94 | virtual void SetBitmap(const wxBitmap& label); | |
95 | ||
96 | /** | |
97 | Sets the label to the given icon. | |
98 | ||
99 | @param label | |
100 | The new icon. | |
101 | */ | |
102 | virtual void SetIcon(const wxIcon& label); | |
103 | }; | |
104 |