/* * Author: Andrew Robberts * * Copyright (C) 2003 Atomic Blue (info@planeshift.it, http://www.atomicblue.org) * * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation (version 2 of the License) * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef EEDIT_EDIT_EFFECT_TOOLBOX_HEADER #define EEDIT_EDIT_EFFECT_TOOLBOX_HEADER #include "eedittoolbox.h" #include "paws/pawswidget.h" #include "eeditselectstring.h" #include "eeditselectvec3.h" #include "eeditselectfloat.h" #include "eeditselectyesno.h" #include "eeditselectnewanchor.h" class pawsButton; class pawsListBox; class psEffect; class psEffectAnchor; class psEffectAnchorSocket; class psEffectObj; class pawsTree; class pawsSimpleTreeNode; class pawsSeqTreeNode; /** This allows you to edit the effect. */ class EEditEditEffectToolbox : public EEditToolbox, public pawsWidget { public: SCF_DECLARE_IBASE; EEditEditEffectToolbox(); virtual ~EEditEditEffectToolbox(); /** Loads the given effect tree. * @param effect the effect to load */ void LoadEffect(psEffect * effect); // inheritted from EEditToolbox virtual void Update(unsigned int elapsed); virtual size_t GetType() const; virtual char * GetName() const; // inheritted from pawsWidget virtual bool PostSetup(); virtual bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget* widget); virtual bool OnSelected( pawsWidget* widget); virtual void OnUpdateData(const char *dataname,PAWSData& data); enum ANCHOR_TYPE { AT_NONE = 0, AT_BASIC, AT_SPLINE, AT_SOCKET, AT_COUNT }; private: /** Updates the given effect according to the given data. */ void UpdateEffectData(psEffect * effect, char owner, char attr, int index, int index2, int index3, PAWSData & data); /** Builds the tree root nodes with anchors and object nodes (deletes the old ones if they exist). */ void RebuildTreeRoot(); /** Displays anchor data in the given tree node. * @param node the tree node that will display the data. * @param anchor the anchor to visualize. * @param anchorType the type of anchor we're visualizing. * One Of: *