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