]> OCCT Git - occt-wok.git/commitdiff
No comments
authorcas <cas@opencascade.com>
Wed, 18 Jul 2001 18:23:40 +0000 (18:23 +0000)
committercas <cas@opencascade.com>
Wed, 18 Jul 2001 18:23:40 +0000 (18:23 +0000)
src/WOKTclLib/MkBuild.tcl
src/WOKTclLib/osutils.tcl
src/WOKTclLib/wok.tcl
src/WOKTclLib/wokEDF.tcl

index d0c69446d83a88b9e8c6af357df1c5ee30843ec9..7ac39b7d5505494206743095c5951aeda429821b 100755 (executable)
@@ -74,9 +74,13 @@ proc wokBuild { {fast 0} } {
 
     set arr [$w.l subwidget arrow] ; tixBalloon $arr.bal ; $arr.bal bind $arr -msg "Last spots"
 
-    button $w.mdtv -image [image create photo -file $env(WOK_LIBRARY)/opencascade.gif] ;#command wokSeeLayout
-    ;#tixBalloon $w.mdtv.bal
-    ;#$w.mdtv.bal bind $w.mdtv -msg "See Layout"
+    if [file exists $env(WOK_LIBRARY)/images/opencascade.gif] {
+       set ogif $env(WOK_LIBRARY)/images/opencascade.gif
+    } else {
+       set ogif $env(WOK_LIBRARY)/opencascade.gif
+    }
+    button $w.mdtv -image [image create photo -file $ogif] 
+
 
     tixForm $dis -left $lastbut  -bottom $top -top $w.mnu
 
index 1d24c47c908a181c55fb215053d5f24e1f8acee5..cb2c8890c15f9be145036aabb6483926e197a2c2 100755 (executable)
@@ -177,9 +177,12 @@ proc osutils:tk:close { ltk } {
            }
        }
     }
-    if ![lempty $recurse] {
-       set result [concat $result [osutils:tk:close $recurse]]
-    }
+    ;#    if ![lempty $recurse] {
+       ;#      set result [concat $result [osutils:tk:close $recurse]]
+       ;#    }
+       if { $recurse != {} } {
+           set result [concat $result [osutils:tk:close $recurse]]
+       }
     return $result
 }
 ;#
@@ -224,6 +227,12 @@ proc osutils:tk:units { tkloc {typed 0} } {
            if { $typed == 2 } {
                lappend l [list [uinfo -c $fu] $fu]
            }
+           if { $typed == 3 } {
+               lappend l [list [uinfo -t $fu] [wokinfo -n $fu]]
+           }
+           if { $typed == 4 } {
+               lappend l [list [uinfo -t $fu] $fu]
+           }
        } else {
            puts stderr "Unit inconnue $u"
        }
index a4bae9f1ad5c2ff134f1767a1d7cd42853c39444..b66e726a26ee677569a51ff659e5444871e8be00 100755 (executable)
@@ -1,4 +1,17 @@
 
+proc iwokNotYetImplemented { } {
+puts stderr \
+           {
+       This proc is not available on this version of Tcl/Tk.
+       The commands used to prepare, store and integrate as available as
+        respectively : wprepare , wstore , and wintegre.
+        See online help for these commands.
+    }
+}
+
+
+
+
 proc iwokUsage { } {
     puts stderr {Usage : iwok [-fh] }
     puts stderr ""
@@ -11,24 +24,33 @@ proc iwok { args } {
 
     global IWOK_GLOBALS
     global env
-    
+    global tcl_platform    
+    global tcl_version
+
     if { [lsearch $args -h] != -1 } {
        iwokUsage
        return
     }
 
+
+
+    regsub -all {\.[^.]*} $tcl_version "" major
+    if { $major == 8 } {
+       iwokNotYetImplemented 
+       return
+    }
+
+    if [catch {package require Tix} statix ] {
+       puts stderr "$statix"
+       return
+    }
+    
     set fast 0
     if { [lsearch $args -f] != -1 } { set fast 1 }
 
     catch {wokKillAll}
 
-    if {[wokparam -e %Station] == "lin"} {
-      package ifneeded Tk 8.0 "load [list /usr/lib/libtk8.0.so]"
-    }
-    package require Tk
 
-    package require Tix
-    
     set IWOK_GLOBALS(windows) {}
     set IWOK_GLOBALS(toplevel) .wok[join [split [id user][id host] .] _]
     set IWOK_GLOBALS(toplevel,geometry) 1200x80+10+30
@@ -53,7 +75,7 @@ proc iwok { args } {
     set IWOK_GLOBALS(boldfont) [tix option get bold_font]
 
     ;# ucreate -P dans factory/workshop/ => erreur ?!!!
-    set IWOK_GLOBALS(ucreate-P) [list {j jini} {p package} {s schema} {i interface} {C client} {e engine} {x executable} {n nocdlpack} {t toolkit} {r resource} {O documentation} {c ccl} {f frontal} {d delivery} {I idl} {S server}  {m module}]
+    set IWOK_GLOBALS(ucreate-P) [list {j jini} {p package} {s schema} {i interface} {C client} {e engine} {x executable} {n nocdlpack} {t toolkit} {r resource} {O documentation} {c ccl} {f frontal} {d delivery} {I idl} {S server}  ]
 
     foreach type $IWOK_GLOBALS(ucreate-P) {
        set st [lindex $type 0]
index 49c11ee336ab5eedd22451f2fb791774f7341377..3ab990195130a12bae6296dbf867abf9a2780925 100755 (executable)
@@ -66,7 +66,6 @@ proc wokEDF:EditFile { file } {
     switch -- $IWOK_GLOBALS(EDF,EDITOR) {
        
        connected_emacs {
-           wokemacs findfile  $IWOK_GLOBALS(EDF,clients) $file
        }
        
        iwok_editor {
@@ -96,20 +95,14 @@ proc wokEDF:EDITOR { } {
     global env
     global IWOK_GLOBALS
     global tcl_platform
-    set cnx [wokemacs clients]
-    if { $cnx != {} } {
-       set IWOK_GLOBALS(EDF,clients) $cnx
-       return connected_emacs
-    } else {
-       if { "$tcl_platform(platform)" == "unix" } {
-           if {[info exists env(EDITOR)]} {
-               return $env(EDITOR)
-           } else {
-               return iwok_editor
-           }
+    if { "$tcl_platform(platform)" == "unix" } {
+       if {[info exists env(EDITOR)]} {
+           return $env(EDITOR)
        } else {
            return iwok_editor
        }
+    } else {
+       return iwok_editor
     }
 }
 ;#