X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1058f652031c9b99daa7c701f09f16c3af7159c1..cbabf356ce00eb70f677e8483f54062805730e14:/interface/wx/icon.h diff --git a/interface/wx/icon.h b/interface/wx/icon.h index 80a40419da..eff8124923 100644 --- a/interface/wx/icon.h +++ b/interface/wx/icon.h @@ -2,8 +2,7 @@ // Name: icon.h // Purpose: interface of wxIcon // Author: wxWidgets team -// RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -50,7 +49,7 @@ @see @ref overview_bitmap, @ref overview_bitmap_supportedformats, wxDC::DrawIcon, wxCursor */ -class wxIcon : public wxBitmap +class wxIcon : public wxGDIObject { public: /** @@ -118,15 +117,15 @@ public: the appropriate platform, or an icon resource on Windows. @code - wxIcon icon(wxICON(mondrian)); + wxIcon icon(wxICON(sample)); // Equivalent to: #if defined(__WXGTK__) || defined(__WXMOTIF__) - wxIcon icon(mondrian_xpm); + wxIcon icon(sample_xpm); #endif #if defined(__WXMSW__) - wxIcon icon("mondrian"); + wxIcon icon("sample"); #endif @endcode @@ -180,7 +179,30 @@ public: virtual ~wxIcon(); /** - Returns disabled (dimmed) version of the icon. MSW only. + Attach a Windows icon handle. + + This wxMSW-specific method allows to assign a native Windows @c HICON + (which must be castes to @c WXHICON opaque handle type) to wxIcon. + Notice that this means that the @c HICON will be destroyed by wxIcon + when it is destroyed. + + @return @true if successful. + + @onlyfor{wxmsw} + + @since 2.9.5 + */ + bool CreateFromHICON(WXHICON icon); + + /** + Returns disabled (dimmed) version of the icon. + + This method is available in wxIcon only under wxMSW, other ports only + have it in wxBitmap. You can always use wxImage::ConvertToDisabled() + and create the icon from wxImage manually however. + + @onlyfor{wxmsw} + @since 2.9.0 */ wxIcon ConvertToDisabled(unsigned char brightness = 255) const;