Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
contextmenu.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Context menu
4 *
5 * Authors:
6 * Tavmjong Bah
7 *
8 * Copyright (C) 2022 Tavmjong Bah
9 *
10 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
11 */
12
13#ifndef SEEN_CONTEXTMENU_H
14#define SEEN_CONTEXTMENU_H
15
16#include <vector>
17#include <glibmm/refptr.h>
18#include <gtkmm/popovermenu.h>
19
20namespace Gio {
21class SimpleActionGroup;
22} // namespace Gio
23
24class SPDesktop;
25class SPDocument;
26class SPObject;
27class SPItem;
28
32class ContextMenu final : public Gtk::PopoverMenu
33{
34public:
35 ContextMenu(SPDesktop *desktop, SPObject *object, std::vector<SPItem*> const &items_under_cursor, bool hide_layers_and_objects_menu_item = false);
36
37private:
38 // Used for unlock and unhide actions
39 Glib::RefPtr<Gio::SimpleActionGroup> action_group;
40 std::vector<SPItem *> items_under_cursor;
41 void unhide_or_unlock(SPDocument* document, bool unhide);
42};
43
44#endif // SEEN_CONTEXT_MENU_H
45
46/*
47 Local Variables:
48 mode:c++
49 c-file-style:"stroustrup"
50 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
51 indent-tabs-mode:nil
52 fill-column:99
53 End:
54*/
55// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
Implements the Inkscape context menu.
Definition contextmenu.h:33
std::vector< SPItem * > items_under_cursor
Definition contextmenu.h:40
Glib::RefPtr< Gio::SimpleActionGroup > action_group
Definition contextmenu.h:39
void unhide_or_unlock(SPDocument *document, bool unhide)
To do: update description of desktop.
Definition desktop.h:149
Typed SVG document implementation.
Definition document.h:101
Base class for visual SVG elements.
Definition sp-item.h:109
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Definition sp-object.h:160
static void unhide(SPItem *item, SPDesktop *desktop)
SPDesktop * desktop