GwyGraphLabel

GwyGraphLabel — Graph curve legend

Synopsis




            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);

Object Hierarchy


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

Implemented Interfaces

GwyGraphLabel implements AtkImplementorIface.

Description

GwyGraphLabel is a part of GwyGraph, it renders frame with graph curve legend. It can be probabaly used only within GwyGraph.

Details

GwyGraphLabel

typedef struct _GwyGraphLabel GwyGraphLabel;


GwyGraphLabelClass

typedef struct {
    GtkWidgetClass parent_class;

    void (*selected)(GwyGraphLabel *label);

    gpointer reserved1;
    gpointer reserved2;
} GwyGraphLabelClass;


gwy_graph_label_new ()

GtkWidget*  gwy_graph_label_new             ();

creates new graph label.

Returns : new graph label widget

gwy_graph_label_refresh ()

void        gwy_graph_label_refresh         (GwyGraphLabel *label);

synchronize label with information in graphmodel

label : graph label

gwy_graph_label_set_model ()

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

gwy_graph_label_draw_label_on_drawable ()

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

gwy_graph_label_export_vector ()

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

gwy_graph_label_enable_user_input ()

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