Author: ben
Date: 2007-11-07 14:37:01 -0800 (Wed, 07 Nov 2007)
New Revision: 7187

Modified:
   openlaszlo/branches/paperpie/WEB-INF/lps/lfc/core/LzNode.lzs
   openlaszlo/branches/paperpie/WEB-INF/lps/lfc/views/LaszloView.lzs
   openlaszlo/branches/paperpie/docs/src/xsl/js2doc2dbk.xsl
Log:
Change 20071107-ben-j by [EMAIL PROTECTED] on 2007-11-07 14:30:54 PST
    in /Users/ben/src/svn/openlaszlo/branches/paperpie
    for http://svn.openlaszlo.org/openlaszlo/branches/paperpie

Summary: Further improvements to the attributes list category

New Features: Categories can be readonly, read/write, initialize-only, or 
FIXME. 

Documentation: 
js2doc2dbk is now capable of generating correct attributes list
information when the source code has correct markup. 

This change updates metadata in both LzNode.lzs and LaszloView.lzs
so that they produce some reasonable output (not yet perfect) in
combination with the new xsl for the attributes list. 

Tests:
ant clean build doc
look at http://localhost:8080/paperpie/docs/reference/LzView.html 
notice that mask and focusable are "readonly", align is "initialize-only",
and x and y are "read/write". 



Modified: openlaszlo/branches/paperpie/WEB-INF/lps/lfc/core/LzNode.lzs
===================================================================
--- openlaszlo/branches/paperpie/WEB-INF/lps/lfc/core/LzNode.lzs        
2007-11-07 22:35:04 UTC (rev 7186)
+++ openlaszlo/branches/paperpie/WEB-INF/lps/lfc/core/LzNode.lzs        
2007-11-07 22:37:01 UTC (rev 7187)
@@ -292,6 +292,7 @@
 /** @access private */
 var __LZdelegates = null;
 
+/** @access private */
 var defaultattrs = { $hasdefaultattrs : true };
 
 /**
@@ -303,6 +304,7 @@
  * @keywords read-only
  * @see initstage
  * @see oninit
+ * @access private
  */
 var isinited = false;
 
@@ -356,6 +358,7 @@
 var initstage = null;
 /** @access private */
 var $isstate = false;
+/** @access private */
 var doneClassRoot = false;
 
 /** Reference to the node that was passed as this
@@ -364,9 +367,11 @@
   * Its lexical parent is the tag that encloses it. Allow a null parent
   * so that nodes can be garbage collected when they are no longer needed.
   * See also, immediateparent.
+  * @modifiers readonly
   */
 var parent;
 
