Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

gui_file_manager.hxx

Go to the documentation of this file.
00001 //  $Id: gui_file_manager.hxx,v 1.6 2003/01/11 19:07:48 grumbel Exp $
00002 // 
00003 //  Construo - A wire-frame construction gamee
00004 //  Copyright (C) 2002 Ingo Ruhnke <[email protected]>
00005 //
00006 //  This program is free software; you can redistribute it and/or
00007 //  modify it under the terms of the GNU General Public License
00008 //  as published by the Free Software Foundation; either version 2
00009 //  of the License, or (at your option) any later version.
00010 //
00011 //  This program is distributed in the hope that it will be useful,
00012 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 //  GNU General Public License for more details.
00015 // 
00016 //  You should have received a copy of the GNU General Public License
00017 //  along with this program; if not, write to the Free Software
00018 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019 
00020 #ifndef HEADER_CONSTRUO_GUI_FILE_MANAGER_HXX
00021 #define HEADER_CONSTRUO_GUI_FILE_MANAGER_HXX
00022 
00023 #include <map>
00024 #include <string>
00025 #include "gui_child_manager.hxx"
00026 #include "gui_directory.hxx"
00027 
00029 class GUIFileManager : public GUIChildManager
00030 {
00031 private:
00033   std::map<std::string, GUIDirectory*> directories;
00034 
00035   GUIDirectory* current_directory;
00036   
00037   GUIDirectory* get_directory (const std::string& pathname);
00038 
00039   static GUIFileManager* instance_;
00040 public:
00041   enum Mode { LOAD_MANAGER, SAVE_MANAGER };
00042 private:
00043   Mode mode;
00044 public:
00045   GUIFileManager (Mode m);
00046   ~GUIFileManager ();
00047 
00048   static GUIFileManager* instance() { return instance_; }
00049   static void set_instance(GUIFileManager* g) { instance_ = g; }
00050   
00051   void draw_overlay (GraphicContext* gc);
00052 
00055   void open_directory (const std::string& pathname);
00056 
00059   void directory_up();
00060 
00061   void update_current_directory();
00062 
00063   void scroll_up ();
00064   void scroll_down ();
00065 };
00066 
00067 #endif
00068 
00069 /* EOF */

Generated on Thu Jul 24 10:24:30 2003 for Construo by doxygen1.3-rc3