00001 //////////////////////////////////////////////////////////////////////////////// 00002 // Scorched3D (c) 2000-2009 00003 // 00004 // This file is part of Scorched3D. 00005 // 00006 // Scorched3D is free software; you can redistribute it and/or modify 00007 // it under the terms of the GNU General Public License as published by 00008 // the Free Software Foundation; either version 2 of the License, or 00009 // (at your option) any later version. 00010 // 00011 // Scorched3D 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 Scorched3D; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 //////////////////////////////////////////////////////////////////////////////// 00020 00021 #if !defined(__INCLUDE_ProgressDialogh_INCLUDE__) 00022 #define __INCLUDE_ProgressDialogh_INCLUDE__ 00023 00024 #include <common/ProgressCounter.h> 00025 #include <common/FileLines.h> 00026 #include <GLW/GLWWindow.h> 00027 #include <GLEXT/GLTexture.h> 00028 00029 class ProgressDialog : 00030 public GLWWindow, 00031 public ProgressCounterI, 00032 public ProgressCounter 00033 { 00034 public: 00035 static ProgressDialog *instance(); 00036 00037 virtual void progressChange(const LangString &op, const float percentage); 00038 virtual void draw(); 00039 00040 void changeTip(); 00041 void setIcon(const std::string &iconName); 00042 00043 protected: 00044 static ProgressDialog *instance_; 00045 00046 GLTexture icon_; 00047 GLTexture bar1_, bar2_; 00048 FileLines tips_; 00049 LangString progressText_; 00050 float progressPercentage_; 00051 00052 private: 00053 ProgressDialog(); 00054 virtual ~ProgressDialog(); 00055 }; 00056 00057 class ProgressDialogSync : 00058 public ProgressCounterI, 00059 public ProgressCounter 00060 { 00061 public: 00062 static ProgressDialogSync *instance(); 00063 00064 virtual void progressChange(const LangString &op, const float percentage); 00065 00066 protected: 00067 static ProgressDialogSync *instance_; 00068 00069 private: 00070 ProgressDialogSync(); 00071 virtual ~ProgressDialogSync(); 00072 }; 00073 00074 #endif
1.5.3