]> err.no Git - scalable-opengroupware.org/blob - UI/SOGoUI/UIxComponent.h
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1212 d1b88da0-ebda-0310...
[scalable-opengroupware.org] / UI / SOGoUI / UIxComponent.h
1 /*
2   Copyright (C) 2000-2005 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
22 #ifndef __UIxComponent_H_
23 #define __UIxComponent_H_
24
25 #import <NGObjWeb/SoComponent.h>
26 #import <NGObjWeb/WOContext+SoObjects.h>
27
28 #import <SOGo/SOGoObject.h>
29
30 /*
31   UIxComponent
32
33   Common superclass for most components used in SOGo.
34
35   TODO: document facilities.
36 */
37
38 @class NSCalendarDate, NSTimeZone, NSMutableDictionary, SoUser;
39
40 @interface UIxComponent : SoComponent
41 {
42   NSMutableDictionary *queryParameters;
43   NSCalendarDate *_selectedDate;
44 }
45
46 - (NSString *)queryParameterForKey:(NSString *)_key;
47 - (NSDictionary *)queryParameters;
48
49 /* use this to set 'sticky' query parameters */
50 - (void)setQueryParameter:(NSString *)_param forKey:(NSString *)_key;
51
52 /* date related query parameters */
53 - (NSDictionary *)queryParametersBySettingSelectedDate:(NSCalendarDate *)_date;
54 - (void)setSelectedDateQueryParameter:(NSCalendarDate *)_newDate
55         inDictionary:(NSMutableDictionary *)_qp;
56
57 /* appends queryParameters to _method if any are set */
58 - (NSString *)completeHrefForMethod:(NSString *)_method;
59
60 - (NSString *)ownMethodName;
61
62 - (NSString *)userFolderPath;
63 - (NSString *) applicationPath;
64
65 - (NSString *)ownPath;
66 - (NSString *)relativePathToUserFolderSubPath:(NSString *)_sub;
67
68 /* date selection */
69 - (NSCalendarDate *) selectedDate;
70
71 - (NSString *) dateStringForDate: (NSCalendarDate *)_date;
72
73 - (BOOL) hideFrame;
74
75 - (UIxComponent *) jsCloseWithRefreshMethod: (NSString *) methodName;
76
77 /* SoUser */
78 - (NSString *) shortUserNameForDisplay;
79
80 /* labels */
81 - (NSString *) labelForKey:(NSString *)_key;
82
83 - (NSString *) localizedNameForDayOfWeek:(unsigned)_dayOfWeek;
84 - (NSString *) localizedAbbreviatedNameForDayOfWeek:(unsigned)_dayOfWeek;
85 - (NSString *) localizedNameForMonthOfYear:(unsigned)_monthOfYear;
86 - (NSString *) localizedAbbreviatedNameForMonthOfYear:(unsigned)_monthOfYear;
87
88 /* HTTP method safety */
89 - (BOOL) isInvokedBySafeMethod;
90     
91 /* locale */
92 - (NSDictionary *)locale;
93
94 /* cached resource filenames */
95 - (WOResourceManager *) pageResourceManager;
96 - (NSString *) urlForResourceFilename: (NSString *) filename;
97
98 - (WOResponse *) responseWith204;
99
100 /* Debugging */
101 - (BOOL)isUIxDebugEnabled;
102
103 @end
104
105 #endif  /* __UIxComponent_H_ */