]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/mac/icon.h
made the log dialog resizeable (again?)
[wxWidgets.git] / include / wx / mac / icon.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: icon.h
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#ifdef __GNUG__
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 inline wxIcon(const wxIcon& icon) { Ref(icon); }
31
32 wxIcon( const char **data );
33 wxIcon( char **data );
34 wxIcon(const char bits[], int width, int height);
35 wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_ICON_RESOURCE,
36 int desiredWidth = -1, int desiredHeight = -1);
37 ~wxIcon();
38
39 bool LoadFile(const wxString& name, long flags /* = wxBITMAP_TYPE_ICON_RESOURCE */ ,
40 int desiredWidth /* = -1 */ , int desiredHeight = -1);
41 bool LoadFile(const wxString& name ,long flags = wxBITMAP_TYPE_ICON_RESOURCE )
42 { return LoadFile( name , flags , -1 , -1 ) ; }
43
44 inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; }
45 inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
46 inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; }
47};
48
49/*
50class WXDLLEXPORT wxICONFileHandler: public wxBitmapHandler
51{
52 DECLARE_DYNAMIC_CLASS(wxICONFileHandler)
53public:
54 inline wxICONFileHandler()
55 {
56 m_name = "ICO icon file";
57 m_extension = "ico";
58 m_type = wxBITMAP_TYPE_ICO;
59 };
60
61 virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
62 int desiredWidth = -1, int desiredHeight = -1);
63};
64*/
65
66class WXDLLEXPORT wxICONResourceHandler: public wxBitmapHandler
67{
68 DECLARE_DYNAMIC_CLASS(wxICONResourceHandler)
69public:
70 inline wxICONResourceHandler()
71 {
72 m_name = "ICON resource";
73 m_extension = "";
74 m_type = wxBITMAP_TYPE_ICON_RESOURCE;
75 };
76
77 virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
78 int desiredWidth = -1, int desiredHeight = -1);
79
80};
81
82#endif
83 // _WX_ICON_H_