X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aaf7ab431b85d817af39d1a19b6d392ff5bd9379..66c2bf7b1d9326fb650acfaae22ec50528cfbf7c:/include/wx/iconloc.h diff --git a/include/wx/iconloc.h b/include/wx/iconloc.h index 2ace40208b..9baaaa5297 100644 --- a/include/wx/iconloc.h +++ b/include/wx/iconloc.h @@ -4,8 +4,7 @@ // Author: Vadim Zeitlin // Modified by: // Created: 21.06.2003 -// RCS-ID: $Id$ -// Copyright: (c) 2003 Vadim Zeitlin +// Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -18,11 +17,12 @@ // wxIconLocation: describes the location of an icon // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxIconLocationBase +class WXDLLIMPEXP_BASE wxIconLocationBase { public: // ctor takes the name of the file where the icon is - wxEXPLICIT wxIconLocationBase(const wxString& file) : m_filename(file) { } + wxEXPLICIT wxIconLocationBase(const wxString& filename = wxEmptyString) + : m_filename(filename) { } // default copy ctor, assignment operator and dtor are ok @@ -31,23 +31,23 @@ public: bool IsOk() const { return !m_filename.empty(); } // set/get the icon file name - void SetFileName(const wxString& file) { m_filename = file; } + 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 +// under Windows the same file may contain several icons so we also store the // index of the icon -#if defined(__WXMSW__) +#if defined(__WINDOWS__) -class WXDLLEXPORT wxIconLocation : public wxIconLocationBase +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, int num = 0); + wxEXPLICIT wxIconLocation(const wxString& file = wxEmptyString, int num = 0); // set/get the icon index void SetIndex(int num) { m_index = num; } @@ -64,9 +64,15 @@ wxIconLocation::wxIconLocation(const wxString& file, int num) SetIndex(num); } -#else // !MSW +#else // !__WINDOWS__ -typedef wxIconLocationBase wxIconLocation; +// 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