2007-01-04 17:03:52 +01:00
|
|
|
// $Id: UIxCalView.h 1007 2007-01-04 14:42:10Z wolfgang $
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
#ifndef __SOGo_UIxCalView_H__
|
|
|
|
#define __SOGo_UIxCalView_H__
|
|
|
|
|
|
|
|
#include <SOGoUI/UIxComponent.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
UIxCalView
|
|
|
|
|
|
|
|
Superclass for most components which render a set of appointments coming from
|
|
|
|
a SOPE clientObject (which usually is an SOGoAppointmentFolder).
|
|
|
|
*/
|
|
|
|
|
2006-12-19 18:06:07 +01:00
|
|
|
@class NSString, NSArray, NSDictionary, NSMutableDictionary, NSCalendarDate, SOGoAptFormatter;
|
|
|
|
@class SOGoAppointmentFolder;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
@interface UIxCalView : UIxComponent
|
|
|
|
{
|
|
|
|
NSArray *appointments;
|
2007-03-29 20:11:58 +02:00
|
|
|
NSMutableArray *calendarFolders;
|
2006-12-19 18:06:07 +01:00
|
|
|
NSMutableDictionary *componentsData;
|
2006-10-11 20:19:42 +02:00
|
|
|
NSArray *tasks;
|
2006-06-15 21:34:10 +02:00
|
|
|
NSArray *allDayApts;
|
|
|
|
id appointment;
|
|
|
|
NSCalendarDate *currentDay;
|
|
|
|
SOGoAptFormatter *aptFormatter;
|
|
|
|
SOGoAptFormatter *aptTooltipFormatter;
|
|
|
|
SOGoAptFormatter *privateAptFormatter;
|
|
|
|
SOGoAptFormatter *privateAptTooltipFormatter;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
unsigned isMyApt : 1;
|
|
|
|
unsigned canAccessApt : 1;
|
|
|
|
unsigned RESERVED : 30;
|
|
|
|
} aptFlags;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* config */
|
|
|
|
|
|
|
|
- (void)configureFormatters;
|
|
|
|
|
|
|
|
/* accessors */
|
|
|
|
|
2006-10-11 20:19:42 +02:00
|
|
|
- (NSArray *) appointments;
|
|
|
|
- (void) setAppointments: (NSArray *) _apts;
|
|
|
|
|
|
|
|
- (void) setTasks: (NSArray *) _tasks;
|
|
|
|
- (NSArray *) tasks;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
- (NSArray *)allDayApts;
|
|
|
|
- (id)appointment;
|
|
|
|
- (BOOL)isMyApt;
|
|
|
|
- (BOOL)canAccessApt; /* protection */
|
|
|
|
|
|
|
|
- (BOOL)hasDayInfo;
|
|
|
|
- (BOOL)hasHoldidayInfo;
|
|
|
|
- (BOOL)hasAllDayApts;
|
|
|
|
|
|
|
|
- (NSDictionary *)aptTypeDict;
|
|
|
|
- (NSString *)aptTypeLabel;
|
|
|
|
- (NSString *)aptTypeIcon;
|
|
|
|
- (SOGoAptFormatter *)aptFormatter;
|
|
|
|
|
|
|
|
- (NSString *)shortTextForApt;
|
|
|
|
- (NSString *)shortTitleForApt;
|
|
|
|
- (NSString *)tooltipForApt;
|
|
|
|
- (NSString *)appointmentViewURL;
|
|
|
|
|
|
|
|
- (id)holidayInfo;
|
|
|
|
|
|
|
|
/* related to current day */
|
|
|
|
- (void)setCurrentDay:(NSCalendarDate *)_day;
|
|
|
|
- (NSCalendarDate *)currentDay;
|
|
|
|
- (NSString *)currentDayName; /* localized */
|
|
|
|
|
|
|
|
/* defaults */
|
|
|
|
- (BOOL)showFullNames;
|
|
|
|
- (BOOL)showAMPMDates;
|
|
|
|
- (unsigned)dayStartHour;
|
|
|
|
- (unsigned)dayEndHour;
|
|
|
|
- (BOOL)shouldDisplayWeekend;
|
|
|
|
- (BOOL)shouldDisplayRejectedAppointments;
|
|
|
|
|
|
|
|
- (NSCalendarDate *)referenceDateForFormatter;
|
|
|
|
|
|
|
|
- (NSCalendarDate *)thisMonth;
|
|
|
|
- (NSCalendarDate *)nextMonth;
|
|
|
|
|
|
|
|
/* fetching */
|
|
|
|
|
|
|
|
- (NSCalendarDate *)startDate;
|
|
|
|
- (NSCalendarDate *)endDate;
|
2006-10-11 20:19:42 +02:00
|
|
|
- (NSArray *) fetchCoreAppointmentsInfos;
|
|
|
|
- (NSArray *) fetchCoreTasksInfos;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/* date selection */
|
|
|
|
|
|
|
|
- (NSDictionary *)todayQueryParameters;
|
|
|
|
- (NSDictionary *)currentDayQueryParameters;
|
|
|
|
|
|
|
|
/* calendarUIDs */
|
|
|
|
|
|
|
|
- (NSString *)formattedCalendarUIDs;
|
|
|
|
|
|
|
|
/* CSS related */
|
|
|
|
|
|
|
|
- (NSString *)aptStyle;
|
|
|
|
|
2006-08-19 00:56:47 +02:00
|
|
|
/* protected methods */
|
|
|
|
- (NSDictionary *) _dateQueryParametersWithOffset: (int) daysOffset;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif /* __SOGo_UIxCalView_H__ */
|