]> err.no Git - sope/blob - sope-appserver/WEExtensions/WECalendarField.h
renamed packages as discussed in the developer list
[sope] / sope-appserver / WEExtensions / WECalendarField.h
1 /*
2   Copyright (C) 2000-2004 SKYRIX Software AG
3
4   This file is part of OpenGroupware.org.
5
6   OGo 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   OGo 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 OGo; 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 // $Id$
22
23 #ifndef __WEExtensions_WECalendarField_H__
24 #define __WEExtensions_WECalendarField_H__
25
26 /*
27   required resources:
28
29   // time field:
30   downstairs.gif
31
32   // date field:
33   icon_popupcalendar.gif
34   first.gif
35   previous.gif
36   non_sorted.gif
37   next.gif
38   last.gif
39   icon_unread.gif
40 */
41
42 #define HEAD_BACKGROUND_COLOR @"#FFDAAA"
43 #define HEAD_COLOR            @"#000000"
44 #define HEAD_NAVIGATION_COLOR @"#6F1537"
45
46 #include <NGObjWeb/NGObjWeb.h>
47
48 @interface WECalendarField : WODynamicElement
49 {
50   WOAssociation *date;
51   WOAssociation *name;
52   
53   // dateField elements
54   WOAssociation *year;
55   WOAssociation *month;
56   WOAssociation *day;
57   WOAssociation *format;
58
59   // timeField elements
60   WOAssociation *hour;
61   WOAssociation *minute;
62   WOAssociation *second;
63   WOAssociation *useTextField;
64   WOAssociation *hourInterval;
65   WOAssociation *minuteInterval;
66   WOAssociation *secondInterval;
67
68   WOElement     *template;
69 }
70 @end
71
72 @interface WEDateFieldScript : WODynamicElement
73 {
74   WOAssociation *headBackground;
75   WOAssociation *headColor;
76   WOAssociation *headNavColor;
77   WOAssociation *labels;
78   WOAssociation *useImages;
79 }
80
81 + (void)appendWEDateFieldScriptToResponse:(WOResponse *)_response
82   inContext:(WOContext *)_ctx
83   headBackground: (NSString *) _hBack
84   headColor:      (NSString *) _hCol
85   headNavColor:   (NSString *) _hNav
86   labels:         (id)_labels
87   useImages:      (BOOL)_useImg;
88
89 @end
90
91 @interface WECalendarField(WETimeFieldImplementation)
92
93 - (void)_takeValuesFromTimeFieldRequest:(WORequest *)_rq
94   inContext:(WOContext *)_ctx;
95 - (id)_invokeActionForTimeFieldRequest:(WORequest *)_rq
96   inContext:(WOContext *)_ctx;
97 - (void)_appendTimeFieldToResponse:(WOResponse *)_r inContext:(WOContext *)_cx;
98
99 @end /* WECalendarField(WETimeFieldImplementation) */
100
101 @interface WECalendarField(WEDateFieldImplementation)
102
103 - (void)_takeValuesFromDateFieldRequest:(WORequest *)_rq
104   inContext:(WOContext *)_ctx;
105 - (id)_invokeActionForDateFieldRequest:(WORequest *)_rq 
106   inContext:(WOContext *)_ctx;
107 - (void)_appendDateFieldToResponse:(WOResponse *)_r inContext:(WOContext *)_cx;
108
109 @end /* WECalendarField(WEDateFieldImplementation) */
110
111 @interface WECalendarField(Accessors)
112
113 - (NSString *)elementIdWithSuffix:(NSString *)_suffix ctx:(WOContext *)_ctx;
114
115 - (void)setSecond:(int)_second inComponent:(WOComponent *)_comp;
116 - (int)secondInComponent:(WOComponent *)_comp;
117
118 - (void)setMinute:(int)_minute inComponent:(WOComponent *)_comp;
119 - (int)minuteInComponent:(WOComponent *)_comp;
120
121 - (void)setHour:(int)_hour inComponent:(WOComponent *)_comp;
122 - (int)hourInComponent:(WOComponent *)_comp;
123
124 - (void)setDay:(int)_day inComponent:(WOComponent *)_comp;
125 - (int)dayInComponent:(WOComponent *)_comp;
126
127 - (void)setMonth:(int)_month inComponent:(WOComponent *)_comp;
128 - (int)monthInComponent:(WOComponent *)_comp;
129
130 - (void)setYear:(int)_year inComponent:(WOComponent *)_comp;
131 - (int)yearInComponent:(WOComponent *)_comp;
132
133 - (BOOL)isSecondSettable;
134 - (BOOL)isMinuteSettable;
135 - (BOOL)isHourSettable;
136 - (BOOL)isDaySettable;
137 - (BOOL)isMonthSettable;
138 - (BOOL)isYearSettable;
139
140 - (BOOL)hasSecondInComponent:(WOComponent *)_comp;
141 - (BOOL)hasMinuteInComponent:(WOComponent *)_comp;
142 - (BOOL)hasHourInComponent:(WOComponent *)_comp;
143 - (BOOL)hasDayInComponent:(WOComponent *)_comp;
144 - (BOOL)hasMonthInComponent:(WOComponent *)_comp;
145 - (BOOL)hasYearInComponent:(WOComponent *)_comp;
146
147 @end
148
149 #endif /* __WEExtensions_WECalendarField_H__ */