1. wxStaticBitmap now uses mask even for bitmaps (and not only icons)
2. we now catch WM_SYSKEYDOWN/UP events as well as normal ones git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -90,11 +90,17 @@ public:
|
||||
bool operator != (const wxIcon& icon) const
|
||||
{ return m_refData != icon.m_refData; }
|
||||
|
||||
// implementation only from now on
|
||||
wxIconRefData *GetIconData() const { return (wxIconRefData *)m_refData; }
|
||||
|
||||
void SetHICON(WXHICON icon) { SetHandle((WXHANDLE)icon); }
|
||||
WXHICON GetHICON() const { return (WXHICON)GetHandle(); }
|
||||
|
||||
// create from bitmap (which should have a mask unless it's monochrome):
|
||||
// there shouldn't be any implicit bitmap -> icon conversion (i.e. no
|
||||
// ctors, assignment operators...), but it's ok to have such function
|
||||
void CopyFromBitmap(const wxBitmap& bmp);
|
||||
|
||||
protected:
|
||||
virtual wxGDIImageRefData *CreateData() const
|
||||
{
|
||||
@@ -104,9 +110,6 @@ protected:
|
||||
// create from XPM data
|
||||
void CreateIconFromXpm(const char **data);
|
||||
|
||||
// create from bitmap (which should have a mask unless it's monochrome)
|
||||
void CopyFromBitmap(const wxBitmap& bmp);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxIcon)
|
||||
};
|
||||
|
@@ -51,8 +51,8 @@ public:
|
||||
|
||||
virtual ~wxStaticBitmap() { Free(); }
|
||||
|
||||
void SetIcon(const wxIcon& icon) { SetImage(icon); }
|
||||
void SetBitmap(const wxBitmap& bitmap) { SetImage(bitmap); }
|
||||
void SetIcon(const wxIcon& icon) { SetImage(&icon); }
|
||||
void SetBitmap(const wxBitmap& bitmap) { SetImage(&bitmap); }
|
||||
|
||||
// assert failure is provoked by an attempt to get an icon from bitmap or
|
||||
// vice versa
|
||||
@@ -79,7 +79,7 @@ protected:
|
||||
// TRUE if icon/bitmap is valid
|
||||
bool ImageIsOk() const;
|
||||
|
||||
void SetImage(const wxGDIImage& image);
|
||||
void SetImage(const wxGDIImage* image);
|
||||
|
||||
// we can have either an icon or a bitmap
|
||||
bool m_isIcon;
|
||||
|
Reference in New Issue
Block a user