[go: up one dir, main page]

Menu

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

Download this file

54 lines (42 with data), 1.2 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
50
51
52
53
#ifndef __CLOCK_H
#define __CLOCK_H
#include "ywindow.h"
#include "ytimer.h"
#ifdef CONFIG_APPLET_CLOCK
class YClock: public YWindow, public YTimerListener {
public:
YClock(YWindow *aParent = 0);
virtual ~YClock();
void autoSize();
virtual void handleButton(const XButtonEvent &button);
virtual void handleCrossing(const XCrossingEvent &crossing);
virtual void handleClick(const XButtonEvent &up, int count);
virtual void paint(Graphics &g, const YRect &r);
void updateToolTip();
virtual bool handleTimer(YTimer *t);
private:
YTimer *clockTimer;
bool clockUTC;
bool toolTipUTC;
int transparent;
ref<YPixmap> getPixmap(char ch);
int calcWidth(const char *s, int count);
bool hasTransparency();
static YColor *clockBg;
static YColor *clockFg;
static ref<YFont> clockFont;
};
#endif
// !!! remove this
#ifdef CONFIG_APPLET_CLOCK
extern ref<YPixmap> PixNum[10];
extern ref<YPixmap> PixSpace;
extern ref<YPixmap> PixColon;
extern ref<YPixmap> PixSlash;
extern ref<YPixmap> PixA;
extern ref<YPixmap> PixP;
extern ref<YPixmap> PixM;
extern ref<YPixmap> PixDot;
extern ref<YPixmap> PixPercent;
#endif
#endif