summaryrefslogtreecommitdiff
path: root/math/guppi/files/GNOME_Gnumeric_Graph.idl
blob: 5a104973748c3caad11158c906335c58b07eabe2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/**
 * The interfaces Gnumeric uses to communicate with graphing components
 *
 * Author:
 *   Jody Goldberg <jody@gnome.org>
 */
#include <Bonobo.idl>

module GNOME {
    module Gnumeric {
	struct Pair {
	    short start;
	    short end;
	};
	typedef long		   PlotID;
	typedef long		   SeriesID;
	typedef long		   VectorID;
	typedef sequence<Pair>	   SeqPair;
	typedef sequence<VectorID> VectorIDs;
	typedef sequence<octet>	   Buffer;

	exception Error { string mesg; };

	enum VectorType {
	    VECTOR_TYPE_SCALAR,
	    VECTOR_TYPE_DATE,
	    VECTOR_TYPE_STRING
	};

	/* This is a place holder */
	interface VectorSelection {
	    oneway void selected (in SeqPair ranges);
	};
	module Scalar {
	    typedef sequence<double> Seq;
	    interface Vector : VectorSelection {
		oneway void changed (in short start, in Seq new_values);
		void value (out Seq values);
	    };
	};
	module String {
	    typedef sequence<string> Seq;
	    interface Vector : VectorSelection {
		oneway void changed (in short start, in Seq new_values);
		void value (out Seq values);
	    };
	};

	module Graph_v2 {
	    interface ConfigGuru : Bonobo::Control {
		oneway void applyChanges ();
	    };

	    interface DataGuru : ConfigGuru {
		readonly attribute Buffer spec;

		/**
		 * seriesSetDimension :
		 *
		 * Add/Remove/Edit the vector associated with a specific dimension
		 * of an series.
		 *
		 * a vectorID of -1 will remove the dimension.
		 */
		void seriesSetDimension (in SeriesID seriesID,
					 in string dim,
					 in VectorID vectorID)
		    raises (Error);

		PlotID   plotAdd      ()		   raises (Error);
		void     plotDelete   (in PlotID plot)	   raises (Error);
		SeriesID seriesAdd    (in PlotID plot)	   raises (Error);
		void     seriesDelete (in SeriesID series) raises (Error);
	    };

	    interface Manager : Bonobo::Embeddable {
		ConfigGuru configure (in string type);

		/**
		 * Read :
		 * 	A full specified document including enough markup
		 * 	information to assist in data assignment and for
		 * 	persistence.
		 *
		 * Write :
		 * 	Take a possibly incomplete description of a graph using
		 * 	a subset of the dtd used for persistence and initialize
		 * 	the graphs state.  The document refers to vectors by
		 * 	IDs that were assigned previously.
		 */
		attribute Buffer spec;

		/**
		 * addVector :
		 *
		 * Register new vectors and get their callbacks.
		 */
		VectorSelection addVector (in VectorSelection v,
					   in VectorType type, in VectorID id,
					   in string default_fmt);

		/**
		 * clearVectors :
		 *
		 * Remove all references to the existing set of vectors.
		 */
		oneway void clearVectors ();

		/**
		 * arrangeVectors :
		 *
		 * Take the set of vectors and their optional
		 * headers in the order specified by the
		 * supplied @data ids, and arrange them into a
		 * graph using the 'current' graph type.
		 */
		oneway void arrangeVectors (in VectorIDs data,
					    in VectorIDs optional_headers);

	    };
	};
    };
};