Commit 8dfb5935 authored by Jody Goldberg's avatar Jody Goldberg

rename to match naming conventions

parent c332d9dd
#ifndef __GNUMERIC_IDL__
#define __GNUMERIC_IDL__
/*
* If you are looking for a good example of Bonobo use, this is not it.
* please see bonobo/samples/ for a better starting point.
*/
#include <Bonobo.idl>
#include <oaf-factory.idl>
module GNOME {
module Gnumeric {
struct CellRange {
string cell_a;
string cell_b;
};
const short VALUE_STRING = 0;
const short VALUE_INTEGER = 1;
const short VALUE_FLOAT = 2;
const short VALUE_CELLRANGE = 3;
const short VALUE_ARRAY = 4;
const short VALUE_BOOLEAN = 5;
const short VALUE_ERROR = 6;
const short VALUE_EMPTY = 7;
union Value switch(short) {
case VALUE_BOOLEAN: boolean v_bool;
case VALUE_FLOAT: double v_float;
case VALUE_INTEGER: long v_int;
case VALUE_STRING: string str;
case VALUE_ERROR: string error;
case VALUE_ARRAY: string array;
case VALUE_CELLRANGE: CellRange cell_range;
};
union VecValue switch (short) {
case VALUE_FLOAT: double v_float;
case VALUE_STRING: string str;
};
typedef sequence<VecValue> VecValueVec;
exception PluginProblem { string mesg; };
interface Sheet {
exception OutOfRange {};
exception ParseError {};
exception InvalidCmd {};
void cursor_set (in long base_col, in long base_row,
in long start_col, in long start_row,
in long end_col, in long end_row)
raises (OutOfRange);
void cursor_move (in long col, in long row)
raises (OutOfRange);
void make_cell_visible (in long col, in long row)
raises (OutOfRange);
//
// Selection
//
void select_all ();
boolean is_all_selected ();
void selection_append (in long col, in long row)
raises (OutOfRange);
void selection_append_range (in long start_col,
in long start_row,
in long end_col,
in long end_row)
raises (OutOfRange);
void selection_copy ();
void selection_cut ()
raises (InvalidCmd);
//
// Operations on the region
//
void clear_region (in long start_col, in long start_row,
in long end_col, in long end_row)
raises (OutOfRange, InvalidCmd);
void clear_region_content (in long start_col, in long start_row,
in long end_col, in long end_row)
raises (OutOfRange, InvalidCmd);
void clear_region_comments (in long start_col, in long start_row,
in long end_col, in long end_row)
raises (OutOfRange);
void clear_region_formats (in long start_col, in long start_row,
in long end_col, in long end_row)
raises (OutOfRange);
//
// Cell management
//
void cell_set_value (in long col, in long row,
in Gnumeric::Value value)
raises (OutOfRange, InvalidCmd);
Value cell_get_value (in long col, in long row)
raises (OutOfRange);
void cell_set_text (in long col, in long row, in string text)
raises (OutOfRange, InvalidCmd);
string cell_get_text (in long col, in long row)
raises (OutOfRange);
void cell_set_format (in long col, in long row, in string format)
raises (OutOfRange);
string cell_get_format (in long col, in long row)
raises (OutOfRange);
void cell_set_font (in long col, in long row, in string font, in double points)
raises (OutOfRange);
string cell_get_font (in long col, in long row)
raises (OutOfRange);
void cell_set_comment (in long col, in long row, in string comment)
raises (OutOfRange);
string cell_get_comment (in long col, in long row)
raises (OutOfRange);
void cell_set_foreground (in long col, in long row, in string color)
raises (OutOfRange);
string cell_get_foreground (in long col, in long row)
raises (OutOfRange);
void cell_set_background (in long col, in long row, in string color)
raises (OutOfRange);
string cell_get_background (in long col, in long row)
raises (OutOfRange);
void cell_set_pattern (in long col, in long row, in long pattern)
raises (OutOfRange);
long cell_get_pattern (in long col, in long row)
raises (OutOfRange);
const short HALIGN_GENERAL = 1;
const short HALIGN_LEFT = 2;
const short HALIGN_RIGHT = 4;
const short HALIGN_CENTER = 8;
const short HALIGN_FILL = 16;
const short HALIGN_JUSTIFY = 32;
const short HALIGN_CENTER_ACROSS_SELECTION = 64;
const short VALIGN_TOP = 1;
const short VALIGN_BOTTOM = 2;
const short VALIGN_CENTER = 4;
const short VALIGN_JUSTIFY = 8;
void cell_set_alignment (in long col, in long row,
in long halign, in long valign,
in long orientation, in boolean wrap_text)
raises (OutOfRange);
void cell_get_alignment (in long col, in long row,
out long halign, out long valign,
out long orientation, out boolean wrap_text)
raises (OutOfRange);
//
// Cell regions
//
typedef sequence<Value> ValueVector;
ValueVector range_get_values (in string range)
raises (OutOfRange);
void range_set_text (in string range, in string text)
raises (OutOfRange, InvalidCmd);
void range_set_format (in string range, in string format)
raises (OutOfRange);
void range_set_font (in string range, in string font, in short points)
raises (OutOfRange);
void range_set_foreground (in string range, in string color)
raises (OutOfRange);
void range_set_background (in string range, in string color)
raises (OutOfRange);
void range_set_pattern (in string range, in long pattern)
raises (OutOfRange);
void range_set_alignment (in string range,
in long halign, in long valign,
in long orientation, in boolean auto_return)
raises (OutOfRange);
//
// Sheet administrivia
//
void set_dirty (in boolean is_dirty);
//
// Sheet manipulation
//
void insert_col (in long col, in long count)
raises(InvalidCmd);
void delete_col (in long col, in long count)
raises(InvalidCmd);
void insert_row (in long row, in long count)
raises(InvalidCmd);
void delete_row (in long row, in long count)
raises(InvalidCmd);
void shift_rows (in long col,
in long start_row, in long end_row,
in long count);
void shift_cols (in long col,
in long start_row, in long end_row,
in long count);
//
// Information
//
long max_cols_used ();
long max_rows_used ();
double col_width (in long col);
double row_height (in long row);
};
interface Workbook : Bonobo::Embeddable {
exception NameExists {};
Sheet sheet_new (in string name) raises (NameExists);
Sheet sheet_lookup (in string name);
void set_filename (in string name);
void save_to (in string filename);
Sheet sheet_current ();
Sheet sheet_nth (in long n);
long sheet_count ();
//
// Workbook administrivia
//
void set_dirty (in boolean is_dirty);
boolean sheet_rename (in string old_name, in string new_name);
//
// Recomputation
//
void recalc ();
void recalc_all ();
//
// Cell reference parsing
//
void parse (in string cellref,
out Gnumeric::Sheet sheet,
out long col, out long row);
};
//
// Interfaces for embedding Gnumeric with Bonobo
//
interface WorkbookFactory : GNOME::ObjectFactory {
Workbook read (in string filename);
};
interface Grid : Bonobo::Embeddable {
Sheet get_sheet ();
void set_header_visibility (in boolean cols, in boolean rows);
void get_header_visibility (out boolean cols, out boolean rows);
};
};
};
#endif /* __GNUMERIC_IDL__ */
/*
* Graphic module CORBA interface
*
* Author:
* Miguel de Icaza (miguel@gnu.org)
*
* (C) 1999 International GNOME Support (http://www.gnome-support.com)
*/
#include <Bonobo.idl>
%{
#pragma include_defs idl/Gnumeric.h
%}
#pragma inhibit push
#include "idl/Gnumeric.idl"
#pragma inhibit pop
module GNOME {
module Graph {
enum ScaleType {
SCALE_TYPE_LINEAR,
SCALE_TYPE_LOGARITMIC,
SCALE_TYPE_PERCENT
};
enum AxisType {
AXIS_X,
AXIS_Y,
AXIS_Z
};
interface Axis {
/*
* Whether the Axis is hidden
*/
attribute boolean hidden;
ScaleType type ();
/*
* The logaritmic base
*/
attribute short log_base;
};
enum AngleUnit {
ANGLE_DEGREES,
ANGLE_RADIANS,
ANGLE_GRADS
};
interface Plot {
//
// Units of measure used for chart angles
//
attribute AngleUnit angle_unit;
//
// Direction in which pie charts are drawn
//
attribute boolean clockwise;
//
// Whether the slices of a pie are sorted
//
attribute boolean sorted;
//
//
//
// Backdrop backdrop ();
//
// Starting angle for drawing pie charts.
//
attribute short starting_angle;
};
enum ChartType {
//
// Columns or bars where groups of ith-elements
// are plotted next to each other.
CHART_TYPE_CLUSTERED,
//
// ith-values of each series are stacked
// on top of each other.
//
CHART_TYPE_STACKED,
//
// Values fill entire plot
//
CHART_TYPE_STACKED_FULL,
//
// Extra axis displays i-th
//
CHART_TYPE_3D,
//
// Pie
//
CHART_TYPE_PIE,
//
// Scatter
//
CHART_TYPE_SCATTER,
//
// Surface
//
CHART_TYPE_SURFACE_2D,
CHART_TYPE_SURFACE_3D,
//
// Bubbles
//
CHART_TYPE_BUBBLES,
//
// Stock
//
CHART_TYPE_STOCK_HIGH_LOW_CLOSE,
CHART_TYPE_STOCK_OPEN_HIGH_LOW_CLOSE,
CHART_TYPE_STOCK_VOL_HIGH_LOW_CLOSE,
CHART_TYPE_STOCK_VOL_OPEN_HIGH_LOW_CLOSE
};
enum PlotMode {
PLOT_COLBAR, // Columns or bars.
PLOT_LINES, // Lines
PLOT_AREA // Areas
};
enum ColBarMode {
COLBAR_FLAT,
COLBAR_CUBE,
COLBAR_PIRAMID,
COLBAR_CONE,
COLBAR_CYLINDER
};
enum DirMode {
DIR_BAR,
DIR_COL
};
enum LineMode {
LINE_PLAIN,
LINE_MARKERS
};
enum PieMode {
PIE_SIMPLE,
PIE_EXPLODED
};
enum PieDimension {
PIE_2D,
PIE_3D
};
enum ScatterPoints {
SCATTER_NONE,
SCATTER_POINTS
};
enum ScatterConn {
SCATTER_CONN_NONE,
SCATTER_CONN_SMOOTH,
SCATTER_CONN_LINES
};
enum SurfaceMode {
SURFACE_WIREFRAME,
SURFACE_COLORED
};
interface Chart : Bonobo::Unknown {
attribute ChartType chart_type;
attribute PlotMode plot_mode;
attribute ColBarMode col_bar_mode;
attribute DirMode direction;
attribute LineMode line_mode;
attribute PieMode pie_mode;
attribute PieDimension pie_dim;
attribute ScatterPoints scatter_mode;
attribute ScatterConn scatter_conn;
attribute SurfaceMode surface_mode;
attribute boolean with_labels;
//
// Methods for avoiding un-needed repaints.
//
void freeze ();
void thaw ();
};
//
// This one actually contains all the chart elements and controls
// its placement.
//
// * The Chart
// * The titles
// * The axis
// * The chart background
//
interface Layout : Bonobo::Embeddable {
Chart get_chart ();
Axis get_axis (in AxisType axis);
void reset_series ();
void add_series (in GNOME::Gnumeric::Vector vector, in string series_name);
};
};
};
......@@ -9,10 +9,16 @@ noinst_LIBRARIES = libGnumericIDL.a
endif
GNUMERIC_GENERATED = \
Gnumeric-common.c \
Gnumeric-skels.c \
Gnumeric-stubs.c \
Gnumeric.h
GNOME_Gnumeric-common.c \
GNOME_Gnumeric-skels.c \
GNOME_Gnumeric-stubs.c \
GNOME_Gnumeric.h
GNUMERIC_GRAPH_GENERATED = \
GNOME_Gnumeric_Graph-common.c \
GNOME_Gnumeric_Graph-skels.c \
GNOME_Gnumeric_Graph-stubs.c \
GNOME_Gnumeric_Graph.h
if ENABLE_EVOLUTION
EVOLUTION_GENERATED = \
......@@ -22,28 +28,22 @@ EVOLUTION_GENERATED = \
Evolution-Composer-stubs.c
endif
GNUMERIC_GRAPHS_GENERATED = \
gnumeric-graphs-common.c \
gnumeric-graphs-skels.c \
gnumeric-graphs-stubs.c \
gnumeric-graphs.h
libGnumericIDL_a_SOURCES = \
$(GNUMERIC_GENERATED) \
$(GNUMERIC_GRAPHS_GENERATED) \
$(GNUMERIC_GRAPH_GENERATED) \
$(EVOLUTION_GENERATED)
stamp_gnumeric_idl : $(srcdir)/Gnumeric.idl
stamp_Gnumeric_idl : $(srcdir)/GNOME_Gnumeric.idl
$(ORBIT_IDL) -I$(srcdir) $(IDL_FLAGS) $<
touch $@
$(GNUMERIC_GENERATED): stamp_gnumeric_idl
$(GNUMERIC_GENERATED): stamp_Gnumeric_idl
stamp_gnumeric_graphs_idl : $(srcdir)/gnumeric-graphs.idl
stamp_Gnumeric_Graph_idl : $(srcdir)/GNOME_Gnumeric_Graph.idl
$(ORBIT_IDL) -I$(srcdir) $(IDL_FLAGS) $<
touch $@
$(GNUMERIC_GRAPHS_GENERATED): stamp_gnumeric_graphs_idl
$(GNUMERIC_GRAPH_GENERATED): stamp_Gnumeric_Graph_idl
if ENABLE_EVOLUTION
stamp_evolution_idl :
......@@ -55,15 +55,15 @@ $(EVOLUTION_GENERATED) : stamp_evolution_idl
endif
idldir = $(gnumeric_datadir)/idl
idl_DATA = gnumeric-graphs.idl Gnumeric.idl
idl_DATA = GNOME_Gnumeric_Graph.idl GNOME_Gnumeric.idl
EXTRA_DIST = $(idl_DATA)
# Do not use built sources BUILT_SOURCES
# it attempts to build the source even if it is not used.
CLEANFILES += $(GNUMERIC_GENERATED) \
$(GNUMERIC_GRAPHS_GENERATED) \
$(GNUMERIC_GRAPH_GENERATED) \
$(EVOLUTION_GENERATED) \
stamp_gnumeric_idl stamp_gnumeric_graphs_idl stamp_evolution_idl
stamp_Gnumeric_idl stamp_Gnumeric_Graph_idl stamp_evolution_idl
dist-hook :
cd $(distdir) && rm -f $(CLEANFILES)
/**
* The interfaces Gnumeric uses to communicate with graphing components
*
* Author:
* Jody Goldberg <jgoldberg@home.com>
*/
#include <Bonobo.idl>
module GNOME {
module Gnumeric {
struct Pair {
short start;
short end;
};
/* This is a place holder */
typedef sequence<Pair> SeqPair;
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 Date {
typedef sequence<long> 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 {
interface Manager_v2 : Bonobo::Unknown {
typedef long VectorID;
typedef sequence<VectorID> VectorIDs;
typedef sequence<octet> Buffer;
Scalar::Vector addScalarVector (in Scalar::Vector v, in VectorID id);
Date::Vector addDateVector (in Date::Vector v, in VectorID id);
String::Vector addStringVector (in String::Vector v, in VectorID id);
/**
* 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);
Bonobo::Control getTypeSelectControl ();
/**
* importSpecification :
*
* 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.
*/
oneway void importSpecification (in Buffer spec);
};
};
};
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment