#ifndef GLWIDGET_H #define GLWIDGET_H #include class SierpinskiDA : public Gtk::GL::DrawingArea { public: SierpinskiDA(const Glib::RefPtr & config, Gtk::Entry & n_points_entry); void regenerate(int npts); void regenerate_clicked(); protected: int m_x, m_y; int m_dl; Gtk::Entry & m_n_points_entry; virtual bool draw(); virtual void on_realize(); virtual bool on_configure_event(GdkEventConfigure * event); virtual bool on_expose_event(GdkEventExpose * event); bool gl_begin(); void gl_end(); /* 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