]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/icon.h
   1 ///////////////////////////////////////////////////////////////////////////// 
   4 // Author:      Robert Roebling 
   6 // Copyright:   (c) 1998 Robert Roebling 
   7 // Licence:     wxWindows licence 
   8 ///////////////////////////////////////////////////////////////////////////// 
  19 #include "wx/object.h" 
  20 #include "wx/bitmap.h" 
  22 //----------------------------------------------------------------------------- 
  24 //----------------------------------------------------------------------------- 
  28 //----------------------------------------------------------------------------- 
  30 //----------------------------------------------------------------------------- 
  32 class wxIcon
: public wxBitmap
 
  36     wxIcon( const wxIcon
& icon
); 
  37     wxIcon( const char **bits
, int width
=-1, int height
=-1 ); 
  39     // For compatibility with wxMSW where desired size is sometimes required to 
  40     // distinguish between multiple icons in a resource. 
  41     wxIcon( const wxString
& filename
, int type 
= wxBITMAP_TYPE_XPM
,  
  42             int WXUNUSED(desiredWidth
)=-1, int WXUNUSED(desiredHeight
)=-1 ) : 
  43         wxBitmap(filename
, type
) 
  46     wxIcon( char **bits
, int width
=-1, int height
=-1 ); 
  48     wxIcon
& operator = (const wxIcon
& icon
); 
  49     inline bool operator == (const wxIcon
& icon
) { return m_refData 
== icon
.m_refData
; } 
  50     inline bool operator != (const wxIcon
& icon
) { return m_refData 
!= icon
.m_refData
; } 
  52     // create from bitmap (which should have a mask unless it's monochrome): 
  53     // there shouldn't be any implicit bitmap -> icon conversion (i.e. no 
  54     // ctors, assignment operators...), but it's ok to have such function 
  55     void CopyFromBitmap(const wxBitmap
& bmp
); 
  58     DECLARE_DYNAMIC_CLASS(wxIcon
) 
  62 #endif // __GTKICONH__