[gtk+/popover-menu-buttons: 8/8] Document iconic section support
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/popover-menu-buttons: 8/8] Document iconic section support
- Date: Sat, 26 Apr 2014 23:46:56 +0000 (UTC)
commit 2da436ec171d7e854c5ce2fc52382cc14c866b67
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Apr 26 14:38:07 2014 -0400
Document iconic section support
gtk/gtkpopover.c | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 85cb7f8..63b6f3d 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -37,6 +37,40 @@
* is desired on a popover, gtk_popover_set_modal() may be called on it
* to tweak its behavior.
*
+ * ## GtkPopover as menu replacement
+ *
+ * GtkPopover is often used to replace menus. To facilitate this, it
+ * supports being populated from a #GMenuModel, using
+ * gtk_popover_new_from_model(). In addition to all the regular menu
+ * model features, this function supports rendering sections in the
+ * model in a more compact form, as a row of icon buttons instead of
+ * menu items.
+ *
+ * To use this rendering, set the ”display-hint” attribute
+ * of the section to ”iconic” and set the icons of your items with
+ * the ”verb-icon” attribute.
+ *
+ * |[
+ * <section>
+ * <attribute name="display-hint">iconic</attribute>
+ * <item>
+ * <attribute name="label">Cut</attribute>
+ * <attribute name="action">app.cut</attribute>
+ * <attribute name="verb-icon">edit-cut-symbolic</attribute>
+ * </item>
+ * <item>
+ * <attribute name="label">Copy</attribute>
+ * <attribute name="action">app.copy</attribute>
+ * <attribute name="verb-icon">edit-copy-symbolic</attribute>
+ * </item>
+ * <item>
+ * <attribute name="label">Paste</attribute>
+ * <attribute name="action">app.paste</attribute>
+ * <attribute name="verb-icon">edit-paste-symbolic</attribute>
+ * </item>
+ * </section>
+ * ]|
+ *
* Since: 3.12
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]