]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/stubs/icon.cpp
Documented help API extension and fixed gsocket compilation.
[wxWidgets.git] / src / stubs / icon.cpp
... / ...
CommitLineData
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
19IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap)
20#endif
21
22/*
23 * Icons
24 */
25
26
27wxIconRefData::wxIconRefData()
28{
29 // TODO: init icon handle
30}
31
32wxIconRefData::~wxIconRefData()
33{
34 // TODO: destroy icon handle
35}
36
37wxIcon::wxIcon()
38{
39}
40
41wxIcon::wxIcon(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height))
42{
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