Lines Matching defs:target

44 void Inkscape::SnapPreferences::_mapTargetToArrayIndex(Inkscape::SnapTargetType &target, bool &always_on, bool &group_on) const
46 if (target == SNAPTARGET_BBOX_CATEGORY ||
47 target == SNAPTARGET_NODE_CATEGORY ||
48 target == SNAPTARGET_OTHERS_CATEGORY ||
49 target == SNAPTARGET_DATUMS_CATEGORY) {
52 always_on = (target == SNAPTARGET_DATUMS_CATEGORY);
57 if (target & SNAPTARGET_BBOX_CATEGORY) {
62 if (target & SNAPTARGET_NODE_CATEGORY) {
64 switch (target) {
66 target = SNAPTARGET_NODE_CUSP;
69 target = SNAPTARGET_NODE_SMOOTH;
72 target = SNAPTARGET_PATH_INTERSECTION;
76 target = SNAPTARGET_PATH;
85 if (target & SNAPTARGET_DATUMS_CATEGORY) {
87 switch (target) {
89 // them to their cousin which does have a toggle, and which is called a "primary target"
92 target = SNAPTARGET_GRID;
97 target = SNAPTARGET_GUIDE;
100 target = SNAPTARGET_PAGE_BORDER;
115 g_warning("Snap-preferences warning: Undefined snap target (#%i)", target);
121 if (target & SNAPTARGET_OTHERS_CATEGORY) {
125 switch (target) {
127 // them to their cousin which does have a toggle, and which is called a "primary target"
129 target = SNAPTARGET_TEXT_BASELINE;
133 target = SNAPTARGET_OTHERS_CATEGORY;
148 g_warning("Snap-preferences warning: Undefined snap target (#%i)", target);
155 if (target == SNAPTARGET_UNDEFINED ) {
156 g_warning("Snap-preferences warning: Undefined snaptarget (#%i)", target);
158 g_warning("Snap-preferences warning: Snaptarget not handled (#%i)", target);
162 void Inkscape::SnapPreferences::setTargetSnappable(Inkscape::SnapTargetType const target, bool enabled)
166 Inkscape::SnapTargetType index = target;
170 if (always_on) { // If true, then this snap target is always active and cannot be toggled
172 g_warning("Snap-preferences warning: Trying to enable/disable a snap target (#%i) that's always on by definition", index);
174 if (index == target) { // I.e. if it has not been re-mapped, then we have a primary target at hand
176 } else { // If it has been re-mapped though, then this target does not have its own toggle button and should therefore not be set
177 g_warning("Snap-preferences warning: Trying to enable/disable a secondary snap target (#%i); only primary targets can be set", index);
182 bool Inkscape::SnapPreferences::isTargetSnappable(Inkscape::SnapTargetType const target) const
186 Inkscape::SnapTargetType index = target;
190 if (group_on) { // If true, then this snap target is in a snap group that has been enabled (e.g. bbox group, nodes/paths group, or "others" group
191 if (always_on) { // If true, then this snap target is always active and cannot be toggled
196 g_warning("Snap-preferences warning: Using an uninitialized snap target setting (#%i)", index);
198 // or if this target index doesn't exist at all
223 bool Inkscape::SnapPreferences::isSnapButtonEnabled(Inkscape::SnapTargetType const target) const
227 Inkscape::SnapTargetType index = target;
233 g_warning("Snap-preferences warning: Using an uninitialized snap target setting (#%i)", index);
235 // or if this target index doesn't exist at all
237 if (index == target) { // I.e. if it has not been re-mapped, then we have a primary target at hand, which does have its own toggle button
239 } else { // If it has been re-mapped though, then this target does not have its own toggle button and therefore the button status cannot be read
240 g_warning("Snap-preferences warning: Trying to determine the button status of a secondary snap target (#%i); However, only primary targets have a button", index);
295 // For these snapsources there doesn't exist an equivalent snap target
300 g_warning("Mapping of snap source to snap target undefined");