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

538bb7
#ifndef MAINWINDOW_H
538bb7
#define MAINWINDOW_H
538bb7
538bb7
4dc49c
#include <vector></vector>
4dc49c
538bb7
#include <gtkmm window.h=""></gtkmm>
538bb7
538bb7
#include "view.h"
a1942e
#include "surface.h"
a1942e
#include "generator.h"
538bb7
538bb7
538bb7
class MainWindow: public Gtk::Window {
538bb7
public:
4dc49c
	class Layer {
4dc49c
	public:
4dc49c
		IntVector2 src_size;
4dc49c
		Pair2 src_bounds;
4dc49c
		RefPtr<surface> src_surface;</surface>
4dc49c
4dc49c
		IntPair2 dst_bounds;
4dc49c
		Matrix back_transform;
4dc49c
		RefPtr<surface> dst_surface;</surface>
4dc49c
		Cairo::RefPtr<cairo::imagesurface> cairo_surface;</cairo::imagesurface>
4dc49c
4dc49c
		void process(const RefPtr<surface> &dst_surface) const;</surface>
4dc49c
	};
4dc49c
4dc49c
	typedef std::vector<layer> LayerList;</layer>
4dc49c
a1942e
	Generator generator;
a1942e
538bb7
	View src_view;
538bb7
	View dst_view;
538bb7
	
538bb7
	View::PointPtr
4dc49c
		src_rect_p0, src_rect_p1,
4dc49c
		dst_rect_p0, dst_rect_px, dst_rect_py, dst_rect_p1,
4dc49c
		dst_bounds_p0, dst_bounds_p1;
538bb7
	
4dc49c
	Pair2 view_surface_rect;
a1942e
	Cairo::RefPtr<cairo::imagesurface> view_surface;</cairo::imagesurface>
4dc49c
4dc49c
	Cairo::RefPtr<cairo::imagesurface> target_surface;</cairo::imagesurface>
4dc49c
538bb7
	MainWindow();
538bb7
	
538bb7
	Gtk::Widget* generator_demo();
538bb7
	
4dc49c
	void update_layers();
a1942e
	void update_view_surface();
a1942e
	
538bb7
	void on_point_motion(const View::PointPtr &point);
538bb7
	void on_point_changed(const View::PointPtr &point);
a1942e
	void on_view_transform_changed(View *view);
538bb7
	void on_draw_src_view(const Cairo::RefPtr<cairo::context> &context);</cairo::context>
538bb7
	void on_draw_dst_view(const Cairo::RefPtr<cairo::context> &context);</cairo::context>
538bb7
};
538bb7
538bb7
538bb7
#endif
538bb7