1
/* gtkplotcsurface - csurface plots widget for gtk+
2
* Copyright 1999-2001 Adrian E. Feiguin <feiguin@ifir.edu.ar>
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Library General Public
6
* License as published by the Free Software Foundation; either
7
* version 2 of the License, or (at your option) any later version.
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Library General Public License for more details.
14
* You should have received a copy of the GNU Library General Public
15
* License along with this library; if not, write to the
16
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
* Boston, MA 02111-1307, USA.
20
#ifndef __GTK_PLOT_CSURFACE_H__
21
#define __GTK_PLOT_CSURFACE_H__
25
#endif /* __cplusplus */
28
#include "gtkplotdt.h"
29
#include "gtkplotsurface.h"
30
#include "gtkplotpc.h"
33
#define GTK_PLOT_CSURFACE(obj) GTK_CHECK_CAST (obj, gtk_plot_csurface_get_type (), GtkPlotCSurface)
34
#define GTK_TYPE_PLOT_CSURFACE (gtk_plot_csurface_get_type ())
35
#define GTK_PLOT_CSURFACE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_plot_csurface_get_type, GtkPlotCSurfaceClass)
36
#define GTK_IS_PLOT_CSURFACE(obj) GTK_CHECK_TYPE (obj, gtk_plot_csurface_get_type ())
38
typedef struct _GtkPlotCSurface GtkPlotCSurface;
39
typedef struct _GtkPlotCSurfaceClass GtkPlotCSurfaceClass;
43
GTK_PLOT_PROJECT_NONE, /* draw surface with no projections */
44
GTK_PLOT_PROJECT_EMPTY, /* draw empty contours -- lines only.
45
Notice that the style of the lines is given by
46
levels/sublevels_line. You should set to
47
GTK_PLOT_LINE_NONE if you don't want the lines
49
GTK_PLOT_PROJECT_FULL, /* draw filled contours */
52
struct _GtkPlotCSurface
54
GtkPlotSurface surface;
56
gboolean lines_visible; /* show contour level lines -- for 3d only */
57
/* for 2d it is given by projection and line style */
58
GtkPlotProjection projection; /* project on x-y plane */
60
/* all fields below this line are for 2d contours */
62
GList *levels; /* polygons corrsponding to each contour level */
63
GList *bg_triangles; /* background triangles, drawn before the contour
64
levels, that are not cut by any contour line */
66
GtkPlotLine levels_line;
67
GtkPlotLine sublevels_line;
70
struct _GtkPlotCSurfaceClass
72
GtkPlotSurfaceClass parent_class;
77
GtkType gtk_plot_csurface_get_type (void);
78
GtkWidget* gtk_plot_csurface_new (void);
79
GtkWidget* gtk_plot_csurface_new_function (GtkPlotFunc3D function);
81
void gtk_plot_csurface_construct_function (GtkPlotCSurface *csurface,
82
GtkPlotFunc3D function);
84
void gtk_plot_csurface_set_lines_visible (GtkPlotCSurface *csurface,
86
gboolean gtk_plot_csurface_get_lines_visible (GtkPlotCSurface *csurface);
87
void gtk_plot_csurface_set_projection (GtkPlotCSurface *csurface,
88
GtkPlotProjection proj);
89
GtkPlotProjection gtk_plot_csurface_projection (GtkPlotCSurface *csurface);
90
void gtk_plot_csurface_set_levels_attributes (GtkPlotCSurface *data,
91
GtkPlotLineStyle style,
93
const GdkColor *color);
94
void gtk_plot_csurface_set_sublevels_attributes (GtkPlotCSurface *data,
95
GtkPlotLineStyle style,
97
const GdkColor *color);
98
void gtk_plot_csurface_get_levels_attributes (GtkPlotCSurface *data,
99
GtkPlotLineStyle *style,
102
void gtk_plot_csurface_get_sublevels_attributes (GtkPlotCSurface *data,
103
GtkPlotLineStyle *style,
109
#endif /* __cplusplus */
112
#endif /* __GTK_PLOT_CSURFACE_H__ */