OptionGroup

A glib.option_group.OptionGroup struct defines the options in a single group. The struct has only private fields and should not be directly accessed.

All options in a group share the same translation function. Libraries which need to parse commandline options are expected to provide a function for getting a glib.option_group.OptionGroup holding their options, which the application can then add to its #GOptionContext.

Constructors

this
this(void* ptr, Flag!"Take" take)
this
this(string name, string description, string helpDescription)

Members

Functions

_cPtr
void* _cPtr(Flag!"Dup" dup)
addEntries
void addEntries(glib.types.OptionEntry[] entries)

Adds the options specified in entries to group.

self
OptionGroup self()

Returns this, for use in with statements.

setTranslateFunc
void setTranslateFunc(glib.types.TranslateFunc func)

Sets the function which is used to translate user-visible strings, for --help output. Different groups can use different #GTranslateFuncs. If func is null, strings are not translated.

setTranslationDomain
void setTranslationDomain(string domain)

A convenience function to use gettext() for translating user-visible strings.

Properties

_gType
GType _gType [@property getter]

Static functions

_getGType
GType _getGType()

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

_getGType
GType _getGType()

Get the GType of this boxed type.

_gType
GType _gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.