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>
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.
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.
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
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>
30 typedef string element_id;
32 interface View : Bonobo::Unknown {
36 * @uri: URI of a MathML document
38 * Loads the document at the specified URI in the component
39 * and displays it. If the load is successful returns @TRUE,
42 boolean load (in string uri);
47 * Unload any loaded document from the component
54 * Freezes the component. Any modification to the document is
55 * not reflected by the view.
62 * Thaws the component. If the document was changed while the
63 * component was frozen, the view is updated.
67 void setIdAttribute (in string ns, in string name);
68 void getIdAttribute (out string ns, out string name);
70 void select (in element_id elem);
71 void unselect (in element_id elem);
72 boolean isSelected (in element_id elem);
74 boolean elementCoords (in element_id elem,
75 out short x, out short y);
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
84 * Returns the position and the size of the rectangle includes @elem
86 boolean elementBoundingBox (in element_id elem,
87 out short width, out short height, out short depth);
89 void getSize (out short width, out short height);
91 void getTop (out short x, out short y);
92 void setTop (in short x, in short y);
94 void setDefaultFontSize (in short size);
95 short getDefaultFontSize ();
97 void setVerbosity (in short level);
98 short getVerbosity ();