+/** @access private */
 var children = null;
 
 /** If this node is replicated due to data
@@ -452,11 +457,14 @@
 
 /** The depth of this node in the overall node hierarchy
   * @type Number
+  * @modifiers readonly
   */
 var nodeLevel;
 
 if ($debug) {
-    // The source locator table maps source locations to nodes
+    /** The source locator table maps source locations to nodes
+      * @access private
+      */ 
     var sourceLocatorTable = {};
 
     /**
@@ -788,6 +796,15 @@
   */
 static var _ignoreAttribute = {toString: function () {
                                         return '_ignoreAttribute'}};
+                                        
+/** 
+  * Overrides placement attribute (and defaultplacement in lexical parent). 
+  * See the LzNode.determinePlacement method. Defaults to false.
+  * @type Boolean
+  * @modifiers final
+  */
+var ignoreplacement;  
+                                        
 
 /**
   * Applies a dictionary of args
@@ -1057,6 +1074,7 @@
 }
 
 
+/** @access private */
 var setters ={
     name : "setName" ,
     id : "setID" ,

Modified: openlaszlo/branches/paperpie/WEB-INF/lps/lfc/views/LaszloView.lzs
===================================================================
--- openlaszlo/branches/paperpie/WEB-INF/lps/lfc/views/LaszloView.lzs   
2007-11-07 22:35:04 UTC (rev 7186)
+++ openlaszlo/branches/paperpie/WEB-INF/lps/lfc/views/LaszloView.lzs   
2007-11-07 22:37:01 UTC (rev 7187)
@@ -37,7 +37,22 @@
   * href="${tutorials}laszlo_basics.html">Laszlo Basics</a> and <a
   * href="${tutorials}views.html">Understanding Views</a>.  For a more
   * rigorous explanation of views see the<a href="${dguide}">Developer's 
Guide</a>, particularly the <a
-  * href="${dguide}views.html">views</a> chapter.</p>
+  * href="${dguide}views-tutorial.html">views</a> chapter.</p>
+  *   
+  * In addition to any events documented in the section below, these events 
are also available:
+  *
+  * <event>onmouseupoutside</event>: Sent when the mouse button comes up 
outside a
+  * view This event is only sent by views which are clickable
+  * after it went down over the view. This event is only sent by views which
+  * are clickable
+
+  * <event>onmousedragin</event>: Sent when the mouse button went down over 
the view
+  * and the button is still down when mouse rolls back inside the view.
+  * This event is only sent by views which are clickable
+
+  * <event>onmousedragout</event>: Sent when the mouse button went down over 
the view
+  * and the button is still down when mouse rolls outside the view.
+  * This event is only sent by views which are clickable  
   * 
   * @shortdesc The most basic viewable element.
   * @lzxname view
@@ -52,20 +67,7 @@
   * @initarg public String resource: A string denoting the library resource to 
use for
   * this view. The default is usually 'theEmptyResource'
   *
-  * In addition to any events documented in the section below, these events 
are also available:
-  *
-  * <event>onmouseupoutside</event>: Sent when the mouse button comes up 
outside a
-  * view This event is only sent by views which are clickable
-  * after it went down over the view. This event is only sent by views which
-  * are clickable
 
-  * <event>onmousedragin</event>: Sent when the mouse button went down over 
the view
-  * and the button is still down when mouse rolls back inside the view.
-  * This event is only sent by views which are clickable
-
-  * <event>onmousedragout</event>: Sent when the mouse button went down over 
the view
-  * and the button is still down when mouse rolls outside the view.
-  * This event is only sent by views which are clickable
   */
 class LzView extends LzNode {
 
@@ -76,8 +78,11 @@
   */
 static var tagname = 'view';
 
-/** Event called when this view adds a subview */
+/** Event called when this view adds a subview 
+  * @access private
+  */
 var onaddsubview = LzDeclaredEvent;
+/** @access private */
 var onbgcolor = LzDeclaredEvent;
 /** The onblur script is executed when an element loses focus either
   * by the pointing device or by tabbing navigation.
@@ -87,6 +92,7 @@
   * clicked over an element.
   */
 var onclick = LzDeclaredEvent;
+/** @access private */
 var onclickable = LzDeclaredEvent;
 /** The onfocus script is executed when an element receives focus
   * either by the pointing device or by tabbing navigation.
@@ -117,6 +123,7 @@
 
 /** <event>onerror</event>: Sent when there is an error loading the view's 
resource.
   * The argument sent with the event is the error string sent by the server.
+  * @access private
   */
 var onerror = LzDeclaredEvent;
 
@@ -138,7 +145,9 @@
   * moved onto an element.
   */
 var onmouseover = LzDeclaredEvent;
+/** @access private */
 var onmousetrackover = LzDeclaredEvent;
+/** @access private */
 var onmousetrackup = LzDeclaredEvent;
 
 /** The onmouseup script is executed when the pointing device button is
@@ -148,18 +157,27 @@
 /** Sent when a view changes its opacity */
 var onopacity = LzDeclaredEvent;
 
+/** @access private */
 var onplay = LzDeclaredEvent;
 
 /** Event called when this view removes a subview */
 var onremovesubview = LzDeclaredEvent;
 
+/** @access private */
 var onresource = LzDeclaredEvent;
+/** @access private */
 var onresourceheight = LzDeclaredEvent;
+/** @access private */
 var onresourcewidth = LzDeclaredEvent;
+/** @access private */
 var onrotation = LzDeclaredEvent;
+/** @access private */
 var onstop = LzDeclaredEvent;
+/** @access private */
 var ontotalframes = LzDeclaredEvent;
+/** @access private */
 var onunstretchedheight = LzDeclaredEvent;
+/** @access private */
 var onunstretchedwidth = LzDeclaredEvent;
 var onvisible = LzDeclaredEvent;
 /** @access private */
@@ -170,10 +188,12 @@
 
 /** event for changes to view's <attribute>x</attribute> property */
 var onx = LzDeclaredEvent;
+/** @access private */
 var onxoffset = LzDeclaredEvent;
 
 /** event for changes to view's <attribute>y</attribute> property */
 var ony = LzDeclaredEvent;
+/** @access private */
 var onyoffset = LzDeclaredEvent;
 
 /**
@@ -188,8 +208,10 @@
   * DOUBLE_CLICK_TIME attribute
   */
 var ondblclick = LzDeclaredEvent;
+/** @access private */
 var DOUBLE_CLICK_TIME = 500;
 
+/** @access private */
 var capabilities = LzSprite.prototype.capabilities;
 
 /**
@@ -311,6 +333,7 @@
 /** Reference to closest masked view in the hierarchy at or above
   * this one
   * @type LzView
+  * @keywords readonly
   */
 var mask;
 
@@ -318,6 +341,7 @@
   * See focus manager (LzFocus) for more details.
   * @type Boolean
   * @lzxtype boolean
+  * @keywords readonly
   */
 var focusable = false;
 
@@ -332,6 +356,7 @@
   * @lzxdefault "false"
   * @keywords final
   */
+var clip = false;
 setters.clip =  -1;
 setters.x ="setX"
 setters.y =  "setY";
@@ -350,6 +375,7 @@
   * @lzxdefault "left"
   * @keywords final
   */
+var align = "left"
 setters.align = "setAlign"
 
 /**
@@ -359,6 +385,7 @@
   * @lzxtype "top" | "middle" | "bottom" | constraint
   * @lzxdefault "top"
   */
+var valign = "top"
 setters.valign = "setValign"
 
 /** The URL from which to load the resource for this
@@ -368,6 +395,7 @@
   * @lzxtype expression
   * @access private
   */
+var source;
 setters.source = "setSource";
 /** The background color of the canvas. 
   * @lzxtype token
@@ -378,6 +406,7 @@
   * be loaded.
   * @type String
   */
+var resource;
 setters.resource =  "setResource";
 
 /** If true, this view intercepts click events; otherwise they are passed
@@ -390,6 +419,7 @@
   * @access private
   * @lzxtype string
   */
+var clickregion;   
 setters.clickregion =  "__LZsetClickRegion";
 /** The cursor to display when the mouse is over this view. Any
   * resource can be used as a cursor. This attribute can be set for
@@ -397,12 +427,14 @@
   * clickable to true.
   * @lzxtype token
   */
+var cursor;  
 setters.cursor =  "setCursor";
 /** A color to use to render object that appears inside this view,
   * which includes any vector or bitmap art in the view's resource
   * and any contained views.
   * @lzxtype color
   */
+var fgcolor;   
 setters.fgcolor =  "setColor";
 /** The font to use for any @c{&lt;text>} or @c{&lt;inputtext>} elements that
   * appear inside this view. Like all the font properties
@@ -413,6 +445,7 @@
   * for any of its subviews.
   * @lzxtype string
   */
+var font;  
 setters.font = "setFontName" ;
 
 /** The style to use to render text fields that appear inside of
@@ -440,36 +473,43 @@
   * the view is instantiated.
   * @lzxtype boolean
   */
+var play;   
 setters.play =   "setPlay";
 /** Show or hide the handcursor for this view, if clickable */
 setters.showhandcursor =   "setShowHandCursor";
 
+var layout; 
 setters.layout =   "setLayout";
 
 /** Activate/inactivate children for accessibility
   * @type Boolean
   * @lzxtype boolean
   */
+var aaactive; 
 setters.aaactive =   "setAAActive";
 /** Set accessibility name
   * @type String
   * @lzxtype string
   */
+var aaname;
 setters.aaname =   "setAAName";
 /** Set accessibility description
   * @type String
   * @lzxtype string
   */
+var aadescription; 
 setters.aadescription =   "setAADescription";
 /** Set accessibility tab order
   * @type Number
   * @lzxtype number
   */
+var aatabindex;   
 setters.aatabindex =   "setAATabIndex";
 /** Set accessibility silencing/unsilencing
   * @type Boolean
   * @lzxtype boolean
   */
+var aasilent; 
 setters.aasilent =   "setAASilent";
 
 __LZdelayedSetters.layout = "setLayout";
@@ -492,6 +532,7 @@
   */
 setters.yoffset = "setYOffset";
 
+/** @access private */
 var sprite = null;
 
 /** A value of true means that this view is shown. A
@@ -581,7 +622,7 @@
   * to scale a view by a percentage of its original size, or to determine the
   * aspect ratio for a view.
   * @type Number
-  * @modifiers readonly
+  * @keywords readonly
   */
 var unstretchedwidth =   0;
 /** If stretches is not set to none, the height
@@ -589,12 +630,12 @@
   * to scale a view by a percentage of its original size, or to determine the
   * aspect ratio for a view.
   * @type Number
-  * @modifiers readonly
+  * @keywords readonly
   */
 var unstretchedheight =   0;
 /** An array of the subviews that are children of this
   * view. This is initialized to an empty array for views that have no 
subviews.
-  * @modifiers readonly
+  * @keywords readonly
   */
 var subviews =   [];
 /** @access private */
@@ -630,7 +671,7 @@
 
 /** The total number of frames for this view's resource.
   * @type Number
-  * @modifiers readonly
+  * @keywords readonly
   */
 var totalframes =   0;
 /** If this view has a multi-frame resource, this allows setting which
@@ -649,30 +690,35 @@
 var frame =   0;
 setters.frame =   "setResourceNumber";
 
-/** @keywords deprecated */
+/** @keywords deprecated 
+  * @access private 
+  */
 var loadperc =   0;
 /** For views whose resource is loaded at runtime,
   * the ratio of the loaded frames to the total frames. This is a number 
between
   * zero and 1.
   * @type Number
-  * @modifiers readonly
+  * @keywords readonly
   */
 var framesloadratio =   0;
 /** For views whose resource is loaded at runtime,
   * ratio of the loaded bytes to the total bytes. This is a number between 
   * zero and 1.
   * @type Number
+  * @keywords readonly
   */
 var loadratio =   0;
 
 /** If true, then setWidth() has been called on this
   * view, and the view will not be sized to its contents. 
   * @type Boolean
+  * @keywords readonly  
   */
 var hassetheight = false;
 /** If true, then setHeight() has been called on this
   * view, and the view will not be sized to its contents. 
   * @type Boolean
+  * @keywords readonly  
   */
 var hassetwidth = false;
 
@@ -688,9 +734,11 @@
 // @access private
 //
 //============================================================================
-
+/** @access private */
 var addedToParent = null;
+/** @access private */
 var checkPlayStatusDel = null;
+/** @access private */
 var masked = false;
 
 /**
@@ -698,9 +746,10 @@
   * animation. This may be turned off to make the view snap to a
   * pixel boundary by setting pixellock to true.
   * @lzxtype booleanLiteral
+  * @modifiers final
   */
 var pixellock = null;
-
+/** @access private */
 var setButtonSize = null;
 
 var clickable = false;
@@ -709,6 +758,7 @@
   * @lzxtype boolean
   */
 var showhandcursor = null;
+/** @access private */
 var updatePlayDel = null;
 /**
   * A resource that is presented in the background of this view.  The
@@ -722,11 +772,11 @@
 var resource = null;
 
 /**
-  * @modifiers readonly
+  * @keywords readonly
   */
 var resourcewidth = null;
 /**
-  * @modifiers readonly
+  * @keywords readonly
   */
 var resourceheight = null;
 
@@ -2513,6 +2563,7 @@
 
 /** blurring is true if the view is in the process of losing focus.
   * @type Boolean
+  * @access private 
   */
 var blurring = false;
 

Modified: openlaszlo/branches/paperpie/docs/src/xsl/js2doc2dbk.xsl
===================================================================
--- openlaszlo/branches/paperpie/docs/src/xsl/js2doc2dbk.xsl    2007-11-07 
22:35:04 UTC (rev 7186)
+++ openlaszlo/branches/paperpie/docs/src/xsl/js2doc2dbk.xsl    2007-11-07 
22:37:01 UTC (rev 7187)
@@ -22,6 +22,10 @@
 <!ENTITY classvalue     '(class|function)'>
 <!ENTITY privateslot    '(@name="prototype" or @name="__ivars__" or 
@name="dependencies" or @name="setters" or @name="tagname")'>
 
+<!ENTITY readonly       '(@modifiers="readonly" or @modifiers="read-only" or 
@keywords="read-only" or @keywords="readonly")'>
+<!ENTITY final          '(@modifiers="final" or @keywords="final")'>
+<!ENTITY unwritable     '(@modifiers="readonly" or @modifiers="read-only" or 
@keywords="read-only" or @keywords="readonly" or @modifiers="final" or 
@keywords="final")'>
+
 ]>
         
 <xsl:stylesheet version="1.0"
