summaryrefslogtreecommitdiff
path: root/lib/icon_buffer.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:23:48 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:23:48 +0200
commitee1c8c5c25d25dfa42120125a8a45dc9831ee412 (patch)
tree67aa287157db954e0cadeee05b4aad331eb2ecf2 /lib/icon_buffer.h
parent5.13 (diff)
downloadFreeFileSync-ee1c8c5c25d25dfa42120125a8a45dc9831ee412.tar.gz
FreeFileSync-ee1c8c5c25d25dfa42120125a8a45dc9831ee412.tar.bz2
FreeFileSync-ee1c8c5c25d25dfa42120125a8a45dc9831ee412.zip
5.14
Diffstat (limited to 'lib/icon_buffer.h')
-rw-r--r--lib/icon_buffer.h26
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;
};
}
bgstack15