summaryrefslogtreecommitdiff
path: root/gtk/gtkmenubutton.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-02-07 19:21:49 -0500
committerMatthias Clasen <mclasen@redhat.com>2014-02-08 20:42:20 -0500
commit9822d510a68e01db4468db7629d4e7fb40e7abcc (patch)
tree6d314c96167be8bc7674f39d9d0dbbb6761a5f9c /gtk/gtkmenubutton.h
parent552c29b488ecd7bcc3303dd5514ce6dbfff04437 (diff)
downloadgtk+-9822d510a68e01db4468db7629d4e7fb40e7abcc.tar.gz
GtkMenuButton: Support popovers
Add api to allow explicitly setting a GtkPopover instead of a GtkMenu as the popup of a GtkMenuButton. Also, add api to instruct the menu button to construct a popover when given a menu model. We set the style class "menu-button" on the button only when it pops up a menu, to allow different treatment for the active state of the button in the two cases. https://bugzilla.gnome.org/show_bug.cgi?id=723878
Diffstat (limited to 'gtk/gtkmenubutton.h')
-rw-r--r--gtk/gtkmenubutton.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/gtk/gtkmenubutton.h b/gtk/gtkmenubutton.h
index 8aa2644cd2..82a876b606 100644
--- a/gtk/gtkmenubutton.h
+++ b/gtk/gtkmenubutton.h
@@ -27,6 +27,7 @@
#include <gtk/gtktogglebutton.h>
#include <gtk/gtkmenu.h>
+#include <gtk/gtkpopover.h>
G_BEGIN_DECLS
@@ -67,10 +68,16 @@ GtkWidget *gtk_menu_button_new (void);
GDK_AVAILABLE_IN_3_6
void gtk_menu_button_set_popup (GtkMenuButton *menu_button,
- GtkWidget *popup);
+ GtkWidget *menu);
GDK_AVAILABLE_IN_3_6
GtkMenu *gtk_menu_button_get_popup (GtkMenuButton *menu_button);
+GDK_AVAILABLE_IN_3_12
+void gtk_menu_button_set_popover (GtkMenuButton *menu_button,
+ GtkWidget *popover);
+GDK_AVAILABLE_IN_3_12
+GtkPopover *gtk_menu_button_get_popover (GtkMenuButton *menu_button);
+
GDK_AVAILABLE_IN_3_6
void gtk_menu_button_set_direction (GtkMenuButton *menu_button,
GtkArrowType direction);
@@ -89,6 +96,14 @@ void gtk_menu_button_set_align_widget (GtkMenuButton *menu_button,
GDK_AVAILABLE_IN_3_6
GtkWidget *gtk_menu_button_get_align_widget (GtkMenuButton *menu_button);
+GDK_AVAILABLE_IN_3_12
+void gtk_menu_button_set_use_popover (GtkMenuButton *menu_button,
+ gboolean use_popover);
+
+GDK_AVAILABLE_IN_3_12
+gboolean gtk_menu_button_get_use_popover (GtkMenuButton *menu_button);
+
+
G_END_DECLS
#endif /* __GTK_MENU_BUTTON_H__ */