Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 79 lines (76 sloc) 3.443 kB
02179b5 @pchilds source unbundled
authored
1 /***************************************************************************
75e3268 @pchilds transferred to gtk_ based API and polar bug fixes
authored
2 * gtkplotlinear.h
02179b5 @pchilds source unbundled
authored
3 *
4 * A GTK+ widget that plots data
5 *
6 * Sat Dec 4 17:18:14 2010
7 * Copyright 2011 Paul Childs
8 * <pchilds@physics.org>
9 ****************************************************************************/
10
11 /*
12 * This program is free software; you can redistribute it and/or modify
d08bbbc @pchilds not much
authored
13 * it under the terms of the GNU Library General Public License as published by
02179b5 @pchilds source unbundled
authored
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU Library General Public License for more details.
21 *
d08bbbc @pchilds not much
authored
22 * You should have received a copy of the GNU Library General Public License
02179b5 @pchilds source unbundled
authored
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
25 */
26
75e3268 @pchilds transferred to gtk_ based API and polar bug fixes
authored
27 #ifndef __GTK_PLOT_LINEAR_H__
28 # define __GTK_PLOT_LINEAR_H__
80c6a47 @pchilds update
authored
29 # include <gtk/gtk.h>
fced77f @pchilds Added inheritance structure
authored
30 # include "gtkplot.h"
80c6a47 @pchilds update
authored
31 G_BEGIN_DECLS
75e3268 @pchilds transferred to gtk_ based API and polar bug fixes
authored
32 # define GTK_PLOT_TYPE_LINEAR (gtk_plot_linear_get_type())
33 # define GTK_PLOT_LINEAR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_PLOT_TYPE_LINEAR, GtkPlotLinear))
34 # define GTK_PLOT_IS_LINEAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_PLOT_TYPE_LINEAR))
35 # define GTK_PLOT_LINEAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_PLOT_LINEAR, GtkPlotLinearClass))
36 # define GTK_PLOT_IS_LINEAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_PLOT_TYPE_LINEAR))
37 # define GTK_PLOT_LINEAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_PLOT_TYPE_LINEAR, GtkPlotLinearClass))
38 typedef struct _GtkPlotLinear GtkPlotLinear;
39 typedef struct _GtkPlotLinearClass GtkPlotLinearClass;
80c6a47 @pchilds update
authored
40 typedef enum
41 {
75e3268 @pchilds transferred to gtk_ based API and polar bug fixes
authored
42 GTK_PLOT_LINEAR_ZOOM_OUT = 1 << 0,
43 GTK_PLOT_LINEAR_ZOOM_HZT = 1 << 1,
44 GTK_PLOT_LINEAR_ZOOM_VRT = 1 << 2,
45 GTK_PLOT_LINEAR_ZOOM_SGL = 1 << 3
46 } GtkPlotLinearZoom;
80c6a47 @pchilds update
authored
47 typedef enum
48 {
75e3268 @pchilds transferred to gtk_ based API and polar bug fixes
authored
49 GTK_PLOT_LINEAR_DISP_LIN = 1 << 0,
50 GTK_PLOT_LINEAR_DISP_PTS = 1 << 1
51 } GtkPlotLinearDisp;
52 struct _GtkPlotLinear
80c6a47 @pchilds update
authored
53 {
fced77f @pchilds Added inheritance structure
authored
54 GtkPlot parent;
80c6a47 @pchilds update
authored
55 GArray *xdata, *ydata; /* x and y data sets */
56 GArray *ind, *sizes; /* indices of first element and number of elements for each trace */
57 gchar *xlab, *ylab; /* labels for the x and y axes */
58 guint ptsize, linew; /* radii of the points and line width of the plot line */
dff3b34 @pchilds rounding errors fixed
authored
59 guint xdp, ydp; /* number of decimal points for axes */
80c6a47 @pchilds update
authored
60 gint zmode; /* zoom mode flags */
61 gdouble xps, yps; /* x and y position of mouse */
62 guint flagd; /* data display flags */
63 };
75e3268 @pchilds transferred to gtk_ based API and polar bug fixes
authored
64 struct _GtkPlotLinearClass
80c6a47 @pchilds update
authored
65 {
fced77f @pchilds Added inheritance structure
authored
66 GtkPlotClass parent_class;
75e3268 @pchilds transferred to gtk_ based API and polar bug fixes
authored
67 void (*moved) (GtkPlotLinear *plot);
80c6a47 @pchilds update
authored
68 };
75e3268 @pchilds transferred to gtk_ based API and polar bug fixes
authored
69 gboolean gtk_plot_linear_update_scale(GtkWidget *widget, gdouble xn, gdouble xx, gdouble yn, gdouble yx);
70 gboolean gtk_plot_linear_update_scale_pretty(GtkWidget *widget, gdouble xl, gdouble xu, gdouble yl, gdouble yu);
71 gboolean gtk_plot_linear_print_eps(GtkWidget *widget, gchar *fout);
72 gboolean gtk_plot_linear_print_png(GtkWidget *widget, gchar *fout);
73 gboolean gtk_plot_linear_print_svg(GtkWidget *widget, gchar *fout);
87c02ec @pchilds Added pointer passing functions
authored
74 void gtk_plot_linear_set_label(GtkPlotLinear *plot, gchar *xl, gchar *yl);
75 void gtk_plot_linear_set_data(GtkPlotLinear *plot, GArray *xd, GArray *yd, GArray *nd, GArray *sz);
75e3268 @pchilds transferred to gtk_ based API and polar bug fixes
authored
76 GtkWidget *gtk_plot_linear_new(void);
80c6a47 @pchilds update
authored
77 G_END_DECLS
02179b5 @pchilds source unbundled
authored
78 #endif
Something went wrong with that request. Please try again.