![]() | ![]() | ![]() | Gwyddion Widgets Library Reference Manual | ![]() |
---|
GwyGraphArea — Layout for drawing graph curves.
struct GwyGraphAreaCurvePoints; struct GwyGraphDataPoint; struct GwyGraphScrPoint; struct GwyGraphStatus_CursorData; struct GwyGraphStatus_SelData; struct GwyGraphStatus_PointsData; struct GwyGraphStatus_ZoomData; struct GwyGraphAreaCurve; struct GwyGraphAreaParams; struct GwyGraphArea; struct GwyGraphAreaClass; GtkWidget* gwy_graph_area_new (GtkAdjustment *hadjustment, GtkAdjustment *vadjustment); void gwy_graph_area_set_style (GwyGraphArea *area, GwyGraphAreaParams style); void gwy_graph_area_set_boundaries (GwyGraphArea *area, gdouble x_min, gdouble x_max, gdouble y_min, gdouble y_max); void gwy_graph_area_add_curve (GwyGraphArea *area, GwyGraphAreaCurve *curve); void gwy_graph_area_clear (GwyGraphArea *area); void gwy_graph_area_signal_selected (GwyGraphArea *area); void gwy_graph_area_signal_zoomed (GwyGraphArea *area); void gwy_graph_area_set_selection (GwyGraphArea *area, gdouble from, gdouble to);
GObject +----GtkObject +----GtkWidget +----GtkContainer +----GtkLayout +----GwyGraphArea
"selected" void user_function (GwyGraphArea *gwygrapharea, gpointer user_data); "zoomed" void user_function (GwyGraphArea *gwygrapharea, gpointer user_data);
This widget is a part of GwyGraph widget. It is recommended to use it within the GwyGraph widget, however, it can be used separately. It plots a set of data curves with a given plot properties.
struct GwyGraphAreaCurvePoints { gdouble *xvals; /*screen coordinates of points*/ gdouble *yvals; /*screen coordinates of points*/ gint N; /*number of points*/ };
struct GwyGraphDataPoint { gdouble x; gdouble y; char *x_unit; char *y_unit; };
struct GwyGraphStatus_CursorData { GwyGraphScrPoint scr_point; GwyGraphDataPoint data_point; };
struct GwyGraphStatus_SelData { gint scr_start; gint scr_end; gdouble data_start; gdouble data_end; };
struct GwyGraphStatus_PointsData { GwyGraphScrPoint actual_scr_point; GwyGraphDataPoint actual_data_point; GArray *scr_points; GArray *data_points; gint n; };
struct GwyGraphStatus_ZoomData { gint x; gint y; gint width; gint height; gdouble xmin; gdouble xmax; gdouble ymin; gdouble ymax; };
struct GwyGraphAreaCurve { GwyGraphAreaCurvePoints data; /*original data including its size*/ GwyGraphAreaCurveParams params; /*parameters of plot*/ GdkPoint *points; /*points to be directly plotted*/ gpointer reserved; };
struct GwyGraphAreaClass { GtkLayoutClass parent_class; GdkCursor *cross_cursor; GdkCursor *arrow_cursor; void (*selected)(GwyGraphArea *area); void (*zoomed)(GwyGraphArea *area); gpointer reserved1; gpointer reserved2; };
GtkWidget* gwy_graph_area_new (GtkAdjustment *hadjustment, GtkAdjustment *vadjustment);
hadjustment : | |
vadjustment : | |
Returns : |
void gwy_graph_area_set_style (GwyGraphArea *area, GwyGraphAreaParams style);
area : | |
style : |
void gwy_graph_area_set_boundaries (GwyGraphArea *area, gdouble x_min, gdouble x_max, gdouble y_min, gdouble y_max);
Sets the boudaries of graph area and calls for recomputation of actual curve screen representation and its redrawing. used for example by zoom to change curve screen representation.
area : | graph area |
x_min : | x minimum |
x_max : | x maximum |
y_min : | y minimim |
y_max : | y maximum |
void gwy_graph_area_add_curve (GwyGraphArea *area, GwyGraphAreaCurve *curve);
Adds a curve to graph. Adds the curve data values, but the recomputation of actual screen points representing curve must be called after setting the boundaries of the graph area (and complete graph).
area : | graph area |
curve : | curve to be added |
void gwy_graph_area_clear (GwyGraphArea *area);
clear graph area
area : | graph area |
void gwy_graph_area_signal_selected (GwyGraphArea *area);
emit signal that something was selected by mouse. "Something" depends on the actual graph status (points, horizontal selection, etc.).
area : | graph area |
void gwy_graph_area_signal_zoomed (GwyGraphArea *area);
emit signal that user finished drawing zoom rectangle by mouse.
area : | graph area |
void gwy_graph_area_set_selection (GwyGraphArea *area, gdouble from, gdouble to);
area : | |
from : | |
to : |
void user_function (GwyGraphArea *gwygrapharea, gpointer user_data);
gwygrapharea : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
void user_function (GwyGraphArea *gwygrapharea, gpointer user_data);
gwygrapharea : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
<< GwyAxis | GwyGraphCorner >> |