Gwyddion – Free SPM (AFM, SNOM/NSOM, STM, MFM, …) data analysis software

Gwy3DLabel (HEAD)

Gwy3DLabel — Label on Gwy3DView

Functions

Gwy3DLabel * gwy_3d_label_new ()
void gwy_3d_label_set_text ()
const gchar * gwy_3d_label_get_text ()
gchar * gwy_3d_label_expand_text ()
void gwy_3d_label_reset ()
void gwy_3d_label_reset_text ()
gdouble gwy_3d_label_user_size ()

Properties

char * default-text Read / Write / Construct Only
double delta-x Read / Write
double delta-y Read / Write
gboolean fixed-size Read / Write
double rotation Read / Write
double size Read / Write
char * text Read / Write

Types and Values

struct Gwy3DLabel
struct Gwy3DLabelClass

Object Hierarchy

    GObject
    ╰── Gwy3DLabel

Implemented Interfaces

Gwy3DLabel implements GwySerializable.

Includes

#include <libgwydgets/gwydgets.h>

Description

Functions

gwy_3d_label_new ()

Gwy3DLabel *
gwy_3d_label_new (const gchar *default_text);

Creates a new 3D view label.

Parameters

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.

Parameters

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.

Parameters

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.

Parameters

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.

Parameters

label

A 3D label.

 

gwy_3d_label_reset_text ()

void
gwy_3d_label_reset_text (Gwy3DLabel *label);

Resets 3D label text to default values.

Parameters

label

A 3D label.

 

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.

Parameters

label

A 3D label.

 

user_size

Size of the text to be set.

 

Returns

Size of label.

Types and Values

struct Gwy3DLabel

struct Gwy3DLabel;

struct Gwy3DLabelClass

struct Gwy3DLabelClass {
    GObjectClass parent_class;

    void (*reserved1)(void);
    void (*reserved2)(void);
};

Property Details

The “default-text” property

  “default-text”             char *

Default label text.

Owner: Gwy3DLabel

Flags: Read / Write / Construct Only

Default value: ""

The “delta-x” property

  “delta-x”                  double

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

Owner: Gwy3DLabel

Flags: Read / Write

Allowed values: [-1000,1000]

Default value: 0

The “delta-y” property

  “delta-y”                  double

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

Owner: Gwy3DLabel

Flags: Read / Write

Allowed values: [-1000,1000]

Default value: 0

The “fixed-size” property

  “fixed-size”               gboolean

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

Owner: Gwy3DLabel

Flags: Read / Write

Default value: FALSE

The “rotation” property

  “rotation”                 double

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

Owner: Gwy3DLabel

Flags: Read / Write

Allowed values: [-3.14159,3.14159]

Default value: 0

The “size” property

  “size”                     double

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

Owner: Gwy3DLabel

Flags: Read / Write

Allowed values: [1,100]

Default value: 14

The “text” property

  “text”                     char *

The label text template.

Owner: Gwy3DLabel

Flags: Read / Write

Default value: ""

© David Nečas and Petr Klapetek

Home Download News Features Screenshots Documentation Communicate Participate Resources Publications Applications Site Map

Valid XHTML 1.0 Valid CSS