Check-in [0f9ea1c484]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix some javascript problems. (CVS 1259)
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:0f9ea1c48471b44ce63be0035f2101378a0c6eee
User & Date: danielk1977 2008-02-03 11:19:58
Context
2008-02-03
17:53
Automatically resize the tabs header when changing the gui font. (CVS 1260) check-in: fb70bdbca2 user: danielk1977 tags: trunk
11:19
Fix some javascript problems. (CVS 1259) check-in: 0f9ea1c484 user: danielk1977 tags: trunk
11:06
Get javascript working again. Still not completely right. (CVS 1258) check-in: a7fd9dfcae user: danielk1977 tags: trunk
Changes

Changes to hv/hv3_dom_ns.tcl.

1
2
3
4
5
6
7
8
...
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
...
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
...
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
namespace eval hv3 { set {version($Id: hv3_dom_ns.tcl,v 1.40 2008/02/03 11:06:56 danielk1977 Exp $)} 1 }

#---------------------------------
# List of DOM objects in this file:
#
#     Navigator
#     Window
#     Location
................................................................................
    list object [list ::hv3::DOM::Screen $myDom $myHv3]
  }

  -- A reference to the parent of the current window or subframe. If the
  -- window does not have a parent, then a reference to the window
  -- itself is returned.
  dom_get parent {
    set frame [winfo parent $myHv3]
    set parent [$frame parent_frame]
    if {$parent eq ""} {set parent $frame}
    list object [$myDom hv3_to_window [$parent hv3]]
  }

  -- A reference to the outermost window in the frameset. For ordinary
  -- HTML documents (not framesets) this property is set to a reference
  -- to this object (same as the <I>window</I> and <I>self</I> properties).
  dom_get top { 
    set frame [winfo parent $myHv3]
    set top [$frame top_frame]
    list object [$myDom hv3_to_window [$top hv3]]
  }

  -- A reference to this object.
  dom_get self   { list object [list ::hv3::DOM::Window $myDom $myHv3] }

  -- A reference to this object.
  dom_get window { list object [list ::hv3::DOM::Window $myDom $myHv3] }

  -- Set to a container of type [Ref FramesList] containing the sub-frames
  -- of this window.
  dom_get frames {
    list object [list ::hv3::DOM::FramesList $myDom [winfo parent $myHv3]]
  }

  -- Pop up a modal dialog box with a single button - \"OK\". The <i>msg</i>
  -- argument is displayed in the dialog. This function does not return
  -- until the user dismisses the dialog.
  --
  -- Returns null.
