GwySciText

GwySciText — Text entry with markup and special symbol helper widgets

Synopsis




            GwySciText;
            GwySciTextClass;
GtkWidget*  gwy_sci_text_new                (void);
gchar*      gwy_sci_text_get_text           (GwySciText *sci_text);
void        gwy_sci_text_set_text           (GwySciText *sci_text,
                                             const gchar *new_text);
gboolean    gwy_sci_text_get_has_preview    (GwySciText *sci_text);
void        gwy_sci_text_set_has_preview    (GwySciText *sci_text,
                                             gboolean has_preview);
GtkWidget*  gwy_sci_text_get_entry          (GwySciText *sci_text);

Object Hierarchy


  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBox
                                 +----GtkVBox
                                       +----GwySciText

Implemented Interfaces

GwySciText implements AtkImplementorIface.

Properties


  "has-preview"          gboolean              : Read / Write

Signal Prototypes


"edited"    void        user_function      (GwySciText *gwyscitext,
                                            gpointer user_data);

Description

Details

GwySciText

typedef struct _GwySciText GwySciText;


GwySciTextClass

typedef struct {
    GtkVBoxClass parent_class;

    /* Signals */
    void (*edited)(GwySciText *sci_text);

    gpointer reserved1;
    gpointer reserved2;
} GwySciTextClass;


gwy_sci_text_new ()

GtkWidget*  gwy_sci_text_new                (void);

Returns :

gwy_sci_text_get_text ()

gchar*      gwy_sci_text_get_text           (GwySciText *sci_text);

Returns the text.

The text is already in UTF-8 with all entities converted.

sci_text : A science text widget.
Returns : The text as a newly allocated string. It should be freed when no longer used.

gwy_sci_text_set_text ()

void        gwy_sci_text_set_text           (GwySciText *sci_text,
                                             const gchar *new_text);

Sets the text a science text widget displays.

It can contain both UTF-8 and entities, but attempt to convert UTF-8 `back' to entities is made.

sci_text : A science text widget.
new_text : The text to display.

gwy_sci_text_get_has_preview ()

gboolean    gwy_sci_text_get_has_preview    (GwySciText *sci_text);

sci_text :
Returns :

gwy_sci_text_set_has_preview ()

void        gwy_sci_text_set_has_preview    (GwySciText *sci_text,
                                             gboolean has_preview);

sci_text :
has_preview :

gwy_sci_text_get_entry ()

GtkWidget*  gwy_sci_text_get_entry          (GwySciText *sci_text);

sci_text :
Returns :

Properties

The "has-preview" property

  "has-preview"          gboolean              : Read / Write

The :has-preview property controls whether a GwySciText has a preview.

Default value: TRUE

Signals

The "edited" signal

void        user_function                  (GwySciText *gwyscitext,
                                            gpointer user_data);

The ::edited signal is emitted when the text in its entry changes to a valid markup. If you need to react to all changes in entry contents, you can use gwy_sci_text_get_entry() to get the entry and connect to its signal.

gwyscitext : The GwySciText which received the signal.
user_data : user data set when the signal handler was connected.