ieditor/editor.h
00001 /* 00002 Copyright (C) 2007 by Seth Yastrov 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public 00015 License along with this library; if not, write to the Free 00016 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 00019 #ifndef __IEDITOR_EDITOR_H__ 00020 #define __IEDITOR_EDITOR_H__ 00021 00022 #include "csutil/array.h" 00023 #include "csutil/scf.h" 00024 #include "csutil/scf_implementation.h" 00025 00026 #include "ieditor/editorobject.h" 00027 00028 class wxWindow; 00029 00030 struct iCollection; 00031 struct iProgressMeter; 00032 struct iThreadReturn; 00033 struct csSimpleRenderMesh; 00034 00035 namespace CS { 00036 namespace EditorApp { 00037 00038 struct iObjectList; 00039 struct iPanelManager; 00040 struct iMenuBar; 00041 00043 struct iMapListener : public virtual iBase 00044 { 00045 SCF_INTERFACE (iMapListener, 0, 0, 1); 00046 00048 virtual void OnMapLoaded (const char* path, const char* filename) = 0; 00049 00051 virtual void OnLibraryLoaded (const char* path, const char* filename, iCollection* collection) = 0; 00052 }; 00053 00057 struct iEditor : public virtual iBase 00058 { 00059 SCF_INTERFACE (iEditor, 0, 0, 1); 00060 00061 virtual bool StartEngine () = 0; 00062 virtual bool StartApplication () = 0; 00063 virtual bool LoadPlugin (const char* name) = 0; 00064 00066 virtual wxWindow* GetWindow () = 0; 00067 00069 virtual iPanelManager* GetPanelManager () const = 0; 00070 00072 virtual iMenuBar* GetMenuBar () const = 0; 00073 00075 virtual csPtr<iProgressMeter> GetProgressMeter () = 0; 00076 00078 virtual iThreadReturn* LoadMapFile (const char* path, const char* filename, 00079 bool clearEngine = true) = 0; 00080 00082 virtual void SaveMapFile (const char* path, const char* filename) = 0; 00083 00085 virtual iThreadReturn* LoadLibraryFile (const char* path, const char* filename) = 0; 00086 00088 virtual void AddMapListener (iMapListener* listener) = 0; 00089 00091 virtual void RemoveMapListener (iMapListener* listener) = 0; 00092 00094 virtual csPtr<iEditorObject> CreateEditorObject (iBase* object, wxBitmap* icon) = 0; 00095 00097 virtual iObjectList* GetSelection () = 0; 00098 00100 virtual iObjectList* GetObjects () = 0; 00101 00102 // TODO: remove all of that 00103 virtual void SetHelperMeshes (csArray<csSimpleRenderMesh>* helpers) = 0; 00104 virtual csArray<csSimpleRenderMesh>* GetHelperMeshes () = 0; 00105 00106 enum TransformStatus 00107 { 00108 NOTHING = 0, 00109 00110 MOVING, 00111 MOVEX, 00112 MOVEY, 00113 MOVEZ, 00114 00115 ROTATING, 00116 ROTATEX, 00117 ROTATEY, 00118 ROTATEZ, 00119 00120 SCALING, 00121 SCALEX, 00122 SCALEY, 00123 SCALEZ 00124 }; 00125 00126 virtual void SetTransformStatus (TransformStatus status) = 0; 00127 virtual TransformStatus GetTransformStatus () = 0; 00128 }; 00129 00130 } // namespace EditorApp 00131 } // namespace CS 00132 00133 #endif
Generated for Crystal Space 2.1 by doxygen 1.6.1
