![]() |
![]() |
![]() |
Gwyddion Widgets Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
#include <libgwydgets/gwydgets.h> struct GwyGraph; struct GwyGraphClass; GtkWidget * gwy_graph_new (GwyGraphModel *gmodel
); GwyAxis * gwy_graph_get_axis (GwyGraph *graph
,GtkPositionType type
); void gwy_graph_set_axis_visible (GwyGraph *graph
,GtkPositionType type
,gboolean is_visible
); GtkWidget * gwy_graph_get_area (GwyGraph *graph
); void gwy_graph_set_model (GwyGraph *graph
,GwyGraphModel *gmodel
); GwyGraphModel * gwy_graph_get_model (GwyGraph *graph
); void gwy_graph_set_status (GwyGraph *graph
,GwyGraphStatusType status
); GwyGraphStatusType gwy_graph_get_status (GwyGraph *graph
); void gwy_graph_enable_user_input (GwyGraph *graph
,gboolean enable
); GdkPixbuf * gwy_graph_export_pixmap (GwyGraph *graph
,gboolean export_title
,gboolean export_axis
,gboolean export_labels
); GString * gwy_graph_export_postscript (GwyGraph *graph
,gboolean export_title
,gboolean export_axis
,gboolean export_labels
,GString *str
);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkTable +----GwyGraph
GwyGraph is a basic widget for displaying graphs. It consists of several widgets that can also be used separately (at least in principle): GwyGraphArea forms the main part of the graph, GwyAxis is used for the axes, GwyGraphLabel represents the key and GwyGraphCorner is a dummy widget (at this moment) used for graph corners.
Persisent graph properties and data are represented with GwyGraphModel. Changes to the model are automatically reflected in the graph.
struct GwyGraphClass { GtkTableClass parent_class; void (*reserved1)(void); void (*reserved2)(void); void (*reserved3)(void); void (*reserved4)(void); };
GtkWidget * gwy_graph_new (GwyGraphModel *gmodel
);
Creates graph widget based on information in model.
|
A graph model. |
Returns : |
new graph widget. |
GwyAxis * gwy_graph_get_axis (GwyGraph *graph
,GtkPositionType type
);
Gets a graph axis.
|
A graph widget. |
|
Axis orientation |
Returns : |
The axis (of given orientation) within the graph widget. |
void gwy_graph_set_axis_visible (GwyGraph *graph
,GtkPositionType type
,gboolean is_visible
);
Sets the visibility of graph axis of given orientation. Visibility can be set also directly using GwyAxis API.
|
A graph widget. |
|
Axis orientation |
|
set/unset axis visibility within graph widget |
GtkWidget * gwy_graph_get_area (GwyGraph *graph
);
Gets the area widget of a graph.
|
A graph widget. |
Returns : |
The graph area widget within the graph. |
void gwy_graph_set_model (GwyGraph *graph
,GwyGraphModel *gmodel
);
Changes the model a graph displays.
Everything in graph widgets will be reset to reflect the new data.
|
A graph widget. |
|
New graph model |
GwyGraphModel * gwy_graph_get_model (GwyGraph *graph
);
Gets the model of a graph.
|
A graph widget. |
Returns : |
The graph model this graph widget displays. |
void gwy_graph_set_status (GwyGraph *graph
,GwyGraphStatusType status
);
Sets the status of a graph widget.
The status determines how the graph reacts on mouse events. This includes point or area selection and zooming.
|
A graph widget. |
|
graph status |
GwyGraphStatusType gwy_graph_get_status (GwyGraph *graph
);
Get the status of a graph widget.
See gwy_graph_set_status()
for more.
|
A graph widget. |
Returns : |
The current graph status. |
void gwy_graph_enable_user_input (GwyGraph *graph
,gboolean enable
);
Enables/disables all the graph/curve settings dialogs to be invoked by mouse clicks.
|
A graph widget. |
|
whether to enable user input |
GdkPixbuf * gwy_graph_export_pixmap (GwyGraph *graph
,gboolean export_title
,gboolean export_axis
,gboolean export_labels
);
"model"
property"model" GwyGraphModel* : Read / Write
The graph model of the graph. (Since: 2.7).