![]() | ![]() | ![]() | Gwyddion Widgets Library Reference Manual | ![]() |
---|
GwyGraphLabel — Graph label
struct GwyGraphAreaCurveParams; struct GwyGraphLabelParams; struct GwyGraphLabel; struct GwyGraphLabelClass; GtkWidget* gwy_graph_label_new (); void gwy_graph_label_set_visible (GwyGraphLabel *label, gboolean is_visible); void gwy_graph_label_set_style (GwyGraphLabel *label, GwyGraphLabelParams style); void gwy_graph_label_add_curve (GwyGraphLabel *label, GwyGraphAreaCurveParams *params); void gwy_graph_label_clear (GwyGraphLabel *label); void gwy_graph_draw_point (GdkWindow *window, GdkGC *gc, gint i, gint j, gint type, gint size, GdkColor *color, gboolean clear);
This widget should be probabaly used only within the GwyGraph widget. It plots a curves legend.
struct GwyGraphAreaCurveParams { gint is_line; /* XXX: booleans should be booleans */ gint is_point; /* XXX: booleans should be booleans */ gint point_size; gint point_type; /* XXX: enmus should be enums */ GdkLineStyle line_style; gint line_size; GString *description; GdkColor color; /* when adding meaningful fields, please make sure GwyGraphCurveModel * understands them too */ gpointer reserved1; gpointer reserved2; };
struct GwyGraphLabelParams { gboolean is_frame; gint frame_thickness; gint position; PangoFontDescription *font; gpointer reserved1; gpointer reserved2; };
struct GwyGraphLabelClass { GtkWidgetClass parent_class; void (*selected)(GwyGraphLabel *label); gpointer reserved1; gpointer reserved2; };
GtkWidget* gwy_graph_label_new ();
creates new graph label.
Returns : | new graph label |
void gwy_graph_label_set_visible (GwyGraphLabel *label, gboolean is_visible);
label : | |
is_visible : |
void gwy_graph_label_set_style (GwyGraphLabel *label, GwyGraphLabelParams style);
label : | |
style : |
void gwy_graph_label_add_curve (GwyGraphLabel *label, GwyGraphAreaCurveParams *params);
Adds a curve description to label. All the information is in structure params, including line/dots sizes and text of added curve label.
label : | label to be changed |
params : | curve parameters |
void gwy_graph_label_clear (GwyGraphLabel *label);
Clears label - removes all the curve descriptions.
label : | label to be cleared |
void gwy_graph_draw_point (GdkWindow *window, GdkGC *gc, gint i, gint j, gint type, gint size, GdkColor *color, gboolean clear);
Plots a point of requested parameters on the screen.
window : | widget window |
gc : | Graphical context |
i : | x position on the screen |
j : | y position on the screen |
type : | type of point (square, circle, etc.) |
size : | size of point |
color : | color of point |
clear : | clear window part under symbol |
<< GwyGraphCorner | GwyGraph >> |