lib/rope.ml \
lib/buf.ml \
lib/draw.ml \
- lib/scrollmap.ml
+ lib/scrollmap.ml \
+ lib/view.ml
LIBOBJS = \
$(LIBSRCS:.ml=.$(OBJEXT)) \
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Buf.Cursor</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Buf.Cursor</title>
</head>
<body>
<div class="navbar"> <a class="up" href="Buf.html" title="Buf">Up</a>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Buf</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Buf</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Rope.html" title="Rope">Previous</a>
<pre><span id="VALempty"><span class="keyword">val</span> empty</span> : <code class="type"><a href="Buf.html#TYPEbuf">buf</a></code></pre>
<pre><span id="VALload"><span class="keyword">val</span> load</span> : <code class="type">string -> <a href="Buf.html#TYPEbuf">buf</a></code></pre>
+<pre><span id="VALpath"><span class="keyword">val</span> path</span> : <code class="type"><a href="Buf.html#TYPEbuf">buf</a> -> string</code></pre>
<pre><span id="VALlength"><span class="keyword">val</span> length</span> : <code class="type"><a href="Buf.html#TYPEbuf">buf</a> -> int</code></pre>
<pre><span id="VALiteri"><span class="keyword">val</span> iteri</span> : <code class="type">(int -> <a href="Rope.html#TYPErune">Rope.rune</a> -> bool) -> <a href="Buf.html#TYPEbuf">buf</a> -> int -> unit</code></pre>
<pre><span id="VALiter"><span class="keyword">val</span> iter</span> : <code class="type">(<a href="Rope.html#TYPErune">Rope.rune</a> -> bool) -> <a href="Buf.html#TYPEbuf">buf</a> -> int -> unit</code></pre>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Cfg.Color.Syntax</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Cfg.Color.Syntax</title>
</head>
<body>
<div class="navbar"> <a class="up" href="Cfg.Color.html" title="Cfg.Color">Up</a>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Cfg.Color</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Cfg.Color</title>
</head>
<body>
<div class="navbar"> <a class="up" href="Cfg.html" title="Cfg">Up</a>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Cfg</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Cfg</title>
</head>
<body>
<div class="navbar"><a class="pre" href="X11.html" title="X11">Previous</a>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Draw.Cursor</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Draw.Cursor</title>
</head>
<body>
<div class="navbar"> <a class="up" href="Draw.html" title="Draw">Up</a>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Draw</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Draw</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Buf.html" title="Buf">Previous</a>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Misc</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Misc</title>
</head>
<body>
<div class="navbar"> <a class="up" href="index.html" title="Index">Up</a>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Rope</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Rope</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Cfg.html" title="Cfg">Previous</a>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link rel="previous" href="Draw.html">
+<link rel="next" href="View.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Scrollmap</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Scrollmap</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Draw.html" title="Draw">Previous</a>
<a class="up" href="index.html" title="Index">Up</a>
- </div>
+ <a class="post" href="View.html" title="View">Next</a>
+</div>
<h1>Module <a href="type_Scrollmap.html">Scrollmap</a></h1>
<pre><span class="keyword">module</span> Scrollmap: <code class="code">sig</code> <a href="Scrollmap.html">..</a> <code class="code">end</code></pre><hr width="100%">
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<link rel="stylesheet" href="style.css" type="text/css">
+<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<link rel="Start" href="index.html">
+<link rel="previous" href="Scrollmap.html">
+<link rel="Up" href="index.html">
+<link title="Index of types" rel=Appendix href="index_types.html">
+<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
+<link title="Index of values" rel=Appendix href="index_values.html">
+<link title="Index of modules" rel=Appendix href="index_modules.html">
+<link title="Misc" rel="Chapter" href="Misc.html">
+<link title="X11" rel="Chapter" href="X11.html">
+<link title="Cfg" rel="Chapter" href="Cfg.html">
+<link title="Rope" rel="Chapter" href="Rope.html">
+<link title="Buf" rel="Chapter" href="Buf.html">
+<link title="Draw" rel="Chapter" href="Draw.html">
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>View</title>
+</head>
+<body>
+<div class="navbar"><a class="pre" href="Scrollmap.html" title="Scrollmap">Previous</a>
+ <a class="up" href="index.html" title="Index">Up</a>
+ </div>
+<h1>Module <a href="type_View.html">View</a></h1>
+
+<pre><span class="keyword">module</span> View: <code class="code">sig</code> <a href="View.html">..</a> <code class="code">end</code></pre><hr width="100%">
+
+<pre><code><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> = {</code></pre><table class="typetable">
+<tr>
+<td align="left" valign="top" >
+<code> </code></td>
+<td align="left" valign="top" >
+<code><span id="TYPEELTt.num">num</span> : <code class="type">int</code>;</code></td>
+
+</tr>
+<tr>
+<td align="left" valign="top" >
+<code> </code></td>
+<td align="left" valign="top" >
+<code><span id="TYPEELTt.buf">buf</span> : <code class="type"><a href="Buf.html#TYPEt">Buf.t</a></code>;</code></td>
+
+</tr>
+<tr>
+<td align="left" valign="top" >
+<code> </code></td>
+<td align="left" valign="top" >
+<code><span id="TYPEELTt.map">map</span> : <code class="type"><a href="Scrollmap.html#TYPEt">Scrollmap.t</a></code>;</code></td>
+
+</tr></table>
+}
+
+
+
+<pre><span id="VALfrom_buffer"><span class="keyword">val</span> from_buffer</span> : <code class="type"><a href="Buf.html#TYPEt">Buf.t</a> -> int -> 'a -> <a href="View.html#TYPEt">t</a></code></pre>
+<pre><span id="VALempty"><span class="keyword">val</span> empty</span> : <code class="type">int -> 'a -> <a href="View.html#TYPEt">t</a></code></pre>
+<pre><span id="VALmake"><span class="keyword">val</span> make</span> : <code class="type">int -> 'a -> string -> <a href="View.html#TYPEt">t</a></code></pre>
+<pre><span id="VALpath"><span class="keyword">val</span> path</span> : <code class="type"><a href="View.html#TYPEt">t</a> -> string</code></pre>
+<pre><span id="VALresize"><span class="keyword">val</span> resize</span> : <code class="type"><a href="View.html#TYPEt">t</a> -> int -> <a href="View.html#TYPEt">t</a></code></pre>
+<pre><span id="VALdraw"><span class="keyword">val</span> draw</span> : <code class="type"><a href="View.html#TYPEt">t</a> -> <a href="Draw.Cursor.html#TYPEt">Draw.Cursor.t</a> -> <a href="View.html#TYPEt">t</a></code></pre>
+<pre><span id="VALscroll_up"><span class="keyword">val</span> scroll_up</span> : <code class="type"><a href="View.html#TYPEt">t</a> -> <a href="View.html#TYPEt">t</a></code></pre>
+<pre><span id="VALscroll_dn"><span class="keyword">val</span> scroll_dn</span> : <code class="type"><a href="View.html#TYPEt">t</a> -> <a href="View.html#TYPEt">t</a></code></pre>
+<pre><span id="VALscroll_params"><span class="keyword">val</span> scroll_params</span> : <code class="type"><a href="View.html#TYPEt">t</a> -> float * float</code></pre></body></html>
\ No newline at end of file
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>X11.GlyphMap</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>X11.GlyphMap</title>
</head>
<body>
<div class="navbar"><a class="pre" href="X11.Rune.html" title="X11.Rune">Previous</a>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>X11.Rune</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>X11.Rune</title>
</head>
<body>
<div class="navbar"> <a class="up" href="X11.html" title="X11">Up</a>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>X11</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>X11</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Misc.html" title="Misc">Previous</a>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title></title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title></title>
</head>
<body>
<h1></h1>
<tr><td class="module"><a href="Buf.html">Buf</a></td><td></td></tr>
<tr><td class="module"><a href="Draw.html">Draw</a></td><td></td></tr>
<tr><td class="module"><a href="Scrollmap.html">Scrollmap</a></td><td></td></tr>
+<tr><td class="module"><a href="View.html">View</a></td><td></td></tr>
</table>
</body>
</html>
\ No newline at end of file
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Index of class attributes</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Index of class attributes</title>
</head>
<body>
<div class="navbar"> <a class="up" href="index.html" title="Index">Up</a>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Index of class types</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Index of class types</title>
</head>
<body>
<div class="navbar"> <a class="up" href="index.html" title="Index">Up</a>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Index of classes</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Index of classes</title>
</head>
<body>
<div class="navbar"> <a class="up" href="index.html" title="Index">Up</a>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Index of exceptions</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Index of exceptions</title>
</head>
<body>
<div class="navbar"> <a class="up" href="index.html" title="Index">Up</a>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Index of extensions</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Index of extensions</title>
</head>
<body>
<div class="navbar"> <a class="up" href="index.html" title="Index">Up</a>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Index of class methods</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Index of class methods</title>
</head>
<body>
<div class="navbar"> <a class="up" href="index.html" title="Index">Up</a>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Index of module types</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Index of module types</title>
</head>
<body>
<div class="navbar"> <a class="up" href="index.html" title="Index">Up</a>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Index of modules</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Index of modules</title>
</head>
<body>
<div class="navbar"> <a class="up" href="index.html" title="Index">Up</a>
<td></td></tr>
<tr><td><a href="Cfg.Color.Syntax.html">Syntax</a> [<a href="Cfg.Color.html">Cfg.Color</a>]</td>
<td></td></tr>
+<tr><td align="left"><br>V</td></tr>
+<tr><td><a href="View.html">View</a> </td>
+<td></td></tr>
<tr><td align="left"><br>X</td></tr>
<tr><td><a href="X11.html">X11</a> </td>
<td></td></tr>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Index of types</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Index of types</title>
</head>
<body>
<div class="navbar"> <a class="up" href="index.html" title="Index">Up</a>
<tr><td><a href="Rope.html#TYPErune">rune</a> [<a href="Rope.html">Rope</a>]</td>
<td></td></tr>
<tr><td align="left"><br>T</td></tr>
+<tr><td><a href="View.html#TYPEt">t</a> [<a href="View.html">View</a>]</td>
+<td></td></tr>
<tr><td><a href="Scrollmap.html#TYPEt">t</a> [<a href="Scrollmap.html">Scrollmap</a>]</td>
<td></td></tr>
<tr><td><a href="Draw.Cursor.html#TYPEt">t</a> [<a href="Draw.Cursor.html">Draw.Cursor</a>]</td>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Index of values</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Index of values</title>
</head>
<body>
<div class="navbar"> <a class="up" href="index.html" title="Index">Up</a>
<td></td></tr>
<tr><td><a href="X11.html#VALdisconnect">disconnect</a> [<a href="X11.html">X11</a>]</td>
<td></td></tr>
+<tr><td><a href="View.html#VALdraw">draw</a> [<a href="View.html">View</a>]</td>
+<td></td></tr>
<tr><td><a href="X11.html#VALdraw_char">draw_char</a> [<a href="X11.html">X11</a>]</td>
<td></td></tr>
<tr><td><a href="Draw.Cursor.html#VALdraw_glyph">draw_glyph</a> [<a href="Draw.Cursor.html">Draw.Cursor</a>]</td>
<td></td></tr>
<tr><td><a href="Cfg.html#VALedit_tags">edit_tags</a> [<a href="Cfg.html">Cfg</a>]</td>
<td></td></tr>
+<tr><td><a href="View.html#VALempty">empty</a> [<a href="View.html">View</a>]</td>
+<td></td></tr>
<tr><td><a href="Buf.html#VALempty">empty</a> [<a href="Buf.html">Buf</a>]</td>
<td></td></tr>
<tr><td><a href="Rope.html#VALempty">empty</a> [<a href="Rope.html">Rope</a>]</td>
<td></td></tr>
<tr><td><a href="X11.html#VALfont_load">font_load</a> [<a href="X11.html">X11</a>]</td>
<td></td></tr>
+<tr><td><a href="View.html#VALfrom_buffer">from_buffer</a> [<a href="View.html">View</a>]</td>
+<td></td></tr>
<tr><td><a href="Rope.html#VALfrom_string">from_string</a> [<a href="Rope.html">Rope</a>]</td>
<td></td></tr>
<tr><td align="left"><br>G</td></tr>
<tr><td><a href="Misc.html#VALload_file">load_file</a> [<a href="Misc.html">Misc</a>]</td>
<td></td></tr>
<tr><td align="left"><br>M</td></tr>
+<tr><td><a href="View.html#VALmake">make</a> [<a href="View.html">View</a>]</td>
+<td></td></tr>
<tr><td><a href="Scrollmap.html#VALmake">make</a> [<a href="Scrollmap.html">Scrollmap</a>]</td>
<td></td></tr>
<tr><td><a href="Draw.Cursor.html#VALmake">make</a> [<a href="Draw.Cursor.html">Draw.Cursor</a>]</td>
<tr><td align="left"><br>P</td></tr>
<tr><td><a href="Cfg.Color.html#VALpalette">palette</a> [<a href="Cfg.Color.html">Cfg.Color</a>]</td>
<td></td></tr>
+<tr><td><a href="View.html#VALpath">path</a> [<a href="View.html">View</a>]</td>
+<td></td></tr>
+<tr><td><a href="Buf.html#VALpath">path</a> [<a href="Buf.html">Buf</a>]</td>
+<td></td></tr>
<tr><td><a href="Draw.Cursor.html#VALplace_glyph">place_glyph</a> [<a href="Draw.Cursor.html">Draw.Cursor</a>]</td>
<td></td></tr>
<tr><td><a href="Cfg.Color.Syntax.html#VALpreproc">preproc</a> [<a href="Cfg.Color.Syntax.html">Cfg.Color.Syntax</a>]</td>
<tr><td align="left"><br>R</td></tr>
<tr><td><a href="Draw.html#VALrectangle">rectangle</a> [<a href="Draw.html">Draw</a>]</td>
<td></td></tr>
+<tr><td><a href="View.html#VALresize">resize</a> [<a href="View.html">View</a>]</td>
+<td></td></tr>
<tr><td><a href="Scrollmap.html#VALresize">resize</a> [<a href="Scrollmap.html">Scrollmap</a>]</td>
<td></td></tr>
<tr><td><a href="Draw.Cursor.html#VALrestart">restart</a> [<a href="Draw.Cursor.html">Draw.Cursor</a>]</td>
<tr><td align="left"><br>S</td></tr>
<tr><td><a href="Draw.html#VALscroll">scroll</a> [<a href="Draw.html">Draw</a>]</td>
<td></td></tr>
+<tr><td><a href="View.html#VALscroll_dn">scroll_dn</a> [<a href="View.html">View</a>]</td>
+<td></td></tr>
<tr><td><a href="Scrollmap.html#VALscroll_dn">scroll_dn</a> [<a href="Scrollmap.html">Scrollmap</a>]</td>
<td></td></tr>
<tr><td><a href="Cfg.html#VALscroll_lines">scroll_lines</a> [<a href="Cfg.html">Cfg</a>]</td>
<td></td></tr>
<tr><td><a href="Cfg.Color.html#VALscroll_nor">scroll_nor</a> [<a href="Cfg.Color.html">Cfg.Color</a>]</td>
<td></td></tr>
+<tr><td><a href="View.html#VALscroll_params">scroll_params</a> [<a href="View.html">View</a>]</td>
+<td></td></tr>
+<tr><td><a href="View.html#VALscroll_up">scroll_up</a> [<a href="View.html">View</a>]</td>
+<td></td></tr>
<tr><td><a href="Scrollmap.html#VALscroll_up">scroll_up</a> [<a href="Scrollmap.html">Scrollmap</a>]</td>
<td></td></tr>
<tr><td><a href="X11.html#VALshow_window">show_window</a> [<a href="X11.html">X11</a>]</td>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Buf.Cursor</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Buf.Cursor</title>
</head>
<body>
<code class="code"><span class="keyword">sig</span><br>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Buf</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Buf</title>
</head>
<body>
<code class="code"><span class="keyword">sig</span> <span class="keyword">end</span></code></body></html>
\ No newline at end of file
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Cfg.Color.Syntax</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Cfg.Color.Syntax</title>
</head>
<body>
<code class="code"><span class="keyword">sig</span><br>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Cfg.Color</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Cfg.Color</title>
</head>
<body>
<code class="code"><span class="keyword">sig</span><br>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Cfg</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Cfg</title>
</head>
<body>
<code class="code"><span class="keyword">sig</span> <span class="keyword">end</span></code></body></html>
\ No newline at end of file
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Draw.Cursor</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Draw.Cursor</title>
</head>
<body>
<code class="code"><span class="keyword">sig</span><br>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Draw</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Draw</title>
</head>
<body>
<code class="code"><span class="keyword">sig</span> <span class="keyword">end</span></code></body></html>
\ No newline at end of file
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Misc</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Misc</title>
</head>
<body>
<code class="code"><span class="keyword">sig</span> <span class="keyword">end</span></code></body></html>
\ No newline at end of file
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Rope</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Rope</title>
</head>
<body>
<code class="code"><span class="keyword">sig</span> <span class="keyword">end</span></code></body></html>
\ No newline at end of file
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>Scrollmap</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>Scrollmap</title>
</head>
<body>
<code class="code"><span class="keyword">sig</span> <span class="keyword">end</span></code></body></html>
\ No newline at end of file
--- /dev/null
+<html><head>
+<link rel="stylesheet" href="style.css" type="text/css">
+<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<link rel="Start" href="index.html">
+<link title="Index of types" rel=Appendix href="index_types.html">
+<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
+<link title="Index of values" rel=Appendix href="index_values.html">
+<link title="Index of modules" rel=Appendix href="index_modules.html">
+<link title="Misc" rel="Chapter" href="Misc.html">
+<link title="X11" rel="Chapter" href="X11.html">
+<link title="Cfg" rel="Chapter" href="Cfg.html">
+<link title="Rope" rel="Chapter" href="Rope.html">
+<link title="Buf" rel="Chapter" href="Buf.html">
+<link title="Draw" rel="Chapter" href="Draw.html">
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>View</title>
+</head>
+<body>
+<code class="code"><span class="keyword">sig</span> <span class="keyword">end</span></code></body></html>
\ No newline at end of file
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>X11.GlyphMap</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>X11.GlyphMap</title>
</head>
<body>
<code class="code"><span class="keyword">sig</span><br>
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>X11.Rune</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>X11.Rune</title>
</head>
<body>
<code class="code"><span class="keyword">sig</span> <span class="keyword">type</span> t = int <span class="keyword">val</span> compare : int <span class="keywordsign">-></span> int <span class="keywordsign">-></span> int <span class="keyword">end</span></code></body></html>
\ No newline at end of file
<link title="Rope" rel="Chapter" href="Rope.html">
<link title="Buf" rel="Chapter" href="Buf.html">
<link title="Draw" rel="Chapter" href="Draw.html">
-<link title="Scrollmap" rel="Chapter" href="Scrollmap.html"><title>X11</title>
+<link title="Scrollmap" rel="Chapter" href="Scrollmap.html">
+<link title="View" rel="Chapter" href="View.html"><title>X11</title>
</head>
<body>
<code class="code"><span class="keyword">sig</span> <span class="keyword">end</span></code></body></html>
\ No newline at end of file
open X11
-module View = struct
- type t = {
- num : int;
- buf : Buf.t;
- map : Scrollmap.t
- }
-
- let from_buffer buf width height =
- { num = 0; buf = buf; map = Scrollmap.make buf width 0 }
-
- let empty width height =
- from_buffer (Buf.empty) width height
-
- let make width height path =
- from_buffer (Buf.load path) width height
-
- let resize view width =
- { view with map = Scrollmap.resize view.map view.buf width }
-
- let draw view csr =
- let view = (resize view (Draw.Cursor.max_width csr)) in
- let num = Draw.buffer csr view.buf (Scrollmap.first view.map) in
- { view with num = num }
-
- let scroll_up view =
- { view with map = Scrollmap.scroll_up view.map view.buf }
-
- let scroll_dn view =
- { view with map = Scrollmap.scroll_dn view.map view.buf }
-
- let scroll_params view =
- let length = float_of_int (Buf.length view.buf)
- and first = float_of_int (Scrollmap.first view.map)
- and nvisible = float_of_int view.num in
- ((first /. length), (nvisible /. length))
-end
-
let tags_buf = ref Buf.empty
let edit_view = ref (View.empty 640 480)
let onupdate width height =
let csr = Draw.Cursor.make (width, height) 0 0 in
- Draw.status csr "UNSI> *scratch*";
+ Draw.status csr (View.path !edit_view);
Draw.tags csr !tags_buf;
let scrollcsr = (Draw.Cursor.clone csr) in
Draw.Cursor.move_x csr 15;
let load path =
{ path = path; rope = Rope.from_string (Misc.load_file path) }
+let path buf =
+ buf.path
+
let length buf =
Rope.length buf.rope
val empty : t
val load : string -> t
+val path : t -> string
val length : t -> int
val iter : (int -> bool) -> t -> int -> unit
val iteri : (int -> int -> bool) -> t -> int -> unit
let from_string s =
Leaf (s, 0, (String.length s))
-(******************************************************************************)
-
let length = function
| Leaf (_,_,l) -> l
| Node (_,_,_,l) -> l
if i < 0 || i >= (length rope) then
raise (Out_of_bounds "Rope.check_index")
-(******************************************************************************)
-
let rec getb rope i =
check_index rope i;
match rope with
else
getc r (i - left_len)
-(******************************************************************************)
-
(* inefficient form of iteri *)
let rec iteri fn rope pos =
if pos < (length rope) && (fn pos (Char.code (getb rope pos))) then
rope i;
Bytes.unsafe_to_string buf
-(******************************************************************************)
-
(* Rebalancing:
* Height of leaf is 0
--- /dev/null
+type t = {
+ num : int;
+ buf : Buf.t;
+ map : Scrollmap.t
+}
+
+let from_buffer buf width height =
+ { num = 0; buf = buf; map = Scrollmap.make buf width 0 }
+
+let empty width height =
+ from_buffer (Buf.empty) width height
+
+let make width height path =
+ from_buffer (Buf.load path) width height
+
+let path view =
+ Buf.path view.buf
+
+let resize view width =
+ { view with map = Scrollmap.resize view.map view.buf width }
+
+let draw view csr =
+ let view = (resize view (Draw.Cursor.max_width csr)) in
+ let num = Draw.buffer csr view.buf (Scrollmap.first view.map) in
+ { view with num = num }
+
+let scroll_up view =
+ { view with map = Scrollmap.scroll_up view.map view.buf }
+
+let scroll_dn view =
+ { view with map = Scrollmap.scroll_dn view.map view.buf }
+
+let scroll_params view =
+ let length = float_of_int (Buf.length view.buf)
+ and first = float_of_int (Scrollmap.first view.map)
+ and nvisible = float_of_int view.num in
+ ((first /. length), (nvisible /. length))