![]() | ![]() | ![]() | Gwyddion Widgets Library Reference Manual | ![]() |
---|
GwyGraphAreaGwyGraphArea — Layout for drawing graph curves. |
GwyGraphStatus_PointData; GwyGraphStatus_CursorData; GwyGraphStatus_PointsData; GwyGraphStatus_AreaData; GwyGraphStatus_AreasData; GwyGraphStatus_ZoomData; GwyGraphAreaCurve; GwyGraphArea; GwyGraphAreaClass; GtkWidget* gwy_graph_area_new (GtkAdjustment *hadjustment, GtkAdjustment *vadjustment); void gwy_graph_area_signal_selected (GwyGraphArea *area); void gwy_graph_area_signal_zoomed (GwyGraphArea *area); void gwy_graph_area_signal_mouse_moved (GwyGraphArea *area); void gwy_graph_area_refresh (GwyGraphArea *area); void gwy_graph_area_set_selection (GwyGraphArea *area, GwyGraphStatusType status, gdouble *selection, gint n_of_selections); void gwy_graph_area_change_model (GwyGraphArea *area, gpointer gmodel); void gwy_graph_area_draw_area_on_drawable (GdkDrawable *drawable, GdkGC *gc, gint x, gint y, gint width, gint height, GwyGraphArea *area); GString* gwy_graph_area_export_vector (GwyGraphArea *area, gint x, gint y, gint width, gint height); void gwy_graph_area_clear_selection (GwyGraphArea *area); void gwy_graph_area_enable_user_input (GwyGraphArea *area, gboolean enable); void gwy_graph_area_get_cursor (GwyGraphArea *area, gdouble *x_cursor, gdouble *y_cursor);
GObject +----GtkObject +----GtkWidget +----GtkContainer +----GtkLayout +----GwyGraphArea
"mouse-moved" void user_function (GwyGraphArea *gwygrapharea, gpointer user_data); "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.
typedef struct { GwyGraphDataPoint data_point; } GwyGraphStatus_CursorData;
typedef struct { gdouble xmin; gdouble ymin; gdouble width; gdouble height; } GwyGraphStatus_ZoomData;
typedef struct { GdkPoint *points; /*points to be directly plotted*/ gpointer reserved; } GwyGraphAreaCurve;
typedef struct { GtkLayoutClass parent_class; GdkCursor *cross_cursor; GdkCursor *arrow_cursor; void (*selected)(GwyGraphArea *area); void (*zoomed)(GwyGraphArea *area); void (*mouse_moved)(GwyGraphArea *area); gpointer reserved1; gpointer reserved2; } GwyGraphAreaClass;
GtkWidget* gwy_graph_area_new (GtkAdjustment *hadjustment, GtkAdjustment *vadjustment);
hadjustment : | |
vadjustment : | |
Returns : |
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_signal_mouse_moved (GwyGraphArea *area);
emit signal that user moved mouse over graph area.
area : | grapher area |
void gwy_graph_area_set_selection (GwyGraphArea *area, GwyGraphStatusType status, gdouble *selection, gint n_of_selections);
Set selection data for given values and status. Refresh graph area after doing this to see any change.
area : | graph area |
status : | status of selection to be set |
selection : | selection data field |
n_of_selections : | number of selections to be set |
void gwy_graph_area_change_model (GwyGraphArea *area, gpointer gmodel);
Changes the graph model. Calls refresh afterwards.
area : | graph area |
gmodel : | new graph model |
void gwy_graph_area_draw_area_on_drawable (GdkDrawable *drawable, GdkGC *gc, gint x, gint y, gint width, gint height, GwyGraphArea *area);
drawable : | |
gc : | |
x : | |
y : | |
width : | |
height : | |
area : |
GString* gwy_graph_area_export_vector (GwyGraphArea *area, gint x, gint y, gint width, gint height);
area : | |
x : | |
y : | |
width : | |
height : | |
Returns : |
void gwy_graph_area_clear_selection (GwyGraphArea *area);
Clear all the selections. If you use grapher area as a part of GwyGrapher use the GwyGrapher clear selection function preferably.
area : | graph area |
void gwy_graph_area_enable_user_input (GwyGraphArea *area, gboolean enable);
Enables/disables all the user input dialogs to be invoked by clicking by mouse.
area : | graph area |
enable : | enable/disable user input |
void gwy_graph_area_get_cursor (GwyGraphArea *area, gdouble *x_cursor, gdouble *y_cursor);
Gets mouse cursor related values withing graph area
area : | graph area |
x_cursor : | x value corresponding to cursor position |
y_cursor : | y value corresponding to cursor position |
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. |
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. |
<< GwyGraphCurveModel | GwyAxis >> |