/* GTK - The GIMP Toolkit
* Copyright © 2014 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see .
*/
#include "config.h"
#include "gtkpopovermenu.h"
#include "gtkpopovermenuprivate.h"
#include "gtkstack.h"
#include "gtkmenusectionboxprivate.h"
#include "gtkmenubutton.h"
#include "gtkactionmuxerprivate.h"
#include "gtkmenutrackerprivate.h"
#include "gtkpopoverprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkeventcontrollerfocus.h"
#include "gtkeventcontrollermotion.h"
#include "gtkmain.h"
#include "gtktypebuiltins.h"
#include "gtkmodelbuttonprivate.h"
#include "gtkpopovermenubar.h"
#include "gtkshortcutmanager.h"
#include "gtkshortcutcontroller.h"
#include "gtkbuildable.h"
#include "gtkscrolledwindow.h"
#include "gtkviewport.h"
/**
* GtkPopoverMenu:
*
* `GtkPopoverMenu` is a subclass of `GtkPopover` that implements menu
* behavior.
*
* ![An example GtkPopoverMenu](menu.png)
*
* `GtkPopoverMenu` treats its children like menus and allows switching
* between them. It can open submenus as traditional, nested submenus,
* or in a more touch-friendly sliding fashion.
* The property [property@Gtk.PopoverMenu:flags] controls this appearance.
*
* `GtkPopoverMenu` is meant to be used primarily with menu models,
* using [ctor@Gtk.PopoverMenu.new_from_model]. If you need to put
* other widgets such as a `GtkSpinButton` or a `GtkSwitch` into a popover,
* you can use [method@Gtk.PopoverMenu.add_child].
*
* For more dialog-like behavior, use a plain `GtkPopover`.
*
* ## Menu models
*
* The XML format understood by `GtkBuilder` for `GMenuModel` consists
* of a toplevel `