AdgToyText

AdgToyText — Simple text entity that use the cairo "toy" text API

Synopsis

                    AdgToyText;
AdgToyText *        adg_toy_text_new                    (const gchar *label);
void                adg_toy_text_set_font_dress         (AdgToyText *toy_text,
                                                         AdgDress dress);
AdgDress            adg_toy_text_get_font_dress         (AdgToyText *toy_text);
void                adg_toy_text_set_label              (AdgToyText *toy_text,
                                                         const gchar *label);
const gchar *       adg_toy_text_get_label              (AdgToyText *toy_text);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----AdgEntity
               +----AdgToyText

Properties

  "font-dress"               AdgDress              : Read / Write
  "label"                    gchar*                : Read / Write

Description

The AdgToyText class is a basic class to show simple text. It internally uses the so called cairo "toy" API and it shares the same limitations.

The toy text entity is not subject to the local matrix, only its origin is.

Details

AdgToyText

typedef struct _AdgToyText AdgToyText;

All fields are privates and should not be used directly. Use its public methods instead.


adg_toy_text_new ()

AdgToyText *        adg_toy_text_new                    (const gchar *label);

Creates a new toy text entity using label as its text. The "local-method" property is set by default to ADG_LOCAL_NORMALIZED.

label :

the label text

Returns :

the newly created toy text entity

adg_toy_text_set_font_dress ()

void                adg_toy_text_set_font_dress         (AdgToyText *toy_text,
                                                         AdgDress dress);

Sets a new font dress for rendering toy_text. The new dress must be related to the original dress for this property: you cannot set a dress used for line styles to a dress managing fonts.

The check is done by calling adg_dress_are_related() with dress and the previous dress as arguments. Check out its documentation for details on what is a related dress.

toy_text :

an AdgToyText

dress :

the new AdgDress to use

adg_toy_text_get_font_dress ()

AdgDress            adg_toy_text_get_font_dress         (AdgToyText *toy_text);

Gets the font dress to be used in rendering toy_text.

toy_text :

an AdgToyText

Returns :

the current font dress

adg_toy_text_set_label ()

void                adg_toy_text_set_label              (AdgToyText *toy_text,
                                                         const gchar *label);

Sets a new label for toy_text. label can be also NULL, in which case will be treated as an empty string.

toy_text :

an AdgToyText

label :

the label text

adg_toy_text_get_label ()

const gchar *       adg_toy_text_get_label              (AdgToyText *toy_text);

Gets the label text. The string is internally owned and must not be freed or modified.

toy_text :

an AdgToyText

Returns :

the label text

Property Details

The "font-dress" property

  "font-dress"               AdgDress              : Read / Write

The font dress to use for rendering this text.

Allowed values: [G_MAXINT,G_MININT]

Default value: 0


The "label" property

  "label"                    gchar*                : Read / Write

The label to display.

Default value: NULL

AdgToyText was last modified by gtk-doc on Sun 21 Feb 2010 10:22:17 PM CET
Hosted by Get Automatic Drawing Generation at SourceForge.net. Fast, secure and Free Open Source software downloads
Search on this domain