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