simple_zoom/simple.h

00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Rick L. Vinyard, Jr.                            *
00003  *   rvinyard@cs.nmsu.edu                                                  *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU Lesser General Public License as        *
00007  *   published by the Free Software Foundation version 2.1.                *
00008  *                                                                         *
00009  *   This program is distributed in the hope that it will be useful,       *
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00012  *   GNU General Public License for more details.                          *
00013  *                                                                         *
00014  *   You should have received a copy of the GNU Lesser General Public      *
00015  *   License along with this library; if not, write to the                 *
00016  *   Free Software Foundation, Inc.,                                       *
00017  *   51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA              *
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   //Signal handlers:
00038 
00039   //Member widgets:
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 };

Generated on Sun Jan 7 22:53:57 2007 by  doxygen 1.5.1