1
///////////////////////////////////////////////////////////////////////////////
3
// Purpose: declaration of wxIconLocation class
4
// Author: Vadim Zeitlin
7
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
8
// Licence: wxWindows licence
9
///////////////////////////////////////////////////////////////////////////////
11
#ifndef _WX_ICONLOC_H_
12
#define _WX_ICONLOC_H_
14
#include "wx/string.h"
16
// ----------------------------------------------------------------------------
17
// wxIconLocation: describes the location of an icon
18
// ----------------------------------------------------------------------------
20
class WXDLLIMPEXP_BASE wxIconLocationBase
23
// ctor takes the name of the file where the icon is
24
wxEXPLICIT wxIconLocationBase(const wxString& filename = wxEmptyString)
25
: m_filename(filename) { }
27
// default copy ctor, assignment operator and dtor are ok
30
// returns true if this object is valid/initialized
31
bool IsOk() const { return !m_filename.empty(); }
33
// set/get the icon file name
34
void SetFileName(const wxString& filename) { m_filename = filename; }
35
const wxString& GetFileName() const { return m_filename; }
41
// under Windows the same file may contain several icons so we also store the
43
#if defined(__WINDOWS__)
45
class WXDLLIMPEXP_BASE wxIconLocation : public wxIconLocationBase
48
// ctor takes the name of the file where the icon is and the icons index in
50
wxEXPLICIT wxIconLocation(const wxString& file = wxEmptyString, int num = 0);
52
// set/get the icon index
53
void SetIndex(int num) { m_index = num; }
54
int GetIndex() const { return m_index; }
61
wxIconLocation::wxIconLocation(const wxString& file, int num)
62
: wxIconLocationBase(file)
69
// must be a class because we forward declare it as class
70
class WXDLLIMPEXP_BASE wxIconLocation : public wxIconLocationBase
73
wxEXPLICIT wxIconLocation(const wxString& filename = wxEmptyString)
74
: wxIconLocationBase(filename) { }
79
#endif // _WX_ICONLOC_H_