/[alph]/alph/doc/alph.rst
ViewVC logotype

Diff of /alph/doc/alph.rst

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by tjl, Mon May 26 08:26:52 2003 UTC revision 1.3 by tjl, Mon May 26 08:40:57 2003 UTC
# Line 1  Line 1 
1  ===========  =============================
2  Alph design  Alph design -- the interfaces
3  ===========  =============================
4    
5  Alph is an implementation of xanalogical hypertext (see e.g. Nelson's  Alph is an implementation of xanalogical hypertext (see e.g. Nelson's
6  writings). The fundamental point in xanalogical hypertext is that  writings). The fundamental point in xanalogical hypertext is that
# Line 44  is as follows: Line 44  is as follows:
44              intersects(Span s)              intersects(Span s)
45              getScrollId()              getScrollId()
46    
47      class Span1D "interface"      class SpanID "interface"
48          inherit Span          inherit Span
49          methods          methods
50              int offset()              int offset()
51              int length()              int length()
52              Span1D subSpan(..)              SpanID subSpan(..)
53              Span1D append(Span1D s)              SpanID append(SpanID s)
54    
55      class TextSpan "interface"      class TextSpan "interface"
56          inherit Span1D          inherit SpanID
57          methods          methods
58              String getText()              String getText()
59    
60      class PageSpan "interface"      class PageSpan "interface"
61          inherit Span1D          inherit SpanID
62          methods          methods
63              PageImageSpan getPage(int ind)              PageImageSpan getPage(int ind)
         dep "create" PageImageSpan  
64    
65      class ImageSpan "interface"      class ImageSpan "interface"
66          inherit Span          inherit Span
# Line 75  is as follows: Line 74  is as follows:
74          methods          methods
75              int getPageIndex()              int getPageIndex()
76    
77        dep "create" PageSpan PageImageSpan
78    
79      ---      ---
80    
81      Span.c = (0,0);      Span.c = (0,0);
82    
83      horizontally(20, vs,      horizontally(50, vs,
84          TextSpan, PageSpan, PageImageSpan, ImageSpan);          TextSpan, PageSpan, PageImageSpan, ImageSpan);
85    
86      vs.c = Span.c + (0, -500);      vs.c = Span.c + (0, -250);
87      Span1D.c = .5[Span.c, TextSpan.c];      SpanID.c = .5[Span.c, TextSpan.c];
88    
89    (In the diagram above, SpanID should read Span1D!!!)
90    
91    The interfaces in the lowest row are those that are actually
92    implemented by some classes.
93    
94  Note: Spans are immutable objects - the ``append()`` method returns  Note: Spans are immutable objects - the ``append()`` method returns
95  a new span, if the the object and the parameter were consecutive  a new span, if the the object and the parameter were consecutive
# Line 94  in the right order. Line 98  in the right order.
98  Manipulating text: Enfilades, Span makers  Manipulating text: Enfilades, Span makers
99  =========================================  =========================================
100    
101    The
102    
103  Scrollblocks  Scrollblocks
104  ============  ============
# Line 117  Each span can contain media only inside Line 122  Each span can contain media only inside
122              String getID()              String getID()
123              Object getBlockId()              Object getBlockId()
124                            
125        ---
126        ScrollBlock.c = Span.c + (-200,0);
127    
128    
129  The scrollblock model assumes that given a span it is possible  The scrollblock model assumes that given a span it is possible
# Line 138  system implemented in C++. Forcing acces Line 144  system implemented in C++. Forcing acces
144  would make things inefficient for the OpenGL system.  would make things inefficient for the OpenGL system.
145    
146  Because of this, Alph provides direct access to the underlying  Because of this, Alph provides direct access to the underlying
147  block:  data block by allowing the access through the  ``BlockFile`` class.
148    
149    ..  UML:: alph_blockfile
150    
151        class ScrollBlock
152            assoc multi(1) - multi(0..1) BlockFile
153            methods
154                BlockFile getBlockFile()
155    
156        class BlockFile
157            methods
158                java.io.File getFile()
159                String getFilename()
160                void close()
161    
162        ---
163        ScrollBlock.c = BlockFile.c + (-200,0);
164    
165    The blockfile is created by calling ``ScrollBlock.getBlockFile()``,
166    and can then be used to obtain access to the file.
167    The file may be temporary, which is why it is important to
168    explicitly ``close()`` the ``BlockFile`` after use.
169    
170    
171    The central media repository class: ``Alph``
172    ============================================
173    
174    b
175    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26