2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: statbmp.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxStaticBitmap
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
2010-07-13 09:29:13 -04:00
|
|
|
// Licence: wxWindows licence
|
2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxStaticBitmap
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-10-07 12:57:34 -04:00
|
|
|
A static bitmap control displays a bitmap. Native implementations on some
|
|
|
|
platforms are only meant for display of the small icons in the dialog
|
2008-06-21 11:32:33 -04:00
|
|
|
boxes. In particular, under Windows 9x the size of bitmap is limited
|
|
|
|
to 64*64 pixels.
|
2008-10-07 12:57:34 -04:00
|
|
|
|
|
|
|
If you want to display larger images portably, you may use generic
|
|
|
|
implementation wxGenericStaticBitmap declared in \<wx/generic/statbmpg.h\>.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2013-02-08 19:35:54 -05:00
|
|
|
Notice that for the best results, the size of the control should be the
|
|
|
|
same as the size of the image displayed in it, as happens by default if
|
2014-05-22 10:35:43 -04:00
|
|
|
it's not resized explicitly. Otherwise, behaviour depends on the
|
2013-02-08 19:35:54 -05:00
|
|
|
platform: under MSW, the bitmap is drawn centred inside the control, while
|
|
|
|
elsewhere it is drawn at the origin of the control.
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxcore}
|
|
|
|
@category{ctrl}
|
2012-11-03 14:32:50 -04:00
|
|
|
@appearance{staticbitmap}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2014-05-22 10:35:43 -04:00
|
|
|
@see wxBitmap
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxStaticBitmap : public wxControl
|
|
|
|
{
|
|
|
|
public:
|
2008-05-29 10:10:52 -04:00
|
|
|
/**
|
|
|
|
Default constructor
|
|
|
|
*/
|
|
|
|
wxStaticBitmap();
|
2008-10-07 12:57:34 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
Constructor, creating and showing a static bitmap control.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param parent
|
2008-03-09 08:33:59 -04:00
|
|
|
Parent window. Should not be @NULL.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param id
|
2008-03-09 08:33:59 -04:00
|
|
|
Control identifier. A value of -1 denotes a default value.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param label
|
2008-03-09 08:33:59 -04:00
|
|
|
Bitmap label.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param pos
|
2008-03-09 08:33:59 -04:00
|
|
|
Window position.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param size
|
2008-03-09 08:33:59 -04:00
|
|
|
Window size.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param style
|
2008-03-09 08:33:59 -04:00
|
|
|
Window style. See wxStaticBitmap.
|
2008-03-08 09:43:31 -05:00
|
|
|
@param name
|
2008-03-09 08:33:59 -04:00
|
|
|
Window name.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see Create()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-08 09:43:31 -05:00
|
|
|
wxStaticBitmap(wxWindow* parent, wxWindowID id,
|
|
|
|
const wxBitmap& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
2008-11-13 16:32:53 -05:00
|
|
|
const wxString& name = wxStaticBitmapNameStr);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Creation function, for two-step construction. For details see wxStaticBitmap().
|
|
|
|
*/
|
2008-10-28 11:36:26 -04:00
|
|
|
bool Create(wxWindow* parent, wxWindowID id, const wxBitmap& label,
|
2008-03-08 08:52:38 -05:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
2008-10-28 11:36:26 -04:00
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
|
|
|
const wxString& name = wxStaticBitmapNameStr);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-10-07 12:57:34 -04:00
|
|
|
Returns the bitmap currently used in the control.
|
|
|
|
Notice that this method can be called even if SetIcon() had been used.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see SetBitmap()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual wxBitmap GetBitmap() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-10-07 12:57:34 -04:00
|
|
|
Returns the icon currently used in the control.
|
|
|
|
Notice that this method can only be called if SetIcon() had been used: an icon
|
|
|
|
can't be retrieved from the control if a bitmap had been set
|
|
|
|
(using wxStaticBitmap::SetBitmap).
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see SetIcon()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual wxIcon GetIcon() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the bitmap label.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param label
|
2008-03-09 08:33:59 -04:00
|
|
|
The new bitmap.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see GetBitmap()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
virtual void SetBitmap(const wxBitmap& label);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the label to the given icon.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param label
|
2008-03-09 08:33:59 -04:00
|
|
|
The new icon.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
virtual void SetIcon(const wxIcon& label);
|
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|