MapInfo.h

Go to the documentation of this file.
00001 /*
00002  Copyright (C) 2001-2006, William Joseph.
00003  All Rights Reserved.
00004 
00005  This file is part of GtkRadiant.
00006 
00007  GtkRadiant is free software; you can redistribute it and/or modify
00008  it under the terms of the GNU General Public License as published by
00009  the Free Software Foundation; either version 2 of the License, or
00010  (at your option) any later version.
00011 
00012  GtkRadiant is distributed in the hope that it will be useful,
00013  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  GNU General Public License for more details.
00016 
00017  You should have received a copy of the GNU General Public License
00018  along with GtkRadiant; if not, write to the Free Software
00019  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020  */
00021 
00022 #if !defined(INCLUDED_MAPINFO_H)
00023 #define INCLUDED_MAPINFO_H
00024 
00025 #include <gtk/gtk.h>
00026 #include <map>
00027 #include <string>
00028 
00029 #include "gtkutil/menu/PopupMenu.h"
00030 
00031 namespace sidebar
00032 {
00033     class MapInfo
00034     {
00035         private:
00036 
00037             // Main widget
00038             GtkWidget* _widget;
00039 
00040             // List store to contain the entity list with name and count
00041             GtkListStore* _store;
00042             GtkWidget *_view;
00043 
00044             // List store to contain attributes and values for the map
00045             GtkListStore* _infoStore;
00046 
00047             GtkWidget *_vboxEntityBreakdown;
00048             // Context menu
00049             gtkutil::PopupMenu _popupMenu;
00050 
00051         private:
00052 
00053             GtkWidget* createEntityBreakdownTreeView ();
00054             GtkWidget* createInfoPanel ();
00055 
00056             /* GTK CALLBACKS */
00057 
00058             static void removeEntity (gpointer data, gpointer userData);
00059 
00060         public:
00061 
00064             static MapInfo& getInstance ();
00065 
00069             GtkWidget* getWidget ()
00070             {
00071                 gtk_widget_show_all(_widget);
00072                 return _widget;
00073             }
00074 
00077             MapInfo ();
00078 
00081             void update ();
00082     };
00083 
00084     void MapInfo_Construct ();
00085     void MapInfo_Destroy ();
00086 }
00087 
00088 #endif

Generated by  doxygen 1.6.2