Revision: 4397 http://vexi.svn.sourceforge.net/vexi/?rev=4397&view=rev Author: clrg Date: 2012-06-01 03:37:54 +0000 (Fri, 01 Jun 2012) Log Message: ----------- Test for events
Added Paths: ----------- trunk/org.vexi-vexi.widgets/src_poke/visualtest/events.t Added: trunk/org.vexi-vexi.widgets/src_poke/visualtest/events.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_poke/visualtest/events.t (rev 0) +++ trunk/org.vexi-vexi.widgets/src_poke/visualtest/events.t 2012-06-01 03:37:54 UTC (rev 4397) @@ -0,0 +1,67 @@ +<vexi xmlns:ui="vexi://ui" + xmlns="vexi.widget"> + + <surface /> + <ui:box orient="vertical"> + <ui:box vshrink="true"> + <check id="block" text="Block" /> + <option id="select" enabled="false"> + <item text="Outer" selected="true" /> + <item text="Mid" /> + <item text="Inner" /> + </option> + <option id="event" enabled="false"> + <item text="_Press1" selected="true" /> + <item text="Press1" /> + </option> + </ui:box> + <ui:box id="outer" name="Outer" text="Press order"> + <ui:box id="mid" name="Mid"> + <ui:box id="inner" name="Inner" /> + </ui:box> + </ui:box> + + _Press1 ++= function(v) { vexi.trace("--------------------"); cascade = v; } + + const printPress = function(v) { cascade = v; vexi.trace(trapee.name+"."+trapname); } + $outer._Press1 ++= printPress; + $outer.Press1 ++= printPress; + $mid._Press1 ++= printPress; + $mid.Press1 ++= printPress; + $inner._Press1 ++= printPress; + $inner_Press1 ++= printPress; + + const blockPress = function(v) { return; } + + var prevBox; + var prevTrapname; + + const setupPress = function(v) { + cascade = v; + if (prevBox and prevTrapname) { + prevBox[prevTrapname] --= blockPress; + prevBox = null; + prevTrapname = null; + } + var block = $block.selected; + $select.enabled = block; + $event.enabled = block; + if (block) { + switch ($select.value) { + case "Outer": prevBox = $outer; break; + case "Mid": prevBox = $mid; break; + case "Inner": prevBox = $inner; break; + } + prevTrapname = $event.value; + prevBox[prevTrapname] ++= blockPress; + } + } + + $block.selected ++= setupPress; + $select.value ++= setupPress; + $event.value ++= setupPress; + + vexi.ui.frame = thisbox; + + </ui:box> +</vexi> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn