1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: icon.h
|
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-29 13:03:18 -05:00
|
|
|
// Id: $Id$
|
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
1998-12-09 12:30:17 -05:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GTKICONH__
|
|
|
|
#define __GTKICONH__
|
|
|
|
|
2002-09-07 08:28:46 -04:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
1998-05-20 10:01:55 -04:00
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/bitmap.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class wxIcon;
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxIcon
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class wxIcon: public wxBitmap
|
|
|
|
{
|
|
|
|
public:
|
1999-11-22 14:44:25 -05:00
|
|
|
wxIcon();
|
|
|
|
wxIcon( const wxIcon& icon);
|
|
|
|
wxIcon( const char **bits, int width=-1, int height=-1 );
|
|
|
|
|
|
|
|
// For compatibility with wxMSW where desired size is sometimes required to
|
|
|
|
// distinguish between multiple icons in a resource.
|
2002-04-20 07:20:49 -04:00
|
|
|
wxIcon( const wxString& filename, int type = wxBITMAP_TYPE_XPM,
|
1999-11-22 14:44:25 -05:00
|
|
|
int WXUNUSED(desiredWidth)=-1, int WXUNUSED(desiredHeight)=-1 ) :
|
|
|
|
wxBitmap(filename, type)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
wxIcon( char **bits, int width=-1, int height=-1 );
|
|
|
|
|
2002-04-20 07:20:49 -04:00
|
|
|
wxIcon& operator=(const wxIcon& icon);
|
|
|
|
bool operator==(const wxIcon& icon) const { return m_refData == icon.m_refData; }
|
|
|
|
bool operator!=(const wxIcon& icon) const { return !(*this == icon); }
|
2000-08-15 17:44:18 -04:00
|
|
|
|
|
|
|
// 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);
|
2002-04-20 07:20:49 -04:00
|
|
|
|
1999-11-22 14:44:25 -05:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxIcon)
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // __GTKICONH__
|