]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/icon.h
added wxMAKE_UNIQUE_NAME to wx/defs.h, use it in wx/debug.h
[wxWidgets.git] / include / wx / cocoa / icon.h
CommitLineData
a24aff65 1/////////////////////////////////////////////////////////////////////////////
aaf7ab43 2// Name: wx/cocoa/icon.h
a24aff65
DE
3// Purpose: wxIcon class
4// Author: AUTHOR
5// Modified by:
6// Created: ??/??/98
7// RCS-ID: $Id$
8// Copyright: (c) AUTHOR
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_ICON_H_
13#define _WX_ICON_H_
14
15#if defined(__GNUG__) && !defined(__APPLE__)
16#pragma interface "icon.h"
17#endif
18
19#include "wx/bitmap.h"
20
21// Icon
22class WXDLLEXPORT wxIcon: public wxBitmap
23{
24 DECLARE_DYNAMIC_CLASS(wxIcon)
25
26public:
27 wxIcon();
28
29 // Copy constructors
30 wxIcon(const wxIcon& icon)
31 : wxBitmap()
32 { Ref(icon); }
33
34 wxIcon(const char **data);
35 wxIcon(char **data);
36 wxIcon(const char bits[], int width , int height );
37 wxIcon(const wxString& name, int flags = wxBITMAP_TYPE_ICON_RESOURCE,
38 int desiredWidth = -1, int desiredHeight = -1);
aaf7ab43
VZ
39 wxIcon(const wxIconLocation& loc)
40 {
41 LoadFile(loc.GetFileName(), wxBITMAP_TYPE_ICON);
42 }
a24aff65
DE
43 ~wxIcon();
44
45 bool LoadFile(const wxString& name, wxBitmapType flags /* = wxBITMAP_TYPE_ICON_RESOURCE */ ,
46 int desiredWidth /* = -1 */ , int desiredHeight = -1);
47 bool LoadFile(const wxString& name ,wxBitmapType flags = wxBITMAP_TYPE_ICON_RESOURCE )
aaf7ab43
VZ
48 { return LoadFile( name , flags , -1 , -1 ) ; }
49
50 wxIcon& operator=(const wxIcon& icon)
51 { if (this != &icon) Ref(icon); return *this; }
52 bool operator==(const wxIcon& icon) const { return m_refData == icon.m_refData; }
53 bool operator!=(const wxIcon& icon) const { return !(*this == icon); }
a24aff65 54
a24aff65
DE
55 // create from bitmap (which should have a mask unless it's monochrome):
56 // there shouldn't be any implicit bitmap -> icon conversion (i.e. no
57 // ctors, assignment operators...), but it's ok to have such function
58 void CopyFromBitmap(const wxBitmap& bmp);
59};
60
61#endif
62 // _WX_ICON_H_