# gtksourceview::SourceLanguageManager Class Reference

manages the languages supported by the SourceBuffer. More...

`#include <sourcelanguagemanager.h>`

List of all members.

## Public Types
typedef SourceLanguageManager | CppObjectType
typedef SourceLanguageManager_Class | CppClassType
typedef GtkSourceLanguageManager | BaseObjectType
typedef GtkSourceLanguageManagerClass | BaseClassType
typedef SourceLanguageManager | CppObjectType
typedef SourceLanguageManager_Class | CppClassType
typedef GtkSourceLanguageManager | BaseObjectType
typedef GtkSourceLanguageManagerClass | BaseClassType
## Public Member Functions
virtual | ~SourceLanguageManager ()
GtkSourceLanguageManager * | gobj ()
| Provides access to the underlying C GObject.
const GtkSourceLanguageManager * | gobj () const
| Provides access to the underlying C GObject.
GtkSourceLanguageManager * | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Glib::StringArrayHandle | get_search_path () const
void | set_search_path (const Glib::StringArrayHandle &dirs)
Glib::StringArrayHandle | get_language_ids () const
Glib::RefPtr< SourceLanguage > | get_language (const Glib::ustring &id)
Glib::RefPtr< const SourceLanguage > | get_language (const Glib::ustring &id) const
virtual | ~SourceLanguageManager ()
GtkSourceLanguageManager * | gobj ()
| Provides access to the underlying C GObject.
const GtkSourceLanguageManager * | gobj () const
| Provides access to the underlying C GObject.
GtkSourceLanguageManager * | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Glib::SListHandle < Glib::RefPtr< SourceLanguage > > | get_available_languages () const
| the available languages supported by the current LanguagesManager.
Glib::RefPtr< SourceLanguage > | get_language_from_mime_type (const Glib::ustring &mime_type) const
| gets the SourceLanguage associated to the given mime_type in the language manager.
Glib::SListHandle< Glib::ustring > | get_lang_files_dirs () const
| Gets the list of language files directories for the given language manager.
## Static Public Member Functions
static GType | get_type () G_GNUC_CONST
static GType | get_base_type () G_GNUC_CONST
static Glib::RefPtr < SourceLanguageManager > | create ()
| creates an instance of SourceLanguageManager
static Glib::RefPtr < SourceLanguageManager > | get_default ()
static GType | get_type () G_GNUC_CONST
static GType | get_base_type () G_GNUC_CONST
static Glib::RefPtr < SourceLanguageManager > | create ()
| creates an instance of SourceLanguageManager
## Protected Member Functions
| SourceLanguageManager (const Glib::ConstructParams &construct_params)
| SourceLanguageManager (GtkSourceLanguageManager *castitem)
| SourceLanguageManager ()
| SourceLanguageManager (const Glib::ConstructParams &construct_params)
| SourceLanguageManager (GtkSourceLanguageManager *castitem)
| SourceLanguageManager ()
## Friends
class | SourceLanguageManager_Class
## Related Functions
(Note that these are not member functions.)
Glib::RefPtr < gtksourceview::SourceLanguageManager > | wrap (GtkSourceLanguageManager *object, bool take_copy=false)

## Detailed Description

manages the languages supported by the SourceBuffer.

## Member Typedef Documentation

typedef SourceLanguageManager gtksourceview::SourceLanguageManager::CppObjectType

typedef SourceLanguageManager_Class gtksourceview::SourceLanguageManager::CppClassType

typedef GtkSourceLanguageManager gtksourceview::SourceLanguageManager::BaseObjectType

typedef GtkSourceLanguageManagerClass gtksourceview::SourceLanguageManager::BaseClassType

typedef SourceLanguageManager gtksourceview::SourceLanguageManager::CppObjectType

typedef SourceLanguageManager_Class gtksourceview::SourceLanguageManager::CppClassType

typedef GtkSourceLanguageManager gtksourceview::SourceLanguageManager::BaseObjectType

typedef GtkSourceLanguageManagerClass gtksourceview::SourceLanguageManager::BaseClassType

## Constructor & Destructor Documentation

gtksourceview::SourceLanguageManager::SourceLanguageManager | ( | const Glib::ConstructParams & | construct_params | ) | `[explicit, protected]`

gtksourceview::SourceLanguageManager::SourceLanguageManager | ( | GtkSourceLanguageManager * | castitem | ) | `[explicit, protected]`

virtual gtksourceview::SourceLanguageManager::~SourceLanguageManager | ( |  | ) | `[virtual]`

gtksourceview::SourceLanguageManager::SourceLanguageManager | ( |  | ) | `[protected]`

gtksourceview::SourceLanguageManager::SourceLanguageManager | ( | const Glib::ConstructParams & | construct_params | ) | `[explicit, protected]`

gtksourceview::SourceLanguageManager::SourceLanguageManager | ( | GtkSourceLanguageManager * | castitem | ) | `[explicit, protected]`

