13#ifndef SEEN_UI_DIALOGS_ATTRDIALOG_H
14#define SEEN_UI_DIALOGS_ATTRDIALOG_H
16#include <gtkmm/treemodel.h>
26class CellRendererText;
28class EventControllerKey;
107 void setUndo(Glib::ustring
const &event_description);
126 void startNameEdit(Gtk::CellEditable *cell,
const Glib::ustring &path);
127 void startValueEdit(Gtk::CellEditable *cell,
const Glib::ustring &path);
128 void nameEdited(
const Glib::ustring &path,
const Glib::ustring &
name);
129 void valueEdited(
const Glib::ustring &path,
const Glib::ustring &value);
159 static Glib::ustring
round_numbers(
const Glib::ustring& text,
int precision);
Gtk::TreeModelColumn< Glib::ustring > _attributeValue
Gtk::TreeModelColumn< Glib::ustring > _attributeValueRender
Gtk::TreeModelColumn< Glib::ustring > _attributeName
The AttrDialog class This dialog allows to add, delete and modify XML attributes created in the xml e...
void adjust_popup_edit_size()
static std::unique_ptr< Syntax::TextEditView > init_text_view(AttrDialog *owner, Syntax::SyntaxMode coloring, bool map)
void setUndo(Glib::ustring const &event_description)
void startNameEdit(Gtk::CellEditable *cell, const Glib::ustring &path)
bool onTreeViewKeyPressed(unsigned keyval, unsigned keycode, Gdk::ModifierType state)
AttrDialog::onTreeViewKeyPressed Delete or create elements based on key presses.
void attr_reset_context(gint attr)
Sets the XML status bar, depending on which attr is selected.
Gtk::ScrolledWindow & _scrolled_text_view
sigc::scoped_connection _message_changed_connection
Signal handlers.
Gtk::TreeViewColumn * _valueCol
Gtk::TreeView & _treeView
void set_mono_font(bool mono)
Gtk::ScrolledWindow & get_scrolled_window()
void startValueEdit(Gtk::CellEditable *cell, const Glib::ustring &path)
Gtk::Entry * _editingEntry
Gtk::CellRendererText * _valueRenderer
void set_current_textedit(Syntax::TextEditView *edit)
Gtk::ScrolledWindow & _scrolled_window
void deleteAttribute(Gtk::TreeRow &row)
Gtk::Box & get_status_box()
std::unique_ptr< Syntax::TextEditView > _points_edit
Glib::ustring _value_editing
void nameEdited(const Glib::ustring &path, const Glib::ustring &name)
Called when the name is edited in the TreeView editable column.
void notifyContentChanged(XML::Node &node, Util::ptr_shared old_content, Util::ptr_shared new_content) final
Content change callback.
void storeMoveToNext(Gtk::TreeModel::Path modelpath)
std::unique_ptr< Syntax::TextEditView > _text_edit
static Glib::ustring round_numbers(const Glib::ustring &text, int precision)
std::unique_ptr< Inkscape::MessageContext > _message_context
Gtk::CellRendererText * _nameRenderer
Syntax::TextEditView * _current_text_edit
std::unique_ptr< Syntax::TextEditView > _style_edit
Glib::RefPtr< Gtk::Builder > _builder
std::unique_ptr< Syntax::TextEditView > _attr_edit
void truncateDigits() const
Round the selected floating point numbers in the attribute edit popover.
void valueEdited(const Glib::ustring &path, const Glib::ustring &value)
AttrDialog::valueEdited.
void onAttrDelete(Glib::ustring const &path)
AttrDialog::onAttrDelete.
sigc::scoped_connection _adjust_size
void setRepr(Inkscape::XML::Node *repr)
AttrDialog::setRepr Set the internal xml object that I'm working on right now.
void notifyAttributeChanged(XML::Node &repr, GQuark name, Util::ptr_shared old_value, Util::ptr_shared new_value) final
AttrDialog::notifyAttributeChanged This is called when the XML has an updated attribute.
Gtk::TreeViewColumn * _nameCol
std::unique_ptr< Inkscape::MessageStack > _message_stack
Glib::ustring _value_path
sigc::scoped_connection _close_popup
std::unique_ptr< Syntax::TextEditView > _css_edit
Inkscape::XML::Node * _repr
void onTreeViewKeyReleased(unsigned keyval, unsigned keycode, Gdk::ModifierType state)
void onCreateClicked()
AttrDialog::onCreateClicked This function is a slot to signal_clicked for '+' button panel.
Gtk::ScrolledWindow & _content_sw
Gtk::TextView & _activeTextView() const
std::unique_ptr< Syntax::TextEditView > _svgd_edit
void setEditingEntry(Gtk::Entry *entry, bool embedNewline)
void setPrecision(int const n)
bool onPopoverKeyPressed(unsigned keyval, unsigned keycode, Gdk::ModifierType state)
AttrDialog()
Constructor A treeview whose each row corresponds to an XML attribute of a selected node New attribut...
Glib::RefPtr< Gtk::ListStore > _store
DialogBase is the base class for the dialog system.
Base class for styled text editing widget.
Interface for XML node observers.
Interface for refcounted XML nodes.
std::unordered_map< std::string, std::unique_ptr< SPDocument > > map
A base class for all dialogs.
Inkscape::XML::Node * node
SyntaxMode
Syntax highlighting mode (language).
Helper class to stream background task notifications as a series of messages.
Interface for XML node observers.