diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:14:37 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:14:37 +0200 |
commit | 8bf668665b107469086f16cb8ad23e47d479d2b4 (patch) | |
tree | 66a91ef06a8caa7cd6819dcbe1860693d3eda8d5 /library/icon_buffer.h | |
parent | 3.21 (diff) | |
download | FreeFileSync-8bf668665b107469086f16cb8ad23e47d479d2b4.tar.gz FreeFileSync-8bf668665b107469086f16cb8ad23e47d479d2b4.tar.bz2 FreeFileSync-8bf668665b107469086f16cb8ad23e47d479d2b4.zip |
4.0
Diffstat (limited to 'library/icon_buffer.h')
-rw-r--r-- | library/icon_buffer.h | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/library/icon_buffer.h b/library/icon_buffer.h index 00370d1b..cbd582f2 100644 --- a/library/icon_buffer.h +++ b/library/icon_buffer.h @@ -17,25 +17,33 @@ namespace zen class IconBuffer { public: - static const wxIcon& getDirectoryIcon(); //generic icons - static const wxIcon& getFileIcon(); // + enum IconSize + { + SIZE_SMALL, + SIZE_MEDIUM, + SIZE_LARGE + }; + + IconBuffer(IconSize sz); + ~IconBuffer(); + + int getSize() const { return cvrtSize(icoSize); } //*maximum* icon size in pixel + + const wxIcon& genericDirIcon () { return genDirIcon; } + const wxIcon& genericFileIcon() { return genFileIcon; } - static IconBuffer& getInstance(); - bool requestFileIcon(const Zstring& fileName, wxIcon* icon = NULL); //returns false if icon is not in buffer + bool requestFileIcon(const Zstring& filename, wxIcon* icon = NULL); //returns false if icon is not in buffer void setWorkload(const std::vector<Zstring>& load); //(re-)set new workload of icons to be retrieved; -#ifdef FFS_WIN - static const int ICON_SIZE = 16; //size in pixel -#elif defined FFS_LINUX - static const int ICON_SIZE = 24; //size in pixel -#endif + static int cvrtSize(IconSize sz); private: - IconBuffer(); - ~IconBuffer(); - struct Pimpl; std::unique_ptr<Pimpl> pimpl; + + const IconSize icoSize; + const wxIcon genDirIcon; + const wxIcon genFileIcon; }; } |