GtexTemplatesDefault: Enter TeX Reference Manual

## GtexTemplatesDefault

GtexTemplatesDefault — Default templates

## Functions

GtexTemplatesDefault * | gtex_templates_default_get_instance ()
gchar * | gtex_templates_default_get_contents ()

## Types and Values

| GtexTemplatesDefault

## Object Hierarchy

        GObject
        ╰── GtkListStore
            ╰── GtexTemplatesDefault

## Implemented Interfaces

GtexTemplatesDefault implements GtkTreeModel, GtkTreeDragSource, GtkTreeDragDest, GtkTreeSortable and GtkBuildable.

## Includes

    #include <gtex.h>

## Description

GtexTemplatesDefault is a singleton class that stores information about default templates. In this application, new documents are created from templates. There are a few default templates available, and personal templates can be created (see GtexTemplatesPersonal).

Each LaTeX user has probably different needs, and has a different set of templates. So it's better to keep a short list of default templates. It would be useless to have a hundred default templates, since anyway they would most probably not fit many users. For example each user has a different preamble, with different packages, configured differently, etc.

In the git repository, default templates are located in the data/templates/ directory.

## Functions

### gtex_templates_default_get_instance ()

    GtexTemplatesDefault *
    gtex_templates_default_get_instance (void);

Gets the instance of the GtexTemplatesDefault singleton.

#### Returns

the instance of GtexTemplatesDefault.

[transfer none]

### gtex_templates_default_get_contents ()

    gchar *
    gtex_templates_default_get_contents (GtexTemplatesDefault *templates,
                                         GtkTreePath *path);

Gets the contents of a default template.

TODO load contents asynchronously.

#### Parameters

templates | the GtexTemplatesDefault instance. |
path | the GtkTreePath of a default template. |

#### Returns

the default template's contents. Free with `g_free()`.

## Types and Values

### GtexTemplatesDefault

    typedef struct _GtexTemplatesDefault GtexTemplatesDefault;

## See Also

GtexTemplatesPersonal