00001 /* $Id: show_game.h jjs $ */ 00002 /* 00003 Copyright (C) 2007 by Jurjen Stellingwerff <jurjen@stwerff.xs4all.nl> 00004 Part of the Moros Project http://moros.sourceforge.net/ 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License. 00008 This program is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY. 00010 00011 See the COPYING file for more details. 00012 */ 00013 #ifndef SHOW_GAME_H 00014 #define SHOW_GAME_H 00015 00016 #include <gtkmm.h> 00017 #include <libglademm.h> 00018 #include "list_games.h" 00019 00021 00022 class show_game : public Gtk::Window { 00023 public: 00024 show_game(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml> refGlade); 00025 virtual ~show_game(); 00026 void load(long gamenr); 00027 sigc::signal<void> signal_changed; 00028 00029 protected: 00030 int game_nr; 00031 Glib::RefPtr<Gnome::Glade::Xml> glade; 00032 Gtk::Entry* name; 00033 Gtk::TextView* description; 00034 Glib::RefPtr<Gtk::TextBuffer> desc_buffer; 00035 Gtk::Entry* join; 00036 Gtk::Entry* goal; 00037 Gtk::Entry* map_name; 00038 Gtk::Entry* owner; 00039 Gtk::TreeView* party_list; 00040 Glib::RefPtr<Gtk::ListStore> party_store; 00041 Glib::RefPtr<Gtk::ListStore> join_store; 00042 Glib::RefPtr<Gtk::ListStore> goal_store; 00043 00044 Gtk::Button* cancel_game; 00045 virtual void clicked_cancel(); 00046 Gtk::Button* join_game; 00047 virtual void clicked_join_game(); 00048 00049 class ModelColumns : public Gtk::TreeModelColumnRecord { 00050 public: 00051 Gtk::TreeModelColumn<Glib::ustring> name; 00052 Gtk::TreeModelColumn<Glib::ustring> description; 00053 ModelColumns() { 00054 add(name); 00055 add(description); 00056 } 00057 }; 00058 const ModelColumns cols; 00059 }; 00060 00061 #endif //show_game_H