Blame c++/perspective/src/generatorsandboxview.h

2a4477
#ifndef GENERATORSANDBOXVIEW_H
2a4477
#define GENERATORSANDBOXVIEW_H
2a4477
2a4477
#include <set></set>
2a4477
2a4477
#include "view.h"
2a4477
2a4477
2a4477
class GeneratorSandBoxView: public View {
2a4477
public:
2a4477
	class GenPoint {
2a4477
	public:
2a4477
		enum {
2a4477
			max_level = 4,
2a4477
			one = (1 << max_level)
2a4477
		};
2a4477
2a4477
		typedef std::set<genpoint> Set;</genpoint>
2a4477
		
2a4477
	private:
2a4477
		IntVector2 coord;
2a4477
		int level;
2a4477
		int step;
2a4477
		bool diamond;
2a4477
		
2a4477
	public:
2a4477
		explicit GenPoint(const IntVector2 &coord = IntVector2());
2a4477
		inline GenPoint(Int x, Int y): GenPoint(IntVector2(x, y)) { }
2a4477
		
2a4477
		inline bool operator< (const GenPoint &other) const { return coord < other.coord; }
2a4477
		
2a4477
		inline const IntVector2& get_coord() const { return coord; }
2a4477
		inline int get_level() const { return level; }
2a4477
		inline int get_step() const { return step; }
2a4477
		inline int get_diamond() const { return diamond; }
2a4477
2a4477
		void get_parents(Set &out_points) const;
2a4477
2a4477
		void draw(const Cairo::RefPtr<cairo::context> &context) const;</cairo::context>
2a4477
	};
2a4477
	
2a4477
	
2a4477
	View::PointPtr p0, p1;
2a4477
	
2a4477
	GeneratorSandBoxView();
2a4477
	
2a4477
	void on_draw_view(const Cairo::RefPtr<cairo::context> &context);</cairo::context>
2a4477
};
2a4477
2a4477
#endif