// This source code is property of the Computer Graphics and Visualization 
// chair of the TU Dresden. Do not distribute! 
// Copyright (C) CGV TU Dresden - All Rights Reserved
//

#pragma once

#include "common.h"

#include <cgv/gui/trigger.h>
#include <cgv/gui/provider.h>
#include <cgv/render/drawable.h>
#include <cgv/render/context.h>
#include <cgv_gl/gl/gl.h>

using namespace cgv::base;
using namespace cgv::signal;
using namespace cgv::gui;
using namespace cgv::math;
using namespace cgv::render;
using namespace cgv::utils;

class CGVDemo : 
				public node,     // obligatory base class
				public drawable, // enables 3d view capabilities for this class
				public provider  // enables 2d gui capabilities for this class
{
private:	
	// True if coordinate systems shall be rendered
	bool show_coordinate_system;				

	//Demo slider value
	float slider_value;

	// Render a simple coordinate system
	void render_coordinate_system();
	
	// The timer event. This method is called every 1/60 sec.
	void timer_event(double, double dt);
	
	// Demo button action for further buttons
	void button_pressed();
	
	// Method that is called whenever a gui element is clicked
	void on_set(void* member_ptr);	
	
public:
	// The constructor of this class
	CGVDemo();
	
	// Create the gui elements
	void create_gui();
	// Draw the scene
	void draw(context& c);
};

