]> matita.cs.unibo.it Git - helm.git/blob - helm/gtkmathview-bonobo/idl/GtkMathView.idl
ocaml 3.09 transition
[helm.git] / helm / gtkmathview-bonobo / idl / GtkMathView.idl
1 /* This file is part of GtkMathView-Bonobo, a Bonobo wrapper for GtkMathView.
2  * Copyright (C) 2003 Luca Padovani <lpadovan@cs.unibo.it>
3  *                    Pouria Masoudi <pmasoudi@cs.unibo.it>
4  * 
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * 
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  * 
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  *
19  * For more information, please visit the project's home page
20  * http://helm.cs.unibo.it/gtkmathview-bonobo
21  * or send an email to <lpadovan@cs.unibo.it>
22  */
23
24 #include <Bonobo.idl>
25
26 module GNOME {
27
28   module GtkMathView {
29
30     typedef string element_id;
31
32     interface View : Bonobo::Unknown {
33       
34       /**
35         * load:
36         * @uri: URI of a MathML document
37         *
38         * Loads the document at the specified URI in the component
39         * and displays it. If the load is successful returns @TRUE,
40         * @FALSE otherwise.
41         */
42       boolean load (in string uri);
43
44       /**
45        * unload:
46        *
47        * Unload any loaded document from the component
48        */
49       void unload ();
50
51       /**
52         * freeze:
53         *
54         * Freezes the component. Any modification to the document is
55         * not reflected by the view.
56         */
57       void freeze ();
58
59       /**
60         * thaw:
61         *
62         * Thaws the component. If the document was changed while the
63         * component was frozen, the view is updated.
64         */
65       void thaw ();
66
67       void setIdAttribute (in string ns, in string name);
68       void getIdAttribute (out string ns, out string name);
69
70       void select (in element_id elem);
71       void unselect (in element_id elem);
72       boolean isSelected (in element_id elem);
73       
74       boolean elementCoords (in element_id elem,
75                              out short x, out short y);
76       /**
77         * elementRectangle:
78         * @elem: ID of the element
79         * @x: x coordinate of the element
80         * @y: y coordinate of the element
81         * @width: width of the element
82         * @height: height of the element
83         *
84         * Returns the position and the size of the rectangle includes @elem
85         */
86       boolean elementBoundingBox (in element_id elem,
87                                   out short width, out short height, out short depth);
88
89       void getSize (out short width, out short height);
90
91       void getTop (out short x, out short y);
92       void setTop (in short x, in short y);
93
94       void setDefaultFontSize (in short size);
95       short getDefaultFontSize ();
96
97       void setVerbosity (in short level);
98       short getVerbosity ();
99
100     };
101
102   };
103
104 };
105