dolphin/Externals/wxWidgets3/include/wx/iconloc.h
Soren Jorvang d14efe561b Import r67258 of the wxWidgets trunk, which I expect will before
long become wxWidgets 2.9.2, which in turn is expected to be the
last 2.9 release before the 3.0 stable release.

Since the full wxWidgets distribution is rather large, I have
imported only the parts that we use, on a subdirectory basis:

art
include/wx/*.*
include/wx/aui
include/wx/cocoa
include/wx/generic
include/wx/gtk
include/wx/meta
include/wx/msw
include/wx/osx
include/wx/persist
include/wx/private
include/wx/protocol
include/wx/unix
src/aui
src/common
src/generic
src/gtk
src/msw
src/osx
src/unix


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7380 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-20 18:05:19 +00:00

81 lines
2.3 KiB
C++

///////////////////////////////////////////////////////////////////////////////
// Name: wx/iconloc.h
// Purpose: declaration of wxIconLocation class
// Author: Vadim Zeitlin
// Modified by:
// Created: 21.06.2003
// RCS-ID: $Id: iconloc.h 27408 2004-05-23 20:53:33Z JS $
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ICONLOC_H_
#define _WX_ICONLOC_H_
#include "wx/string.h"
// ----------------------------------------------------------------------------
// wxIconLocation: describes the location of an icon
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxIconLocationBase
{
public:
// ctor takes the name of the file where the icon is
wxEXPLICIT wxIconLocationBase(const wxString& filename = wxEmptyString)
: m_filename(filename) { }
// default copy ctor, assignment operator and dtor are ok
// returns true if this object is valid/initialized
bool IsOk() const { return !m_filename.empty(); }
// set/get the icon file name
void SetFileName(const wxString& filename) { m_filename = filename; }
const wxString& GetFileName() const { return m_filename; }
private:
wxString m_filename;
};
// under MSW the same file may contain several icons so we also store the
// index of the icon
#if defined(__WXMSW__)
class WXDLLIMPEXP_BASE wxIconLocation : public wxIconLocationBase
{
public:
// ctor takes the name of the file where the icon is and the icons index in
// the file
wxEXPLICIT wxIconLocation(const wxString& file = wxEmptyString, int num = 0);
// set/get the icon index
void SetIndex(int num) { m_index = num; }
int GetIndex() const { return m_index; }
private:
int m_index;
};
inline
wxIconLocation::wxIconLocation(const wxString& file, int num)
: wxIconLocationBase(file)
{
SetIndex(num);
}
#else // !MSW
// must be a class because we forward declare it as class
class WXDLLIMPEXP_BASE wxIconLocation : public wxIconLocationBase
{
public:
wxEXPLICIT wxIconLocation(const wxString& filename = wxEmptyString)
: wxIconLocationBase(filename) { }
};
#endif // platform
#endif // _WX_ICONLOC_H_