00001 // $Id: gui_directory.hxx,v 1.7 2003/01/11 19:07:48 grumbel Exp $ 00002 // 00003 // Construo - A wire-frame construction gamee 00004 // Copyright (C) 2002 Ingo Ruhnke <grumbel@gmx.de> 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_DIRECTORY_HXX 00021 #define HEADER_CONSTRUO_GUI_DIRECTORY_HXX 00022 00023 #include <vector> 00024 #include "gui_child_manager.hxx" 00025 00026 class ZoomGraphicContext; 00027 class GUIFileButton; 00028 00030 class GUIDirectory : public GUIChildManager 00031 { 00032 private: 00033 std::string pathname; 00034 std::vector<GUIFileButton*> files; 00035 int offset; 00036 unsigned int mtime; 00037 00038 void place_components (); 00039 public: 00040 enum Mode { LOAD_DIRECTORY, SAVE_DIRECTORY }; 00041 private: 00042 Mode mode; 00043 public: 00044 GUIDirectory (const std::string& pathname, Mode m); 00045 ~GUIDirectory (); 00046 00047 void draw_overlay (GraphicContext* gc); 00048 00049 std::string get_path() { return pathname; } 00050 00052 void move_up (); 00054 void move_down (); 00055 00056 void wheel_up (int x, int y); 00057 void wheel_down (int x, int y); 00058 }; 00059 00060 #endif 00061 00062 /* EOF */