Inkscape
Vector Graphics Editor
|
Go to the source code of this file.
Typedefs | |
typedef std::vector< SnapInfo > | SnapVector |
typedef std::unordered_map< SnapTargetType, Glib::ustring > | SnapMap |
Functions | |
void | set_actions_canvas_snapping (Gio::ActionMap &map) |
const SnapMap & | get_snap_map () |
const SnapVector & | get_snap_vect () |
SnapPreferences & | get_snapping_preferences () |
void | store_snapping_action (const Glib::ustring &action_name, bool enabled) |
void | set_canvas_snapping (SnapTargetType type, bool enabled) |
void | update_actions (Gio::ActionMap &map) |
static void | canvas_snapping_toggle (Gio::ActionMap &map, SnapTargetType type) |
void | set_simple_snap (SimpleSnap option, bool value) |
void | toggle_simple_snap_option (Gio::ActionMap &map, SimpleSnap option) |
void | apply_simple_snap_defaults (Gio::ActionMap &map) |
void | add_actions_canvas_snapping (Gio::ActionMap *map) |
void | set_actions_canvas_snapping_helper (Gio::ActionMap &map, Glib::ustring action_name, bool state, bool enabled) |
void | transition_to_simple_snapping () |
Simple snapping groups existing "advanced" options into three easy to understand choices (bounding box, nodes, alignment snap). | |
Variables | ||
SnapVector | snap_bbox | |
SnapVector | snap_node | |
SnapVector | snap_alignment | |
SnapVector | snap_all_the_rest | |
struct { | ||
const char * action_name | ||
SimpleSnap option | ||
bool set | ||
} | simple_snap_options [] | |
const Glib::ustring | snap_pref_path = "/options/snapping/" | |
const Glib::ustring | global_toggle = "snap-global-toggle" | |
const Glib::ustring | SECTION = NC_("Action Section", "Snap") | |
std::vector< std::vector< Glib::ustring > > | raw_data_canvas_snapping | |
typedef std::unordered_map<SnapTargetType, Glib::ustring> SnapMap |
Definition at line 43 of file actions-canvas-snapping.cpp.
typedef std::vector<SnapInfo> SnapVector |
Definition at line 42 of file actions-canvas-snapping.cpp.
void add_actions_canvas_snapping | ( | Gio::ActionMap * | map | ) |
Definition at line 288 of file actions-canvas-snapping.cpp.
References canvas_snapping_toggle(), get_snap_vect(), get_snapping_preferences(), global_toggle, InkscapeApplication::instance(), raw_data_canvas_snapping, show_output(), simple_snap_options, store_snapping_action(), toggle_simple_snap_option(), and update_actions().
Referenced by InkscapeWindow::InkscapeWindow().
void apply_simple_snap_defaults | ( | Gio::ActionMap & | map | ) |
Definition at line 235 of file actions-canvas-snapping.cpp.
References set_simple_snap(), and update_actions().
Referenced by Inkscape::UI::Toolbar::SnapToolbar::mode_update(), and transition_to_simple_snapping().
|
static |
Definition at line 175 of file actions-canvas-snapping.cpp.
References get_snapping_preferences(), Inkscape::SnapPreferences::isSnapButtonEnabled(), set_canvas_snapping(), and update_actions().
Referenced by add_actions_canvas_snapping().
const SnapMap & get_snap_map | ( | ) |
Definition at line 92 of file actions-canvas-snapping.cpp.
References snap_alignment, snap_all_the_rest, snap_bbox, and snap_node.
Referenced by set_canvas_snapping().
const SnapVector & get_snap_vect | ( | ) |
Definition at line 103 of file actions-canvas-snapping.cpp.
References snap_alignment, snap_all_the_rest, snap_bbox, and snap_node.
Referenced by add_actions_canvas_snapping(), and get_snapping_preferences().
SnapPreferences & get_snapping_preferences | ( | ) |
Definition at line 117 of file actions-canvas-snapping.cpp.
References Inkscape::Preferences::get(), get_snap_vect(), global_toggle, Inkscape::SnapPreferences::set_simple_snap(), Inkscape::SnapPreferences::setSnapEnabledGlobally(), Inkscape::SnapPreferences::setTargetSnappable(), simple_snap_options, snap_pref_path, and transition_to_simple_snapping().
Referenced by add_actions_canvas_snapping(), canvas_snapping_toggle(), set_actions_canvas_snapping(), set_canvas_snapping(), set_simple_snap(), and toggle_simple_snap_option().
void set_actions_canvas_snapping | ( | Gio::ActionMap & | map | ) |
Definition at line 343 of file actions-canvas-snapping.cpp.
References get_snapping_preferences(), node, set_actions_canvas_snapping_helper(), Inkscape::SNAPTARGET_ALIGNMENT_CATEGORY, Inkscape::SNAPTARGET_ALIGNMENT_HANDLE, Inkscape::SNAPTARGET_BBOX_CATEGORY, Inkscape::SNAPTARGET_BBOX_CORNER, Inkscape::SNAPTARGET_BBOX_EDGE, Inkscape::SNAPTARGET_BBOX_EDGE_MIDPOINT, Inkscape::SNAPTARGET_BBOX_MIDPOINT, Inkscape::SNAPTARGET_DISTRIBUTION_CATEGORY, Inkscape::SNAPTARGET_GRID, Inkscape::SNAPTARGET_GRID_LINE, Inkscape::SNAPTARGET_GUIDE, Inkscape::SNAPTARGET_LINE_MIDPOINT, Inkscape::SNAPTARGET_NODE_CATEGORY, Inkscape::SNAPTARGET_NODE_CUSP, Inkscape::SNAPTARGET_NODE_SMOOTH, Inkscape::SNAPTARGET_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OTHERS_CATEGORY, Inkscape::SNAPTARGET_PAGE_EDGE_BORDER, Inkscape::SNAPTARGET_PAGE_MARGIN_BORDER, Inkscape::SNAPTARGET_PATH, Inkscape::SNAPTARGET_PATH_CLIP, Inkscape::SNAPTARGET_PATH_INTERSECTION, Inkscape::SNAPTARGET_PATH_MASK, Inkscape::SNAPTARGET_PATH_PERPENDICULAR, Inkscape::SNAPTARGET_PATH_TANGENTIAL, Inkscape::SNAPTARGET_ROTATION_CENTER, and Inkscape::SNAPTARGET_TEXT_BASELINE.
Referenced by update_actions().
void set_actions_canvas_snapping_helper | ( | Gio::ActionMap & | map, |
Glib::ustring | action_name, | ||
bool | state, | ||
bool | enabled | ||
) |
Definition at line 321 of file actions-canvas-snapping.cpp.
References action_name, and show_output().
Referenced by set_actions_canvas_snapping().
void set_canvas_snapping | ( | SnapTargetType | type, |
bool | enabled | ||
) |
Definition at line 157 of file actions-canvas-snapping.cpp.
References action_name, end, get_snap_map(), get_snapping_preferences(), Inkscape::SnapPreferences::setTargetSnappable(), and store_snapping_action().
Referenced by canvas_snapping_toggle(), set_simple_snap(), and toggle_simple_snap_option().
void set_simple_snap | ( | SimpleSnap | option, |
bool | value | ||
) |
Definition at line 181 of file actions-canvas-snapping.cpp.
References action_name, Inkscape::Preferences::get(), get_snapping_preferences(), option, set_canvas_snapping(), Inkscape::SnapPreferences::set_simple_snap(), Inkscape::Preferences::setBool(), show_output(), simple_snap_options, snap_alignment, snap_all_the_rest, snap_bbox, snap_node, and snap_pref_path.
Referenced by apply_simple_snap_defaults(), and toggle_simple_snap_option().
void store_snapping_action | ( | const Glib::ustring & | action_name, |
bool | enabled | ||
) |
Definition at line 149 of file actions-canvas-snapping.cpp.
References action_name, Inkscape::Preferences::get(), Inkscape::Preferences::setBool(), and snap_pref_path.
Referenced by add_actions_canvas_snapping(), and set_canvas_snapping().
void toggle_simple_snap_option | ( | Gio::ActionMap & | map, |
SimpleSnap | option | ||
) |
Definition at line 222 of file actions-canvas-snapping.cpp.
References Inkscape::SnapPreferences::get_simple_snap(), get_snapping_preferences(), option, set_canvas_snapping(), set_simple_snap(), snap_all_the_rest, and update_actions().
Referenced by add_actions_canvas_snapping().
void transition_to_simple_snapping | ( | ) |
Simple snapping groups existing "advanced" options into three easy to understand choices (bounding box, nodes, alignment snap).
Behind the scene the same snapping properties to used. When entering "simple" mode those snapping properties need to be set to the correct default values; advanced mode affords complete freedom in selecting them, simple mode restricts them.
Definition at line 404 of file actions-canvas-snapping.cpp.
References apply_simple_snap_defaults().
Referenced by get_snapping_preferences().
void update_actions | ( | Gio::ActionMap & | map | ) |
Definition at line 170 of file actions-canvas-snapping.cpp.
References set_actions_canvas_snapping().
Referenced by add_actions_canvas_snapping(), apply_simple_snap_defaults(), canvas_snapping_toggle(), and toggle_simple_snap_option().
const char* action_name |
Definition at line 86 of file actions-canvas-snapping.cpp.
Referenced by Inkscape::Shortcuts::_add_shortcut(), Inkscape::Shortcuts::_write(), InkscapeWindow::add_document_actions(), canvas_set_state(), canvas_toggle_state(), Inkscape::UI::Widget::Ruler::create_context_menu(), Inkscape::UI::Dialog::LivePathEffectEditor::enable_item_action(), Inkscape::UI::Dialog::CommandPalette::execute_action(), Inkscape::UI::Dialog::CommandPalette::get_action_ptr_name(), InkActionExtraData::get_label_for_action(), InkActionExtraData::get_section_for_action(), InkActionExtraData::get_tooltip_for_action(), InkActionHintData::get_tooltip_hint_for_action(), Inkscape::Shortcuts::invoke_action(), Inkscape::UI::Dialog::InkscapePreferences::onKBTreeEdited(), set_actions_canvas_snapping_helper(), set_canvas_snapping(), set_simple_snap(), and store_snapping_action().
const Glib::ustring global_toggle = "snap-global-toggle" |
Definition at line 114 of file actions-canvas-snapping.cpp.
Referenced by add_actions_canvas_snapping(), and get_snapping_preferences().
SimpleSnap option |
Definition at line 86 of file actions-canvas-snapping.cpp.
Referenced by canvas_transform(), Inkscape::SnapPreferences::get_simple_snap(), main(), Avoid::Router::routingOption(), Inkscape::SnapPreferences::set_simple_snap(), set_simple_snap(), Inkscape::Selection::setChangeLayer(), Inkscape::Selection::setChangePage(), Avoid::Router::setRoutingOption(), and toggle_simple_snap_option().
std::vector<std::vector<Glib::ustring> > raw_data_canvas_snapping |
Definition at line 245 of file actions-canvas-snapping.cpp.
Referenced by add_actions_canvas_snapping().
const Glib::ustring SECTION = NC_("Action Section", "Snap") |
Definition at line 243 of file actions-canvas-snapping.cpp.
bool set |
Definition at line 86 of file actions-canvas-snapping.cpp.
Referenced by SPGrid::_checkOldGrid(), Inkscape::Extension::ParamColor::_onColorButtonChanged(), Inkscape::ObjectSet::_pathBoolOp(), Inkscape::SelTrans::_updateHandles(), SPItem::adjust_clip(), SPItem::adjust_gradient(), SPItem::adjust_hatch(), SPItem::adjust_pattern(), Inkscape::BooleanBuilder::BooleanBuilder(), SPFeComponentTransfer::build_renderer(), Inkscape::UI::Syntax::build_xml_styles(), SPIEnum< T >::cascade(), Inkscape::UI::Tools::cc_generic_knot_handler(), Inkscape::UI::Widget::CellRendererItemIcon::CellRendererItemIcon(), Inkscape::ObjectSet::cloneOriginal(), Inkscape::ObjectSet::cloneOriginalPathLPE(), Inkscape::ObjectSet::combine(), file_import_pages(), Inkscape::UI::Tools::fit_item(), get_glyphs(), GrDragger::getMgCorner(), SPMeshPatchI::getTensorPoint(), Inkscape::ObjectSet::group(), Persp3D::has_all_boxes_in_selection(), Inkscape::FontCollections::is_font_in_collection(), SPStyle::isSet(), SPIEnum< T >::merge(), SPPage::moveItems(), straightener::Edge::nodePath(), object_set_contains_both_clone_and_original(), object_set_contains_original(), objects_query_baselines(), objects_query_fontstyle(), objects_query_fontvariants(), objects_query_writing_modes(), Inkscape::LivePathEffect::TextParam::param_newWidget(), Inkscape::LivePathEffect::ScalarParam::param_transform_multiply(), Inkscape::UI::Widget::FontList::populate_font_store(), SPIEnum< T >::read(), Inkscape::Colors::ColorSet::set(), Inkscape::Colors::Color::set(), Geom::xAx::set(), Geom::xAx::set(), SVGBox::set(), SVGBox::set(), Inkscape::NRStyleData::Paint::set(), Inkscape::Colors::Color::set(), Inkscape::ObjectSet::set(), Inkscape::Selection::set(), Inkscape::UI::Widget::ComboBoxEntryToolItem::set_active_text(), Inkscape::Selection::setAnchor(), Inkscape::ObjectSet::setClipGroup(), SPKnot::setFlag(), SPObject::setKeyValue(), Inkscape::UI::MultiPathManipulator::setLiveObjects(), Inkscape::UI::PathManipulator::setLiveObjects(), Inkscape::UI::MultiPathManipulator::setLiveOutline(), Inkscape::UI::PathManipulator::setLiveOutline(), Inkscape::ObjectSet::setMask(), SPMeshPatchI::setPoint(), SPRect::setRx(), SPRect::setRy(), Inkscape::MessageContext::setVF(), sp_desktop_set_style(), sp_gradient_transform_multiply(), sp_marker_flip_horizontally(), Inkscape::UI::Tools::sp_spray_dilate(), Inkscape::UI::Tools::sp_spray_recursive(), Inkscape::Extension::ParamColor::string_to_value(), SVGBox::SVGBox(), Inkscape::ObjectSet::swapFillStroke(), Geom::Sweeper< SweepSet >::Sweeper(), Inkscape::ObjectSet::tile(), Inkscape::UI::Tools::ToolBase::ToolBase(), Inkscape::ObjectSet::toSymbol(), SPHatch::transform_multiply(), SPPattern::transform_multiply(), SPClipPath::transform_multiply(), ungroup_impl(), SPIEnum< T >::update_value_merge(), SPMeshPatchI::updateNodes(), Geom::xAx::xAx(), Geom::xAx::xAx(), Geom::xAx::xAx(), Geom::xAx::xAx(), Geom::xAx::xAx(), Geom::xAx::xAx(), Geom::xAx::xAx(), and Inkscape::XML::SignalObserver::~SignalObserver().
const struct { ... } simple_snap_options[] |
Referenced by add_actions_canvas_snapping(), get_snapping_preferences(), and set_simple_snap().
SnapVector snap_alignment |
Definition at line 64 of file actions-canvas-snapping.cpp.
Referenced by get_snap_map(), get_snap_vect(), and set_simple_snap().
SnapVector snap_all_the_rest |
Definition at line 71 of file actions-canvas-snapping.cpp.
Referenced by get_snap_map(), get_snap_vect(), set_simple_snap(), and toggle_simple_snap_option().
SnapVector snap_bbox |
Definition at line 45 of file actions-canvas-snapping.cpp.
Referenced by get_snap_map(), get_snap_vect(), and set_simple_snap().
SnapVector snap_node |
Definition at line 53 of file actions-canvas-snapping.cpp.
Referenced by get_snap_map(), get_snap_vect(), and set_simple_snap().
const Glib::ustring snap_pref_path = "/options/snapping/" |
Definition at line 113 of file actions-canvas-snapping.cpp.
Referenced by get_snapping_preferences(), set_simple_snap(), and store_snapping_action().