diff options
Diffstat (limited to 'lib/icon_buffer.h')
-rw-r--r-- | lib/icon_buffer.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/icon_buffer.h b/lib/icon_buffer.h index ba34faa2..efa5179f 100644 --- a/lib/icon_buffer.h +++ b/lib/icon_buffer.h @@ -7,11 +7,11 @@ #ifndef ICONBUFFER_H_INCLUDED #define ICONBUFFER_H_INCLUDED +#include <list> #include <memory> -#include <wx/bitmap.h> -#include <wx/icon.h> #include <zen/zstring.h> - +#include <zen/optional.h> +#include <wx/bitmap.h> namespace zen { @@ -28,22 +28,24 @@ public: IconBuffer(IconSize sz); ~IconBuffer(); - static int getSize(IconSize icoSize); //*maximum* icon size in pixel - int getSize() const { return getSize(icoSize); } // + static int getSize(IconSize icoSizeType); //expected and *maximum* icon size in pixel + int getSize() const { return getSize(iconSizeType); } // + + const wxBitmap& genericFileIcon() { return genFileIcon; } + const wxBitmap& genericDirIcon () { return genDirIcon; } - const wxIcon& genericFileIcon() { return genFileIcon; } - const wxIcon& genericDirIcon () { return genDirIcon; } + bool readyForRetrieval(const Zstring& filename); + Opt<wxBitmap> retrieveFileIcon(const Zstring& filename); - bool requestFileIcon(const Zstring& filename, wxIcon* icon = nullptr); //returns false if icon is not in buffer - void setWorkload(const std::vector<Zstring>& load); //(re-)set new workload of icons to be retrieved; + void setWorkload(const std::list<Zstring>& load); //(re-)set new workload of icons to be retrieved; private: struct Pimpl; std::unique_ptr<Pimpl> pimpl; - const IconSize icoSize; - const wxIcon genDirIcon; - const wxIcon genFileIcon; + const IconSize iconSizeType; + const wxBitmap genDirIcon; + const wxBitmap genFileIcon; }; } |