]>
Commit | Line | Data |
---|---|---|
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 | IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap) | |
19 | ||
20 | /* | |
21 | * Icons | |
22 | */ | |
23 | ||
24 | ||
25 | wxIconRefData::wxIconRefData() | |
26 | { | |
27 | // TODO: init icon handle | |
28 | } | |
29 | ||
30 | wxIconRefData::~wxIconRefData() | |
31 | { | |
32 | // TODO: destroy icon handle | |
33 | } | |
34 | ||
35 | wxIcon::wxIcon() | |
36 | { | |
37 | } | |
38 | ||
39 | wxIcon::wxIcon(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height)) | |
40 | { | |
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 |