]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/statbmp.h
Return NULL from wxWindow::GetCapture() when the capture is being lost.
[wxWidgets.git] / interface / wx / statbmp.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: statbmp.h
e54c96f1 3// Purpose: interface of wxStaticBitmap
23324ae1 4// Author: wxWidgets team
526954c5 5// Licence: wxWindows licence
23324ae1
FM
6/////////////////////////////////////////////////////////////////////////////
7
8/**
9 @class wxStaticBitmap
7c913512 10
4701dc09
FM
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
a30e7029
VZ
13 boxes. In particular, under Windows 9x the size of bitmap is limited
14 to 64*64 pixels.
4701dc09
FM
15
16 If you want to display larger images portably, you may use generic
17 implementation wxGenericStaticBitmap declared in \<wx/generic/statbmpg.h\>.
7c913512 18
05942059
VZ
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
23324ae1
FM
25 @library{wxcore}
26 @category{ctrl}
ce154616 27 @appearance{staticbitmap}
7c913512 28
e54c96f1 29 @see wxStaticBitmap, wxStaticBox
23324ae1
FM
30*/
31class wxStaticBitmap : public wxControl
32{
33public:
671600d8
RR
34 /**
35 Default constructor
36 */
37 wxStaticBitmap();
4701dc09 38
23324ae1
FM
39 /**
40 Constructor, creating and showing a static bitmap control.
3c4f71cc 41
7c913512 42 @param parent
4cc4bfaf 43 Parent window. Should not be @NULL.
7c913512 44 @param id
4cc4bfaf 45 Control identifier. A value of -1 denotes a default value.
7c913512 46 @param label
4cc4bfaf 47 Bitmap label.
7c913512 48 @param pos
4cc4bfaf 49 Window position.
7c913512 50 @param size
4cc4bfaf 51 Window size.
7c913512 52 @param style
4cc4bfaf 53 Window style. See wxStaticBitmap.
7c913512 54 @param name
4cc4bfaf 55 Window name.
3c4f71cc 56
4cc4bfaf 57 @see Create()
23324ae1 58 */
7c913512
FM
59 wxStaticBitmap(wxWindow* parent, wxWindowID id,
60 const wxBitmap& label,
61 const wxPoint& pos = wxDefaultPosition,
62 const wxSize& size = wxDefaultSize,
63 long style = 0,
11e3af6e 64 const wxString& name = wxStaticBitmapNameStr);
23324ae1
FM
65
66 /**
67 Creation function, for two-step construction. For details see wxStaticBitmap().
68 */
43c48e1e 69 bool Create(wxWindow* parent, wxWindowID id, const wxBitmap& label,
23324ae1 70 const wxPoint& pos = wxDefaultPosition,
43c48e1e
FM
71 const wxSize& size = wxDefaultSize, long style = 0,
72 const wxString& name = wxStaticBitmapNameStr);
23324ae1
FM
73
74 /**
4701dc09
FM
75 Returns the bitmap currently used in the control.
76 Notice that this method can be called even if SetIcon() had been used.
3c4f71cc 77
4cc4bfaf 78 @see SetBitmap()
23324ae1 79 */
adaaa686 80 virtual wxBitmap GetBitmap() const;
23324ae1
FM
81
82 /**
4701dc09
FM
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).
3c4f71cc 87
4cc4bfaf 88 @see SetIcon()
23324ae1 89 */
adaaa686 90 virtual wxIcon GetIcon() const;
23324ae1
FM
91
92 /**
93 Sets the bitmap label.
3c4f71cc 94
7c913512 95 @param label
4cc4bfaf 96 The new bitmap.
3c4f71cc 97
4cc4bfaf 98 @see GetBitmap()
23324ae1
FM
99 */
100 virtual void SetBitmap(const wxBitmap& label);
101
102 /**
103 Sets the label to the given icon.
3c4f71cc 104
7c913512 105 @param label
4cc4bfaf 106 The new icon.
23324ae1
FM
107 */
108 virtual void SetIcon(const wxIcon& label);
109};
e54c96f1 110