16#ifndef SELECTORSDIALOG_H
17#define SELECTORSDIALOG_H
19#include <gtkmm/paned.h>
20#include <gtkmm/scrolledwindow.h>
21#include <gtkmm/treestore.h>
22#include <gtkmm/treeview.h>
109 const Glib::ValueBase& selection_data)
const final;
127 Glib::RefPtr<Gtk::Adjustment>
_vadj;
156 Glib::ustring
_getIdList(std::vector<SPObject *>);
157 std::vector<SPObject *>
_getObjVec(Glib::ustring
const &selector);
158 void _insertClass(
const std::vector<SPObject *>& objVec,
const Glib::ustring& className);
160 void _removeClass(
const std::vector<SPObject *> &objVec,
const Glib::ustring &className,
bool all =
false);
172 void _rowExpand(
const Gtk::TreeModel::iterator &iter,
const Gtk::TreeModel::Path &path);
173 void _rowCollapse(
const Gtk::TreeModel::iterator &iter,
const Gtk::TreeModel::Path &path);
187 void _styleButton(Gtk::Button& btn,
char const* iconName,
char const* tooltip);
The set of selected SPObjects for a given document and layer model.
DialogBase is the base class for the dialog system.
Gtk::TreeModelColumn< Glib::ustring > _colSelector
Gtk::TreeModelColumn< SPObject * > _colObj
Gtk::TreeModelColumn< bool > _colExpand
Gtk::TreeModelColumn< gint > _fontWeight
Gtk::TreeModelColumn< gint > _colType
Gtk::TreeModelColumn< Glib::ustring > _colProperties
void on_row_deleted(const TreeModel::Path &path) final
bool row_drop_possible_vfunc(const Gtk::TreeModel::Path &path, const Glib::ValueBase &selection_data) const final
Allow dropping only in between other selectors.
SelectorsDialog * _selectorsdialog
bool row_draggable_vfunc(const Gtk::TreeModel::Path &path) const final
Allow dragging only selectors.
The SelectorsDialog class A list of CSS selectors will show up in this dialog.
void _readStyleElement()
Fill the internal Gtk::TreeStore from the svg:style element.
SelectorsDialog()
Constructor A treeview and a set of two buttons are added to the dialog.
Inkscape::XML::Node * _getStyleTextNode(bool create_if_missing=false)
void _selectRow()
This function selects the row in treeview corresponding to an object selected in the drawing.
void _insertSyntacticElement(CSS::RuleStatement const &rule, bool expand, Gtk::TreeIter< Gtk::TreeRow > where)
Populate a tree row with a representation of a CSS rule statement.
void update() final
The update() method is essential to Gtk state management.
void _styleButton(Gtk::Button &btn, char const *iconName, char const *tooltip)
Gtk::TreeModel::Path _lastpath
void _addToSelector(Gtk::TreeModel::Row row)
void _insertClass(const std::vector< SPObject * > &objVec, const Glib::ustring &className)
Glib::RefPtr< Gtk::Adjustment > _vadj
std::vector< SPObject * > getSelectedObjects()
Gtk::ScrolledWindow _scrolled_window_selectors
void _nodeChanged(Inkscape::XML::Node &repr)
void _rowExpand(const Gtk::TreeModel::iterator &iter, const Gtk::TreeModel::Path &path)
Inkscape::XML::Node * _textNode
Glib::ustring _formatRowAsCSS(Gtk::TreeConstRow const &row) const
Return the representation of the contents of a tree row in the dialog as a CSS string.
void _removeClass(const std::vector< SPObject * > &objVec, const Glib::ustring &className, bool all=false)
void _rowCollapse(const Gtk::TreeModel::iterator &iter, const Gtk::TreeModel::Path &path)
void _writeStyleElement()
Update the content of the style element as selectors (or objects) are added/removed.
Inkscape::XML::Node * m_root
StyleDialog * _style_dialog
void documentReplaced() final
void onTreeViewClickReleased(int n_press, double x, double y)
void _nodeAdded(Inkscape::XML::Node &repr)
void _removeFromSelector(Gtk::TreeModel::Row row)
void _addSelector()
This function opens a dialog to add a selector.
void _nodeRemoved(Inkscape::XML::Node &repr)
Glib::RefPtr< Gtk::TreeModelFilter > _modelfilter
std::unique_ptr< Inkscape::XML::NodeObserver > m_styletextwatcher
std::vector< SPObject * > _getObjVec(Glib::ustring const &selector)
void desktopReplaced() final
Called when the desktop has certainly changed.
static Glib::ustring _getSelectorClasses(Glib::ustring selector)
Glib::RefPtr< TreeStore > _store
void _delSelector()
This function deletes selector when '-' at the bottom is clicked.
void _toggleDirection(Gtk::ToggleButton *vertical)
void selectionChanged(Selection *selection) final
Inkscape::XML::SignalObserver _objObserver
void _closeDialog(Gtk::Dialog *textDialogPtr)
std::unique_ptr< Inkscape::XML::NodeObserver > m_nodewatcher
Glib::ustring _getIdList(std::vector< SPObject * >)
The StyleDialog class A list of CSS selectors will show up in this dialog.
Interface for refcounted XML nodes.
SPObject is an abstract base class of all of the document nodes at the SVG document level.
A base class for all dialogs.
TODO: insert short description here.
std::string OtherStatement
Another CSS statement, currently not handled in a special way; for example @charset.
Helper class to stream background task notifications as a series of messages.
A decomposed block -statement, consisting of the statement and the contents of the associated block.
A decomposed CSS rule statement, consisting of a selector (which can be complex), and the associated ...
Parsing utils capable of producing a rudimentary syntactic decomposition of a CSS stylesheet.