]> err.no Git - sope/blob - sope-appserver/WEExtensions/WECalendarField.h
added strict OSX bundle dependencies
[sope] / sope-appserver / WEExtensions / WECalendarField.h
1 /*
2   Copyright (C) 2000-2005 SKYRIX Software AG
3
4   This file is part of SOPE.
5
6   SOPE is free software; you can redistribute it and/or modify it under
7   the terms of the GNU Lesser General Public License as published by the
8   Free Software Foundation; either version 2, or (at your option) any
9   later version.
10
11   SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
12   WARRANTY; without even the implied warranty of MERCHANTABILITY or
13   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
14   License for more details.
15
16   You should have received a copy of the GNU Lesser General Public
17   License along with SOPE; see the file COPYING.  If not, write to the
18   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19   02111-1307, USA.
20 */
21
22 #ifndef __WEExtensions_WECalendarField_H__
23 #define __WEExtensions_WECalendarField_H__
24
25 /*
26   required resources:
27
28   // time field:
29   downstairs.gif
30
31   // date field:
32   icon_popupcalendar.gif
33   first.gif
34   previous.gif
35   non_sorted.gif
36   next.gif
37   last.gif
38   icon_unread.gif
39 */
40
41 #define HEAD_BACKGROUND_COLOR @"#FFDAAA"
42 #define HEAD_COLOR            @"#000000"
43 #define HEAD_NAVIGATION_COLOR @"#6F1537"
44
45 #include <NGObjWeb/NGObjWeb.h>
46
47 @interface WECalendarField : WODynamicElement
48 {
49   WOAssociation *date;
50   WOAssociation *name;
51   
52   // dateField elements
53   WOAssociation *year;
54   WOAssociation *month;
55   WOAssociation *day;
56   WOAssociation *format;
57
58   // timeField elements
59   WOAssociation *hour;
60   WOAssociation *minute;
61   WOAssociation *second;
62   WOAssociation *useTextField;
63   WOAssociation *hourInterval;
64   WOAssociation *minuteInterval;
65   WOAssociation *secondInterval;
66
67   WOElement     *template;
68 }
69 @end
70
71 @interface WEDateFieldScript : WODynamicElement
72 {
73   WOAssociation *headBackground;
74   WOAssociation *headColor;
75   WOAssociation *headNavColor;
76   WOAssociation *labels;
77   WOAssociation *useImages;
78 }
79
80 + (void)appendWEDateFieldScriptToResponse:(WOResponse *)_response
81   inContext:(WOContext *)_ctx
82   headBackground: (NSString *) _hBack
83   headColor:      (NSString *) _hCol
84   headNavColor:   (NSString *) _hNav
85   labels:         (id)_labels
86   useImages:      (BOOL)_useImg;
87
88 @end
89
90 @interface WECalendarField(WETimeFieldImplementation)
91
92 - (void)_takeValuesFromTimeFieldRequest:(WORequest *)_rq
93   inContext:(WOContext *)_ctx;
94 - (id)_invokeActionForTimeFieldRequest:(WORequest *)_rq
95   inContext:(WOContext *)_ctx;
96 - (void)_appendTimeFieldToResponse:(WOResponse *)_r inContext:(WOContext *)_cx;
97
98 @end /* WECalendarField(WETimeFieldImplementation) */
99
100 @interface WECalendarField(WEDateFieldImplementation)
101
102 - (void)_takeValuesFromDateFieldRequest:(WORequest *)_rq
103   inContext:(WOContext *)_ctx;
104 - (id)_invokeActionForDateFieldRequest:(WORequest *)_rq 
105   inContext:(WOContext *)_ctx;
106 - (void)_appendDateFieldToResponse:(WOResponse *)_r inContext:(WOContext *)_cx;
107
108 @end /* WECalendarField(WEDateFieldImplementation) */
109
110 @interface WECalendarField(Accessors)
111
112 - (NSString *)elementIdWithSuffix:(NSString *)_suffix ctx:(WOContext *)_ctx;
113
114 - (void)setSecond:(int)_second inComponent:(WOComponent *)_comp;
115 - (int)secondInComponent:(WOComponent *)_comp;
116
117 - (void)setMinute:(int)_minute inComponent:(WOComponent *)_comp;
118 - (int)minuteInComponent:(WOComponent *)_comp;
119
120 - (void)setHour:(int)_hour inComponent:(WOComponent *)_comp;
121 - (int)hourInComponent:(WOComponent *)_comp;
122
123 - (void)setDay:(int)_day inComponent:(WOComponent *)_comp;
124 - (int)dayInComponent:(WOComponent *)_comp;
125
126 - (void)setMonth:(int)_month inComponent:(WOComponent *)_comp;
127 - (int)monthInComponent:(WOComponent *)_comp;
128
129 - (void)setYear:(int)_year inComponent:(WOComponent *)_comp;
130 - (int)yearInComponent:(WOComponent *)_comp;
131
132 - (BOOL)isSecondSettable;
133 - (BOOL)isMinuteSettable;
134 - (BOOL)isHourSettable;
135 - (BOOL)isDaySettable;
136 - (BOOL)isMonthSettable;
137 - (BOOL)isYearSettable;
138
139 - (BOOL)hasSecondInComponent:(WOComponent *)_comp;
140 - (BOOL)hasMinuteInComponent:(WOComponent *)_comp;
141 - (BOOL)hasHourInComponent:(WOComponent *)_comp;
142 - (BOOL)hasDayInComponent:(WOComponent *)_comp;
143 - (BOOL)hasMonthInComponent:(WOComponent *)_comp;
144 - (BOOL)hasYearInComponent:(WOComponent *)_comp;
145
146 @end
147
148 #endif /* __WEExtensions_WECalendarField_H__ */