GwyGraphLabel

GwyGraphLabel — Graph label

Synopsis




#define     GWY_GRAPH_LABEL_NORTHEAST
#define     GWY_GRAPH_LABEL_NORTHWEST
#define     GWY_GRAPH_LABEL_SOUTHEAST
#define     GWY_GRAPH_LABEL_SOUTHWEST
#define     GWY_GRAPH_POINT_SQUARE
#define     GWY_GRAPH_POINT_CROSS
#define     GWY_GRAPH_POINT_CIRCLE
#define     GWY_GRAPH_POINT_STAR
#define     GWY_GRAPH_POINT_TIMES
#define     GWY_GRAPH_POINT_TRIANGLE_UP
#define     GWY_GRAPH_POINT_TRIANGLE_DOWN
#define     GWY_GRAPH_POINT_DIAMOND
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);

Object Hierarchy


  GObject
   +----GtkObject
         +----GtkWidget
               +----GwyGraphLabel

Implemented Interfaces

GwyGraphLabel implements AtkImplementorIface.

Description

This widget should be probabaly used only within the GwyGraph widget. It plots a curves legend.

Details

GWY_GRAPH_LABEL_NORTHEAST

#define GWY_GRAPH_LABEL_NORTHEAST 0


GWY_GRAPH_LABEL_NORTHWEST

#define GWY_GRAPH_LABEL_NORTHWEST 1


GWY_GRAPH_LABEL_SOUTHEAST

#define GWY_GRAPH_LABEL_SOUTHEAST 2


GWY_GRAPH_LABEL_SOUTHWEST

#define GWY_GRAPH_LABEL_SOUTHWEST 3


GWY_GRAPH_POINT_SQUARE

#define GWY_GRAPH_POINT_SQUARE         0


GWY_GRAPH_POINT_CROSS

#define GWY_GRAPH_POINT_CROSS          1


GWY_GRAPH_POINT_CIRCLE

#define GWY_GRAPH_POINT_CIRCLE         2


GWY_GRAPH_POINT_STAR

#define GWY_GRAPH_POINT_STAR           3


GWY_GRAPH_POINT_TIMES

#define GWY_GRAPH_POINT_TIMES          4


GWY_GRAPH_POINT_TRIANGLE_UP

#define GWY_GRAPH_POINT_TRIANGLE_UP    5


GWY_GRAPH_POINT_TRIANGLE_DOWN

#define GWY_GRAPH_POINT_TRIANGLE_DOWN  6


GWY_GRAPH_POINT_DIAMOND

#define GWY_GRAPH_POINT_DIAMOND        7


struct GwyGraphAreaCurveParams

struct GwyGraphAreaCurveParams {

    gint is_line;
    gint is_point;

    gint point_size;
    gint point_type;

    GdkLineStyle line_style;
    gint line_size;

    GString *description;
    GdkColor color;

    gpointer reserved1;
    gpointer reserved2;
};


struct GwyGraphLabelParams

struct GwyGraphLabelParams {

    gboolean is_frame;
    gint frame_thickness;
    gint position;
    PangoFontDescription *font;

    gpointer reserved1;
    gpointer reserved2;
};


struct GwyGraphLabel

struct GwyGraphLabel;


struct GwyGraphLabelClass

struct GwyGraphLabelClass {

    GtkWidgetClass parent_class;

    void (*selected)(GwyGraphLabel *label);
    
    gpointer reserved1;
    gpointer reserved2;
};


gwy_graph_label_new ()

GtkWidget*  gwy_graph_label_new             ();

creates new graph label.

Returns : new graph label

gwy_graph_label_set_visible ()

void        gwy_graph_label_set_visible     (GwyGraphLabel *label,
                                             gboolean is_visible);

label :
is_visible :

gwy_graph_label_set_style ()

void        gwy_graph_label_set_style       (GwyGraphLabel *label,
                                             GwyGraphLabelParams style);

label :
style :

gwy_graph_label_add_curve ()

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

gwy_graph_label_clear ()

void        gwy_graph_label_clear           (GwyGraphLabel *label);

Clears label - removes all the curve descriptions.

label : label to be cleared

gwy_graph_draw_point ()

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