Blame view

src/ParamOutputImpl/Plot/Layout.hh 1.46 KB
fbe3c2bb   Benjamin Renard   First commit
1
2
3
4
5
6
7
8
9
10
11
12
13
/*
 * Layout.hh
 *
 *  Created on: Sep, 2, 2014
 *      Author: AKKA
 */

#ifndef LAYOUT_HH_
#define LAYOUT_HH_

#include <iostream>
#include <map>
#include <string>
2f0b202e   Benjamin Renard   Reverse panels or...
14
#include <boost/shared_ptr.hpp>
1d1a3b8a   Erdogan Furkan   Done for tickPlot...
15
16

#include "ParameterData.hh"
42149ed8   Elena.Budnik   added vector.hh
17
#include <vector>
fbe3c2bb   Benjamin Renard   First commit
18
19
20
21

#include "LayoutProperties.hh"
#include "Bounds.hh"

fbe3c2bb   Benjamin Renard   First commit
22
23
namespace plot {

2f0b202e   Benjamin Renard   Reverse panels or...
24
25
class PanelPlotOutput;

fbe3c2bb   Benjamin Renard   First commit
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
 * Available panel constrains in the layout.
 * MaxWidth means the panel must occupy the maximum width drawn on a page
 * Square means the panel must keep a square geometric form when drawn on a page
 *
 */
enum class PanelConstraint {
	MaxWidth,
	Square
};

/**
 * Generic Layout interface
 */
class Layout {
public:
12353568   Benjamin Renard   Add layout proper...
42
	Layout(double panelHeight, double panelSpacing, double firstPanelHeightFactor = 1.0, bool autoExpand = true, double xyRatio = 1.0,  bool onlyLowerTimeAxesLegend = false) :
fbe3c2bb   Benjamin Renard   First commit
43
44
45
46
		_requestPanelHeight (panelHeight),
		_requestPanelSpacing(panelSpacing),
		_firstPanelHeightFactor(firstPanelHeightFactor),
		_autoExpand (autoExpand),
12353568   Benjamin Renard   Add layout proper...
47
48
		_xyRatio (xyRatio),
		_onlyLowerTimeAxesLegend(onlyLowerTimeAxesLegend)
fbe3c2bb   Benjamin Renard   First commit
49
50
51
52
53
54
	{
	}

	virtual ~Layout() {
	}

1d1a3b8a   Erdogan Furkan   Done for tickPlot...
55
	virtual void computePanelsPosition (std::vector<boost::shared_ptr<PanelPlotOutput>> _plots,  std::map<std::string, ParameterData> *parameterValues = NULL) = 0;
fbe3c2bb   Benjamin Renard   First commit
56
57
58
59
60
61
62

protected:
	double		_requestPanelHeight;
	double		_requestPanelSpacing;
	double 		_firstPanelHeightFactor;
	bool		_autoExpand;
	double		_xyRatio;
12353568   Benjamin Renard   Add layout proper...
63
	bool            _onlyLowerTimeAxesLegend;
fbe3c2bb   Benjamin Renard   First commit
64
65
66
67
68
};

} /* namespace plot */

#endif /* LAYOUT_HH_ */