]> matita.cs.unibo.it Git - helm.git/blob - helm/gtkmathview-bonobo/idl/GtkMathView.idl
* advanced implementation of View interface
[helm.git] / helm / gtkmathview-bonobo / idl / GtkMathView.idl
1
2 #include <Bonobo.idl>
3
4 module GNOME {
5
6   module GtkMathView {
7
8     typedef string element_id;
9
10     interface View : Bonobo::Unknown {
11       
12       /**
13         * load:
14         * @uri: URI of a MathML document
15         *
16         * Loads the document at the specified URI in the component
17         * and displays it. If the load is successful returns @TRUE,
18         * @FALSE otherwise.
19         */
20       boolean load (in string uri);
21
22       /**
23        * unload:
24        *
25        * Unload any loaded document from the component
26        */
27       void unload ();
28
29       /**
30         * freeze:
31         *
32         * Freezes the component. Any modification to the document is
33         * not reflected by the view.
34         */
35       void freeze ();
36
37       /**
38         * thaw:
39         *
40         * Thaws the component. If the document was changed while the
41         * component was frozen, the view is updated.
42         */
43       void thaw ();
44
45       void setIdAttribute (in string ns, in string name);
46       void getIdAttribute (out string ns, out string name);
47
48       void select (in element_id elem);
49       void unselect (in element_id elem);
50       boolean isSelected (in element_id elem);
51       
52       boolean elementCoords (in element_id elem,
53                              out short x, out short y);
54       /**
55         * elementRectangle:
56         * @elem: ID of the element
57         * @x: x coordinate of the element
58         * @y: y coordinate of the element
59         * @width: width of the element
60         * @height: height of the element
61         *
62         * Returns the position and the size of the rectangle includes @elem
63         */
64       boolean elementBoundingBox (in element_id elem,
65                                   out short width, out short height, out short depth);
66
67       void getSize (out short width, out short height);
68
69       void getTop (out short x, out short y);
70       void setTop (in short x, in short y);
71
72       void setDefaultFontSize (in short size);
73       short getDefaultFontSize ();
74
75       void setVerbosity (in short level);
76       short getVerbosity ();
77
78     };
79
80   };
81
82 };
83