]> err.no Git - scalable-opengroupware.org/blob - UI/WebServerResources/layout2or3_xlib.txt
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1294 d1b88da0-ebda-0310...
[scalable-opengroupware.org] / UI / WebServerResources / layout2or3_xlib.txt
1
2 ------------------------------------------------------------------------------
3 X Library, Copyright (C) 2001,2002,2003,2004,2005 Michael Foster (Cross-Browser.com). 
4 Distributed under the terms of the GNU LGPL. This file contains contributor copyrights,
5 license information and documentation for a customized X library.
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20
21 layout2or3_xlib.txt compiled with XC v0.22b for layout2or3_xlib.js
22
23 ------------------------------------------------------------------------------
24 globals, Copyright (C) 2001,2002,2003,2004,2005 Michael Foster (Cross-Browser.com)
25
26 [Revisions]
27
28   r2, ?, mf, added more sniffer vars
29   r1, 31Mar04, mf, put in it's own file for use with XC
30
31 [Description]
32
33   The following global variables are available.
34
35   xVersion - X version string (in _header.js)
36
37   xUA - lowercase user-agent string
38   xIE4Up - true if browser is IE 4 or greater
39   xIE4 - true if browser is IE 4.x
40   xIE5 - true if browser is IE 5.x
41   xNN4 - true if browser is Netscape Navigator 4.x
42   xOp5or6 - true if browser is Opera 5.x or 6.x
43   xOp7 - true if browser is Opera 7.x
44   xMoz - true if browser is Mozilla, etc.
45   xMac - true if OS is Mac 
46
47   For some browsers, the window resize and scroll events are simulated.
48   Some of the following variables may be used.
49
50   xPCW - previous clientWidth
51   xPCH - previous clientHeight
52   xREL - resize event listener
53   xPSL - previous scrollLeft
54   xPST - previous scrollTop
55   xSEL - scroll event listener
56
57 [Invocation]
58
59
60 [Parameters]
61
62
63 [Return]
64
65
66 [Dependencies]
67
68
69 [Demos]
70
71
72 [Notes]
73
74   As much as possible, object-detection is used instead of browser-detection.
75
76
77 ------------------------------------------------------------------------------
78 xGetElementById, Copyright (C) 2001,2002,2003,2004,2005 Michael Foster (Cross-Browser.com)
79
80 [Revisions]
81
82   r1, 31Mar04, mf, put in it's own file for use with XC
83
84 [Description]
85
86
87 [Invocation]
88
89   xGetElementById(ele)
90
91 [Parameters]
92
93   ele - id string or object reference
94
95 [Return]
96
97
98 [Dependencies]
99
100
101 [Demos]
102
103
104 [Notes]
105
106
107 ------------------------------------------------------------------------------
108 xStr, Copyright (C) 2001,2002,2003,2004,2005 Michael Foster (Cross-Browser.com)
109
110 [Revisions]
111
112   r1, 31Mar04, mf, put in it's own file for use with XC
113
114 [Description]
115
116
117 [Invocation]
118
119   xStr(ref[, etc])
120
121 [Parameters]
122
123
124 [Return]
125
126   Returns true if all its arguments are 'string' type.
127
128 [Dependencies]
129
130
131 [Demos]
132
133
134 [Notes]
135
136
137 ------------------------------------------------------------------------------
138 xScrollLeft, Copyright (C) 2001,2002,2003,2004,2005 Michael Foster (Cross-Browser.com)
139
140 [Revisions]
141
142   r2, ?, mf, added external window support
143   r1, 31Mar04, mf, put in it's own file for use with XC
144
145 [Description]
146
147
148 [Invocation]
149
150   xScrollLeft(e, bWin)
151
152 [Parameters]
153
154   ele - id string or object reference. If undefined return document scrollLeft.
155
156 [Return]
157
158   Return the number of pixels the element (or window) has scrolled horizontally.
159
160 [Dependencies]
161
162   xGetElementById, xDef, xNum
163
164 [Demos]
165
166
167 [Notes]
168
169
170 ------------------------------------------------------------------------------
171 xScrollTop, Copyright (C) 2001,2002,2003,2004,2005 Michael Foster (Cross-Browser.com)
172
173 [Revisions]
174
175   r2, ?, mf, added external window support
176   r1, 31Mar04, mf, put in it's own file for use with XC
177
178 [Description]
179
180
181 [Invocation]
182
183   xScrollTop(ele)
184
185 [Parameters]
186
187   ele - id string or object reference. If undefined return document scrollTop.
188
189 [Return]
190
191   Return the number of pixels the element (or window) has scrolled vertically.
192
193 [Dependencies]
194
195   xGetElementById, xDef, xNum
196
197 [Demos]
198
199
200 [Notes]
201
202
203 ------------------------------------------------------------------------------
204 xHeight, Copyright (C) 2001,2002,2003,2004,2005 Michael Foster (Cross-Browser.com)
205
206 [Revisions]
207
208   r3, 12Mar05, mf, Changed xSetCH to use xGetComputedStyle and removed xGetCS.
209                    Made xSetCH inline. Reduces width/height funtions about 200 bytes.
210   r2, 14May04, mf, xHeight now accepts zero as valid
211   r1, 31Mar04, mf, put in it's own file for use with XC
212
213 [Description]
214
215   Return and optionally set the element's height.
216
217 [Invocation]
218
219   xHeight(ele[, uH])
220
221 [Parameters]
222
223   ele - id string or object reference
224   uH - unsigned integer height; it is rounded to an integer
225
226 [Return]
227
228
229 [Dependencies]
230
231   xgetelementbyid, xnum, xdef, xstr, xgetcomputedstyle
232
233 [Demos]
234
235
236 [Notes]
237
238
239 ------------------------------------------------------------------------------
240 xClientWidth, Copyright (C) 2001,2002,2003,2004,2005 Michael Foster (Cross-Browser.com)
241
242 [Revisions]
243
244   r2, 27Jan05, mf, Moz update for xClientWidth/xClientHeight, check for 'CSS1Compat' (experimental?).
245   r1, 31Mar04, mf, put in it's own file for use with XC
246
247 [Description]
248
249
250 [Invocation]
251
252   xClientWidth()
253
254 [Parameters]
255
256   None
257
258 [Return]
259
260
261 [Dependencies]
262
263   xOp5or6, xDef
264
265 [Demos]
266
267
268 [Notes]
269
270
271 ------------------------------------------------------------------------------
272 xClientHeight, Copyright (C) 2001,2002,2003,2004,2005 Michael Foster (Cross-Browser.com)
273
274 [Revisions]
275
276   r2, 27Jan05, mf, Moz update for xClientWidth/xClientHeight, check for 'CSS1Compat' (experimental?).
277   r1, 31Mar04, mf, put in it's own file for use with XC
278
279 [Description]
280
281
282 [Invocation]
283
284   xClientHeight()
285
286 [Parameters]
287
288   None
289
290 [Return]
291
292
293 [Dependencies]
294
295   xOp5or6, xDef
296
297 [Demos]
298
299
300 [Notes]
301
302
303 ------------------------------------------------------------------------------
304 xAddEventListener, Copyright (C) 2001,2002,2003,2004,2005 Michael Foster (Cross-Browser.com)
305
306 [Revisions]
307
308   r2, 14Mar05, mf, reduced 136 bytes with shorter parameter names.
309   r1, 31Mar04, mf, put in it's own file for use with XC
310
311 [Description]
312
313   Register an event listener on the element. For some browsers
314   the window.onscroll and window.onresize events are simulated.
315
316 [Invocation]
317
318   xAddEventListener(ele, sEventType, fnEventListener[, bCapture])
319
320 [Parameters]
321
322   ele - id string or object reference
323   sEventType - string event type ('mousemove', 'click', 'resize', etc.)
324   fnEventListener - reference to the listener function
325   bCapture - boolean capture event flag
326
327 [Return]
328
329   void
330
331 [Dependencies]
332
333   xGetElementById, xIE4Up, xOp7,
334   xClientWidth, xClientHeight, xScrollLeft, xScrollTop
335
336 [Demos]
337
338
339 [Notes]
340
341   13Mar05, mf, The 2 sim events add a lot of weight - find a solution!!!
342
343 ------------------------------------------------------------------------------
344 xGetComputedStyle, Copyright (C) 2001,2002,2003,2004,2005 Michael Foster (Cross-Browser.com)
345
346 [Revisions]
347
348 r5, 14Mar05, mf, reduced by about 20 bytes
349 r4, 12Mar05, mf, return null on error
350 r3, ?, mf, added some error checking
351 r2, 23Aug04, mf, option to parseInt or return string
352 r1, 31Mar04, mf, put in it's own file for use with XC
353
354 [Description]
355
356   For sProp use the css property name, not the object property name.
357   For finding width this works in Moz and Op, but in IE this only works
358   if padding and border use pixel units in the CSS.
359
360 [Invocation]
361
362   xGetComputedStyle(oEle, sProp[, bInt])
363
364 [Parameters]
365
366   oEle - element object
367   sProp - css property name
368   bInt - if true, return value is an integer
369
370 [Return]
371
372
373 [Dependencies]
374
375
376 [Demos]
377
378
379 [Notes]
380
381
382 ------------------------------------------------------------------------------
383 xShow, Copyright (C) 2001,2002,2003,2004,2005 Michael Foster (Cross-Browser.com)
384
385 [Revisions]
386
387   r3, 27Jan05, mf, Bug-fixes for xShow/xHide (Dave/dlowther).
388   r2, ?, mf, changed to use xVisibility
389   r1, 31Mar04, mf, put in it's own file for use with XC
390
391 [Description]
392
393   Set the element's visibility to 'visible' ('show' for NN4).
394
395 [Invocation]
396
397   xShow(ele)
398
399 [Parameters]
400
401   ele - id string or object reference
402
403 [Return]
404
405
406 [Dependencies]
407
408   xVisibility
409
410 [Demos]
411
412
413 [Notes]
414
415
416 ------------------------------------------------------------------------------
417 xDef, Copyright (C) 2001,2002,2003,2004,2005 Michael Foster (Cross-Browser.com)
418
419 [Revisions]
420
421   r1, 31Mar04, mf, put in it's own file for use with XC
422
423 [Description]
424
425
426 [Invocation]
427
428   xDef(ref[, ...])
429
430 [Parameters]
431
432   Can take any number and any type of arguments.
433
434 [Return]
435
436   Return true if all arguments are defined.
437
438 [Dependencies]
439
440
441 [Demos]
442
443
444 [Notes]
445
446
447 ------------------------------------------------------------------------------
448 xNum, Copyright (C) 2001,2002,2003,2004,2005 Michael Foster (Cross-Browser.com)
449
450 [Revisions]
451
452   r2, 2Apr05, mf, also return false if isNaN, suggested by pgira at SPF
453   r1, 31Mar04, mf, put in it's own file for use with XC
454
455 [Description]
456
457
458 [Invocation]
459
460   xNum(ref, etc)
461
462 [Parameters]
463
464
465 [Return]
466
467   Return true if all arguments are of type 'number', else false.
468   Also returns false if isNaN.
469
470 [Dependencies]
471
472   None
473
474 [Demos]
475
476
477 [Notes]
478
479
480 ------------------------------------------------------------------------------
481 xVisibility, Copyright (C) 2001,2002,2003,2004,2005 Michael Foster (Cross-Browser.com)
482
483 [Revisions]
484
485   r1
486
487 [Description]
488
489   Return and optionally set the element's visibility.
490
491 [Invocation]
492
493   xVisibility(ele, bShow)
494
495 [Parameters]
496
497   ele - id string or object reference
498   bShow - true = show, false = hide
499
500 [Return]
501
502
503 [Dependencies]
504
505   xGetElementById, xDef
506
507 [Demos]
508
509
510 [Notes]
511