summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJuan Pablo Ugarte <juanpablougarte@gmail.com>2020-10-05 21:10:22 -0300
committerJuan Pablo Ugarte <juanpablougarte@gmail.com>2020-10-05 21:10:22 -0300
commit7ecce9ea239f98cf95990144435238d8541b28f2 (patch)
tree3abdbd1a1e757dc8836a9c85cb7635da046e5494 /doc
parenta5ac6a9a2a4b20eebefd7631508ed70aca185683 (diff)
downloadglade-7ecce9ea239f98cf95990144435238d8541b28f2.tar.gz
Docs: add doc about registering custom types at runtime.
Closes issue #360 "No examples in documentation on using custom catalogues with gtkBuilder"
Diffstat (limited to 'doc')
-rw-r--r--doc/catalogintro.sgml14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/catalogintro.sgml b/doc/catalogintro.sgml
index 8abfce2c..13367ee7 100644
--- a/doc/catalogintro.sgml
+++ b/doc/catalogintro.sgml
@@ -36,6 +36,20 @@ 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
are integrating an object "Frobnicator":