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