![]() | ![]() | ![]() | Gwyddion Widgets Library Reference Manual | ![]() |
---|
GwyGraphLabelGwyGraphLabel — Graph label |
enum GwyGraphLabelPosition; enum GwyGraphPointType; GwyGraphAreaCurveParams; GwyGraphLabelParams; GwyGraphLabel; 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.
typedef enum { GWY_GRAPH_LABEL_NORTHEAST = 0, GWY_GRAPH_LABEL_NORTHWEST = 1, GWY_GRAPH_LABEL_SOUTHEAST = 2, GWY_GRAPH_LABEL_SOUTHWEST = 3, GWY_GRAPH_LABEL_USER = 4 } GwyGraphLabelPosition;
typedef enum { GWY_GRAPH_POINT_SQUARE = 0, GWY_GRAPH_POINT_CROSS = 1, GWY_GRAPH_POINT_CIRCLE = 2, GWY_GRAPH_POINT_STAR = 3, GWY_GRAPH_POINT_TIMES = 4, GWY_GRAPH_POINT_TRIANGLE_UP = 5, GWY_GRAPH_POINT_TRIANGLE_DOWN = 6, GWY_GRAPH_POINT_DIAMOND = 7 } GwyGraphPointType;
typedef struct { 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; } GwyGraphAreaCurveParams;
typedef struct { gboolean is_frame; gint frame_thickness; gint position; PangoFontDescription *font; gpointer reserved1; gpointer reserved2; } GwyGraphLabelParams;
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 |
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 >> |