]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/statbmp.h
support for iPhone callbacks
[wxWidgets.git] / interface / wx / statbmp.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: statbmp.h
3 // Purpose: interface of wxStaticBitmap
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows licence
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 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.
25
26 @library{wxcore}
27 @category{ctrl}
28 @appearance{staticbitmap}
29
30 @see wxStaticBitmap, wxStaticBox
31 */
32 class wxStaticBitmap : public wxControl
33 {
34 public:
35 /**
36 Default constructor
37 */
38 wxStaticBitmap();
39
40 /**
41 Constructor, creating and showing a static bitmap control.
42
43 @param parent
44 Parent window. Should not be @NULL.
45 @param id
46 Control identifier. A value of -1 denotes a default value.
47 @param label
48 Bitmap label.
49 @param pos
50 Window position.
51 @param size
52 Window size.
53 @param style
54 Window style. See wxStaticBitmap.
55 @param name
56 Window name.
57
58 @see Create()
59 */
60 wxStaticBitmap(wxWindow* parent, wxWindowID id,
61 const wxBitmap& label,
62 const wxPoint& pos = wxDefaultPosition,
63 const wxSize& size = wxDefaultSize,
64 long style = 0,
65 const wxString& name = wxStaticBitmapNameStr);
66
67 /**
68 Creation function, for two-step construction. For details see wxStaticBitmap().
69 */
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);
74
75 /**
76 Returns the bitmap currently used in the control.
77 Notice that this method can be called even if SetIcon() had been used.
78
79 @see SetBitmap()
80 */
81 virtual wxBitmap GetBitmap() const;
82
83 /**
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).
88
89 @see SetIcon()
90 */
91 virtual wxIcon GetIcon() const;
92
93 /**
94 Sets the bitmap label.
95
96 @param label
97 The new bitmap.
98
99 @see GetBitmap()
100 */
101 virtual void SetBitmap(const wxBitmap& label);
102
103 /**
104 Sets the label to the given icon.
105
106 @param label
107 The new icon.
108 */
109 virtual void SetIcon(const wxIcon& label);
110 };
111