2007-04-03 15:41:51 +02:00
|
|
|
// $Id: UIxCalView.h 1040 2007-04-02 21:29:40Z 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).
|
|
|
|
*/
|
|
|
|
|
2007-04-02 21:24:49 +02:00
|
|
|
@class NSArray;
|
|
|
|
@class NSCalendarDate;
|
|
|
|
@class NSDictionary;
|
|
|
|
@class NSMutableDictionary;
|
|
|
|
@class NSString;
|
2007-04-11 21:08:58 +02:00
|
|
|
@class NSTimeZone;
|
2007-04-02 21:24:49 +02:00
|
|
|
|
|
|
|
@class SOGoAptFormatter;
|
2006-12-19 18:06:07 +01:00
|
|
|
@class SOGoAppointmentFolder;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
@interface UIxCalView : UIxComponent
|
|
|
|
{
|
2007-04-02 21:24:49 +02:00
|
|
|
NSArray *appointments;
|
2006-12-19 18:06:07 +01:00
|
|
|
NSMutableDictionary *componentsData;
|
2007-04-02 21:24:49 +02:00
|
|
|
NSArray *tasks;
|
|
|
|
NSArray *allDayApts;
|
|
|
|
id appointment;
|
|
|
|
NSCalendarDate *currentDay;
|
2007-04-11 21:08:58 +02:00
|
|
|
NSTimeZone *timeZone;
|
2006-06-15 21:34:10 +02:00
|
|
|
SOGoAptFormatter *aptFormatter;
|
|
|
|
SOGoAptFormatter *aptTooltipFormatter;
|
|
|
|
SOGoAptFormatter *privateAptFormatter;
|
|
|
|
SOGoAptFormatter *privateAptTooltipFormatter;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
unsigned isMyApt : 1;
|
|
|
|
unsigned canAccessApt : 1;
|
|
|
|
unsigned RESERVED : 30;
|
|
|
|
} aptFlags;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* config */
|
|
|
|
|
2007-04-02 21:24:49 +02:00
|
|
|
- (void) configureFormatters;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/* 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
|
|
|
|
2007-04-02 21:24:49 +02:00
|
|
|
- (NSArray *) allDayApts;
|
|
|
|
- (id) appointment;
|
|
|
|
- (BOOL) isMyApt;
|
|
|
|
- (BOOL) canAccessApt; /* protection */
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-04-02 21:24:49 +02:00
|
|
|
- (BOOL) hasDayInfo;
|
|
|
|
- (BOOL) hasHoldidayInfo;
|
|
|
|
- (BOOL) hasAllDayApts;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-04-02 21:24:49 +02:00
|
|
|
- (NSDictionary *) aptTypeDict;
|
|
|
|
- (NSString *) aptTypeLabel;
|
|
|
|
- (NSString *) aptTypeIcon;
|
|
|
|
- (SOGoAptFormatter *) aptFormatter;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-04-02 21:24:49 +02:00
|
|
|
- (NSString *) shortTextForApt;
|
|
|
|
- (NSString *) shortTitleForApt;
|
|
|
|
- (NSString *) tooltipForApt;
|
|
|
|
- (NSString *) appointmentViewURL;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-04-02 21:24:49 +02:00
|
|
|
- (id) holidayInfo;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/* related to current day */
|
2007-04-02 21:24:49 +02:00
|
|
|
- (void) setCurrentDay: (NSCalendarDate *) _day;
|
|
|
|
- (NSCalendarDate *) currentDay;
|
|
|
|
- (NSString *) currentDayName; /* localized */
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/* defaults */
|
2007-04-02 21:24:49 +02:00
|
|
|
- (BOOL) showFullNames;
|
|
|
|
- (BOOL) showAMPMDates;
|
|
|
|
- (unsigned) dayStartHour;
|
|
|
|
- (unsigned) dayEndHour;
|
|
|
|
- (BOOL) shouldDisplayWeekend;
|
|
|
|
- (BOOL) shouldDisplayRejectedAppointments;
|
|
|
|
|
|
|
|
- (NSCalendarDate *) referenceDateForFormatter;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-04-02 21:24:49 +02:00
|
|
|
- (NSCalendarDate *) thisMonth;
|
|
|
|
- (NSCalendarDate *) nextMonth;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/* fetching */
|
|
|
|
|
2007-04-02 21:24:49 +02:00
|
|
|
- (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 */
|
|
|
|
|
2007-04-02 21:24:49 +02:00
|
|
|
- (NSDictionary *) todayQueryParameters;
|
|
|
|
- (NSDictionary *) currentDayQueryParameters;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/* CSS related */
|
|
|
|
|
2007-04-02 21:24:49 +02:00
|
|
|
- (NSString *) aptStyle;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
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__ */
|