00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <gtkmm.h>
00020
00021 #include <papyrusmm/viewport.h>
00022 #include <papyrus/rectangle.h>
00023 #include <papyrus/image.h>
00024 #include <papyrus/circle.h>
00025 #include <papyrus/text.h>
00026 #include <papyrus/polyline.h>
00027 #include <papyrus/polygon.h>
00028
00029 class Simple : public Gtk::Window
00030 {
00031
00032 public:
00033 Simple();
00034 virtual ~Simple();
00035
00036 protected:
00037
00038
00039
00040 Gtk::VBox m_vbox;
00041 Gtk::Frame m_frame;
00042 Gtk::HScale m_slider;
00043 Gtk::HScale m_zoom;
00044 Gtk::CheckButton m_animate;
00045 PapyrusGtk::Viewport m_viewport;
00046 Papyrus::Rectangle::pointer m_rect;
00047 Papyrus::Image::pointer m_png;
00048 Papyrus::Circle::pointer m_circle;
00049 Papyrus::Text::pointer m_text;
00050 Papyrus::Polyline::pointer m_lines;
00051 Papyrus::Polygon::pointer m_polygon;
00052
00053 void slider_changed();
00054 void zoom_changed();
00055 bool animate_step();
00056 void animate_toggled();
00057 void on_sig_size_allocate(Gtk::Allocation&);
00058
00059 void adjust_canvas(int width, int height);
00060
00061 void draw_scene();
00062
00063 };