IAnjutaEditorCell

## IAnjutaEditorCell IAnjutaEditorCell — Text editor character cell |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #include <libanjuta/interfaces/ianjuta-editor-cell.h>

    #define             IANJUTA_EDITOR_CELL_ERROR
    struct              IAnjutaEditorCellIface;
    GQuark              ianjuta_editor_cell_error_quark     (void);
    IAnjutaEditorAttribute ianjuta_editor_cell_get_attribute
                                                            (IAnjutaEditorCell *obj,
                                                             GError **err);
    gchar               ianjuta_editor_cell_get_char        (IAnjutaEditorCell *obj,
                                                             gint char_index,
                                                             GError **err);
    gchar *             ianjuta_editor_cell_get_character   (IAnjutaEditorCell *obj,
                                                             GError **err);
    gint                ianjuta_editor_cell_get_length      (IAnjutaEditorCell *obj,
                                                             GError **err);

## Description

Represents a cell in editor. A cell corresponds to a unicode character along with all associated styles (such as colors and font). A cell may or may not have style. If style is supported in the editor, it is assumed all cells will have styles and hence every IAnjutaEditorCell interface instance will have additionally IAnjutaEditorCellStyle implemented.

## Details

### IANJUTA_EDITOR_CELL_ERROR

    #define IANJUTA_EDITOR_CELL_ERROR ianjuta_editor_cell_error_quark()

### struct IAnjutaEditorCellIface

    struct IAnjutaEditorCellIface {
    	GTypeInterface g_iface;

    	IAnjutaEditorAttribute (*get_attribute) (IAnjutaEditorCell *obj, GError **err);
    	gchar (*get_char) (IAnjutaEditorCell *obj, gint char_index, GError **err);
    	gchar * (*get_character) (IAnjutaEditorCell *obj, GError **err);
    	gint (*get_length) (IAnjutaEditorCell *obj, GError **err);
    };

### ianjuta_editor_cell_error_quark ()

    GQuark              ianjuta_editor_cell_error_quark     (void);

### ianjuta_editor_cell_get_attribute ()

    IAnjutaEditorAttribute ianjuta_editor_cell_get_attribute
                                                            (IAnjutaEditorCell *obj,
                                                             GError **err);

### ianjuta_editor_cell_get_char ()

    gchar               ianjuta_editor_cell_get_char        (IAnjutaEditorCell *obj,
                                                             gint char_index,
                                                             GError **err);

Returns the byte of the unicode character in this cell at given index `char_index`. `char_index` can vary from 0 to length of the unicode string minus 1. Out of range index is not allowed (asserted) and return is undefined.

Since there is dynamic allocation of unicode character string involved in `ianjuta_editor_cell_get_character()`, this function is mainly useful for fast iteration (such as copying data).

`obj` : | Self
`err` : | Error propagation and reporting
Returns : | a byte character.

### ianjuta_editor_cell_get_character ()

    gchar *             ianjuta_editor_cell_get_character   (IAnjutaEditorCell *obj,
                                                             GError **err);

Returns the unicode character in this cell. A NULL terminated string is returned that is the multibyte unicode character. NULL is returned if the cell does not have any character.

`obj` : | Self
`err` : | Error propagation and reporting
Returns : | a newly created string representing the cell's unicode character.

### ianjuta_editor_cell_get_length ()

    gint                ianjuta_editor_cell_get_length      (IAnjutaEditorCell *obj,
                                                             GError **err);

Gets the length of the cell in bytes. That is, length of the unicode character.

`obj` : | self
`err` : | Error propagation and reporting.
Returns : | Length of the unicode character.