blob: 9232888d26436dce7bd77c992b569f02aefa46bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#pragma once
#include "../../helpers/math/Math.hpp"
#include "../../helpers/memory/Memory.hpp"
#include "ModeAlgorithm.hpp"
namespace Layout {
class ITarget;
class CAlgorithm;
class IFloatingAlgorithm : public IModeAlgorithm {
public:
virtual ~IFloatingAlgorithm() = default;
// a target is being moved by a delta
virtual void moveTarget(const Vector2D& Δ, SP<ITarget> target) = 0;
// a target is moved to a pos x size
virtual void setTargetGeom(const CBox& geom, SP<ITarget> target) = 0;
virtual void recenter(SP<ITarget> t);
virtual void recalculate(eRecalculateReason reason = RECALCULATE_REASON_UNKNOWN);
protected:
IFloatingAlgorithm() = default;
WP<CAlgorithm> m_parent;
friend class Layout::CAlgorithm;
};
}
|