[go: up one dir, main page]

Menu

[3cb4b9]: / src / yicon.h  Maximize  Restore  History

Download this file

50 lines (37 with data), 1.0 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef YICON_H
#define YICON_H
#include "ypaint.h"
#include "ypixbuf.h"
class YIcon {
public:
YIcon(char const *fileName);
YIcon(ref<YIconImage> small, ref<YIconImage> large, ref<YIconImage> huge);
~YIcon();
ref<YIconImage> huge();
ref<YIconImage> large();
ref<YIconImage> small();
ref<YIconImage> getScaledIcon(int size);
char const *iconName() const { return fPath; }
static YIcon *getIcon(const char *name);
static void freeIcons();
bool isCached() { return fCached; }
void setCached(bool cached) { fCached = cached; }
static int smallSize();
static int largeSize();
static int hugeSize();
private:
ref<YIconImage> fSmall;
ref<YIconImage> fLarge;
ref<YIconImage> fHuge;
bool loadedS;
bool loadedL;
bool loadedH;
char *fPath;
bool fCached;
char *findIcon(char *base, unsigned size);
char *findIcon(int size);
void removeFromCache();
static int cacheFind(const char *name);
ref<YIconImage> loadIcon(int size);
};
#endif