]>
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 | ||
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 = "staticBitmap"); | |
60 | ||
61 | /** | |
62 | Creation function, for two-step construction. For details see wxStaticBitmap(). | |
63 | */ | |
64 | bool Create(wxWindow* parent, wxWindowID id, | |
65 | const wxBitmap& label, | |
66 | const wxPoint& pos = wxDefaultPosition, | |
67 | const wxSize& size = wxDefaultSize, | |
68 | long style = 0, | |
69 | const wxString& name = "staticBitmap"); | |
70 | ||
71 | /** | |
72 | Returns the bitmap currently used in the control. | |
73 | Notice that this method can be called even if SetIcon() had been used. | |
74 | ||
75 | @see SetBitmap() | |
76 | */ | |
77 | virtual wxBitmap GetBitmap() const; | |
78 | ||
79 | /** | |
80 | Returns the icon currently used in the control. | |
81 | Notice that this method can only be called if SetIcon() had been used: an icon | |
82 | can't be retrieved from the control if a bitmap had been set | |
83 | (using wxStaticBitmap::SetBitmap). | |
84 | ||
85 | @see SetIcon() | |
86 | */ | |
87 | virtual wxIcon GetIcon() const; | |
88 | ||
89 | /** | |
90 | Sets the bitmap label. | |
91 | ||
92 | @param label | |
93 | The new bitmap. | |
94 | ||
95 | @see GetBitmap() | |
96 | */ | |
97 | virtual void SetBitmap(const wxBitmap& label); | |
98 | ||
99 | /** | |
100 | Sets the label to the given icon. | |
101 | ||
102 | @param label | |
103 | The new icon. | |
104 | */ | |
105 | virtual void SetIcon(const wxIcon& label); | |
106 | }; | |
107 |