]> git.saurik.com Git - wxWidgets.git/blob - src/os2/icon.cpp
Added a check for -lresolv in configure.in
[wxWidgets.git] / src / os2 / icon.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: icon.cpp
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 #ifdef __GNUG__
13 #pragma implementation "icon.h"
14 #endif
15
16 #include "wx/icon.h"
17
18 #if !USE_SHARED_LIBRARIES
19 IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap)
20 #endif
21
22 /*
23 * Icons
24 */
25
26
27 wxIconRefData::wxIconRefData()
28 {
29 // TODO: init icon handle
30 }
31
32 wxIconRefData::~wxIconRefData()
33 {
34 // TODO: destroy icon handle
35 }
36
37 wxIcon::wxIcon()
38 {
39 }
40
41 wxIcon::wxIcon(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height))
42 {
43 }
44
45 wxIcon::wxIcon(const wxString& icon_file, long flags,
46 int desiredWidth, int desiredHeight)
47
48 {
49 LoadFile(icon_file, flags, desiredWidth, desiredHeight);
50 }
51
52 wxIcon::~wxIcon()
53 {
54 }
55
56 bool wxIcon::LoadFile(const wxString& filename, long type,
57 int desiredWidth, int desiredHeight)
58 {
59 UnRef();
60
61 m_refData = new wxIconRefData;
62
63 wxBitmapHandler *handler = FindHandler(type);
64
65 if ( handler )
66 return handler->LoadFile(this, filename, type, desiredWidth, desiredHeight);
67 else
68 return FALSE;
69 }
70