~ubuntu-branches/debian/sid/genius/sid

« back to all changes in this revision

Viewing changes to gtkextra/gtkplotcsurface.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2006-08-21 12:57:45 UTC
  • Revision ID: james.westby@ubuntu.com-20060821125745-sl9ks8v7fq324bdf
Tags: upstream-0.7.6.1
ImportĀ upstreamĀ versionĀ 0.7.6.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* gtkplotcsurface - csurface plots widget for gtk+
 
2
 * Copyright 1999-2001  Adrian E. Feiguin <feiguin@ifir.edu.ar>
 
3
 *
 
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.
 
8
 *
 
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.
 
13
 *
 
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.
 
18
 */
 
19
 
 
20
#ifndef __GTK_PLOT_CSURFACE_H__
 
21
#define __GTK_PLOT_CSURFACE_H__
 
22
 
 
23
#ifdef __cplusplus
 
24
extern "C" {
 
25
#endif /* __cplusplus */
 
26
 
 
27
#include "gtkplot.h"
 
28
#include "gtkplotdt.h"
 
29
#include "gtkplotsurface.h"
 
30
#include "gtkplotpc.h"
 
31
 
 
32
 
 
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 ())
 
37
 
 
38
typedef struct _GtkPlotCSurface         GtkPlotCSurface;
 
39
typedef struct _GtkPlotCSurfaceClass    GtkPlotCSurfaceClass;
 
40
 
 
41
typedef enum
 
42
{
 
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
 
48
                             drawn */
 
49
  GTK_PLOT_PROJECT_FULL,  /* draw filled contours */
 
50
} GtkPlotProjection;      
 
51
 
 
52
struct _GtkPlotCSurface
 
53
{
 
54
  GtkPlotSurface surface;
 
55
 
 
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 */
 
59
 
 
60
  /* all fields below this line are for 2d contours */
 
61
 
 
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 */
 
65
 
 
66
  GtkPlotLine levels_line;
 
67
  GtkPlotLine sublevels_line;
 
68
};
 
69
 
 
70
struct _GtkPlotCSurfaceClass
 
71
{
 
72
  GtkPlotSurfaceClass parent_class;
 
73
};
 
74
 
 
75
/* PlotCSurface */
 
76
 
 
77
GtkType         gtk_plot_csurface_get_type      (void);
 
78
GtkWidget*      gtk_plot_csurface_new           (void);
 
79
GtkWidget*      gtk_plot_csurface_new_function  (GtkPlotFunc3D function);
 
80
 
 
81
void            gtk_plot_csurface_construct_function (GtkPlotCSurface *csurface,
 
82
                                                      GtkPlotFunc3D function);
 
83
 
 
84
void            gtk_plot_csurface_set_lines_visible (GtkPlotCSurface *csurface,
 
85
                                                     gboolean visible);
 
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,
 
92
                                                         gfloat width,
 
93
                                                         const GdkColor *color);
 
94
void            gtk_plot_csurface_set_sublevels_attributes (GtkPlotCSurface *data,
 
95
                                                         GtkPlotLineStyle style,
 
96
                                                         gfloat width,
 
97
                                                         const GdkColor *color);
 
98
void            gtk_plot_csurface_get_levels_attributes (GtkPlotCSurface *data,
 
99
                                                         GtkPlotLineStyle *style,
 
100
                                                         gfloat *width,
 
101
                                                         GdkColor *color);
 
102
void            gtk_plot_csurface_get_sublevels_attributes (GtkPlotCSurface *data,
 
103
                                                         GtkPlotLineStyle *style,
 
104
                                                         gfloat *width,
 
105
                                                         GdkColor *color);
 
106
 
 
107
#ifdef __cplusplus
 
108
}
 
109
#endif /* __cplusplus */
 
110
 
 
111
 
 
112
#endif /* __GTK_PLOT_CSURFACE_H__ */