aboutsummaryrefslogtreecommitdiff
path: root/test/toxy/setup.wid
diff options
context:
space:
mode:
authorN.N. <krzyszcz@users.sourceforge.net>2004-12-21 11:32:13 +0000
committerN.N. <krzyszcz@users.sourceforge.net>2004-12-21 11:32:13 +0000
commitb89456a346e176c4dc536e7de8f14b152cb2b15b (patch)
treef51a070a0dd16b9d072545901833a598db14bb55 /test/toxy/setup.wid
parent5af9cc14b70f907f0d10a75aa28ad04bbd65ec0d (diff)
widget: redefine, version control, better kb
svn path=/trunk/externals/miXed/; revision=2425
Diffstat (limited to 'test/toxy/setup.wid')
-rw-r--r--test/toxy/setup.wid31
1 files changed, 14 insertions, 17 deletions
diff --git a/test/toxy/setup.wid b/test/toxy/setup.wid
index 3ae0a70..98fe7fb 100644
--- a/test/toxy/setup.wid
+++ b/test/toxy/setup.wid
@@ -1,4 +1,7 @@
-# LATER transfer the `standard' toxy setup definitions into a tcl package
+package provide toxywidgets 0.1.0.14
+
+# LATER keep standard widget setup in a .tcl file (transfered into a .wiq), and
+# glue separate .wid files with standard widget definitions into another .wiq
# LATER think about using a slave interpreter, and a toxy-specific connection
# LATER gather aqua incompatibilities, and decide, if there is no other
# way than branching (different meaning of -bg, -borderwidth trouble,
@@ -116,11 +119,9 @@ proc ::toxy::item_visconfig {path target name varname cvpath px py} {
}
}
- if {[info exists ::toxy::masterinit]} {
- set failed [catch {eval $::toxy::masterinit} res]
- unset ::toxy::masterinit
- if {$failed} { error [concat in ::toxy::masterinit: $res] }
- }
+ set failed [catch {::toxy::master $path $cvpath $target} res]
+ if {$failed} { error [concat in ::toxy::master: $res] }
+
if {[info exists ::toxy::typeinit]} {
set failed [catch {eval $::toxy::typeinit} res]
unset ::toxy::typeinit
@@ -183,7 +184,7 @@ proc ::toxy::master_motion {target cvpath x y} {
[$cvpath canvasy [expr {$y - [winfo rooty $cvpath]}]] 0 \;
}
-proc ::toxy::master {path toppath cvpath target} {
+proc ::toxy::master {path cvpath target} {
# FIXME subitem handling in megawidgets
bind $path <ButtonRelease> "::toxy::master_release $target $cvpath %X %Y %b"
bind $path <1> "::toxy::item_click $target $cvpath %X %Y %b 0"
@@ -198,10 +199,13 @@ proc ::toxy::master {path toppath cvpath target} {
bind $path <3> "::toxy::item_click $target $cvpath %X %Y %b 8"
bind $path <Motion> "::toxy::master_motion $target $cvpath %X %Y"
+ bind $path <B1-Motion> "::toxy::master_motion $target $cvpath %X %Y"
bind $path <Enter> "::toxy::item_inout $target 1"
bind $path <Leave> "::toxy::item_inout $target 0"
}
+# standard widget types, LATER move to separate .wid files
+
# FIXME
proc ::toxy::scale_command {target sel v} {
if {$::toxy::scale_isactive} {
@@ -242,16 +246,6 @@ proc ::toxy::popup {path target remote entries args} {
} else { error [concat in ::toxy::popup: $err] }
}
-# master initializer
-#> master
-
-::toxy::master .- .- .^.c .|
-
-# FIXME
-set ::toxy::scale_isactive 1
-
-# standard widget types
-
#> bang button
#. -image ::toxy::img::empty -command .<.>
#. -bg pink -activebackground red -width 50 -height 50
@@ -263,6 +257,9 @@ set ::toxy::scale_isactive 1
#. @float .- set .#1
#. @vset ::toxy::scale_doset .- .#1
+# FIXME
+set ::toxy::scale_isactive 1
+
#> symbol entry
#. -bg pink -font .(helvetica 24.) -width 16
#. @symbol .- delete 0 end .: .- insert 0 .#1