// SPDX-License-Identifier: GPL-2.0-or-later /** @file * @brief A dialog for CSS selectors */ /* Authors: * Kamalpreet Kaur Grewal * Tavmjong Bah * * Copyright (C) Kamalpreet Kaur Grewal 2016 * Copyright (C) Tavmjong Bah 2017 * * Released under GNU GPL v2+, read the file 'COPYING' for more information. */ #ifndef SELECTORSDIALOG_H #define SELECTORSDIALOG_H #include #include #include #include #include #include #include #include #include #include #include #include "ui/dialog/dialog-base.h" #include "ui/dialog/styledialog.h" #include "xml/helper-observer.h" namespace Inkscape { namespace UI { namespace Dialog { /** * @brief The SelectorsDialog class * A list of CSS selectors will show up in this dialog. This dialog allows one to * add and delete selectors. Elements can be added to and removed from the selectors * in the dialog. Selection of any selector row selects the matching objects in * the drawing and vice-versa. (Only simple selectors supported for now.) * * This class must keep two things in sync: * 1. The text node of the style element. * 2. The Gtk::TreeModel. */ class SelectorsDialog : public DialogBase { public: // No default constructor, noncopyable, nonassignable SelectorsDialog(); ~SelectorsDialog() override; SelectorsDialog(SelectorsDialog const &d) = delete; SelectorsDialog operator=(SelectorsDialog const &d) = delete; static SelectorsDialog &getInstance() { return *new SelectorsDialog(); } void update() override; void desktopReplaced() override; void documentReplaced() override; void selectionChanged(Selection *selection) override; private: // Monitor