virtual gtksourceview::SourceLanguageManager::~SourceLanguageManager | ( |  | ) | `[virtual]`

gtksourceview::SourceLanguageManager::SourceLanguageManager | ( |  | ) | `[protected]`

## Member Function Documentation

static GType gtksourceview::SourceLanguageManager::get_type | ( |  | ) | `[static]`

static GType gtksourceview::SourceLanguageManager::get_base_type | ( |  | ) | `[static]`

GtkSourceLanguageManager* gtksourceview::SourceLanguageManager::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

const GtkSourceLanguageManager* gtksourceview::SourceLanguageManager::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

GtkSourceLanguageManager* gtksourceview::SourceLanguageManager::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

static Glib::RefPtr<SourceLanguageManager> gtksourceview::SourceLanguageManager::create | ( |  | ) | `[static]`

creates an instance of SourceLanguageManager

Returns:
  the newly created instance of SourceLanguageManager

static Glib::RefPtr<SourceLanguageManager> gtksourceview::SourceLanguageManager::get_default | ( |  | ) | `[static]`

Returns: a Gtk::SourceLanguageManager. Return value is owned

Returns:
  A Gtk::SourceLanguageManager. Return value is owned by GtkSourceView library and must not be unref'ed.

Glib::StringArrayHandle gtksourceview::SourceLanguageManager::get_search_path | ( |  | ) | const

Gets the list directories where lm looks for language files.

Returns:
  `0`-terminated array containg a list of language files directories. The array is owned by lm and must not be modified.

void gtksourceview::SourceLanguageManager::set_search_path | ( | const Glib::StringArrayHandle & | dirs | ) |

Sets the list of directories where the lm looks for language files. If dirs is `0`, the search path is reset to default.

<note>

At the moment this function can be called only before the language files are loaded for the first time. In practice to set a custom search path for a Gtk::SourceLanguageManager, you have to call this function right after creating it.

</note>

Parameters:

  | dirs | A `0`-terminated array of strings or `0`.

Glib::StringArrayHandle gtksourceview::SourceLanguageManager::get_language_ids | ( |  | ) | const

Returns: a `0`-terminated array of string containing the ids of the

Returns:
  A `0`-terminated array of string containing the ids of the available languages or `0` if no language is available. The array is owned by lm and must not be modified.

Glib::RefPtr<SourceLanguage> gtksourceview::SourceLanguageManager::get_language | ( | const Glib::ustring & | id | ) |

Gets the Gtk::SourceLanguage identified by the given id in the language manager.

Parameters:

  | id | A language id.

Returns:
  A Gtk::SourceLanguage, or `0` if there is no language identified by the given id. Return value is owned by lm and should not be freed.

Glib::RefPtr<const SourceLanguage> gtksourceview::SourceLanguageManager::get_language | ( | const Glib::ustring & | id | ) | const

Gets the Gtk::SourceLanguage identified by the given id in the language manager.

Parameters:

  | id | A language id.

Returns:
  A Gtk::SourceLanguage, or `0` if there is no language identified by the given id. Return value is owned by lm and should not be freed.

static GType gtksourceview::SourceLanguageManager::get_type | ( |  | ) | `[static]`

static GType gtksourceview::SourceLanguageManager::get_base_type | ( |  | ) | `[static]`

GtkSourceLanguageManager* gtksourceview::SourceLanguageManager::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

const GtkSourceLanguageManager* gtksourceview::SourceLanguageManager::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

GtkSourceLanguageManager* gtksourceview::SourceLanguageManager::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

static Glib::RefPtr<SourceLanguageManager> gtksourceview::SourceLanguageManager::create | ( |  | ) | `[static]`

creates an instance of SourceLanguageManager

Returns:
  the newly created instance of SourceLanguageManager

Glib::SListHandle<Glib::RefPtr<SourceLanguage> > gtksourceview::SourceLanguageManager::get_available_languages | ( |  | ) | const

the available languages supported by the current LanguagesManager.

Returns:
  the list of languages available for the current LanguagesManager.

Glib::RefPtr<SourceLanguage> gtksourceview::SourceLanguageManager::get_language_from_mime_type | ( | const Glib::ustring & | mime_type | ) | const

gets the SourceLanguage associated to the given mime_type in the language manager.

Returns:
  the SourceLanguage associated to the given mime_type in the language manager.

Glib::SListHandle<Glib::ustring> gtksourceview::SourceLanguageManager::get_lang_files_dirs | ( |  | ) | const

Gets the list of language files directories for the given language manager.

Returns:
  the list of language files directories for the given language manager.

## Friends And Related Function Documentation

SourceLanguageManager_Class`[friend]`

Glib::RefPtr< gtksourceview::SourceLanguageManager > wrap | ( | GtkSourceLanguageManager * | object,
|  | bool | take_copy = `false` |
| ) |  |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  | object | The C instance.
  | take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following files:

- sourcelanguagemanager.h
- sourcelanguagesmanager.h