]>
Commit | Line | Data |
---|---|---|
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 | 18 | IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap) |
01b2eeec KB |
19 | |
20 | /* | |
21 | * Icons | |
22 | */ | |
23 | ||
24 | ||
25 | wxIconRefData::wxIconRefData() | |
26 | { | |
27 | // TODO: init icon handle | |
28 | } | |
7c78e7c7 | 29 | |
01b2eeec KB |
30 | wxIconRefData::~wxIconRefData() |
31 | { | |
32 | // TODO: destroy icon handle | |
33 | } | |
34 | ||
35 | wxIcon::wxIcon() | |
36 | { | |
37 | } | |
7c78e7c7 | 38 | |
01b2eeec | 39 | wxIcon::wxIcon(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height)) |
7c78e7c7 | 40 | { |
01b2eeec KB |
41 | } |
42 | ||
43 | wxIcon::wxIcon(const wxString& icon_file, long flags, | |
44 | int desiredWidth, int desiredHeight) | |
45 | ||
46 | { | |
47 | LoadFile(icon_file, flags, desiredWidth, desiredHeight); | |
48 | } | |
49 | ||
50 | wxIcon::~wxIcon() | |
51 | { | |
52 | } | |
53 | ||
54 | bool 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 |