Commit 7ecce9ea authored by Juan Pablo Ugarte's avatar Juan Pablo Ugarte
Browse files

Docs: add doc about registering custom types at runtime.

Closes issue #360 "No examples in documentation on using custom catalogues with gtkBuilder"
parent a5ac6a9a
Pipeline #219043 passed with stages
in 3 minutes and 21 seconds
......@@ -35,6 +35,20 @@ some basic examples and describe a wealth of options that can be used to
enhance UI editing and workaround exceptions.
</para>
<para>
Keep in mind you need to take extra steps to ensure GtkBuilder can pick up your
new object types at runtime. Ussualy all you need is to link your executable
with your widget library assuming it has properly named get_type() functions.
<![CDATA[GtkWindow -> gtk_window_get_type
GtkHBox -> gtk_hbox_get_type
GtkUIManager -> gtk_ui_manager_get_type
GWeatherLocation -> gweather_location_get_type]]>
If not you can always register your widgets with the type system with g_type_ensure ()
</para>
<para>
The catalog file starts by specifying the name of the catalog and the plugin
library to use, the following examples assume you have a namespace "Foo" and
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment