20 #ifndef EEDIT_APP_HEADER    21 #define EEDIT_APP_HEADER    23 #include <csutil/sysfunc.h>    24 #include <csutil/csstring.h>    25 #include <csutil/ref.h>    26 #include <csutil/bitarray.h>    27 #include <csgeom/vector2.h>    28 #include <csgeom/vector3.h>    37 struct iConfigManager;
    38 struct iTextureManager;
    44 class csRandomFloatGen;
   254     csPtr<iMeshWrapper> 
LoadCustomMesh(
const csString & meshFile, 
const csString & name, csVector3 pos);
   360     bool LoadMap(
const char * mapFile);
   376     csRef<iVFS>             
GetVFS() 
const;
   386     const char * 
GetConfigString(
const char * key, 
const char * defaultValue) 
const;
   392     bool GetConfigBool(
const char * key, 
bool defaultValue) 
const;
   411     bool CreateEffectPathList(
const csString & path, 
bool clear=
true);
   419     bool AppendEffectPathList(
const csString & effectFile, 
const csString & sourcePath);
   424     void CreateShortcuts();
   429     void RegisterFactories();
   441     void TakeScreenshot(
const csString & fileName);
   444     DeclareGenericEventHandler(EventHandler,
EEditApp,
"planeshift.eedit");
   445     csRef<EventHandler> event_handler;
   449     iObjectRegistry*        object_reg;
   450     csRef<iEngine>          engine;
   452     csRef<iEventQueue>      queue;
   453     csRef<iConfigManager>   cfgmgr;
   454     csRef<iTextureManager>  txtmgr;
   455     csRef<iGraphics3D>      g3d;
   456     csRef<iGraphics2D>      g2d;
   457     csRef<iVirtualClock>    vc;
   458     csRef<iLoader>          loader;
   466     csString currEffectName;
   467     csString currEffectLoc;
   476     csRef<psEffectManager> effectManager;
   477     unsigned int currEffectID;
   481     csRef<iMeshWrapper> particleSystem;
   484     csRef<iMeshWrapper> pos_anchor;
   487     csRef<iMeshWrapper> tar_anchor;
   501         EffectPath(
const char * newName, 
const char * newPath) : name(newName), path(newPath) {}
   506     csArray<EffectPath> effectPaths;
   508     csVector2 mousePointer;
   510     csRef<psCal3DCallbackLoader> cal3DCallbackLoader;
   512     csRandomFloatGen * rand;
 void SetPositionData(const csVector3 &pos, float rot)
Sets the position and rotation of the effect position anchor. 
 
PawsManager * GetPaws()
Get Paws. 
 
A csReporterListener for eedit. 
 
static const char * APP_NAME
 
static const char * CONFIG_FILENAME
 
bool IsToolboxVisible(size_t toolbox)
Checks if the toolbox is visible. 
 
csRef< iVFS > GetVFS() const 
 
bool CancelEffect()
Cancels rendering of the current effect. 
 
bool GetConfigBool(const char *key, bool defaultValue) const 
 
EEditApp(iObjectRegistry *obj_reg, EEditReporter *_reporter)
Constructor. 
 
void SetConfigFloat(const char *key, float value)
 
csRef< iLoader > GetLoader() const 
 
const char * GetConfigString(const char *key, const char *defaultValue) const 
 
Main PlaneShift Window manager. 
 
csRef< iEngine > GetEngine() const 
 
EEditReporter * GetReporter() const 
 
EEditToolboxManager * GetToolboxManager()
Grabs the toolbox manager. 
 
void CreateParticleSystem(const csString &name)
Create a particle system mesh. 
 
csString GetCurrEffectName()
Gets the name current effect. 
 
bool SetCurrEffect(const csString &name)
Sets the current effect. 
 
bool LoadTargetMesh(const csString &meshFile)
Loads the target mesh indicator. 
 
bool RenderEffect(const csString &effectName)
Reloads and renders the given effect. 
 
void SetPositionAnim(size_t index)
Sets the animation of the position mesh. 
 
static const char * WINDOW_CAPTION
 
bool SetDefaultActorPositions()
Sets the positions of the origin and target actors to defaults based on the map's camera...
 
bool Init()
Initializes some CS specific stuff, fills most of this classes global variables, and inits eedit spec...
 
csRef< iVirtualClock > GetVirtualClock() const 
 
A stripped version of the cal3d callback loader used only for eedit. 
 
csRef< iGraphics3D > GetGraphics3D() const 
 
void SetTargetData(const csVector3 &pos, float rot)
Sets the position and rotation of the effect target anchor. 
 
void ExecuteCommand(const char *cmd)
Executes a named command. 
 
void Exit()
Exits the application. 
 
csRef< iGraphics2D > GetGraphics2D() const 
 
void RefreshEffectList()
Refreshes the list of effects. 
 
csRef< iConfigManager > GetConfigManager() const 
 
void SetConfigString(const char *key, const char *value)
 
csVector2 GetMousePointer()
Gets the location of the mouse pointer. 
 
void ShowToolbox(size_t toolbox)
Ensures that the given toolbox is visible. 
 
bool LoadWidgets()
Loads all the paws widgets (windows). 
 
bool UpdateEffect()
Effect has been changed, so lets rerender it. 
 
bool LoadMap(const char *mapFile)
Loads the given map file. 
 
bool ReloadCurrentEffect()
Loads the current effect. 
 
void SevereError(const char *msg)
Reports a severe error in the application. 
 
The main or desktop widget. 
 
static const char * TEMP_EFFECTS_LIST
 
bool LoadWidget(const char *file)
Loads a single paws widget. 
 
csRef< iTextureManager > GetTextureManager() const 
 
bool GetCamFlag(int flag)
Gets the value of the given camera flag. 
 
csString GetCurrParticleSystemName()
Gets the name current particle system. 
 
void SetCamFlag(int flag, bool val)
Sets the given camera flag. 
 
bool RenderCurrentEffect()
Renders the current effect. 
 
float GetConfigFloat(const char *key, float defaultValue) const 
 
unsigned int GetCurrEffectID()
Gets the ID of the current effect. 
 
iObjectRegistry * GetObjectRegistry() const 
 
void SetConfigBool(const char *key, bool value)
 
bool LoadPositionMesh(const csString &meshFile)
Loads the position mesh indicator. 
 
EEditInputboxManager * GetInputboxManager()
Grabs the inputbox manager. 
 
csPtr< iMeshWrapper > LoadCustomMesh(const csString &meshFile, const csString &name, csVector3 pos)
Loads a mesh based on the name or filepath given. 
 
CAM_FLAG
The camera flags. 
 
bool HandleEvent(iEvent &event)
handles an event from the event handler 
 
void SetTargetAnim(size_t index)
Sets the animation of the target mesh. 
 
static const char * KEY_DEFS_FILENAME
 
csRef< iEventQueue > GetEventQueue() const 
 
bool ToggleToolbox(size_t toolbox)
Toggles the visibility of the given toolbox. 
 
psEffectManager * GetEffectManager()
Grabs the effect manager. 
 
bool TogglePauseEffect()
Toggles the pause/resume state of the effect. 
 
void HideToolbox(size_t toolbox)
Ensures that the given toolbox is hidden.