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