]> err.no Git - scalable-opengroupware.org/blob - UI/Scheduler/UIxCalView.h
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1045 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 @class NSTimeZone;
21
22 @class SOGoAptFormatter;
23 @class SOGoAppointmentFolder;
24
25 @interface UIxCalView : UIxComponent
26 {
27   NSArray *appointments;
28   NSMutableDictionary *componentsData;
29   NSArray *tasks;
30   NSArray *allDayApts;
31   id appointment;
32   NSCalendarDate *currentDay;
33   NSTimeZone *timeZone;
34   SOGoAptFormatter *aptFormatter;
35   SOGoAptFormatter *aptTooltipFormatter;
36   SOGoAptFormatter *privateAptFormatter;
37   SOGoAptFormatter *privateAptTooltipFormatter;
38
39   struct {
40     unsigned isMyApt      : 1;
41     unsigned canAccessApt : 1;
42     unsigned RESERVED     : 30;
43   } aptFlags;
44 }
45
46 /* config */
47
48 - (void) configureFormatters;
49
50 /* accessors */
51
52 - (NSArray *) appointments;
53 - (void) setAppointments: (NSArray *) _apts;
54
55 - (void) setTasks: (NSArray *) _tasks;
56 - (NSArray *) tasks;
57
58 - (NSArray *) allDayApts;
59 - (id) appointment;
60 - (BOOL) isMyApt;
61 - (BOOL) canAccessApt; /* protection */
62
63 - (BOOL) hasDayInfo;
64 - (BOOL) hasHoldidayInfo;
65 - (BOOL) hasAllDayApts;
66
67 - (NSDictionary *) aptTypeDict;
68 - (NSString *) aptTypeLabel;
69 - (NSString *) aptTypeIcon;
70 - (SOGoAptFormatter *) aptFormatter;
71
72 - (NSString *) shortTextForApt;
73 - (NSString *) shortTitleForApt;
74 - (NSString *) tooltipForApt;
75 - (NSString *) appointmentViewURL;
76
77 - (id) holidayInfo;
78
79 /* related to current day */
80 - (void) setCurrentDay: (NSCalendarDate *) _day;
81 - (NSCalendarDate *) currentDay;
82 - (NSString *) currentDayName; /* localized */
83
84 /* defaults */
85 - (BOOL) showFullNames;
86 - (BOOL) showAMPMDates;
87 - (unsigned) dayStartHour;
88 - (unsigned) dayEndHour;
89 - (BOOL) shouldDisplayWeekend;
90 - (BOOL) shouldDisplayRejectedAppointments;
91
92 - (NSCalendarDate *) referenceDateForFormatter;
93  
94 - (NSCalendarDate *) thisMonth;
95 - (NSCalendarDate *) nextMonth;
96
97 /* fetching */
98
99 - (NSCalendarDate *) startDate;
100 - (NSCalendarDate *) endDate;
101 - (NSArray *) fetchCoreAppointmentsInfos;
102 - (NSArray *) fetchCoreTasksInfos;
103
104 /* date selection */
105
106 - (NSDictionary *) todayQueryParameters;
107 - (NSDictionary *) currentDayQueryParameters;
108
109 /* CSS related */
110
111 - (NSString *) aptStyle;
112
113 /* protected methods */
114 - (NSDictionary *) _dateQueryParametersWithOffset: (int) daysOffset;
115
116 @end
117
118 #endif /* __SOGo_UIxCalView_H__ */