## GnomeCanvasRichText GnomeCanvasRichText — Rich text canvas item |

## Synopsis

    #include <libgnomecanvas/libgnomecanvas.h>

    struct              GnomeCanvasRichText;
    void                gnome_canvas_rich_text_cut_clipboard
                                                            (GnomeCanvasRichText *text);
    void                gnome_canvas_rich_text_copy_clipboard
                                                            (GnomeCanvasRichText *text);
    void                gnome_canvas_rich_text_paste_clipboard
                                                            (GnomeCanvasRichText *text);
    void                gnome_canvas_rich_text_set_buffer   (GnomeCanvasRichText *text,
                                                             GtkTextBuffer *buffer);
    GtkTextBuffer *     gnome_canvas_rich_text_get_buffer   (GnomeCanvasRichText *text);
    void                gnome_canvas_rich_text_get_iter_location
                                                            (GnomeCanvasRichText *text,
                                                             const GtkTextIter *iter,
                                                             GdkRectangle *location);
    void                gnome_canvas_rich_text_get_iter_at_location
                                                            (GnomeCanvasRichText *text,
                                                             GtkTextIter *iter,
                                                             gint x,
                                                             gint y);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GnomeCanvasItem
                         +----GnomeCanvasRichText

## Properties

      "anchor"                   GtkAnchorType         : Read / Write
      "cursor-blink"             gboolean              : Read / Write
      "cursor-visible"           gboolean              : Read / Write
      "direction"                GtkDirectionType      : Read / Write
      "editable"                 gboolean              : Read / Write
      "grow-height"              gboolean              : Read / Write
      "height"                   gdouble               : Read / Write
      "indent"                   gint                  : Read / Write
      "justification"            GtkJustification      : Read / Write
      "left-margin"              gint                  : Read / Write
      "pixels-above-lines"       gint                  : Read / Write
      "pixels-below-lines"       gint                  : Read / Write
      "pixels-inside-wrap"       gint                  : Read / Write
      "right-margin"             gint                  : Read / Write
      "text"                     gchar*                : Read / Write
      "visible"                  gboolean              : Read / Write
      "width"                    gdouble               : Read / Write
      "wrap-mode"                GtkWrapMode           : Read / Write
      "x"                        gdouble               : Read / Write
      "y"                        gdouble               : Read / Write

## Signals

      "tag-changed"                                    : Run Last

## Description

A canvas item that displays a GtkTextBuffer which is a flexible text display and editing widget. Consult GtkTextBuffer info in the GTK+ Reference documentation for more details.

## Details

### struct GnomeCanvasRichText

    struct GnomeCanvasRichText;

This structure should not be accessed directly. Use the object's properties and functions for querying or changing its parameters.

### gnome_canvas_rich_text_cut_clipboard ()

    void                gnome_canvas_rich_text_cut_clipboard
                                                            (GnomeCanvasRichText *text);

Copies the currently selected `text` to clipboard, then deletes said text if it's editable.

`text` : | a GnomeCanvasRichText.

### gnome_canvas_rich_text_copy_clipboard ()

    void                gnome_canvas_rich_text_copy_clipboard
                                                            (GnomeCanvasRichText *text);

Copies the currently selected `text` to clipboard.

`text` : | a GnomeCanvasRichText.

### gnome_canvas_rich_text_paste_clipboard ()

    void                gnome_canvas_rich_text_paste_clipboard
                                                            (GnomeCanvasRichText *text);

Pastes the contents of the clipboard at the insertion point.

`text` : | a GnomeCanvasRichText.

### gnome_canvas_rich_text_set_buffer ()

    void                gnome_canvas_rich_text_set_buffer   (GnomeCanvasRichText *text,
                                                             GtkTextBuffer *buffer);

Sets the buffer field of the `text` to `buffer`.

`text` : | a GnomeCanvasRichText.
`buffer` : | a GtkTextBuffer.

### gnome_canvas_rich_text_get_buffer ()

    GtkTextBuffer *     gnome_canvas_rich_text_get_buffer   (GnomeCanvasRichText *text);

