Index: /trunk/nv/gui/gui_common.hh
===================================================================
--- /trunk/nv/gui/gui_common.hh	(revision 68)
+++ /trunk/nv/gui/gui_common.hh	(revision 69)
@@ -30,4 +30,13 @@
 		};
 
+		class render_data
+		{
+		public:
+			~render_data(){}
+		};
+
+		class element;
+		class environment;
+
 	} // namespace gui
 
Index: /trunk/nv/gui/gui_element.hh
===================================================================
--- /trunk/nv/gui/gui_element.hh	(revision 68)
+++ /trunk/nv/gui/gui_element.hh	(revision 69)
@@ -16,4 +16,6 @@
 #include <nv/object.hh>
 #include <nv/position.hh>
+#include <nv/io_event.hh>
+#include <nv/gui/gui_common.hh>
 
 namespace nv
@@ -21,5 +23,4 @@
 	namespace gui
 	{
-
 		class element : public object
 		{
@@ -30,6 +31,6 @@
 			virtual void on_update( uint32 elapsed );
 			virtual void on_draw();
-			// bool on_event( event );
-			bool contains( const position& p ) const;
+			virtual bool on_event( const io_event& event );
+			virtual bool contains( const position& p ) const;
 			virtual void set_relative( const rectangle& r );
 			virtual void set_relative( const position& p );
@@ -39,12 +40,22 @@
 			virtual bool is_enabled() const { return m_enabled; }
 			virtual bool is_visible() const { return m_visible; }
+			virtual bool is_dirty()   const { return m_dirty; }
 			virtual void set_enabled( bool value ) { m_enabled = value; }
 			virtual void set_visible( bool value ) { m_visible = value; }
+			virtual void set_dirty( bool value )   { m_dirty   = value; }
+			virtual const string& get_text() const { return m_text; }
+			virtual void set_text( const string& text ) { m_text = text; m_dirty = true; }
+			virtual const string& get_class() const { return m_class; }
+			virtual void set_class( const string& class_ ) { m_class = class_; m_dirty = true; }
 			virtual void recalculate_absolute();
 		protected:
+			string    m_class;
+			string    m_text;
 			rectangle m_relative;
 			rectangle m_absolute;
 			bool m_enabled;
 			bool m_visible;
+			bool m_dirty;
+			render_data* m_render_data;
 		};
 
Index: /trunk/nv/gui/gui_environment.hh
===================================================================
--- /trunk/nv/gui/gui_environment.hh	(revision 69)
+++ /trunk/nv/gui/gui_environment.hh	(revision 69)
@@ -0,0 +1,34 @@
+// Copyright (C) 2012-2013 ChaosForge / Kornel Kisielewicz
+// http://chaosforge.org/
+//
+// This file is part of NV Libraries.
+// For conditions of distribution and use, see copyright notice in nv.hh
+
+/**
+ * @file gui_environment.hh
+ * @author Kornel Kisielewicz
+ * @brief GUI Environment (root)
+ */
+
+#ifndef NV_GUI_ENVIRONMENT_HH
+#define NV_GUI_ENVIRONMENT_HH
+
+#include <nv/gui/gui_element.hh>
+
+namespace nv
+{
+
+	namespace gui
+	{
+
+		class environment : public element
+		{
+		public:
+			void draw( element* e );
+		};
+
+	} // namespace gui
+
+} // namespace nv
+
+#endif // NV_GUI_ENVIRONMENT_HH
Index: /trunk/src/gui/gui_element.cc
===================================================================
--- /trunk/src/gui/gui_element.cc	(revision 68)
+++ /trunk/src/gui/gui_element.cc	(revision 69)
@@ -7,9 +7,11 @@
 #include "nv/gui/gui_element.hh"
 
+#include "nv/gui/gui_environment.hh"
+
 using namespace nv;
 using namespace nv::gui;
 
 element::element( root* aroot, const rectangle r ) 
-	: object( aroot, "", 0 ), m_relative( r ), m_absolute( r ), m_enabled( true ), m_visible( true )
+	: object( aroot, "", 0 ), m_class(""), m_relative( r ), m_absolute( r ), m_enabled( true ), m_visible( true ), m_dirty( true )
 {
 
@@ -31,4 +33,5 @@
 	if ( is_visible() )
 	{
+		((environment*)m_root)->draw( this );
 		for ( object* i : *this )
 		{
@@ -36,4 +39,9 @@
 		}
 	}
+}
+
+bool element::on_event( const io_event& event )
+{
+	return m_parent ? ((element*)m_parent)->on_event( event ) : false;
 }
 
@@ -63,4 +71,5 @@
 void element::set_relative( const rectangle& r )
 {
+	m_dirty    = true;
 	m_relative = r;
 	recalculate_absolute();
Index: /trunk/src/gui/gui_environment.cc
===================================================================
--- /trunk/src/gui/gui_environment.cc	(revision 69)
+++ /trunk/src/gui/gui_environment.cc	(revision 69)
@@ -0,0 +1,15 @@
+// Copyright (C) 2012-2013 ChaosForge / Kornel Kisielewicz
+// http://chaosforge.org/
+//
+// This file is part of NV Libraries.
+// For conditions of distribution and use, see copyright notice in nv.hh
+
+#include "nv/gui/gui_environment.hh"
+
+using namespace nv;
+using namespace nv::gui;
+
+void environment::draw( element* e )
+{
+	
+}
Index: /trunk/tests/lualib_test/lualib_test.cc
===================================================================
--- /trunk/tests/lualib_test/lualib_test.cc	(revision 68)
+++ /trunk/tests/lualib_test/lualib_test.cc	(revision 69)
@@ -8,4 +8,5 @@
 #include <iostream>
 #include <functional>
+#include <nv/gui/gui_element.hh>
 
 struct test_struct
