1 /* primitives.h 2 * 3 * Copyright (C) 2002 The libgnomecanvasmm Development Team 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free 17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 */ 19 20 #ifndef __PRIMITIVES_HH 21 #define __PRIMITIVES_HH 22 23 #include <libgnomecanvasmm/canvas.h> 24 #include <gtkmm/label.h> 25 #include <gtkmm/spinbutton.h> 26 #include <gtkmm/adjustment.h> 27 #include <gtkmm/button.h> 28 #include <gtkmm/scrollbar.h> 29 #include <gtkmm/frame.h> 30 #include <gtkmm/table.h> 31 #include <gtkmm/box.h> 32 33 34 class Primitives : public Gtk::VBox 35 { 36 public: 37 Primitives(bool aa); 38 ~Primitives(); 39 40 protected: 41 void on_zoom_changed(Gnome::Canvas::Canvas* canvas, 42 Gtk::Adjustment* adj); 43 bool on_key_press(GdkEventKey* event, Gnome::Canvas::Canvas* canvas); 44 bool on_item_event(GdkEvent* event, Gnome::Canvas::Item* item); 45 46 void setup_heading(Gnome::Canvas::Group& root, 47 const Glib::ustring& text, 48 int pos); 49 void setup_divisions(Gnome::Canvas::Group& root); 50 void setup_rectangles(Gnome::Canvas::Group& root); 51 void setup_ellipses(Gnome::Canvas::Group& root); 52 void plant_flower(Gnome::Canvas::Group& root, 53 double x, double y); 54 void setup_images(Gnome::Canvas::Group& root); 55 Gnome::Canvas::Group* make_anchor(Gnome::Canvas::Group& root, 56 double x, double y); 57 void setup_texts(Gnome::Canvas::Group& root); 58 void polish_diamond(Gnome::Canvas::Group& root); 59 void make_hilbert(Gnome::Canvas::Group& root); 60 void setup_lines(Gnome::Canvas::Group& root); 61 void setup_polygons(Gnome::Canvas::Group& root); 62 void setup_curves(Gnome::Canvas::Group& root); 63 void setup_widgets(Gnome::Canvas::Group& root); 64 }; 65 66 67 #endif //__PRIMITIVES_HH 68