![]() |
![]() |
![]() |
Gwyddion Widgets Library Reference Manual | ![]() |
---|---|---|---|---|
#include <libgwydgets/gwydgets.h> GwyGraphLabel; GwyGraphLabelClass; GtkWidget* gwy_graph_label_new (void); void gwy_graph_label_set_model (GwyGraphLabel *label, GwyGraphModel *gmodel); GwyGraphModel* gwy_graph_label_get_model (GwyGraphLabel *label); void gwy_graph_label_enable_user_input (GwyGraphLabel *label, gboolean enable); void gwy_graph_label_draw_on_drawable (GwyGraphLabel *label, GdkDrawable *drawable, GdkGC *gc, PangoLayout *layout, gint x, gint y, gint width, gint height); GString* gwy_graph_label_export_vector (GwyGraphLabel *label, gint x, gint y, gint width, gint height, gint fontsize);
typedef struct { GtkWidgetClass parent_class; void (*reserved1)(void); void (*reserved2)(void); } GwyGraphLabelClass;
GtkWidget* gwy_graph_label_new (void);
Creates a new graph label.
Returns : |
A new graph label widget as a GtkWidget. |
void gwy_graph_label_set_model (GwyGraphLabel *label, GwyGraphModel *gmodel);
Sets new model of a graph label.
|
A graph label. |
|
New graph model. |
GwyGraphModel* gwy_graph_label_get_model (GwyGraphLabel *label);
Gets the model of a graph key.
|
A graph label. |
Returns : |
The graph model this graph label takes curve properties and descriptions from. |
void gwy_graph_label_enable_user_input (GwyGraphLabel *label, gboolean enable);
Enables or disables user input to a graph label.
|
A graph label. |
|
Whether to enable the user input. |
void gwy_graph_label_draw_on_drawable (GwyGraphLabel *label, GdkDrawable *drawable, GdkGC *gc, PangoLayout *layout, gint x, gint y, gint width, gint height);
draws a graph label on a drawable
|
graph label |
|
the GdkDrawable |
|
Graphics context. It is modified by this function unpredictably. |
|
pango layout |
|
x position where label is to be drawn |
|
y position where label is to be drawn |
|
width of the label |
|
hieght of the label |
GString* gwy_graph_label_export_vector (GwyGraphLabel *label, gint x, gint y, gint width, gint height, gint fontsize);
Creates PostScript representation of a graph label.
|
A graph label. |
|
x position of the graph label |
|
y position of the graph label |
|
width of the graph label |
|
hieght of the graph label |
|
fontsize of the label |
Returns : |
A fragment of PostScript code representing the the graph label as a newly allocated GString. |