2008-03-08 13:52:38 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: statbmp.h
|
2008-03-10 15:24:38 +00:00
|
|
|
// Purpose: interface of wxStaticBitmap
|
2008-03-08 13:52:38 +00:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxStaticBitmap
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-10-07 16:57:34 +00: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 15:32:33 +00:00
|
|
|
boxes. In particular, under Windows 9x the size of bitmap is limited
|
|
|
|
to 64*64 pixels.
|
2008-10-07 16:57:34 +00:00
|
|
|
|
|
|
|
If you want to display larger images portably, you may use generic
|
|
|
|
implementation wxGenericStaticBitmap declared in \<wx/generic/statbmpg.h\>.
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
@library{wxcore}
|
|
|
|
@category{ctrl}
|
2008-10-13 08:05:18 +00:00
|
|
|
@appearance{staticbitmap.png}
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-10 15:24:38 +00:00
|
|
|
@see wxStaticBitmap, wxStaticBox
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
class wxStaticBitmap : public wxControl
|
|
|
|
{
|
|
|
|
public:
|
2008-05-29 14:10:52 +00:00
|
|
|
/**
|
|
|
|
Default constructor
|
|
|
|
*/
|
|
|
|
wxStaticBitmap();
|
2008-10-07 16:57:34 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
/**
|
|
|
|
Constructor, creating and showing a static bitmap control.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-08 14:43:31 +00:00
|
|
|
@param parent
|
2008-03-09 12:33:59 +00:00
|
|
|
Parent window. Should not be @NULL.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param id
|
2008-03-09 12:33:59 +00:00
|
|
|
Control identifier. A value of -1 denotes a default value.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param label
|
2008-03-09 12:33:59 +00:00
|
|
|
Bitmap label.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param pos
|
2008-03-09 12:33:59 +00:00
|
|
|
Window position.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param size
|
2008-03-09 12:33:59 +00:00
|
|
|
Window size.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param style
|
2008-03-09 12:33:59 +00:00
|
|
|
Window style. See wxStaticBitmap.
|
2008-03-08 14:43:31 +00:00
|
|
|
@param name
|
2008-03-09 12:33:59 +00:00
|
|
|
Window name.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-09 12:33:59 +00:00
|
|
|
@see Create()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-03-08 14:43:31 +00:00
|
|
|
wxStaticBitmap(wxWindow* parent, wxWindowID id,
|
|
|
|
const wxBitmap& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
2008-11-13 21:32:53 +00:00
|
|
|
const wxString& name = wxStaticBitmapNameStr);
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Creation function, for two-step construction. For details see wxStaticBitmap().
|
|
|
|
*/
|
2008-10-28 15:36:26 +00:00
|
|
|
bool Create(wxWindow* parent, wxWindowID id, const wxBitmap& label,
|
2008-03-08 13:52:38 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
2008-10-28 15:36:26 +00:00
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
|
|
|
const wxString& name = wxStaticBitmapNameStr);
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
2008-10-07 16:57:34 +00: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 13:45:17 +00:00
|
|
|
|
2008-03-09 12:33:59 +00:00
|
|
|
@see SetBitmap()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-09-27 11:21:10 +00:00
|
|
|
virtual wxBitmap GetBitmap() const;
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
2008-10-07 16:57:34 +00: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 13:45:17 +00:00
|
|
|
|
2008-03-09 12:33:59 +00:00
|
|
|
@see SetIcon()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-09-27 11:21:10 +00:00
|
|
|
virtual wxIcon GetIcon() const;
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the bitmap label.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-08 14:43:31 +00:00
|
|
|
@param label
|
2008-03-09 12:33:59 +00:00
|
|
|
The new bitmap.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-09 12:33:59 +00:00
|
|
|
@see GetBitmap()
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
virtual void SetBitmap(const wxBitmap& label);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Sets the label to the given icon.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-03-08 14:43:31 +00:00
|
|
|
@param label
|
2008-03-09 12:33:59 +00:00
|
|
|
The new icon.
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
virtual void SetIcon(const wxIcon& label);
|
|
|
|
};
|
2008-03-10 15:24:38 +00:00
|
|
|
|