1#!/bin/sh
2# The next line restarts using /usr/local/bin/wish8.6 \
3exec /usr/local/bin/wish8.6 "$0"
4
5
6package require msgcat
7namespace import msgcat::mc
8
9package require BWidget
10lappend auto_path . library
11package require pane
12package require richtext
13package require simxml
14package require simcss
15package require gui
16package require tmp
17namespace import tmp::*
18
19source library/scrolled_text.tcl
20
21
22if {[info exists env(LANG)]} {
23  set mcDir [file join [file dirname [info script]] gui/msgs]
24  msgcat::mcload $mcDir
25  msgcat::mclocale $env(LANG)
26}
27
28proc SetResource { win } {
29
30  foreach { win } [winfo children $win] {
31    set parameters [option get $win paramList {}]
32    foreach { param } $parameters {
33      $win configure -$param [option get $win $param {}]
34    } ;# foreach
35    if { [llength [winfo children $win]] > 0 } {
36      SetResource $win
37    } ;# if
38  } ;# foreach
39} ;# proc SetResource
40
41
42#======================================================
43#======================================================
44set splash .splashScreen
45wm iconify .
46toplevel $splash
47label $splash.label -text "tkXMLive:" -font "fixed 12 bold" -background white
48label $splash.status -text "" -font "fixed 10"         -background white -foreground blue
49pack $splash.label $splash.status -expand true -fill both -side top
50
51wm withdraw $splash
52wm transient $splash .  ;  wm overrideredirect $splash 1
53
54set x [expr [winfo screenwidth  $splash]/2 - [winfo reqwidth  $splash]/2 - [winfo vrootx [winfo parent $splash]]]
55set y [expr [winfo screenheight $splash]/2 - [winfo reqheight $splash]/2 - [winfo vrooty [winfo parent $splash]]]
56wm geom $splash +$x+$y
57wm deiconify $splash
58update idletasks
59#======================================================
60#======================================================
61
62
63
64set fileResource "Xresource"
65if [file exists $fileResource] {
66  if [ catch { option readfile $fileResource startup} err ] {
67    gui::msgDebug "error in $fileResource: $err"
68  } ;# Read Resource file
69} ;# if Resource fule exists
70
71
72
73source gui/default.tcl
74
75
76
77
78#======================================================
79#======================================================
80gui::data set tkXMLiVEversion {tkXMLive (0.1.4)}
81wm title . [gui::data get tkXMLiVEversion]
82destroy $splash
83wm deiconify .
84set x 55
85set y 50
86wm geom . +$x+$y
87#======================================================
88#======================================================
89
90
91
92