-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathInteractiveSet.cc
More file actions
88 lines (65 loc) · 2.47 KB
/
InteractiveSet.cc
File metadata and controls
88 lines (65 loc) · 2.47 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
* (C) Copyright 1996-2016 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
* In applying this licence, ECMWF does not waive the privileges and immunities
* granted to it by virtue of its status as an intergovernmental organisation nor
* does it submit to any jurisdiction.
*/
// File InteractiveSet.cc
// Magics Team - ECMWF 2004
#include "InteractiveSet.h"
#include "BaseDriver.h"
using namespace magics;
InteractiveSet::InteractiveSet(Layer* layer, const string& box) : BasicGraphicsObject(layer, box) {
begin_ = new InteractiveBegin();
end_ = new InteractiveEnd();
}
bool InteractiveSet::reproject(const Transformation& transformation, GraphicsList& out) const {
out.push_back(begin_);
for (const_iterator item = begin(); item != end(); ++item) {
(*item)->reproject(transformation, out);
MagLog::dev() << "InteractiveSet::reproject-->" << **item << endl;
}
out.push_back(end_);
return false;
}
void InteractiveSet::redisplay(const BaseDriver& driver) const {
MagLog::dev() << " InteractiveSet::redisplay---> to be implemented!\n";
}
void InteractiveSet::print(ostream& out) const {
out << "InteractiveSet[]" << endl;
}
InteractiveBegin::InteractiveBegin(Layer* layer, const string& box) : BasicGraphicsObject(layer, box) {}
void InteractiveBegin::redisplay(const BaseDriver& driver) const {
driver.redisplay(*this);
}
void InteractiveBegin::print(ostream& out) const {
out << "InteractiveBegin[";
string sep = "";
for (const_iterator action = begin(); action != end(); ++action) {
out << sep << action->first << "=" << *action->second;
sep = ",";
}
out << "]";
}
bool InteractiveBegin::reproject(const Transformation& transformation, GraphicsList& out) const {
return true;
}
InteractiveEnd::InteractiveEnd(Layer* layer, const string& box) : BasicGraphicsObject(layer, box) {}
void InteractiveEnd::redisplay(const BaseDriver& driver) const {
driver.redisplay(*this);
}
bool InteractiveEnd::reproject(const Transformation& transformation, GraphicsList& out) const {
return true;
}
void InteractiveEnd::print(ostream& out) const {
out << "InteractiveEnd[]";
}
void InteractiveLink::print(ostream& out) const {
out << "InteractiveLink[url=" << url_ << "]";
}
void InteractiveMagnify::print(ostream& out) const {
out << "InteractiveMagnify[factor=" << factor_ << "]";
}