summaryrefslogtreecommitdiff
path: root/src/my_gtk_gl_scene_widget.h
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2013-01-05 15:55:31 +0000
committerLudovic Pouzenc <ludovic@pouzenc.fr>2013-01-05 15:55:31 +0000
commit66a35d2b466e75604eeaa42b6ff0dfd0e19d2c3b (patch)
treed5927ea38562e91d3690565ef9e6cb665e24e3ad /src/my_gtk_gl_scene_widget.h
parent3ffda80f95478f4e73765f8b7ceb1bbf54ea97ee (diff)
download2013-gpudataviz-66a35d2b466e75604eeaa42b6ff0dfd0e19d2c3b.tar.gz
2013-gpudataviz-66a35d2b466e75604eeaa42b6ff0dfd0e19d2c3b.tar.bz2
2013-gpudataviz-66a35d2b466e75604eeaa42b6ff0dfd0e19d2c3b.zip
- Ajout des dependances de compilation dans le README
- Renommage MyGTKGlScene en MyGTKGlSceneWidget - Refactoring du maigre code OpenGL exitant (meilleure ventillation des events) - Modifications cosmétiques (commentaires / indentation / ordre des méthodes...) - Ajout gestion des évènement souris (reste des bugs avec les modifieurs clavier) git-svn-id: file:///var/svn/2013-gpudataviz/trunk@4 371a6b4a-a258-45f8-9dcc-bdd82ce0ac9d
Diffstat (limited to 'src/my_gtk_gl_scene_widget.h')
-rw-r--r--src/my_gtk_gl_scene_widget.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/my_gtk_gl_scene_widget.h b/src/my_gtk_gl_scene_widget.h
new file mode 100644
index 0000000..8445252
--- /dev/null
+++ b/src/my_gtk_gl_scene_widget.h
@@ -0,0 +1,27 @@
+#ifndef MY_GTK_GL_SCENE_H
+#define MY_GTK_GL_SCENE_H
+
+#include "gtk_includes.h"
+
+// Class that will contain all the OpenGL logic for displaying the OpenCL computed data
+// Implementation is kept in gpudataviz.cc (I want to keep interesting code part in this file)
+
+class MyGTKGLSceneWidget : public Gtk::DrawingArea, public Gtk::GL::Widget<MyGTKGLSceneWidget>
+{
+ public:
+ MyGTKGLSceneWidget(Glib::RefPtr<Gdk::GL::Config> &glconfig);
+ virtual ~MyGTKGLSceneWidget();
+
+ protected:
+ virtual void on_size_request(Gtk::Requisition* requisition);
+ virtual void on_realize();
+ virtual bool on_configure_event(GdkEventConfigure* event);
+ virtual bool on_expose_event(GdkEventExpose* event);
+ virtual bool on_motion_notify_event (GdkEventMotion *event);
+ virtual bool on_button_press_event(GdkEventButton *event);
+ virtual bool on_button_release_event(GdkEventButton *event);
+
+ bool do_mouse_logic(GdkEventType type, guint state, guint x, guint y);
+};
+
+#endif /*MY_GTK_GL_SCENE_H*/