[libadwaita] combo-row: Add an example to docs



commit 3cf84e583245e715082babb5c37087df256f9d03
Author: Alan Beveridge <adbeveridge protonmail com>
Date:   Mon Jul 4 16:30:04 2022 +0000

    combo-row: Add an example to docs

 src/adw-combo-row.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
---
diff --git a/src/adw-combo-row.c b/src/adw-combo-row.c
index af89e5e3..ba799a95 100644
--- a/src/adw-combo-row.c
+++ b/src/adw-combo-row.c
@@ -27,6 +27,26 @@
  * choices. The row displays the selected choice. When activated, the row
  * displays a popover which allows the user to make a new choice.
  *
+ * Example of an `AdwComboRow` UI definition:
+ * ```xml
+ * <object class="AdwComboRow">
+ *   <property name="title" translatable="yes">Combo Row</property>
+ *   <property name="model">
+ *     <object class="GtkStringList">
+ *       <items>
+ *         <item translatable="yes">Foo</item>
+ *         <item translatable="yes">Bar</item>
+ *         <item translatable="yes">Baz</item>
+ *       </items>
+ *     </object>
+ *   </property>
+ * </object>
+ * ```
+ * 
+ * The [property@ComboRow:selected] and [property@ComboRow:selected-item]
+ * properties can be used to keep track of the selected item and react to their
+ * changes.
+ *
  * `AdwComboRow` mirrors [class@Gtk.DropDown], see that widget for details.
  *
  * `AdwComboRow` is [property@Gtk.ListBoxRow:activatable] if a model is set.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]