[go: up one dir, main page]

Menu

[eec2ea]: / src / aclock.h  Maximize  Restore  History

Download this file

49 lines (39 with data), 1.1 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
#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, int x, int y, unsigned int width, unsigned int height);
void updateToolTip();
virtual bool handleTimer(YTimer *t);
private:
YTimer *clockTimer;
bool clockUTC;
bool toolTipUTC;
YPixmap *getPixmap(char ch);
int calcWidth(const char *s, int count);
static YColor *clockBg;
static YColor *clockFg;
static YFont *clockFont;
};
#endif
// !!! remove this
#ifdef CONFIG_APPLET_CLOCK
extern YPixmap *PixNum[10];
extern YPixmap *PixSpace;
extern YPixmap *PixColon;
extern YPixmap *PixSlash;
extern YPixmap *PixA;
extern YPixmap *PixP;
extern YPixmap *PixM;
extern YPixmap *PixDot;
#endif
#endif