Annotation of doc/rat/rat.txt, revision 1.1
1.1 ! albertel 1: Scott Harrison's RAT Notes
! 2: (written in RAN format.. "ridiculous ascii notation")
! 3: 09/27/1999
! 4:
! 5: Start
! 6:
! 7: Who is using RAT?
! 8: Instructor/Student/Guest
! 9: Domain
! 10:
! 11: file names
! 12: [domain]_[user]_[resource].rat
! 13:
! 14: to do:
! 15: * implement fancy resource rat widget
! 16:
! 17:
! 18: * implement fancy resource linking information interface
! 19: widget
! 20:
! 21:
! 22: * implement resources on rat
! 23:
! 24:
! 25:
! 26: Program documentation
! 27: GLOBAL VARIABLES
! 28:
! 29: row array maps row id to display (example, d=row[i] where 'd' is display and 'i' is id)
! 30: used by insertrow, findrow, horizontal, joinres, draw, main
! 31:
! 32: maxrow scalar number of elements-2 in row array (the last element number in the array, -1 for empty array)
! 33: used by insertrow, findrow, horizontal, joinres, draw
! 34:
! 35: col array maps col id to display (example, d=row[i] where 'd' is display and 'i' is id)
! 36: used by insertrow, insertcol, findcol, maprow, comingthru, horizontal, joinres, drawrow, draw, main
! 37:
! 38: maxcol scalar number of elements-2 in col array (the last element number in the array, -1 for empty array)
! 39: used by insertcol, findcol, maprow, comingthru, insertport, drawrow, draw
! 40:
! 41: colmap array in order of display ids which object is in which column
! 42: used by maprow, comingthru, insertport, horizontal, drawrow, draw,
! 43:
! 44: colmap2 array temporary
! 45: used by drawrow
! 46: colmap3 array temporary
! 47: used by drawrow
! 48: colmap4 array temporary
! 49: used by drawrow
! 50: colmap5 array temporary
! 51: used by drawrow
! 52:
! 53: obj array appended array with drawing objects (which are blocks, verticals, horizontals, and conditions), never emptied
! 54: used by insertrow, maprow, insertport, addobj, horizontal, joinres, drawrow, draw, main
! 55:
! 56: maxobj scalar number of values in obj array-2 (last element, -1 for empty)
! 57: used by NOTHING
! 58:
! 59: rowcont array object ids in a row
! 60: used by insertrow, maprow, addobj, drawrow, draw, main
! 61:
! 62: rowtype array row ids to type
! 63: used by insertrow, drawrow, main
! 64:
! 65: coltype array col ids to type
! 66: used by insertcol, insertport, drawrow, main
! 67:
! 68: rrow array display to id (reverse hash of row)
! 69: used by draw
! 70:
! 71: rcol array display to id (reverse hash of row)
! 72: used by drawrow, draw
! 73:
! 74: cw array column width (temporary)
! 75: used by drawcell, draw
! 76:
! 77: rh array row height (temporary)
! 78: used by drawrow, draw,
! 79:
! 80: data1,data2,data3,data4 array used to buffer memory so that javascript does not CRASH!
! 81: used by drawrow, insertrow, insertport
! 82:
! 83:
! 84:
! 85: functions
! 86:
! 87: main - invokes RAT
! 88: \
! 89: \
! 90: initializes rows, with resources labelled 5, 4, 3, and 7
! 91: insert thirteen columns from the left side
! 92: perform 3 testing swaps
! 93: initialize maxrow
! 94: define starting objects (blocks: 3,4,5,7)
! 95: create 12 joinings between these resources! (joinres ... see below)
! 96: draw in debugging editting mode!
! 97: \ b&rowID&colID:inObj:outObj:outCond&...
! 98: \ h&rowID&incolID:outcolID&inObj:outObj&inupdown:outupdown
! 99: \ v&colID&inObj:outObj&updown
! 100: \ simple javascript /
! 101: \ / /
! 102: open, configure, and clear a debugging javascript window/ /
! 103: | |
! 104: go through all objects and display object information -----------------------
! 105: |
! 106: write out the value of col array ------- counting col ids from 0 to maxcol, print out a comma separated list of display locations
! 107: |
! 108: write out the value of row array ------- counting row ids from 0 to maxrow, print out a comma separated list of display locations
! 109: |
! 110: find all the display rows (findrow) from 0 to last row, ------------------------------ findrow: does this my running through all rows and waiting till the value of an array
! 111: | index matches the row to display, returns row id
! 112: map this row (maprow), and output the results (colmap and rowcont) onto
! 113: |________________________________
! 114: | \
! 115: | -- a debugging window with column id, colmap, and rowcont
! 116: | where colmap specifies where objects occur within a row based on "display column" location
! 117: | where rowcont is the objects within a row and
! 118: |
! 119: |
! 120: |
! 121: initialize display-to-id array rrow (so that rrow[display] equals original row id)
! 122: |
! 123: initialize display-to-id array rcol (so that rcol[display] equals original col id)
! 124: |
! 125: initialize row height and column width values where rh[1] is short row, rh[2] is tall row, cw[1] is skinny column, cw[2] is fat column
! 126: |
! 127: set javascript RAT display window options (javascript stuff...)
! 128: |
! 129: output HTML beginning to RAT display window
! 130: |
! 131: run through the rows to display, convert from display row # to row id (rrow) and draw in edit mode (drawrow)
! 132: |
! 133: |
! 134: drawrow begins by clearing out and initializing
! 135: these temporary arrays
! 136: colmap,colmap2,colmap3,colmap4,colmap5
! 137: output HTML beginning to row set to rowtype height (from row id)
! 138: if there are contents in the row (rowcont[jid] display them (else just end HTML row)
! 139: run through all the objects in row
! 140: if object is a 'b'lock object
! 141: do a lot of amazing things to position resource within block
! 142: and draw arrows connecting into block in another amazing feat of code
! 143: if object is a 'h'orizontal object
! 144: grab input column id and output column id
! 145: and depending whether input is less than output in display position
! 146: draw left-right arrow line or right-left arrow line
! 147: and set leftmost position and rightmost position
! 148: look at inupdown and outupdown
! 149: if inupdown (means what ??) then
! 150: draw top-to-right line, set colmap2 and colmap3
! 151: else draw right-to-down line
! 152: if outupdown (means what ??) then
! 153: draw top-to-left line, set colmap2 and colmap3
! 154: else draw left-to-down line
! 155: if object is a 'v'ertical object
! 156: set left to display column and USE THIS as the position
! 157: if there is another element found in the colmap
! 158: it must be horizontal so draw top-down-right-left intersection ('tdrl')
! 159: else draw top-to-down or down-to-top depending on 'v'ertical object specification
! 160: set colmap2[left] and colmap3[left] to a plain vertical line
! 161: run through columns and draw cells
! 162: drawcell draws in edit mode html stuff ------------------------------------- rtype is set to type of row, the cell is drawn with drawcell
! 163: then using colmap2 and colmap3 draw two more up-down elements
! 164: in rows below if rowtype is 2
! 165:
! 166:
! 167:
! 168:
! 169:
! 170:
! 171: ***************
! 172: joinres from A to B
! 173:
! 174: calculate where in the middle of first object is a good place to insert outcoming path
! 175: calculate where in the middle of second object is a good place to insert incoming path
! 176: insert the ports based on the objects, the distance from middle of one object to other object, and direction
! 177: if A is below B, then loop around..set updown!
! 178: else set updown the other way
! 179: if inrow equals outrow
! 180: just draw connecting horizontal element
! 181: if updown one way then go from row to row finding good columns to go through (comingthru)
! 182: if there is NO GOOD COLUMN THEN INSERT A ROW! (insertrow)
! 183: if updown the other way then go from row to row finding good columns to go through (comingthru)
! 184: if there is NO GOOD COLUMN THEN INSERT A ROW! (insertrow)
! 185:
! 186: ***************
! 187: comingthru
! 188: see where you can bulldoze..more to write here
! 189:
! 190: ***************
! 191: insertrow
! 192: make sure you can bulldoze..more to write here
! 193:
! 194:
! 195: Help Documentation
! 196: on RAT
! 197:
! 198: Developer Documentation
! 199: on RAT
! 200:
! 201:
! 202:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>