................................................................................
  -- available for displaying HTML documents), including the horizontal 
  -- scrollbar if one is displayed.
  --
  -- <P class=refs>
  -- [Ref http://developer.mozilla.org/en/docs/DOM:window.innerHeight]
  -- [Ref http://tkhtml.tcl.tk/cvstrac/tktview?tn=175]
  -- [Ref http://www.howtocreate.co.uk/tutorials/javascript/browserwindow]
  dom_get innerHeight { list number [winfo height $myHv3] }

  -- The current width of the browser window in pixels (the area 
  -- available for displaying HTML documents), including the vertical 
  -- scrollbar if one is displayed.
  --
  -- <P class=refs>
  -- [Ref http://developer.mozilla.org/en/docs/DOM:window.innerWidth]
  dom_get innerWidth  { list number [winfo width $myHv3] }

  dom_events { list }

  -- Shift keyboard focus to this window. This is mainly useful in frameset
  -- documents.
  dom_call focus {THIS} {
    focus $myHv3
  }

  -- This function is only available if the -unsafe option on the
  -- {[::hv3::browser]} widget is set to true. This is <b>not</b> the
  -- case in the Hv3 web browser, but may be in other applications.
  -- The string passed as an argument is evaluated as a Tcl script
  -- in the widget's interpreter.
................................................................................
#
#     http://developer.mozilla.org/en/docs/DOM:window.screen
#
# 
::hv3::dom2::stateless Screen {
  dom_parameter myHv3

  dom_get colorDepth  { list number [winfo screendepth $myHv3] }
  dom_get pixelDepth  { list number [winfo screendepth $myHv3] }

  dom_get width       { list number [winfo screenwidth $myHv3] }
  dom_get height      { list number [winfo screenheight $myHv3] }
  dom_get availWidth  { list number [winfo screenwidth $myHv3] }
  dom_get availHeight { list number [winfo screenheight $myHv3] }

  dom_get availTop    { list number 0}
  dom_get availLeft   { list number 0}
  dom_get top         { list number 0}
  dom_get left        { list number 0}
}

|







 







|









|













|







 







|







|






|







 







|
|

|
|
|
|







1
2
3
4
5
6
7
8
...
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
...
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
...
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
namespace eval hv3 { set {version($Id: hv3_dom_ns.tcl,v 1.41 2008/02/03 11:19:58 danielk1977 Exp $)} 1 }

#---------------------------------
# List of DOM objects in this file:
#
#     Navigator
#     Window
#     Location
................................................................................
    list object [list ::hv3::DOM::Screen $myDom $myHv3]
  }

  -- A reference to the parent of the current window or subframe. If the
  -- window does not have a parent, then a reference to the window
  -- itself is returned.
  dom_get parent {
    set frame [$myHv3 cget -frame]
    set parent [$frame parent_frame]
    if {$parent eq ""} {set parent $frame}
    list object [$myDom hv3_to_window [$parent hv3]]
  }

  -- A reference to the outermost window in the frameset. For ordinary
  -- HTML documents (not framesets) this property is set to a reference
  -- to this object (same as the <I>window</I> and <I>self</I> properties).
  dom_get top { 
    set frame [$myHv3 cget -frame]
    set top [$frame top_frame]
    list object [$myDom hv3_to_window [$top hv3]]
  }

  -- A reference to this object.
  dom_get self   { list object [list ::hv3::DOM::Window $myDom $myHv3] }

  -- A reference to this object.
  dom_get window { list object [list ::hv3::DOM::Window $myDom $myHv3] }

  -- Set to a container of type [Ref FramesList] containing the sub-frames
  -- of this window.
  dom_get frames {
    list object [list ::hv3::DOM::FramesList $myDom [$myHv3 cget -frame]]
  }

  -- Pop up a modal dialog box with a single button - \"OK\". The <i>msg</i>
  -- argument is displayed in the dialog. This function does not return
  -- until the user dismisses the dialog.
  --
  -- Returns null.
................................................................................
  -- available for displaying HTML documents), including the horizontal 
  -- scrollbar if one is displayed.
  --
  -- <P class=refs>
  -- [Ref http://developer.mozilla.org/en/docs/DOM:window.innerHeight]
  -- [Ref http://tkhtml.tcl.tk/cvstrac/tktview?tn=175]
  -- [Ref http://www.howtocreate.co.uk/tutorials/javascript/browserwindow]
  dom_get innerHeight { list number [winfo height [$myHv3 win]] }

  -- The current width of the browser window in pixels (the area 
  -- available for displaying HTML documents), including the vertical 
  -- scrollbar if one is displayed.
  --
  -- <P class=refs>
  -- [Ref http://developer.mozilla.org/en/docs/DOM:window.innerWidth]
  dom_get innerWidth  { list number [winfo width [$myHv3 win]] }

  dom_events { list }

  -- Shift keyboard focus to this window. This is mainly useful in frameset
  -- documents.
  dom_call focus {THIS} {
    focus [$myHv3 win]
  }

  -- This function is only available if the -unsafe option on the
  -- {[::hv3::browser]} widget is set to true. This is <b>not</b> the
  -- case in the Hv3 web browser, but may be in other applications.
  -- The string passed as an argument is evaluated as a Tcl script
  -- in the widget's interpreter.
................................................................................
#
#     http://developer.mozilla.org/en/docs/DOM:window.screen
#
# 
::hv3::dom2::stateless Screen {
  dom_parameter myHv3

  dom_get colorDepth  { list number [winfo screendepth  [$myHv3 win]] }
  dom_get pixelDepth  { list number [winfo screendepth  [$myHv3 win]] }

  dom_get width       { list number [winfo screenwidth  [$myHv3 win]] }
  dom_get height      { list number [winfo screenheight [$myHv3 win]] }
  dom_get availWidth  { list number [winfo screenwidth  [$myHv3 win]] }
  dom_get availHeight { list number [winfo screenheight [$myHv3 win]] }

  dom_get availTop    { list number 0}
  dom_get availLeft   { list number 0}
  dom_get top         { list number 0}
  dom_get left        { list number 0}
}