nodes.cls source

00001 /*----------------------------------------------------------------------------*/
00002 /*                                                                            */
00003 /*   Copyright (c) 2004-2009 William  Data  Systems Ltd. and Geoff Stevens.   */
00004 /*   All rights reserved.                                                     */
00005 /*                                                                            */
00006 /*   This program and the  accompanying  materials are made available under   */
00007 /*   the terms of the  Common  Public  License  v1.0 which accompanies this   */
00008 /*   distribution. A  copy  is  also  available  at  the following address:   */
00009 /*   http://www.opensource.org/licenses/cpl1.0.php                            */
00010 /*                                                                            */
00011 /*   Redistribution and use in  source  and  binary  forms, with or without   */
00012 /*   modification, are  permitted  provided  that  the following conditions   */
00013 /*   are met:                                                                 */
00014 /*                                                                            */
00015 /*   Redistributions  of  source  code  must  retain  the  above  copyright   */
00016 /*   notice, this list of conditions and the following disclaimer.            */
00017 /*                                                                            */
00018 /*   Redistributions in  binary  form  must  reproduce  the above copyright   */
00019 /*   notice, this list of  conditions  and  the following disclaimer in the   */
00020 /*   documentation and/or other materials provided with the distribution.     */
00021 /*                                                                            */
00022 /*   Neither the name or trademarks  of  William Data Systems nor the names   */
00023 /*   of its  contributors  may  be  used  to  endorse  or  promote products   */
00024 /*   derived from this software without specific prior written permission.    */
00025 /*                                                                            */
00026 /*   DISCLAIMER                                                               */
00027 /*                                                                            */
00028 /*   THIS SOFTWARE IS PROVIDED  BY  THE  COPYRIGHT HOLDERS AND CONTRIBUTORS   */
00029 /*   "AS IS" AND  ANY  EXPRESS  OR  IMPLIED  WARRANTIES, INCLUDING, BUT NOT   */
00030 /*   LIMITED TO, THE IMPLIED WARRANTIES  OF MERCHANTABILITY AND FITNESS FOR   */
00031 /*   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN  NO EVENT SHALL THE COPYRIGHT   */
00032 /*   OWNER OR CONTRIBUTORS BE LIABLE  FOR ANY DIRECT, INDIRECT, INCIDENTAL,   */
00033 /*   SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL  DAMAGES  (INCLUDING,  BUT NOT   */
00034 /*   LIMITED TO, PROCUREMENT OF SUBSTITUTE  GOODS OR SERVICES; LOSS OF USE,   */
00035 /*   DATA, OR PROFITS; OR BUSINESS  INTERRUPTION) HOWEVER CAUSED AND ON ANY   */
00036 /*   THEORY OF LIABILITY, WHETHER  IN  CONTRACT,  STRICT LIABILITY, OR TORT   */
00037 /*   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN  ANY WAY OUT OF THE USE   */
00038 /*   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.     */
00039 /*                                                                            */
00040 /*----------------------------------------------------------------------------*/
00041 -- static class of node image and other image data
00042 -- provides a mapping between the entities referred to
00043 -- in the rexxliterate code and binary entities on disk
00044 --
00045 -- some HTML is mixed in for convenience, but try to
00046 -- keep it related to the images
00047 -- 
00048 -- objects that are scripted nodes on the tree need a
00049 -- folder id substitution supplied by the caller
00050  
00051 ::CLASS nodes PUBLIC
00052 ::ATTRIBUTE vertline  CLASS  -- tree vertical line
00053 ::ATTRIBUTE blankline CLASS  -- tree empty line
00054 ::ATTRIBUTE lastnode  CLASS  -- tree last simple node (L shape)
00055 ::ATTRIBUTE node      CLASS  -- tree simple node (T rotated -90)
00056 ::ATTRIBUTE doc       CLASS  -- tree document icon
00057  
00058 ::ATTRIBUTE rproc              CLASS -- procedure icon
00059 ::ATTRIBUTE rlabe              CLASS -- label icon
00060 ::ATTRIBUTE rrequ              CLASS -- requires icon
00061 ::ATTRIBUTE rrout              CLASS -- routine icon
00062 ::ATTRIBUTE rroutp             CLASS -- routine private icon
00063 ::ATTRIBUTE ropti              CLASS -- options icon
00064 ::ATTRIBUTE rclas              CLASS -- class icon
00065 ::ATTRIBUTE rclasp             CLASS -- class private icon
00066 ::ATTRIBUTE rmeth              CLASS -- method icon
00067 ::ATTRIBUTE rmetha             CLASS -- method abstract icon
00068 ::ATTRIBUTE rmethu             CLASS -- method unguarded icon
00069 ::ATTRIBUTE rmethua            CLASS -- method unguarded abstract icon
00070 ::ATTRIBUTE rmethc             CLASS -- method class icon
00071 ::ATTRIBUTE rmethca            CLASS -- method class abstract icon
00072 ::ATTRIBUTE rmethcu            CLASS -- method class unguarded icon
00073 ::ATTRIBUTE rmethcua           CLASS -- method class unguarded abstract icon
00074 ::ATTRIBUTE rmethp             CLASS -- method private icon
00075 ::ATTRIBUTE rmethpa            CLASS -- method private abstract icon
00076 ::ATTRIBUTE rmethpu            CLASS -- method private unguarded icon
00077 ::ATTRIBUTE rmethpua           CLASS -- method private unguarded abstract icon
00078 ::ATTRIBUTE rmethpc            CLASS -- method private class icon
00079 ::ATTRIBUTE rmethpca           CLASS -- method private class abstract icon
00080 ::ATTRIBUTE rmethpcu           CLASS -- method private class unguarded icon
00081 ::ATTRIBUTE rmethpcua          CLASS -- method private class unguarded abstract icon
00082 ::ATTRIBUTE rattr              CLASS -- attribute icon
00083 ::ATTRIBUTE rattru             CLASS -- attribute unguarded icon
00084 ::ATTRIBUTE rattrc             CLASS -- attribute class icon
00085 ::ATTRIBUTE rattrcu            CLASS -- attribute class unguarded icon
00086 ::ATTRIBUTE rattrp             CLASS -- attribute private icon
00087 ::ATTRIBUTE rattrpu            CLASS -- attribute private unguarded icon
00088 ::ATTRIBUTE rattrpc            CLASS -- attribute private class icon
00089 ::ATTRIBUTE rattrpcu           CLASS -- attribute private class unguarded icon
00090 ::ATTRIBUTE rcons              CLASS -- constant icon
00091 ::ATTRIBUTE rcrex              CLASS -- crexx icon
00092 ::ATTRIBUTE rorex              CLASS -- orexx icon
00093  
00094 ::ATTRIBUTE rsproc             CLASS -- procedure icon
00095 ::ATTRIBUTE rslabe             CLASS -- label icon
00096 ::ATTRIBUTE rsrequ             CLASS -- requires icon
00097 ::ATTRIBUTE rsrout             CLASS -- routine icon
00098 ::ATTRIBUTE rsroutp            CLASS -- routine private icon
00099 ::ATTRIBUTE rsopti             CLASS -- options icon
00100 ::ATTRIBUTE rsclas             CLASS -- class icon
00101 ::ATTRIBUTE rsclasp            CLASS -- class private icon
00102 ::ATTRIBUTE rsmeth             CLASS -- method icon
00103 ::ATTRIBUTE rsmetha            CLASS -- method abstract icon
00104 ::ATTRIBUTE rsmethu            CLASS -- method unguarded icon
00105 ::ATTRIBUTE rsmethua           CLASS -- method unguarded abstract icon
00106 ::ATTRIBUTE rsmethc            CLASS -- method class icon
00107 ::ATTRIBUTE rsmethca           CLASS -- method class abstract icon
00108 ::ATTRIBUTE rsmethcu           CLASS -- method class unguarded icon
00109 ::ATTRIBUTE rsmethcua          CLASS -- method class unguarded abstract icon
00110 ::ATTRIBUTE rsmethp            CLASS -- method private icon
00111 ::ATTRIBUTE rsmethpa           CLASS -- method private abstract icon
00112 ::ATTRIBUTE rsmethpu           CLASS -- method private unguarded icon
00113 ::ATTRIBUTE rsmethpua          CLASS -- method private unguarded abstract icon
00114 ::ATTRIBUTE rsmethpc           CLASS -- method private class icon
00115 ::ATTRIBUTE rsmethpca          CLASS -- method private class abstract icon
00116 ::ATTRIBUTE rsmethpcu          CLASS -- method private class unguarded icon
00117 ::ATTRIBUTE rsmethpcua         CLASS -- method private class unguarded abstract icon
00118 ::ATTRIBUTE rsattr             CLASS -- attribute icon
00119 ::ATTRIBUTE rsattru            CLASS -- attribute unguarded icon
00120 ::ATTRIBUTE rsattrc            CLASS -- attribute class icon
00121 ::ATTRIBUTE rsattrcu           CLASS -- attribute class unguarded icon
00122 ::ATTRIBUTE rsattrp            CLASS -- attribute private icon
00123 ::ATTRIBUTE rsattrpu           CLASS -- attribute private unguarded icon
00124 ::ATTRIBUTE rsattrpc           CLASS -- attribute private class icon
00125 ::ATTRIBUTE rsattrpcu          CLASS -- attribute private class unguarded icon
00126 ::ATTRIBUTE rscons             CLASS -- constant icon
00127 ::ATTRIBUTE rscrex             CLASS -- crexx icon
00128 ::ATTRIBUTE rsorex             CLASS -- orexx icon
00129  
00130 ::ATTRIBUTE prodimg    CLASS  -- doc product image icon
00131 ::ATTRIBUTE prodssheet  CLASS  -- product sylesheet
00132  
00133 ::METHOD init CLASS
00134   expose opennode opennodelast closednode closednodelast oorx clrx folderopen folderclosed rclass rclassp
00135  
00136   -- product stylesheet
00137   self~prodssheet = '<link rel="stylesheet" href="rexxliterate.css"/>'
00138  
00139   -- product image
00140   self~prodimg = '<img border="0" align="middle" alt="rexxliterate" src="rexxliterate.png" />'
00141  
00142   -- tree  static feature icons
00143   self~rproc = '<img src="procedure_22x22.png" width=22 height=22 />'
00144   self~rlabe = '<img src="label_22x22.png" width=22 height=22 />'
00145   self~rrequ = '<img src="requires_22x22.png" width=22 height=22 />'
00146   self~rrout = '<img src="routine_22x22.png" width=22 height=22 />'
00147   self~rroutp = '<img src="routine_private_22x22.png" width=22 height=22 />'
00148   self~ropti = '<img src="options_22x22.png" width=22 height=22 />'
00149   self~rclas = '<img src="class_22x22.png" width=22 height=22 onclick="toggleFolder(''folder$$$'', this)"/>'
00150   self~rclasp = '<img src="class_private_22x22.png" width=22 height=22 onclick="toggleFolder(''folder$$$'', this)"/>'
00151   self~rmeth = '<img src="method_22x22.png" width=22 height=22 />'
00152   self~rmetha = '<img src="method_abstract_22x22.png" width=22 height=22 />'
00153   self~rmethu = '<img src="method_unguarded_22x22.png" width=22 height=22 />'
00154   self~rmethua = '<img src="method_unguarded_abstract_22x22.png" width=22 height=22 />'
00155   self~rmethc = '<img src="method_class_22x22.png" width=22 height=22 />'
00156   self~rmethca = '<img src="method_class_abstract_22x22.png" width=22 height=22 />'
00157   self~rmethcu = '<img src="method_class_unguarded_22x22.png" width=22 height=22 />'
00158   self~rmethcua = '<img src="method_class_unguarded_abstract_22x22.png" width=22 height=22 />'
00159   self~rmethp = '<img src="method_private_22x22.png" width=22 height=22 />'
00160   self~rmethpa = '<img src="method_private_abstract_22x22.png" width=22 height=22 />'
00161   self~rmethpu = '<img src="method_private_unguarded_22x22.png" width=22 height=22 />'
00162   self~rmethpua = '<img src="method_private_unguarded_abstract_22x22.png" width=22 height=22 />'
00163   self~rmethpc = '<img src="method_private_class_22x22.png" width=22 height=22 />'
00164   self~rmethpca = '<img src="method_private_class_abstract_22x22.png" width=22 height=22 />'
00165   self~rmethpcu = '<img src="method_private_class_unguarded_22x22.png" width=22 height=22 />'
00166   self~rmethpcua = '<img src="method_private_class_unguarded_abstract_22x22.png" width=22 height=22 />'
00167   self~rattr = '<img src="attribute_22x22.png" width=22 height=22 />'
00168   self~rattru = '<img src="attribute_unguarded_22x22.png" width=22 height=22 />'
00169   self~rattrc = '<img src="attribute_class_22x22.png" width=22 height=22 />'
00170   self~rattrcu = '<img src="attribute_class_unguarded_22x22.png" width=22 height=22 />'
00171   self~rattrp = '<img src="attribute_private_22x22.png" width=22 height=22 />'
00172   self~rattrpu = '<img src="attribute_private_unguarded_22x22.png" width=22 height=22 />'
00173   self~rattrpc = '<img src="attribute_private_class_22x22.png" width=22 height=22 />'
00174   self~rattrpcu = '<img src="attribute_private_class_unguarded_22x22.png" width=22 height=22 />'
00175   self~rcons = '<img src="constant_22x22.png" width=22 height=22 />'
00176   self~rcrex = '<img src="crexx_22x22.png" width=22 height=22 onclick="toggleFolder(''folder$$$'', this)"/>'
00177   self~rorex = '<img src="orexx_22x22.png" width=22 height=22 onclick="toggleFolder(''folder$$$'', this)"/>'
00178  
00179   -- small icons for inline doc use
00180   self~rsproc = '<img src="procedure_16x16.png" width=16 height=16 />'
00181   self~rslabe = '<img src="label_16x16.png" width=16 height=16 />'
00182   self~rsrequ = '<img src="requires_16x16.png" width=16 height=16 />'
00183   self~rsrout = '<img src="routine_16x16.png" width=16 height=16 />'
00184   self~rsroutp = '<img src="routine_private_16x16.png" width=16 height=16 />'
00185   self~rsopti = '<img src="options_16x16.png" width=16 height=16 />'
00186   self~rsclas = '<img src="class_16x16.png" width=16 height=16 />'
00187   self~rsclasp = '<img src="class_private_16x16.png" width=16 height=16 />'
00188   self~rsmeth = '<img src="method_16x16.png" width=16 height=16 />'
00189   self~rsmetha = '<img src="method_abstract_16x16.png" width=16 height=16 />'
00190   self~rsmethu = '<img src="method_unguarded_16x16.png" width=16 height=16 />'
00191   self~rsmethua = '<img src="method_unguarded_abstract_16x16.png" width=16 height=16 />'
00192   self~rsmethc = '<img src="method_class_16x16.png" width=16 height=16 />'
00193   self~rsmethca = '<img src="method_class_abstract_16x16.png" width=16 height=16 />'
00194   self~rsmethcu = '<img src="method_class_unguarded_16x16.png" width=16 height=16 />'
00195   self~rsmethcua = '<img src="method_class_unguarded_abstract_16x16.png" width=16 height=16 />'
00196   self~rsmethp = '<img src="method_private_16x16.png" width=16 height=16 />'
00197   self~rsmethpa = '<img src="method_private_abstract_16x16.png" width=16 height=16 />'
00198   self~rsmethpu = '<img src="method_private_unguarded_16x16.png" width=16 height=16 />'
00199   self~rsmethpua = '<img src="method_private_unguarded_abstract_16x16.png" width=16 height=16 />'
00200   self~rsmethpc = '<img src="method_private_class_16x16.png" width=16 height=16 />'
00201   self~rsmethpca = '<img src="method_private_class_abstract_16x16.png" width=16 height=16 />'
00202   self~rsmethpcu = '<img src="method_private_class_unguarded_16x16.png" width=16 height=16 />'
00203   self~rsmethpcua = '<img src="method_private_class_unguarded_abstract_16x16.png" width=16 height=16 />'
00204   self~rsattr = '<img src="attribute_16x16.png" width=16 height=16 />'
00205   self~rsattru = '<img src="attribute_unguarded_16x16.png" width=16 height=16 />'
00206   self~rsattrc = '<img src="attribute_class_16x16.png" width=16 height=16 />'
00207   self~rsattrcu = '<img src="attribute_class_unguarded_16x16.png" width=16 height=16 />'
00208   self~rsattrp = '<img src="attribute_private_16x16.png" width=16 height=16 />'
00209   self~rsattrpu = '<img src="attribute_private_unguarded_16x16.png" width=16 height=16 />'
00210   self~rsattrpc = '<img src="attribute_private_class_16x16.png" width=16 height=16 />'
00211   self~rsattrpcu = '<img src="attribute_private_class_unguarded_16x16.png" width=16 height=16 />'
00212   self~rscons = '<img src="constant_16x16.png" width=16 height=16 />'
00213   self~rscrex = '<img src="crexx_22x22.png" width=16 height=16 />'
00214   self~rsorex = '<img src="orexx_22x22.png" width=16 height=16 />'
00215  
00216   -- tree nodes
00217   self~blankline = '<img src="ftv2blank.png" alt="|" width=16 height=22 />'
00218   self~vertline = '<img src="ftv2vertline.png" alt="|" width=16 height=22 />'
00219   self~lastnode = '<img src="ftv2lastnode.png" alt="o" width=16 height=22 />'
00220   self~node = '<img src="ftv2node.png" alt="o" width=16 height=22 />'
00221   self~doc = '<img src="ftv2doc.png" alt="*" width=24 height=22 />'
00222  
00223   -- dynamic tree program and feature icons will toggle folder open/closed
00224   opennode = '<img src="ftv2mnode.png" alt="o" width=16 height=22 onclick="toggleFolder(''folder$$$'', this)"/>'
00225   opennodelast = '<img src="ftv2mnode.png" alt="o" width=16 height=22 onclick="toggleFolder(''folder$$$'', this)"/>'
00226   closednode = '<img src="ftv2pnode.png" alt="o" width=16 height=22 onclick="toggleFolder(''folder$$$'', this)"/>'
00227   closednodelast =  '<img src="ftv2plastnode.png" alt="o" width=16 height=22 onclick="toggleFolder(''folder$$$'', this)"/>'
00228  
00229   folderopen = '<img src="folder_22x22.png" alt="+" width=22 height=22 hspace="2" onclick="toggleFolder(''folder$$$'', this)"/>'
00230   folderclosed = '<img src="folder_closed_22x22.png" alt="+" width=22 height=22 hspace="2" onclick="toggleFolder(''folder$$$'', this)"/>'
00231  
00232 -- return a tree open node with folderid substituted
00233 -- @param folderid - the folderid to subsitiute
00234 ::METHOD opennode CLASS
00235   expose opennode
00236   use strict arg folderid
00237   return opennode~changeStr('$$$', folderid)
00238  
00239 -- return a tree last open node with folderid substituted
00240 -- @param folderid - the folderid to subsitiute
00241 ::METHOD opennodelast CLASS
00242   expose opennodelast
00243   use strict arg folderid
00244   return opennodelast~changeStr('$$$', folderid)
00245  
00246 -- return a tree closed node with folderid substituted
00247 -- @param folderid - the folderid to subsitiute
00248 ::METHOD closednode CLASS
00249   expose closednode
00250   use strict arg folderid
00251   return closednode~changeStr('$$$', folderid)
00252  
00253 -- return a tree last closed node with folderid substituted
00254 -- @param folderid - the folderid to subsitiute
00255 ::METHOD closednodelast CLASS
00256   expose closednodelast
00257   use strict arg folderid
00258   return closednodelast~changeStr('$$$', folderid)
00259  
00260 -- return an oorexx program icon with folderid substituted
00261 -- @param folderid - the folderid to subsitiute
00262 ::METHOD oorx CLASS
00263   use strict arg folderid
00264   return self~rorex~changeStr('$$$', folderid)
00265  
00266 -- return a classic rexx program icon with folderid substituted
00267 -- @param folderid - the folderid to subsitiute
00268 ::METHOD clrx CLASS
00269   use strict arg folderid
00270   return self~rcrex~changeStr('$$$', folderid)
00271  
00272 -- return an open folder icon with folderid substituted
00273 -- @param folderid - the folderid to subsitiute
00274 ::METHOD folderopen CLASS
00275   expose folderopen
00276   use strict arg folderid
00277   return folderopen~changeStr('$$$', folderid)
00278  
00279 -- return a closed folder icon with folderid substituted
00280 -- @param folderid - the folderid to subsitiute
00281 ::METHOD folderclosed CLASS
00282   expose folderclosed
00283   use strict arg folderid
00284   return folderclosed~changeStr('$$$', folderid)
00285  
00286 -- return a class icon with folderid substituted
00287 -- @param folderid - the folderid to subsitiute
00288 ::METHOD rclass CLASS
00289   expose rclas
00290   use strict arg folderid
00291   return rclas~changeStr('$$$', folderid)
00292  
00293 -- return a private class icon with folderid substituted
00294 -- @param folderid - the folderid to subsitiute
00295 ::METHOD rclassp CLASS
00296   expose rclasp
00297   use strict arg folderid
00298   return rclasp~changeStr('$$$', folderid)
00299  

Get RexxLiterate at SourceForge.net. Fast, secure and Free Open Source software downloads
Generated on 31 Aug 2010 05:20:30 for RexxLiterate by rexxliterate  0.0.1