-
Notifications
You must be signed in to change notification settings - Fork 0
/
RurCalendarBase.h
46 lines (40 loc) · 1.15 KB
/
RurCalendarBase.h
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
#ifndef __rurcalendarbase_h
#define __rurcalendarbase_h
#include "rurarray.h"
// toto je zakladna polozka, ktora sa vyznacuje v kalendari
struct RurCalendarItem
{
long hash; // id polozky
long typ; // rozlisenie o aku kalendarovy typ sa jedna
long uid; // ID uzivatela
TRect r;
TColor color;
TDateTime from;
TDateTime to;
// TDateTime from_time;
// TDateTime to_time;
bool splnene; // splneny termin
AnsiString text;
String popis;
RurCalendarItem() {
hash = typ = 0;
uid = 0;
r.left = 0; r.top = 0; r.right = 0; r.bottom = 0;
splnene = false;
}
AnsiString Debug() {return text+" {"+r.left+","+r.top+","+r.right+","+r.bottom+"} <"+from.DateTimeString()+" "+to.DateTimeString()+">";}
};
// pole urychluje niektore cinnosti s polozkami
class RurCalendarArray : public RArray<RurCalendarItem>
{
public:
int select; ///< Selektnute poradie
RurCalendarItem *si;
RurCalendarArray() : RArray<RurCalendarItem>(64, 64) {select = -1; si = NULL;}
int Find(int r,int m,int d);
int Find(int r,int m,int d,int hodina);
int FindXY(int x,int y);
int FindXY2(int x,int y);
int FindXYPos(int id,int x,int y);
};
#endif