]> git.saurik.com Git - wxWidgets.git/blame - src/qt/icon.cpp
wxMenu compile fix
[wxWidgets.git] / src / qt / icon.cpp
CommitLineData
7c78e7c7
RR
1/////////////////////////////////////////////////////////////////////////////
2// Name: icon.cpp
01b2eeec
KB
3// Purpose: wxIcon class
4// Author: AUTHOR
5// Modified by:
6// Created: ??/??/98
7// RCS-ID: $Id$
8// Copyright: (c) AUTHOR
7c78e7c7
RR
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifdef __GNUG__
13#pragma implementation "icon.h"
14#endif
15
16#include "wx/icon.h"
17
01b2eeec
KB
18#if !USE_SHARED_LIBRARIES
19IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap)
20#endif
21
22/*
23 * Icons
24 */
25
26
27wxIconRefData::wxIconRefData()
28{
29 // TODO: init icon handle
30}
7c78e7c7 31
01b2eeec
KB
32wxIconRefData::~wxIconRefData()
33{
34 // TODO: destroy icon handle
35}
36
37wxIcon::wxIcon()
38{
39}
7c78e7c7 40
01b2eeec 41wxIcon::wxIcon(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height))
7c78e7c7 42{
01b2eeec
KB
43}
44
45wxIcon::wxIcon(const wxString& icon_file, long flags,
46 int desiredWidth, int desiredHeight)
47
48{
49 LoadFile(icon_file, flags, desiredWidth, desiredHeight);
50}
51
52wxIcon::~wxIcon()
53{
54}
55
56bool 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