1 /* fifteen.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 __FIFTEEN_H 21 #define __FIFTEEN_H 22 23 #include <libgnomecanvasmm/canvas.h> 24 #include <libgnomecanvasmm/rect.h> 25 #include <libgnomecanvasmm/group.h> 26 #include <libgnomecanvasmm/text.h> 27 #include <gtkmm/frame.h> 28 #include <gtkmm/alignment.h> 29 #include <gtkmm/label.h> 30 #include <gtkmm/button.h> 31 #include <gtkmm/box.h> 32 #include <vector> 33 34 namespace Gnome 35 { 36 namespace Canvas 37 { 38 class Canvas; 39 class Group; 40 class Text; 41 } 42 } 43 44 class Fifteen : public Gtk::VBox 45 { 46 public: 47 Fifteen(); 48 ~Fifteen(); 49 50 protected: 51 void on_scramble(void); 52 Glib::ustring get_piece_color(int piece); 53 bool on_piece_event(GdkEvent* event, 54 Gnome::Canvas::Group* item, 55 Gnome::Canvas::Text* text); 56 57 Gnome::Canvas::Canvas* m_canvas; 58 std::vector<Gnome::Canvas::Group*> m_board; 59 }; 60 61 62 #endif //__FIFTEEN_H 63