[gtk/prop-list: 14/57] builderlistitemfactory: Add an example to the docs
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/prop-list: 14/57] builderlistitemfactory: Add an example to the docs
- Date: Sat, 21 Dec 2019 00:02:08 +0000 (UTC)
commit 8bc50c0383b499635b7df78d2abae0ec5a6a8c54
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Dec 18 22:34:58 2019 -0500
builderlistitemfactory: Add an example to the docs
gtk/gtkbuilderlistitemfactory.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkbuilderlistitemfactory.c b/gtk/gtkbuilderlistitemfactory.c
index 182f276ddc..682b502dfb 100644
--- a/gtk/gtkbuilderlistitemfactory.c
+++ b/gtk/gtkbuilderlistitemfactory.c
@@ -32,7 +32,27 @@
* @Short_description: A listitem factory using ui files
*
* #GtkBuilderListItemFactory is a #GtkListItemFactory that creates
- * widgets by instantiating #GtkBuilder UI templates.
+ * widgets by instantiating #GtkBuilder UI templates. The templates
+ * must be extending #GtkListItem, and typically use #GtkExpressions
+ * to obtain data from the items in the model.
+ *
+ * Example:
+ * |[
+ * <interface>
+ * <template class="GtkListItem">
+ * <property name="child">
+ * <object class="GtkLabel">
+ * <property name="xalign">0</property>
+ * <binding name="label">
+ * <lookup name="name" type="SettingsKey">
+ * <lookup name="item">GtkListItem</lookup>
+ * </lookup>
+ * </binding>
+ * </object>
+ * </property>
+ * </template>
+ * </interface>
+ * ]|
*/
struct _GtkBuilderListItemFactory
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]