@@ -1245,13 +1249,14 @@
         -->
       <entry>
         <xsl:choose>
-          <xsl:when test="@modifiers = 'final'">initialize-only</xsl:when>
-          <xsl:when test="$isinstancevar and not(@modifiers = 
'final')">read/write</xsl:when>
-          <xsl:when test="not($isinstancevar) and $issetter">(TODO: declare 
attribute)</xsl:when>          
-          <xsl:otherwise>(FIXME: otherwise)</xsl:otherwise>
-        </xsl:choose>
-        
-        <xsl:if test="$isinitarg"> (initarg) </xsl:if>                         
            
+          <xsl:when test="&final; and 
$isinstancevar">initialize-only</xsl:when>
+          <xsl:when test="&readonly;">readonly</xsl:when>          
+          <xsl:when test="not(&unwritable;) and 
$isinstancevar">read/write</xsl:when>
+          <xsl:when test="not(&unwritable;) and not($isinstancevar) and 
not($issetter)">(FIXME: declare attribute (non-setter))</xsl:when>
+          <xsl:when test="not(&unwritable;) and not($isinstancevar) and 
$issetter">(FIXME: declare attribute (setter))</xsl:when>          
+          <xsl:otherwise>(FIXME: otherwise) <xsl:if 
test="&final;">final</xsl:if> <xsl:if 
test="&readonly;">readonly</xsl:if></xsl:otherwise>
+        </xsl:choose>        
+        <xsl:if test="$isinitarg"> (FIXME: initarg) </xsl:if>                  
                   
       </entry>
     </row>
     <xsl:if test="doc/text">  


_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Reply via email to