summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefano Facchini <stefano.facchini@gmail.com>2017-10-15 22:41:54 +0000
committerStefano Facchini <stefano.facchini@gmail.com>2017-10-19 17:22:34 +0000
commit4636481acc66c8ac24aff6642257d09e562eedb5 (patch)
treef109635d9627182968caf8a3d9237205621fac2c /src
parentUse standard glib macro instead of a custom one (diff)
downloadinkscape-4636481acc66c8ac24aff6642257d09e562eedb5.tar.gz
inkscape-4636481acc66c8ac24aff6642257d09e562eedb5.zip
Remove unused util/accumulators.h
Diffstat (limited to 'src')
-rw-r--r--src/ui/tool/control-point-selection.h1
-rw-r--r--src/ui/tool/control-point.h12
-rw-r--r--src/util/CMakeLists.txt1
-rw-r--r--src/util/accumulators.h113
4 files changed, 0 insertions, 127 deletions
diff --git a/src/ui/tool/control-point-selection.h b/src/ui/tool/control-point-selection.h
index f122a468d..ec845b1b3 100644
--- a/src/ui/tool/control-point-selection.h
+++ b/src/ui/tool/control-point-selection.h
@@ -20,7 +20,6 @@
#include <2geom/forward.h>
#include <2geom/point.h>
#include <2geom/rect.h>
-#include "util/accumulators.h"
#include "util/unordered-containers.h"
#include "ui/tool/commit-events.h"
#include "ui/tool/manipulator.h"
diff --git a/src/ui/tool/control-point.h b/src/ui/tool/control-point.h
index 4a01b9f21..bc1f060cd 100644
--- a/src/ui/tool/control-point.h
+++ b/src/ui/tool/control-point.h
@@ -18,7 +18,6 @@
#include <2geom/point.h>
#include "ui/control-types.h"
-#include "util/accumulators.h"
#include "display/sodipodi-ctrl.h"
#include "enums.h"
@@ -76,8 +75,6 @@ namespace UI {
*/
class ControlPoint : boost::noncopyable, public sigc::trackable {
public:
- typedef Inkscape::Util::ReverseInterruptible RInt;
- typedef Inkscape::Util::Interruptible Int;
/**
* Enumeration representing the possible states of the control point, used to determine
@@ -162,15 +159,6 @@ public:
void transferGrab(ControlPoint *from, GdkEventMotion *event);
/// @}
- /// @name Receive notifications about control point events
- /// @{
- /*sigc::signal<void, Geom::Point const &, Geom::Point &, GdkEventMotion*> signal_dragged;
- sigc::signal<bool, GdkEventButton*>::accumulated<RInt> signal_clicked;
- sigc::signal<bool, GdkEventButton*>::accumulated<RInt> signal_doubleclicked;
- sigc::signal<bool, GdkEventMotion*>::accumulated<Int> signal_grabbed;
- sigc::signal<void, GdkEventButton*> signal_ungrabbed;*/
- /// @}
-
/// @name Inspect the state of the control point
/// @{
State state() const { return _state; }
diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt
index 9680b6377..64397db57 100644
--- a/src/util/CMakeLists.txt
+++ b/src/util/CMakeLists.txt
@@ -10,7 +10,6 @@ set(util_SRC
# -------
# Headers
- accumulators.h
compose.hpp
copy.h
ege-appear-time-tracker.h
diff --git a/src/util/accumulators.h b/src/util/accumulators.h
deleted file mode 100644
index 2cd51b101..000000000
--- a/src/util/accumulators.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/** @file
- * Frequently used accumulators for use with libsigc++
- */
-/* Authors:
- * Krzysztof KosiƄski <tweenk.pl@gmail.com>
- *
- * Copyright (C) 2009 Authors
- * Released under GNU GPL, read the file 'COPYING' for more information
- */
-
-#ifndef SEEN_UTIL_ACCUMULATORS_H
-#define SEEN_UTIL_ACCUMULATORS_H
-
-#include <iterator>
-
-namespace Inkscape {
-namespace Util {
-
-/**
- * Accumulator which evaluates slots in reverse connection order.
- * The slot that was connected last is evaluated first.
- */
-struct Reverse {
- typedef void result_type;
- template <typename T_iterator>
- result_type operator()(T_iterator first, T_iterator last) const {
- while (first != last) *(--last);
- }
-};
-
-/**
- * Accumulator type for interruptible signals. Slots return a boolean value; emission
- * is stopped when true is returned from a slot.
- */
-struct Interruptible {
- typedef bool result_type;
- template <typename T_iterator>
- result_type operator()(T_iterator first, T_iterator last) const {
- for (; first != last; ++first)
- if (*first) return true;
- return false;
- }
-};
-
-/**
- * Same as Interruptible, but the slots are called in reverse order of connection,
- * e.g. the slot that was connected last is evaluated first.
- */
-struct ReverseInterruptible {
- typedef bool result_type;
- template <typename T_iterator>
- result_type operator()(T_iterator first, T_iterator last) const {
- while (first != last) {
- if (*(--last)) return true;
- }
- return false;
- }
-};
-
-/**
- * The template parameter specifies how many slots from the beginning of the list
- * should be evaluated after other slots. Useful for signals which invoke other signals
- * once complete. Undefined results if the signal does not have at least @c num_chained
- * slots before first emission.
- *
- * For example, if template param = 3, the execution order is as follows:
- * @verbatim
- 8. 1. 2. 3. 4. 5. 6. 7.
- S1 S2 S3 S4 S5 S6 S7 S8 @endverbatim
- */
-template <unsigned num_chained = 1>
-struct Chained {
- typedef void result_type;
- template <typename T_iterator>
- result_type operator()(T_iterator first, T_iterator last) const {
- T_iterator save_first = first;
- // ARGH, iterator_traits is not defined for slot iterators!
- //std::advance(first, num_chained);
- for (unsigned i = 0; i < num_chained && first != last; ++i) ++first;
- for (; first != last; ++first) *first;
- for (unsigned i = 0; i < num_chained && save_first != last; ++i, ++save_first)
- *save_first;
- }
-};
-
-/**
- * Executes a logical OR on the results from slots.
- */
-struct LogicalOr {
- typedef bool result_type;
- template <typename T_iterator>
- result_type operator()(T_iterator first, T_iterator last) const {
- bool ret = false;
- for (; first != last; ++first) ret |= *first;
- return ret;
- }
-};
-
-} // namespace Util
-} // namespace Inkscape
-
-#endif
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :