00001
00006 #ifndef _ConstraintsLayer_h
00007 #define _ConstraintsLayer_h
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "../Constraint.h"
00018 #include "PlotLayer.h"
00019
00020
00021
00022
00023
00024 class ConstraintsLayer
00025 : public PlotLayer
00026 {
00027 public:
00028
00029
00032 ConstraintsLayer(const PlotControl& plotControl,
00033 const Constraint::Container constraints);
00034
00037 ConstraintsLayer(const ConstraintsLayer& from);
00038
00041 ~ConstraintsLayer(void);
00042
00043
00044
00045
00046
00047
00048 virtual vector<ToolbarTool> CreateTools(PlotControl* pPlotControl);
00049
00050
00051
00054 bool& rLegend();
00055
00056
00057
00060 bool IsLegend() const;
00061
00062 protected:
00063 void DrawLegend(wxDC& dc) const;
00064
00065 const wxPen& GetConstraintPen(const Constraint& constraint,
00066 unsigned& rEqualityIndex,
00067 unsigned& rInequalityIndex) const;
00068
00070 const Constraint::Container mConstraints;
00071
00072 private:
00073 bool mLegend;
00074 };
00075
00076
00077
00078
00079
00080
00081
00082 #endif // _ConstraintsLayer_h