AdgTextual

AdgTextual — An interface for entities that embeds text

Synopsis

                    AdgTextual;
void                adg_textual_set_font_dress          (AdgTextual *textual,
                                                         AdgDress dress);
AdgDress            adg_textual_get_font_dress          (AdgTextual *textual);
void                adg_textual_set_text                (AdgTextual *textual,
                                                         const gchar *text);
gchar *             adg_textual_dup_text                (AdgTextual *textual);
void                adg_textual_text_changed            (AdgTextual *textual,
                                                         const gchar *old_text);

Object Hierarchy

  GInterface
   +----AdgTextual

Prerequisites

AdgTextual requires GObject.

Known Implementations

AdgTextual is implemented by AdgText and AdgToyText.

Properties

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

Signals

  "text-changed"                                   : Run Last

Description

The AdgTextual interface should be implemented by entities that can be expressed by text. AdgToyText is a typical case but also more complex entities could implement it.

Details

AdgTextual

typedef struct _AdgTextual AdgTextual;

Dummy type of the AdgTextualIface interface.


adg_textual_set_font_dress ()

void                adg_textual_set_font_dress          (AdgTextual *textual,
                                                         AdgDress dress);

Sets the font dress of textual to dress.

textual :

an object that implements AdgTextual

dress :

the new dress

adg_textual_get_font_dress ()

AdgDress            adg_textual_get_font_dress          (AdgTextual *textual);

Gets the current font dress of textual, eventually resolved to an AdgFontStyle before the rendering.

textual :

an object that implements AdgTextual

Returns :

the current font dress of textual

adg_textual_set_text ()

void                adg_textual_set_text                (AdgTextual *textual,
                                                         const gchar *text);

Sets a new text on textual. If text is the same as the old text no actions are performed, otherwise the set_text() virtual method is called and the "text-changed" signal is emitted.

textual :

an object that implements AdgTextual

text :

the new text to be set

adg_textual_dup_text ()

gchar *             adg_textual_dup_text                (AdgTextual *textual);

Gets a duplicate of the current text bound to textual.

textual :

an object that implements AdgTextual

Returns :

the current text of textual: free with g_free() when finished

adg_textual_text_changed ()

void                adg_textual_text_changed            (AdgTextual *textual,
                                                         const gchar *old_text);

Emits the "text-changed" signal on textual.

Note

This function is only useful when creating a new class that implements the AdgTextual interface.

textual :

an object that implements AdgTextual

old_text :

the old text bound to textual

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 "text" property

  "text"                     gchar*                : Read / Write

The text associated to this entity.

Default value: NULL

Signal Details

The "text-changed" signal

void                user_function                      (AdgTextual *textual,
                                                        gpointer    old_text,
                                                        gpointer    user_data)      : Run Last

Emitted whenever the text of textual has been changed.

textual :

an entity that implements AdgTextual

old_text :

the old text

user_data :

user data set when the signal handler was connected.
AdgTextual was last modified by gtk-doc on Sun 20 Mar 2011 09:36:52 PM CET
Hosted by Get Automatic Drawing Generation at SourceForge.net. Fast, secure and Free Open Source software downloads
Search on this domain