Planeshift

eeditrendertoolbox.h

Go to the documentation of this file.
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 #ifndef EEDIT_RENDER_TOOLBOX_HEADER
00021 #define EEDIT_RENDER_TOOLBOX_HEADER
00022 
00023 #include "eedittoolbox.h"
00024 #include "paws/pawswidget.h"
00025 #include "effects/pseffectmanager.h"
00026 #include "effects/pseffect.h"
00027 #include "iengine/engine.h"
00028 
00029 class pawsButton;
00030 
00037 class EEditRenderToolbox : public EEditToolbox, public pawsWidget, public scfImplementation0<EEditRenderToolbox>
00038 {
00039 public:
00040     EEditRenderToolbox();
00041     virtual ~EEditRenderToolbox();
00042 
00043     // inheritted from EEditToolbox
00044     virtual void Update(unsigned int elapsed);
00045     virtual size_t GetType() const;
00046     virtual const char * GetName() const;
00047 
00048     // inheritted from pawsWidget
00049     virtual bool PostSetup(); 
00050     virtual bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget* widget);
00051     virtual void OnListAction(pawsListBox* selected, int status);
00052 
00053     psEffect* GetCurrentEffect();
00054     void LoadEffect(psEffectManager* mgr, const char* effectName);
00055     void FillAnchor(const char* anchorName);
00056     void FillObj(const char* objName);
00057     void SetEngine(iEngine* e) { engine = e; }
00058 
00059 private:
00060     pawsButton   * renderButton;
00061     pawsButton   * loadButton;
00062     pawsButton   * pauseButton;
00063     pawsButton   * cancelButton;
00064     pawsListBox  * list;
00065     pawsListBox  * list2;
00066 
00067     psEffectManager* effectManager;
00068     csRef<iEngine> engine;
00069     csString effectName;
00070 };
00071 
00072 CREATE_PAWS_FACTORY(EEditRenderToolbox);
00073 
00076 #endif