Returns a GtkTextBuffer associated with the GnomeCanvasRichText. This function creates a new GtkTextBuffer if the text buffer is NULL.

`text` : | a GnomeCanvasRichText.
Returns : | the GtkTextBuffer.

### gnome_canvas_rich_text_get_iter_location ()

    void                gnome_canvas_rich_text_get_iter_location
                                                            (GnomeCanvasRichText *text,
                                                             const GtkTextIter *iter,
                                                             GdkRectangle *location);

Gets a rectangle which roughly contains the character at `iter`.

`text` : | a GnomeCanvasRichText.
`iter` : | a GtkTextIter.
`location` : | a GdkRectangle containing the bounds of the character at `iter`.

### gnome_canvas_rich_text_get_iter_at_location ()

    void                gnome_canvas_rich_text_get_iter_at_location
                                                            (GnomeCanvasRichText *text,
                                                             GtkTextIter *iter,
                                                             gint x,
                                                             gint y);

Retrieves the iterator at the buffer coordinates x and y.

`text` : | a GnomeCanvasRichText.
`iter` : | a GtkTextIter.
`x` : | x position, in buffer coordinates.
`y` : | y position, in buffer coordinates.

## Property Details

### The `"anchor"` property

      "anchor"                   GtkAnchorType         : Read / Write

Anchor point for text.

Default value: GTK_ANCHOR_NORTH_WEST

### The `"cursor-blink"` property

      "cursor-blink"             gboolean              : Read / Write

Does the cursor blink in this rich text item?

Default value: TRUE

### The `"cursor-visible"` property

      "cursor-visible"           gboolean              : Read / Write

Is the cursor visible?

Default value: TRUE

### The `"direction"` property

      "direction"                GtkDirectionType      : Read / Write

Direction of displayed rich text.

Default value: GTK_DIR_TAB_BACKWARD

### The `"editable"` property

      "editable"                 gboolean              : Read / Write

Is this rich text item editable?

Default value: TRUE

### The `"grow-height"` property

      "grow-height"              gboolean              : Read / Write

Should the text box height grow if the text does not fit?

Default value: FALSE

### The `"height"` property

      "height"                   gdouble               : Read / Write

Height for text box.

Default value: 0

### The `"indent"` property

      "indent"                   gint                  : Read / Write

Number of pixels for indentation.

Default value: 0

### The `"justification"` property

      "justification"            GtkJustification      : Read / Write

Justification mode.

Default value: GTK_JUSTIFY_LEFT

### The `"left-margin"` property

      "left-margin"              gint                  : Read / Write

Number of pixels in the left margin.

Default value: 0

### The `"pixels-above-lines"` property

      "pixels-above-lines"       gint                  : Read / Write

Number of pixels to put above lines.

Default value: 0

### The `"pixels-below-lines"` property

      "pixels-below-lines"       gint                  : Read / Write

Number of pixels to put below lines.

Default value: 0

### The `"pixels-inside-wrap"` property

      "pixels-inside-wrap"       gint                  : Read / Write

Number of pixels to put inside the wrap.

Default value: 0

### The `"right-margin"` property

      "right-margin"             gint                  : Read / Write

Number of pixels in the right margin.

Default value: 0

### The `"text"` property

      "text"                     gchar*                : Read / Write

Text to display.

Default value: NULL

### The `"visible"` property

      "visible"                  gboolean              : Read / Write

Is this rich text item visible?

Default value: TRUE

### The `"width"` property

      "width"                    gdouble               : Read / Write

Width for text box.

Default value: 0

### The `"wrap-mode"` property

      "wrap-mode"                GtkWrapMode           : Read / Write

Wrap mode for multiline text.

Default value: GTK_WRAP_WORD

### The `"x"` property

      "x"                        gdouble               : Read / Write

X position.

Default value: 0

### The `"y"` property

      "y"                        gdouble               : Read / Write

Y position.

Default value: 0

## Signal Details

### The `"tag-changed"` signal

    void                user_function                      (GnomeCanvasRichText *canvasrichtext,
                                                            GObject             *arg1,
                                                            gpointer             user_data)           : Run Last

`canvasrichtext` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.