29 lines
757 B
C++
29 lines
757 B
C++
|
|
#ifndef GLWIDGET_H
|
|
#define GLWIDGET_H
|
|
|
|
#include <gtkmm/gl/drawingarea.h>
|
|
|
|
class SierpinskiDA : public Gtk::GL::DrawingArea
|
|
{
|
|
public:
|
|
SierpinskiDA(const Glib::RefPtr<const Gdk::GL::Config> & config);
|
|
|
|
protected:
|
|
int m_x, m_y;
|
|
|
|
virtual bool draw();
|
|
virtual void on_realize();
|
|
virtual bool on_configure_event(GdkEventConfigure * event);
|
|
virtual bool on_expose_event(GdkEventExpose * event);
|
|
|
|
/* signal handlers */
|
|
virtual bool on_motion_notify_event(GdkEventMotion * event);
|
|
virtual bool on_button_press_event(GdkEventButton * event);
|
|
virtual bool on_button_release_event(GdkEventButton * event);
|
|
virtual bool on_scroll_event(GdkEventScroll * event);
|
|
};
|
|
|
|
#endif
|
|
|