## ETextModel ETextModel |

## Synopsis

    struct              ETextModel;
    ETextModel *        e_text_model_new                    (void);
    void                e_text_model_changed                (ETextModel *model);
    void                e_text_model_cancel_completion      (ETextModel *model);
    gint                (*ETextModelReposFn)                (gint Param1,
                                                             gpointer Param2);
    void                e_text_model_reposition             (ETextModel *model,
                                                             ETextModelReposFn fn,
                                                             gpointer repos_data);
    gint                e_text_model_validate_position      (ETextModel *model,
                                                             gint pos);
    const gchar *       e_text_model_get_text               (ETextModel *model);
    gint                e_text_model_get_text_length        (ETextModel *model);
    void                e_text_model_set_text               (ETextModel *model,
                                                             const gchar *text);
    void                e_text_model_insert                 (ETextModel *model,
                                                             gint position,
                                                             const gchar *text);
    void                e_text_model_insert_length          (ETextModel *model,
                                                             gint position,
                                                             const gchar *text,
                                                             gint length);
    void                e_text_model_prepend                (ETextModel *model,
                                                             const gchar *text);
    void                e_text_model_append                 (ETextModel *model,
                                                             const gchar *text);
    void                e_text_model_delete                 (ETextModel *model,
                                                             gint position,
                                                             gint length);
    gint                e_text_model_object_count           (ETextModel *model);
    const gchar *       e_text_model_get_nth_object         (ETextModel *model,
                                                             gint n,
                                                             gint *len);
    gchar *             e_text_model_strdup_nth_object      (ETextModel *model,
                                                             gint n);
    void                e_text_model_get_nth_object_bounds  (ETextModel *model,
                                                             gint n,
                                                             gint *start_pos,
                                                             gint *end_pos);
    gint                e_text_model_get_object_at_offset   (ETextModel *model,
                                                             gint offset);
    gint                e_text_model_get_object_at_pointer  (ETextModel *model,
                                                             const gchar *c);
    void                e_text_model_activate_nth_object    (ETextModel *model,
                                                             gint n);
                        EReposAbsolute;
    gint                e_repos_absolute                    (gint pos,
                                                             gpointer data);
                        EReposInsertShift;
    gint                e_repos_insert_shift                (gint pos,
                                                             gpointer data);
                        EReposDeleteShift;
    gint                e_repos_delete_shift                (gint pos,
                                                             gpointer data);

## Object Hierarchy

      GObject
       +----ETextModel

## Signals

      "cancel-completion"                              : Run Last
      "changed"                                        : Run Last
      "object-activated"                               : Run Last
      "reposition"                                     : Run Last

## Description

## Details

### struct ETextModel

    struct ETextModel;

### e_text_model_new ()

    ETextModel *        e_text_model_new                    (void);

### e_text_model_changed ()

    void                e_text_model_changed                (ETextModel *model);

### e_text_model_cancel_completion ()

    void                e_text_model_cancel_completion      (ETextModel *model);

### ETextModelReposFn ()

    gint                (*ETextModelReposFn)                (gint Param1,
                                                             gpointer Param2);

### e_text_model_reposition ()

    void                e_text_model_reposition             (ETextModel *model,
                                                             ETextModelReposFn fn,
                                                             gpointer repos_data);

### e_text_model_validate_position ()

    gint                e_text_model_validate_position      (ETextModel *model,
                                                             gint pos);

### e_text_model_get_text ()

    const gchar *       e_text_model_get_text               (ETextModel *model);

### e_text_model_get_text_length ()

    gint                e_text_model_get_text_length        (ETextModel *model);

### e_text_model_set_text ()

    void                e_text_model_set_text               (ETextModel *model,
                                                             const gchar *text);

### e_text_model_insert ()

    void                e_text_model_insert                 (ETextModel *model,
                                                             gint position,
                                                             const gchar *text);

### e_text_model_insert_length ()

    void                e_text_model_insert_length          (ETextModel *model,
                                                             gint position,
                                                             const gchar *text,
                                                             gint length);

### e_text_model_prepend ()

    void                e_text_model_prepend                (ETextModel *model,
                                                             const gchar *text);

### e_text_model_append ()

    void                e_text_model_append                 (ETextModel *model,
                                                             const gchar *text);

### e_text_model_delete ()

    void                e_text_model_delete                 (ETextModel *model,
                                                             gint position,
                                                             gint length);

### e_text_model_object_count ()

    gint                e_text_model_object_count           (ETextModel *model);

### e_text_model_get_nth_object ()

    const gchar *       e_text_model_get_nth_object         (ETextModel *model,
                                                             gint n,
                                                             gint *len);

### e_text_model_strdup_nth_object ()

    gchar *             e_text_model_strdup_nth_object      (ETextModel *model,
                                                             gint n);

### e_text_model_get_nth_object_bounds ()

    void                e_text_model_get_nth_object_bounds  (ETextModel *model,
                                                             gint n,
                                                             gint *start_pos,
                                                             gint *end_pos);

### e_text_model_get_object_at_offset ()

    gint                e_text_model_get_object_at_offset   (ETextModel *model,
                                                             gint offset);

### e_text_model_get_object_at_pointer ()

    gint                e_text_model_get_object_at_pointer  (ETextModel *model,
                                                             const gchar *c);

### e_text_model_activate_nth_object ()

    void                e_text_model_activate_nth_object    (ETextModel *model,
                                                             gint n);

### EReposAbsolute

    typedef struct {
    	ETextModel *model;
    	gint pos;  /* Position to move to.  Negative values count from the end buffer.
    		      (i.e. -1 puts cursor at the end, -2 one character from end, etc.) */
    } EReposAbsolute;

### e_repos_absolute ()

    gint                e_repos_absolute                    (gint pos,
                                                             gpointer data);

### EReposInsertShift

    typedef struct {
    	ETextModel *model;
    	gint pos;  /* Location of first inserted character. */
    	gint len;  /* Number of characters inserted. */
    } EReposInsertShift;

### e_repos_insert_shift ()

    gint                e_repos_insert_shift                (gint pos,
                                                             gpointer data);

### EReposDeleteShift

    typedef struct {
    	ETextModel *model;
    	gint pos;  /* Location of first deleted character. */
    	gint len;  /* Number of characters deleted. */
    } EReposDeleteShift;

### e_repos_delete_shift ()

    gint                e_repos_delete_shift                (gint pos,
                                                             gpointer data);

## Signal Details

### The `"cancel-completion"` signal

    void                user_function                      (ETextModel *etextmodel,
                                                            gpointer    user_data)       : Run Last

### The `"changed"` signal

    void                user_function                      (ETextModel *etextmodel,
                                                            gpointer    user_data)       : Run Last

### The `"object-activated"` signal

    void                user_function                      (ETextModel *etextmodel,
                                                            gint        arg1,
                                                            gpointer    user_data)       : Run Last

### The `"reposition"` signal

    void                user_function                      (ETextModel *etextmodel,
                                                            gpointer    arg1,
                                                            gpointer    arg2,
                                                            gpointer    user_data)       : Run Last