![]() |
![]() |
![]() |
Gwyddion Widgets Library Reference Manual | ![]() |
---|
GwyGraphAreaGwyGraphArea — Layout for drawing graph curves |
GwyGraphStatus_CursorData; GwyGraphAreaCurve; GwyGraphArea; GwyGraphAreaClass; GtkWidget* gwy_graph_area_new (GtkAdjustment *hadjustment, GtkAdjustment *vadjustment); GtkWidget* gwy_graph_area_get_label (GwyGraphArea *area); void gwy_graph_area_refresh (GwyGraphArea *area); void gwy_graph_area_set_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_enable_user_input (GwyGraphArea *area, gboolean enable); void gwy_graph_area_get_cursor (GwyGraphArea *area, gdouble *x_cursor, gdouble *y_cursor); void gwy_graph_area_set_x_grid_data (GwyGraphArea *area, GArray *grid_data); void gwy_graph_area_set_y_grid_data (GwyGraphArea *area, GArray *grid_data); const GArray* gwy_graph_area_get_x_grid_data (GwyGraphArea *area); const GArray* gwy_graph_area_get_y_grid_data (GwyGraphArea *area); GwySelection* gwy_graph_area_get_selection (GwyGraphArea *area, GwyGraphStatusType status_type); void gwy_graph_area_set_status (GwyGraphArea *area, GwyGraphStatusType status_type);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkLayout +----GwyGraphArea
"status-changed" void user_function (GwyGraphArea *gwygrapharea, gint arg1, gpointer user_data);
GwyGraphArea is the central part of GwyGraph widget. It plots a set of data curves with the given plot properties.
It is recommended to use it within GwyGraph, however, it can also be used separately.
typedef struct { GwyGraphDataPoint data_point; } GwyGraphStatus_CursorData;
typedef struct { GdkPoint *points; /*points to be directly plotted*/ gpointer reserved; } GwyGraphAreaCurve;
typedef struct { GtkLayoutClass parent_class; void (*status_changed)(GwyGraphArea *area, gint i); gpointer reserved1; gpointer reserved2; } GwyGraphAreaClass;
GtkWidget* gwy_graph_area_new (GtkAdjustment *hadjustment, GtkAdjustment *vadjustment);
Creates a graph area widget.
hadjustment : |
horizontal adjustment (assigns lower and upper bounds as well as increments to the horizontal axis of the new graph area) |
vadjustment : |
vertical adjustment (assigns lower and upper bounds as well as increments to the vertical axis of the new graph area) |
Returns : | new GwyGraphArea widget. |
GtkWidget* gwy_graph_area_get_label (GwyGraphArea *area);
area : |
graph area |
Returns : | the GwyGraphLabel within area (do not free).
|
void gwy_graph_area_refresh (GwyGraphArea *area);
Refreshes the area with respect to graph model.
area : |
graph area |
void gwy_graph_area_set_model (GwyGraphArea *area, gpointer gmodel);
Changes the graph model. Calls refresh afterwards. gmodel
is duplicated.
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);
Draws the graph area to a GdkDrawable.
drawable : |
a GdkDrawable (destination for graphics operations) |
gc : |
a GdkGC graphics context |
x : |
X position in drawable where the graph area should be drawn
|
y : |
Y position in drawable where the graph area should be drawn
|
width : |
width of the graph area on the drawable |
height : |
height of the graph area on the drawable |
area : |
the graph area to draw |
GString* gwy_graph_area_export_vector (GwyGraphArea *area, gint x, gint y, gint width, gint height);
area : |
the graph area to export |
x : |
|
y : |
|
width : |
|
height : |
|
Returns : |
void gwy_graph_area_enable_user_input (GwyGraphArea *area, gboolean enable);
Enables/disables all the user input dialogs (to be invoked by clicking the 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 within graph area.
area : |
graph area |
x_cursor : |
x value corresponding to cursor position |
y_cursor : |
y value corresponding to cursor position |
void gwy_graph_area_set_x_grid_data (GwyGraphArea *area, GArray *grid_data);
Sets the grid data on the x-axis of the graph area
area : |
graph area |
grid_data : |
array of grid data on the x axis |
void gwy_graph_area_set_y_grid_data (GwyGraphArea *area, GArray *grid_data);
Sets the grid data on the y-axis of the graph area
area : |
graph area |
grid_data : |
array of grid data on the y axis |
const GArray* gwy_graph_area_get_x_grid_data (GwyGraphArea *area);
area : |
graph area |
Returns : | the grid data on the x-axis of the graph area as a GArray (do not free). |
const GArray* gwy_graph_area_get_y_grid_data (GwyGraphArea *area);
area : |
graph area |
Returns : | the grid data on the y-axis of the graph area as a GArray (do not free). |
GwySelection* gwy_graph_area_get_selection (GwyGraphArea *area, GwyGraphStatusType status_type);
area : |
|
status_type : |
|
Returns : |
void gwy_graph_area_set_status (GwyGraphArea *area, GwyGraphStatusType status_type);
area : |
|
status_type : |
void user_function (GwyGraphArea *gwygrapharea, gint arg1, gpointer user_data);
gwygrapharea : |
the object which received the signal. |
arg1 : |
|
user_data : |
user data set when the signal handler was connected. |
<< GwyGraphCurveModel | GwyAxis >> |