![]() |
![]() |
![]() |
Gwyddion Widgets Library Reference Manual | ![]() |
---|
GwyGraphLabelGwyGraphLabel — Graph curve legend |
GwyGraphLabel; GwyGraphLabelClass; GtkWidget* gwy_graph_label_new (); void gwy_graph_label_refresh (GwyGraphLabel *label); void gwy_graph_label_set_model (GwyGraphLabel *label, gpointer gmodel); void gwy_graph_label_draw_label_on_drawable (GdkDrawable *drawable, GdkGC *gc, PangoLayout *layout, gint x, gint y, gint width, gint height, GwyGraphLabel *label); GString* gwy_graph_label_export_vector (GwyGraphLabel *label, gint x, gint y, gint width, gint height, gint fontsize); void gwy_graph_label_enable_user_input (GwyGraphLabel *label, gboolean enable);
GwyGraphLabel is a part of GwyGraph, it renders frame with graph curve legend. It can be probabaly used only within GwyGraph.
typedef struct { GtkWidgetClass parent_class; void (*selected)(GwyGraphLabel *label); gpointer reserved1; gpointer reserved2; } GwyGraphLabelClass;
GtkWidget* gwy_graph_label_new ();
creates new graph label.
Returns : | new graph label widget |
void gwy_graph_label_refresh (GwyGraphLabel *label);
synchronize label with information in graphmodel
label : |
graph label |
void gwy_graph_label_set_model (GwyGraphLabel *label, gpointer gmodel);
set model of the graph label. gmodel
is duplicated.
label : |
graph label |
gmodel : |
pointer to the graph model |
void gwy_graph_label_draw_label_on_drawable (GdkDrawable *drawable, GdkGC *gc, PangoLayout *layout, gint x, gint y, gint width, gint height, GwyGraphLabel *label);
draws a graph label on a drawable
drawable : |
the GdkDrawable |
gc : |
a GdkGC graphics context. |
layout : |
pango layout |
x : |
x position where label is to be drawn |
y : |
y position where label is to be drawn |
width : |
width of the label |
height : |
hieght of the label |
label : |
graph label |
GString* gwy_graph_label_export_vector (GwyGraphLabel *label, gint x, gint y, gint width, gint height, gint fontsize);
label : |
graph label |
x : |
x position of the graph label |
y : |
y position of the graph label |
width : |
width of the graph label |
height : |
hieght of the graph label |
fontsize : |
fontsize of the label |
Returns : | the graph label vector (piece of postscript code) as a string |
void gwy_graph_label_enable_user_input (GwyGraphLabel *label, gboolean enable);
enables/disables user input to the graph label
label : |
graph label |
enable : |
whether to enable/disable the user input |
<< GwyAxisDialog | GwyGraphData >> |