Planeshift
|
00001 /* 00002 * Author: Andrew Robberts 00003 * 00004 * Copyright (C) 2003 Atomic Blue ([email protected], http://www.atomicblue.org) 00005 * 00006 * 00007 * This program is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU General Public License 00009 * as published by the Free Software Foundation (version 2 of the License) 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 * 00018 */ 00019 00020 00021 00022 #ifndef EEDIT_FPS_TOOLBOX_WINDOW_HEADER 00023 #define EEDIT_FPS_TOOLBOX_WINDOW_HEADER 00024 00025 00026 00027 #include "eedittoolbox.h" 00028 00029 #include "paws/pawswidget.h" 00030 00031 00032 00033 class pawsTextBox; 00034 00035 class pawsSpinBox; 00036 00037 00038 00046 class EEditFPSToolbox : public EEditToolbox, public pawsWidget, public scfImplementation0<EEditFPSToolbox> 00047 { 00048 public: 00049 EEditFPSToolbox(); 00050 00051 virtual ~EEditFPSToolbox(); 00052 00053 00054 00060 float GetFPS() const; 00061 00067 float GetTargetFPS() const; 00068 00069 // inheritted from EEditToolbox 00070 virtual void Update(unsigned int elapsed); 00071 00072 virtual size_t GetType() const; 00073 00074 virtual const char * GetName() const; 00075 00076 00077 00078 // inheritted from pawsWidget 00079 virtual bool PostSetup(); 00080 00081 virtual bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget ); 00082 00083 private: 00084 00085 pawsTextBox * fpsDisplay; 00086 00087 pawsSpinBox * fpsTarget; 00088 00089 float fps; 00090 00091 unsigned int framesCount; 00092 00093 unsigned int framesElapsed; 00094 00095 }; 00096 00097 CREATE_PAWS_FACTORY(EEditFPSToolbox); 00098 00101 #endif 00102