sierpinski-gtk/SierpinskiDA.h
josh 4ae50b97c8 handled button clicks of Regenerate button, filled in text entry
git-svn-id: svn://anubis/misc/sierpinski-gtk@252 bd8a9e45-a331-0410-811e-c64571078777
2010-10-22 04:29:37 +00:00

36 lines
977 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,
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