123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457 |
- %!
- %
- % $Id$
- %
- % we need to define metric units
- /mm {2.834 mul} def
- /cm {28.34 mul } def
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % Configurable section
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % sets the line width of the class graph to 0.5 points
- /SetLineWidth { 0.5 setlinewidth} def
- % sets the line color of the class graph to black
- /SetLineColor { 0 0 0 setrgbcolor } def
- % sets the default font for class names
- /SetClassFont
- {
- /Arial-BoldMT findfont
- 10 scalefont
- setfont
- } def
- % sets the default font for large written class names
- /SetLargeClassFont
- {
- /Arial-BoldMT findfont
- 18 scalefont
- setfont
- } def
- % RGB colors of the texts
- /StandardTextColor { 0 0 0 } def
- /MissedTextColor { 0.50 0.50 0.50 } def
- % RGB colors of the boxes
- /MissedColor { 0.92 0.92 0.92 } def
- /IncompleteColor { 1 0.5 0.5 } def
- /UntestedColor { 1 1 0.6} def
- /ReadyColor { 0.7 1 0.7 } def
- % Starting point of the class graph
- % (0,0) is the lower left corner of the paper
- /startx { 0 mm } def
- /starty { 290 mm } def
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % End of Configurable section
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % some setups
- /Missed {0} def
- /Incomplete {1} def
- /Untested {2} def
- /Ready {3} def
- /nextx startx def
- /nexty starty def
- /maxx 0 mm def
- %%%%%%%%%%%%%%%%%%%%%%%%
- % drawbox
- % takes two parameters:
- % classname........name of the class
- % status......status of development
- /drawbox
- {
- % save parameters
- /status exch def
- /classname exch def
- % save enviroment
- gsave
- newpath
- % determine the size of the class name
- SetClassFont
- classname
- stringwidth
- % and save it ...
- /widthy exch def
- /widthx exch def
- % moveto start point of the box
- nextx 8 mm add
- nexty
- moveto
- % calculate the place for the icons
- nextx 8 mm add
- widthx 4.5 mm add add
- /nexticonx exch def
- % max. ?
- nexticonx 1.5 mm sub maxx gt { /maxx nexticonx def } if
- % set box color
- status Missed eq { MissedColor setrgbcolor } if
- status Incomplete eq { IncompleteColor setrgbcolor } if
- status Untested eq { UntestedColor setrgbcolor } if
- status Ready eq { ReadyColor setrgbcolor } if
- % draw box
- 0 mm 2.1 mm rlineto
- widthx 3 mm add 0 mm rlineto
- 0 mm -4.2 mm rlineto
- 0 widthx 3 mm add sub 0 mm rlineto
- 0 mm 2.1 mm rlineto
- closepath
- fill
- % set text color
- status Missed eq { MissedTextColor setrgbcolor }
- { StandardTextColor setrgbcolor } ifelse
- % set text pos and write text
- nextx 9.5 mm add
- nexty 1.25 mm sub
- moveto
- classname
- show
- grestore
- } def
- %%%%%%%%%%%%%%%%%%%%%%%%
- % drawlargebox
- % takes two parameters:
- % classname........name of the class
- % status......status of development
- /drawlargebox
- {
- % save parameters
- /status exch def
- /classname exch def
- % save enviroment
- gsave
- newpath
- % determine the size of the class name
- SetLargeClassFont
- classname
- stringwidth
- % and save it ...
- /widthy exch def
- /widthx exch def
- % moveto start point of the box
- nextx 8 mm add
- nexty
- moveto
- % calculate the place for the icons
- nextx 8 mm add
- % add text with and additional space
- widthx 7.5 mm add add
- /nexticonx exch def
- % max. ? (remove icon offset using 1.5 mm sub)
- nexticonx 1.5 mm sub maxx gt { /maxx nexticonx def } if
- %save x-pos for the horizontal line (remove icon offset using 4.5 mm sub)
- /lastlargeobjectx nexticonx 1.5 mm sub def
- % set box color
- status Missed eq { MissedColor setrgbcolor } if
- status Incomplete eq { IncompleteColor setrgbcolor } if
- status Untested eq { UntestedColor setrgbcolor } if
- status Ready eq { ReadyColor setrgbcolor } if
- % draw box
- 0 mm 4.2 mm rlineto
- widthx 6 mm add 0 mm rlineto
- 0 mm -8.4 mm rlineto
- 0 widthx 6 mm add sub 0 mm rlineto
- 0 mm 4.2 mm rlineto
- closepath
- fill
- % set text color
- status Missed eq { MissedTextColor setrgbcolor }
- { StandardTextColor setrgbcolor } ifelse
- % set text pos and write text
- nextx 11 mm add
- nexty 2.5 mm sub
- moveto
- classname
- show
- nexty 2.1 mm sub
- /nexty exch def
- grestore
- } def
- %%%%%%%%%%%%%%%%%%%%%%%%
- % newchildclass
- % draws a new class
- % takes two parameters:
- % name of the class
- % status of development
- /newchildclass
- {
- % save parameters
- /status exch def
- /classname exch def
- % save enviroment
- % push this on the stack for onelevelback
- nexty
- newpath
- SetLineWidth
- SetLineColor
- nexty -2.1 mm add
- /nexty exch def
- nextx 11 mm add
- /nextx exch def
- nextx nexty moveto
- 0 mm -2.9 mm rlineto
- 8 mm 0 mm rlineto stroke
- nexty -2.9 mm add
- /nexty exch def
- classname
- status
- drawbox
- } def
- %%%%%%%%%%%%%%%%%%%%%%%%
- % newclass
- % draws a new class
- % takes two parameters:
- % name of the class
- % status of development
- /newclass
- {
- gsave
- newpath
- SetLineWidth
- SetLineColor
- nextx nexty moveto
- 0 mm -5 mm rlineto
- 8 mm 0 mm rlineto stroke
- nexty -5 mm add
- /nexty exch def
- drawbox
- grestore
- } def
- %%%%%%%%%%%%%%%%%%%%%%%%
- % newclassxmoved
- % draws a new class
- % takes three parameters:
- % name of the class
- % status of development
- % x offset in points
- %
- % Remark:
- % between newclassxmoved and restoreoldxy have to be a newchildclass,
- % else the output gets scrambled, but don't do a
- % onelevelback should be used, restoreoldxy removes one child level!
- /newclassxmoved
- {
- % save parameters
- /offsetx exch def
- /status exch def
- /classname exch def
- % save enviroment
- % push this on the stack for onemovelevelback
- nextx
- nexty
- newpath
- SetLineWidth
- SetLineColor
- nextx nexty moveto
- 0 mm -5 mm rlineto
- 8 mm offsetx add 0 mm rlineto stroke
- nexty -5 mm add
- /nexty exch def
- /nextx nextx offsetx add def
- classname status drawbox
- } def
- %%%%%%%%%%%%%%%%%%%%%%%%
- % restoreoldxy
- % restores old state of nextx and nexty
- /restoreoldxy
- {
- % remove old child y coordinate
- /dummy def
- 5 mm sub
- /nexty exch def
- /nextx exch def
- } def
- %%%%%%%%%%%%%%%%%%%%%%%%
- % newlargeheadclass
- % draws a new large class item to the head line (liek tobject)
- % takes two parameters:
- % name of the class
- % status of development
- /newlargeheadclass
- {
- gsave
- newpath
- SetLineWidth
- SetLineColor
- nextx nexty moveto
- 8 mm 0 mm rlineto stroke
- drawlargebox
- grestore
- } def
- %%%%%%%%%%%%%%%%%%%%%%%%
- % onelevelback
- % goes one level back in the class hierarchy
- /onelevelback
- {
- /oldy exch def
- newpath
- SetLineWidth
- SetLineColor
- nextx -11 mm add
- /nextx exch def
- nextx oldy moveto
- nextx nexty lineto stroke
- } def
- %%%%%%%%%%%%%%%%%%%%%%%%
- % Linuxonly
- % draws the linux icon
- /Linuxonly
- {
- gsave
- newpath
- nexticonx
- nexty 1.25 mm sub
- moveto
- SetClassFont
- StandardTextColor setrgbcolor
- % (Linux)
- % show
- %!!!!!! here we have to update maxx (max. len of the current column)
- grestore
- } def
- %%%%%%%%%%%%%%%%%%%%%%%%
- % Win32only
- % draws the win32 icon
- /Win32only
- {
- gsave
- newpath
- nexticonx
- nexty 1.25 mm sub
- moveto
- SetClassFont
- StandardTextColor setrgbcolor
- % (Win32)
- % show
- %!!!!!! here we have to update maxx (max. len of the current column)
- grestore
- } def
- %%%%%%%%%%%%%%%%%%%%%%%%
- % Both
- % dummy
- /Both
- {
- } def
- %%%%%%%%%%%%%%%%%%%%%%%%
- % goes to a new column
- % newcolumn
- /newcolumn
- {
- % add 3 mm space
- /nextx maxx 3 mm add def
- /nexty starty def
- SetLineWidth
- SetLineColor
- newpath
- lastlargeobjectx nexty moveto
- nextx nexty lineto stroke
- } def
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % here the class tree follows
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %%%%%%%%%%%%%%%%%%%%%%%
- % TObject
- %%%%%%%%%%%%%%%%%%%%%%%
- (TObject) Ready drawlargebox
- %%%%%%%%%%%%%%%%%%%%%%%
- % Exception classes
- %%%%%%%%%%%%%%%%%%%%%%%
- (Exception) Missed newchildclass
- (EAbort) Incomplete newchildclass
- (EAbstractError) Missed newclass Linuxonly
- (EDatabaseError) Missed newclass Linuxonly
- (EDBCLient) Missed newchildclass
- (EReconcileError) Missed newchildclass Linuxonly
- onelevelback
- (EDBEngineError) Missed newclass Win32only
- (ENoResultSet) Missed newclass
- (EUpdateError) Missed newclass
- onelevelback
- (EDBEditError) Missed newclass
- (EDSWriter) Missed newclass
- onelevelback
- (OutlineError) Missed newclass
- %%%%%%%%%%%%%%%%%%%%%%%
- % Some more base classes
- %%%%%%%%%%%%%%%%%%%%%%%
- newcolumn
- (TInterface) Missed 40 mm newclassxmoved
- (TIAddInNotifier) Missed newchildclass
- restoreoldxy
- (TInterfacedObject) Missed newclass
- (TList) Ready newclass
- (TLookupList) Missed newclass
- (TPropertyEditor) Missed 40 mm newclassxmoved
- (TClassProperty) Missed newchildclass
- (TFontProperty) Missed newchildclass
- onelevelback
- (TComponentProperty) Missed newclass
- % remove a childy coordinate
- restoreoldxy
- (TRegistry) Missed newclass
- (TRegIniFile) Missed newchildclass
- onelevelback
- (TSessionList) Missed newclass
- %%%%%%%%%%%%%%%%%%%%%%%
- % TPersistent classes
- %%%%%%%%%%%%%%%%%%%%%%%
- newcolumn
- (TPersistent) Untested newlargeheadclass
- (TCanvas) Missed newchildclass
- (TControlCanvas) Missed newchildclass
- (TMetafileCanvas) Missed newclass
- onelevelback
- (TClipboard) Missed newclass
- %%%%%%%%%%%%%%%%%%%%%%%
- % TComponent classes
- %%%%%%%%%%%%%%%%%%%%%%%
- newcolumn
- (TComponent) Untested newlargeheadclass
- showpage
- %
- % $Log$
- % Revision 1.6 1998-10-01 20:40:20 florian
- % * log was written wrong
- %
- % Revision 1.5 1998/10/01 20:39:08 florian
- % + history and log added
- %
- %
|