WidgetClass

Constructors

this
this(GtkWidgetClass* gtkWidgetClass, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

addShortcut
void addShortcut(Shortcut shortcut)

Installs a shortcut in @widget_class.

bindTemplateCallbackFull
void bindTemplateCallbackFull(string callbackName, GCallback callbackSymbol)

Declares a @callback_symbol to handle @callback_name from the template XML defined for @widget_type.

bindTemplateChildFull
void bindTemplateChildFull(string name, bool internalChild, ptrdiff_t structOffset)

Automatically assign an object declared in the class template XML to be set to a location on a freshly built instance’s private data, or alternatively accessible via [method@Gtk.Widget.get_template_child].

getAccessibleRole
GtkAccessibleRole getAccessibleRole()

Retrieves the accessible role used by the given GtkWidget class.

getActivateSignal
uint getActivateSignal()

Retrieves the signal id for the activation signal set using gtk_widget_class_set_activate_signal().

getCssName
string getCssName()

Gets the name used by this class for matching in CSS code.

getLayoutManagerType
GType getLayoutManagerType()

Retrieves the type of the [class@Gtk.LayoutManager] used by the GtkWidget class.

getStruct
void* getStruct()

the main Gtk struct as a void*

getWidgetClassStruct
GtkWidgetClass* getWidgetClassStruct(bool transferOwnership)

Get the main Gtk struct

installAction
void installAction(string actionName, string parameterType, GtkWidgetActionActivateFunc activate)

This should be called at class initialization time to specify actions to be added for all instances of this class.

installPropertyAction
void installPropertyAction(string actionName, string propertyName)

Installs an action called @action_name on @widget_class and binds its state to the value of the @property_name property.

queryAction
bool queryAction(uint index, GType owner, string actionName, VariantType parameterType, string propertyName)

Queries the actions that have been installed for a widget class using [method@Gtk.WidgetClass.install_action] during class initialization.

setAccessibleRole
void setAccessibleRole(GtkAccessibleRole accessibleRole)

Sets the accessible role used by the given GtkWidget class.

setActivateSignal
void setActivateSignal(uint signalId)

Sets the GtkWidgetClass.activate_signal field with the given @signal_id; the signal will be emitted when calling gtk_widget_activate().

setActivateSignalFromName
void setActivateSignalFromName(string signalName)

Sets the GtkWidgetClass.activate_signal field with the signal id for the given @signal_name; the signal will be emitted when calling gtk_widget_activate().

setCssName
void setCssName(string name)

Sets the name to be used for CSS matching of widgets.

setLayoutManagerType
void setLayoutManagerType(GType type)

Sets the type to be used for creating layout managers for widgets of @widget_class.

setTemplate
void setTemplate(Bytes templateBytes)

This should be called at class initialization time to specify the GtkBuilder XML to be used to extend a widget.

setTemplateFromResource
void setTemplateFromResource(string resourceName)

A convenience function that calls [method@Gtk.WidgetClass.set_template] with the contents of a GResource.

setTemplateScope
void setTemplateScope(BuilderScopeIF scope_)

For use in language bindings, this will override the default GtkBuilderScope to be used when parsing GtkBuilder XML from this class’s template data.

Variables

gtkWidgetClass
GtkWidgetClass* gtkWidgetClass;

the main Gtk struct

ownedRef
bool ownedRef;
Undocumented in source.

Meta