]> err.no Git - scalable-opengroupware.org/blob - UI/Scheduler/UIxCalView.h
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1043 d1b88da0-ebda-0310...
[scalable-opengroupware.org] / UI / Scheduler / UIxCalView.h
1 // $Id$
2
3 #ifndef __SOGo_UIxCalView_H__
4 #define __SOGo_UIxCalView_H__
5
6 #include <SOGoUI/UIxComponent.h>
7
8 /*
9   UIxCalView
10   
11   Superclass for most components which render a set of appointments coming from
12   a SOPE clientObject (which usually is an SOGoAppointmentFolder).
13 */
14
15 @class NSArray;
16 @class NSCalendarDate;
17 @class NSDictionary;
18 @class NSMutableDictionary;
19 @class NSString;
20
21 @class SOGoAptFormatter;
22 @class SOGoAppointmentFolder;
23
24 @interface UIxCalView : UIxComponent
25 {
26   NSArray *appointments;
27   NSMutableDictionary *componentsData;
28   NSArray *tasks;
29   NSArray *allDayApts;
30   id appointment;
31   NSCalendarDate *currentDay;
32   SOGoAptFormatter *aptFormatter;
33   SOGoAptFormatter *aptTooltipFormatter;
34   SOGoAptFormatter *privateAptFormatter;
35   SOGoAptFormatter *privateAptTooltipFormatter;
36
37   struct {
38     unsigned isMyApt      : 1;
39     unsigned canAccessApt : 1;
40     unsigned RESERVED     : 30;
41   } aptFlags;
42 }
43
44 /* config */
45
46 - (void) configureFormatters;
47
48 /* accessors */
49
50 - (NSArray *) appointments;
51 - (void) setAppointments: (NSArray *) _apts;
52
53 - (void) setTasks: (NSArray *) _tasks;
54 - (NSArray *) tasks;
55
56 - (NSArray *) allDayApts;
57 - (id) appointment;
58 - (BOOL) isMyApt;
59 - (BOOL) canAccessApt; /* protection */
60
61 - (BOOL) hasDayInfo;
62 - (BOOL) hasHoldidayInfo;
63 - (BOOL) hasAllDayApts;
64
65 - (NSDictionary *) aptTypeDict;
66 - (NSString *) aptTypeLabel;
67 - (NSString *) aptTypeIcon;
68 - (SOGoAptFormatter *) aptFormatter;
69
70 - (NSString *) shortTextForApt;
71 - (NSString *) shortTitleForApt;
72 - (NSString *) tooltipForApt;
73 - (NSString *) appointmentViewURL;
74
75 - (id) holidayInfo;
76
77 /* related to current day */
78 - (void) setCurrentDay: (NSCalendarDate *) _day;
79 - (NSCalendarDate *) currentDay;
80 - (NSString *) currentDayName; /* localized */
81
82 /* defaults */
83 - (BOOL) showFullNames;
84 - (BOOL) showAMPMDates;
85 - (unsigned) dayStartHour;
86 - (unsigned) dayEndHour;
87 - (BOOL) shouldDisplayWeekend;
88 - (BOOL) shouldDisplayRejectedAppointments;
89
90 - (NSCalendarDate *) referenceDateForFormatter;
91  
92 - (NSCalendarDate *) thisMonth;
93 - (NSCalendarDate *) nextMonth;
94
95 /* fetching */
96
97 - (NSCalendarDate *) startDate;
98 - (NSCalendarDate *) endDate;
99 - (NSArray *) fetchCoreAppointmentsInfos;
100 - (NSArray *) fetchCoreTasksInfos;
101
102 /* date selection */
103
104 - (NSDictionary *) todayQueryParameters;
105 - (NSDictionary *) currentDayQueryParameters;
106
107 /* CSS related */
108
109 - (NSString *) aptStyle;
110
111 /* protected methods */
112 - (NSDictionary *) _dateQueryParametersWithOffset: (int) daysOffset;
113
114 @end
115
116 #endif /* __SOGo_UIxCalView_H__ */