Gwy3DLabel

Gwy3DLabel —

Synopsis




struct      Gwy3DLabel;
struct      Gwy3DLabelClass;
Gwy3DLabel* gwy_3d_label_new                (const gchar *default_text);
void        gwy_3d_label_set_text           (Gwy3DLabel *label,
                                             const gchar *text);
const gchar* gwy_3d_label_get_text          (Gwy3DLabel *label);
gchar*      gwy_3d_label_expand_text        (Gwy3DLabel *label,
                                             GHashTable *variables);
void        gwy_3d_label_reset              (Gwy3DLabel *label);
void        gwy_3d_label_reset_text         (Gwy3DLabel *label);
gboolean    gwy_3d_label_get_fixed_size     (Gwy3DLabel *label);
void        gwy_3d_label_set_fixed_size     (Gwy3DLabel *label,
                                             gboolean fixed_size);
gdouble     gwy_3d_label_user_size          (Gwy3DLabel *label,
                                             gdouble user_size);
GtkAdjustment* gwy_3d_label_get_delta_x_adjustment
                                            (Gwy3DLabel *label);
GtkAdjustment* gwy_3d_label_get_delta_y_adjustment
                                            (Gwy3DLabel *label);
GtkAdjustment* gwy_3d_label_get_rotation_adjustment
                                            (Gwy3DLabel *label);
GtkAdjustment* gwy_3d_label_get_size_adjustment
                                            (Gwy3DLabel *label);

Object Hierarchy


  GObject
   +----Gwy3DLabel

Implemented Interfaces

Gwy3DLabel implements GwySerializable and GwyWatchable.

Properties


  "default-text"         gchararray           : Read / Write / Construct Only
  "delta-x"              gdouble              : Read / Write
  "delta-y"              gdouble              : Read / Write
  "fixed-size"           gboolean             : Read / Write
  "rotation"             gdouble              : Read / Write
  "size"                 gdouble              : Read / Write

Description

Details

struct Gwy3DLabel

struct Gwy3DLabel;


struct Gwy3DLabelClass

struct Gwy3DLabelClass {

    GObjectClass parent_class;
};


gwy_3d_label_new ()

Gwy3DLabel* gwy_3d_label_new                (const gchar *default_text);

Creates a new 3D view label.

default_text : Label default text.
Returns : A newly created 3D label.

gwy_3d_label_set_text ()

void        gwy_3d_label_set_text           (Gwy3DLabel *label,
                                             const gchar *text);

Sets the text of a 3D label.

label : A 3D label.
text : New label text.

gwy_3d_label_get_text ()

const gchar* gwy_3d_label_get_text          (Gwy3DLabel *label);

Gets the text of a 3D label.

label : A 3D label.
Returns : The label text. The returned string is owned by label and must no be modified or freed.

gwy_3d_label_expand_text ()

gchar*      gwy_3d_label_expand_text        (Gwy3DLabel *label,
                                             GHashTable *variables);

Substitutes variables in label text.

label : A 3D label.
variables : Hash table with variable values.
Returns : A newly allocated string with variables from variables substituted with values.

gwy_3d_label_reset ()

void        gwy_3d_label_reset              (Gwy3DLabel *label);

Resets all 3D label properties and text to default values.

label : A 3D label.

gwy_3d_label_reset_text ()

void        gwy_3d_label_reset_text         (Gwy3DLabel *label);

Resets 3D label text to default values.

label : A 3D label.

gwy_3d_label_get_fixed_size ()

gboolean    gwy_3d_label_get_fixed_size     (Gwy3DLabel *label);

Queries a 3D label for its label size policy.

label : A 3D label.
Returns : TRUE if label size is fixed, FALSE if it's overriden by automatic size.

gwy_3d_label_set_fixed_size ()

void        gwy_3d_label_set_fixed_size     (Gwy3DLabel *label,
                                             gboolean fixed_size);

Sets 3D label size policy.

label : A 3D label.
fixed_size : Whether label size should be fixed.

gwy_3d_label_user_size ()

gdouble     gwy_3d_label_user_size          (Gwy3DLabel *label,
                                             gdouble user_size);

Eventually sets size of a 3D label.

If label size si fixed, it does not change and it is simply returned. Otherwise label size is changed and user_size itself is returned.

label : A 3D label.
user_size : Size of the text to be set.
Returns : Size of label.

gwy_3d_label_get_delta_x_adjustment ()

GtkAdjustment* gwy_3d_label_get_delta_x_adjustment
                                            (Gwy3DLabel *label);

Gets the horizontal offest adjustment of a 3D label.

label : A 3D label.
Returns : The horizontal offest adjustment.

gwy_3d_label_get_delta_y_adjustment ()

GtkAdjustment* gwy_3d_label_get_delta_y_adjustment
                                            (Gwy3DLabel *label);

Gets the vertical offest adjustment of a 3D label.

label : A 3D label.
Returns : The vertical offest adjustment.

gwy_3d_label_get_rotation_adjustment ()

GtkAdjustment* gwy_3d_label_get_rotation_adjustment
                                            (Gwy3DLabel *label);

Gets the rotation adjustment of a 3D label.

label : A 3D label.
Returns : The rotation adjustment.

gwy_3d_label_get_size_adjustment ()

GtkAdjustment* gwy_3d_label_get_size_adjustment
                                            (Gwy3DLabel *label);

Gets the size adjustment of a 3D label.

label : A 3D label.
Returns : The size adjustment.

Properties

"default-text" (gchararray : Read / Write / Construct Only)

Default label text.

"delta-x" (gdouble : Read / Write)

The :delta_x property represents horizontal label offset in pixels (in screen coordinates after mapping from 3D to 2D).

"delta-y" (gdouble : Read / Write)

The :delta_y property represents vertical label offset in pixels (in screen coordinates after mapping from 3D to 2D).

"fixed-size" (gboolean : Read / Write)

The :fixed_size property controls whether the :size property is kept and honoured, or conversely ignored and overwritten with automatic size.

"rotation" (gdouble : Read / Write)

The :rotation property represents label rotation in radians, counterclokwise (on screen, after mapping from 3D to 2D).

"size" (gdouble : Read / Write)

The :size property represents label size in pixels. When :fixed_size is FALSE, its value is overwritten with automatic size.