## GnomeDbEditor

GnomeDbEditor —

##

# Synopsis

    struct      GnomeDbEditorPrivate;
    #define     GNOME_DB_EDITOR_LANGUAGE_SQL
    GtkWidget*  gnome_db_editor_new             (void);
    gboolean    gnome_db_editor_get_editable    (GnomeDbEditor *editor);
    void        gnome_db_editor_set_editable    (GnomeDbEditor *editor,
                                                 gboolean editable);
    gboolean    gnome_db_editor_get_highlight   (GnomeDbEditor *editor);
    void        gnome_db_editor_set_highlight   (GnomeDbEditor *editor,
                                                 gboolean highlight);
    void        gnome_db_editor_set_text        (GnomeDbEditor *editor,
                                                 const gchar *text,
                                                 gint len);
    gchar*      gnome_db_editor_get_all_text    (GnomeDbEditor *editor);
    gboolean    gnome_db_editor_load_from_file  (GnomeDbEditor *editor,
                                                 const gchar *filename);
    gboolean    gnome_db_editor_save_to_file    (GnomeDbEditor *editor,
                                                 const gchar *filename);
    void        gnome_db_editor_copy_clipboard  (GnomeDbEditor *editor);
    void        gnome_db_editor_cut_clipboard   (GnomeDbEditor *editor);
    void        gnome_db_editor_paste_clipboard (GnomeDbEditor *editor);

## Description

## Details

### struct GnomeDbEditorPrivate

    struct GnomeDbEditorPrivate;

### GNOME_DB_EDITOR_LANGUAGE_SQL

    #define GNOME_DB_EDITOR_LANGUAGE_SQL "sql"

### gnome_db_editor_new ()

    GtkWidget*  gnome_db_editor_new             (void);

Create a new GnomeDbEditor widget, which is a multiline text widget with support for several languages used to write database stored procedures and functions. If libgnomedb was compiled with gtksourceview in, this widget will support syntax highlighting for all supported languages.

Returns : | the newly created widget.

### gnome_db_editor_get_editable ()

    gboolean    gnome_db_editor_get_editable    (GnomeDbEditor *editor);

Retrieve the editable status of the given editor widget.

`editor` : | a GnomeDbEditor widget.
Returns : | the editable status.

### gnome_db_editor_set_editable ()

    void        gnome_db_editor_set_editable    (GnomeDbEditor *editor,
                                                 gboolean editable);

Set the editable state of the given editor widget.

`editor` : | a GnomeDbEditor widget.
`editable` : | editable state.

### gnome_db_editor_get_highlight ()

    gboolean    gnome_db_editor_get_highlight   (GnomeDbEditor *editor);

Retrieve the highlighting status of the given editor widget.

`editor` : | a GnomeDbEditor widget.
Returns : | the highlighting status.

### gnome_db_editor_set_highlight ()

    void        gnome_db_editor_set_highlight   (GnomeDbEditor *editor,
                                                 gboolean highlight);

Set the highlighting status on the given editor widget.

`editor` : | a GnomeDbEditor widget.
`highlight` : | highlighting status.

### gnome_db_editor_set_text ()

    void        gnome_db_editor_set_text        (GnomeDbEditor *editor,
                                                 const gchar *text,
                                                 gint len);

Set the contents of the given editor widget.

`editor` : | a GnomeDbEditor widget.
`text` : | text to display in the editor.
`len` : | length of `text`.

### gnome_db_editor_get_all_text ()

    gchar*      gnome_db_editor_get_all_text    (GnomeDbEditor *editor);

Retrieve the full contents of the given editor widget.

`editor` : | a GnomeDbEditor widget.
Returns : | the current contents of the editor buffer. You must free the returned value when no longer needed.

### gnome_db_editor_load_from_file ()

    gboolean    gnome_db_editor_load_from_file  (GnomeDbEditor *editor,
                                                 const gchar *filename);

Load the given filename into the editor widget.

`editor` : | a GnomeDbEditor widget.
`filename` : | the file to be loaded.
Returns : | TRUE if successful, FALSE otherwise.

### gnome_db_editor_save_to_file ()

    gboolean    gnome_db_editor_save_to_file    (GnomeDbEditor *editor,
                                                 const gchar *filename);

Save the current editor contents to the given file.

`editor` : | a GnomeDbEditor widget.
`filename` : | the file to save to.
Returns : | TRUE if successful, FALSE otherwise.

### gnome_db_editor_copy_clipboard ()

    void        gnome_db_editor_copy_clipboard  (GnomeDbEditor *editor);

Copy currently selected text in the given editor widget to the clipboard.

`editor` : | a GnomeDbEditor widget.

### gnome_db_editor_cut_clipboard ()

    void        gnome_db_editor_cut_clipboard   (GnomeDbEditor *editor);

Moves currently selected text in the given editor widget to the clipboard.

`editor` : | a GnomeDbEditor widget.

### gnome_db_editor_paste_clipboard ()

    void        gnome_db_editor_paste_clipboard (GnomeDbEditor *editor);

Paste clipboard contents into editor widget, at the current position.

`editor` : | a GnomeDbEditor widget.