]> git.saurik.com Git - wxWidgets.git/blame - src/stubs/icon.cpp
Copied/merged from the 2.2 branch.
[wxWidgets.git] / src / stubs / icon.cpp
CommitLineData
93cf77c0
JS
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
93cf77c0 18IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap)
93cf77c0
JS
19
20/*
21 * Icons
22 */
23
24
25wxIconRefData::wxIconRefData()
26{
27 // TODO: init icon handle
28}
29
30wxIconRefData::~wxIconRefData()
31{
32 // TODO: destroy icon handle
33}
34
35wxIcon::wxIcon()
36{
37}
38
39wxIcon::wxIcon(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height))
40{
41}
42
43wxIcon::wxIcon(const wxString& icon_file, long flags,
44 int desiredWidth, int desiredHeight)
45
46{
47 LoadFile(icon_file, flags, desiredWidth, desiredHeight);
48}
49
50wxIcon::~wxIcon()
51{
52}
53
54bool wxIcon::LoadFile(const wxString& filename, long type,
55 int desiredWidth, int desiredHeight)
56{
57 UnRef();
58
59 m_refData = new wxIconRefData;
60
61 wxBitmapHandler *handler = FindHandler(type);
62
63 if ( handler )
64 return handler->LoadFile(this, filename, type, desiredWidth, desiredHeight);
65 else
66 return FALSE;
67}
68