comparison old/digilib_interop.html @ 1:5baf44fed7b0

add current berlios website pages to repo
author robcast
date Fri, 09 Dec 2011 19:23:29 +0100
parents digilib_interop.html@7b20d15a57e9
children
comparison
equal deleted inserted replaced
0:7b20d15a57e9 1:5baf44fed7b0
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
5 <title>digilib toolbar interoperability</title>
6 </head>
7 <body>
8 <h1>Interoperability of digilib HTML pages with the Alcatraz toolbar</h1>
9
10 <p>A toolbar-friendly digilib page must define a Javascript variable
11 <b><code>toolbarEnabledURL</code></b> whose value is a HTTP URL that
12 produces a <em>toolbar-enabled</em> page. The toolbar should present a
13 button to &quot;take over&quot; the page design by replacing
14 the current page with the page from the given URL.</p>
15
16 <h2>Toolbar-enabled page</h2>
17
18 <p>A <em>toolbar-enabled</em> page must offer the following Javascript functions:</p>
19
20 <h3>Identification</h3>
21
22 <ul>
23 <li><b><code>dlScriptVersion</code></b>: a String variable that contains the version number of the Javascript code (e.g. &quot;1.12b3&quot;)<br>
24 The existence of this variable can be used to test for a <em>toolbar-enabled</em> page</li>
25 </ul>
26
27 <h3>Interactive operations</h3>
28
29 <ul>
30 <li><b><code>setMark()</code></b>: lets the user click and sets a mark at the clicked location</li>
31 <li><b><code>zoomArea()</code></b>: lets the user click to select an area and zooms to the selected area</li>
32 <li><b><code>moveCenter()</code></b>: lets the user click and recenters the image around the clicked location</li>
33 </ul>
34
35 <h3>Page operations</h3>
36
37 <ul>
38 <li><b><code>getRef()</code></b>: returns a String with a URL reference to the current document</li>
39 <li><b><code>removeMark()</code></b>: removes the last mark</li>
40 <li><b><code>zoomBy(float factor)</code></b>: magnifies the image by the given factor around the current center</li>
41 <li><b><code>zoomFullpage()</code></b>: zooms out so that the whole image is visible</li>
42 <li><b><code>display(int prio)</code></b>: reloads the page with the current parameters</li>
43 </ul>
44
45 <h3>Parameter operations</h3>
46
47 <ul>
48 <li><b><code>newParameter(String name, String defaultValue, int prio)</code></b>: declares a new parameter with name, default value (can be of any type) and priority</li>
49 <li><b><code>getParameter(String name)</code></b>: returns the value of the parameter with the name <code>name</code></li>
50 <li><b><code>setParameter(String name, String value)</code></b>: sets the value of the named parameter (value can be of any type)</li>
51 <li><b><code>getAllParameters(int prio)</code></b>: returns a String of all parameters in HTTP request format (name=value) below the given priority</li>
52 <li><b><code>addMark(Position pos)</code></b>: adds a mark with the given Position</li>
53 <li><b><code>deleteMark()</code></b>: removes the last mark form the list</li>
54 <li><b><code>getAllMarks()</code></b>: returns a String with all current marks in digilib format (for parameter &quot;mk&quot;)</li>
55 <li><b><code>addFlag(String name)</code></b>: adds a digilib mode flag with the given name</li>
56 <li><b><code>hasFlag(String name)</code></b>: returns if the given flag is currently set</li>
57 <li><b><code>removeFlag(String name)</code></b>: removes the given flag</li>
58 <li><b><code>toggleFlag(String name)</code></b>: toggles the given flag</li>
59 <li><b><code>getAllFlags()</code></b>: returns a String with all current flags in digilib format (for parameter &quot;mo&quot;)</li>
60 </ul>
61
62 </body>
63 </html>