X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a44f3b5a890fbb2a88ef9adafd94f662e1664889..b02dd12239c8a59b9a545d9fcb04974f8ad02c6b:/interface/wx/icon.h diff --git a/interface/wx/icon.h b/interface/wx/icon.h index bab04d6e6d..083bce7534 100644 --- a/interface/wx/icon.h +++ b/interface/wx/icon.h @@ -3,7 +3,7 @@ // Purpose: interface of wxIcon // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -50,7 +50,7 @@ @see @ref overview_bitmap, @ref overview_bitmap_supportedformats, wxDC::DrawIcon, wxCursor */ -class wxIcon : public wxBitmap +class wxIcon : public wxGDIObject { public: /** @@ -94,7 +94,11 @@ public: @param height The height of the image. - @onlyfor{wxmsw,wxmac} + @beginWxPerlOnly + In wxPerl use Wx::Icon->newBits(bits, width, height, depth = -1); + @endWxPerlOnly + + @onlyfor{wxmsw,wxosx} */ wxIcon(const char bits[], int width, int height); @@ -114,17 +118,21 @@ 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 + + @beginWxPerlOnly + In wxPerl use Wx::Icon->newFromXPM(data). + @endWxPerlOnly */ wxIcon(const char* const* bits); @@ -171,6 +179,19 @@ public: */ virtual ~wxIcon(); + /** + 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; + /** Copies @a bmp bitmap to this icon. Under MS Windows the bitmap must have mask colour set.