Revision: 4351
          http://vexi.svn.sourceforge.net/vexi/?rev=4351&view=rev
Author:   clrg
Date:     2012-02-03 02:03:33 +0000 (Fri, 03 Feb 2012)
Log Message:
-----------
Feature: custom delay times for tooltips - tooltipDelay(ms)

Modified Paths:
--------------
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/role/tooltipable.t
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/role/tooltipmanager.t

Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/role/tooltipable.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/role/tooltipable.t        
2012-02-03 01:34:41 UTC (rev 4350)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/role/tooltipable.t        
2012-02-03 02:03:33 UTC (rev 4351)
@@ -1,12 +1,12 @@
-<!-- Copyright 2009 - see COPYING for details [LGPL] -->
+<!-- Copyright 2012 - see COPYING for details [LGPL] -->
 
-<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta">
-    <meta:doc>
-        <author>Charles Goodwin</author>
-    </meta:doc>
-    
+<vexi xmlns:ui="vexi://ui">
+
     <ui:box>
         
+        // time in ms before opening tooltip (default:1000)
+        thisbox.tooltipDelay;
+        
         // template entry point - all other traps are assigned
         // when a tooltip is assigned in order to make the impact
         // of preapplying tooltip as minimal as possible

Modified: 
trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/role/tooltipmanager.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/role/tooltipmanager.t     
2012-02-03 01:34:41 UTC (rev 4350)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/role/tooltipmanager.t     
2012-02-03 02:03:33 UTC (rev 4351)
@@ -1,10 +1,8 @@
-<!-- Copyright 2011 - see COPYING for details [LGPL] -->
+<!-- Copyright 2012 - see COPYING for details [LGPL] -->
 
-<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="vexi"
-    xmlns:role="org.vexi.lib.role">
-    <meta:doc>
-        <author>Charles Goodwin</author>
-    </meta:doc>
+<vexi xmlns:ui="vexi://ui"
+    xmlns:role="org.vexi.lib.role"
+    xmlns="vexi">
     
     <role:popupable />
     <ui:box blockPress="false" popgroup="tooltip" v_popbox=":$tooltip">
@@ -65,7 +63,8 @@
             // service while there's a valid current request
             do {
                 newTipReq = false;
-                vexi.thread.sleep(1000);
+                var delay = curTipReq?.tooltipDelay;
+                vexi.thread.sleep(delay?:1000);
             } while (newTipReq);
             
             // popup or move on
@@ -111,7 +110,7 @@
         /** clean up on popdown */
         thisbox.popdown ++= function(v) {
             if (!curTipReq) {
-                return true;
+                return;
             }
             curTipReq.v_active_tooltip = false;
             curTipReq.surface --= surfaceWrite;
@@ -138,7 +137,10 @@
                 popup = true;
             
             } else {
-                startPopTooltipThread();
+                var delay = curTipReq.tooltipDelay;
+                if (delay==null or delay>0)
+                    startPopTooltipThread();
+                else popup = true;
             }
         }
         

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to