]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/statbmp.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxStaticBitmap
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
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
17 If you want to display larger images portably, you may use generic
18 implementation wxGenericStaticBitmap declared in \<wx/generic/statbmpg.h\>.
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.
28 @appearance{staticbitmap}
30 @see wxStaticBitmap, wxStaticBox
32 class wxStaticBitmap
: public wxControl
41 Constructor, creating and showing a static bitmap control.
44 Parent window. Should not be @NULL.
46 Control identifier. A value of -1 denotes a default value.
54 Window style. See wxStaticBitmap.
60 wxStaticBitmap(wxWindow
* parent
, wxWindowID id
,
61 const wxBitmap
& label
,
62 const wxPoint
& pos
= wxDefaultPosition
,
63 const wxSize
& size
= wxDefaultSize
,
65 const wxString
& name
= wxStaticBitmapNameStr
);
68 Creation function, for two-step construction. For details see wxStaticBitmap().
70 bool Create(wxWindow
* parent
, wxWindowID id
, const wxBitmap
& label
,
71 const wxPoint
& pos
= wxDefaultPosition
,
72 const wxSize
& size
= wxDefaultSize
, long style
= 0,
73 const wxString
& name
= wxStaticBitmapNameStr
);
76 Returns the bitmap currently used in the control.
77 Notice that this method can be called even if SetIcon() had been used.
81 virtual wxBitmap
GetBitmap() const;
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).
91 virtual wxIcon
GetIcon() const;
94 Sets the bitmap label.
101 virtual void SetBitmap(const wxBitmap
& label
);
104 Sets the label to the given icon.
109 virtual void SetIcon(const wxIcon
& label
);