ieditor/editorobject.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_EDITOROBJECT_H__ 00020 #define __IEDITOR_EDITOROBJECT_H__ 00021 00022 #include <csutil/scf.h> 00023 #include <csutil/scf_implementation.h> 00024 00025 class wxBitmap; 00026 00027 namespace CS { 00028 namespace EditorApp { 00029 00033 struct iBaseIterator : public virtual iBase 00034 { 00035 SCF_INTERFACE (iBaseIterator, 0, 0, 1); 00036 00037 virtual bool HasNext () const = 0; 00038 00039 virtual iBase* Next () = 0; 00040 00041 virtual void Reset () = 0; 00042 }; 00043 00044 struct iEditorObject; 00045 00051 struct iEditorObjectChangeListener : public virtual iBase 00052 { 00053 SCF_INTERFACE (iEditorObjectChangeListener, 0, 0, 1); 00054 00056 virtual void OnObjectChanged (iEditorObject* obj) = 0; 00057 }; 00058 00062 enum EditorObjectType 00063 { 00065 EditorObjectTypeFactory = 0, 00067 EditorObjectTypeInstance, 00069 EditorObjectTypeUnknown, 00070 }; 00071 00075 struct iEditorObjectIterator : public virtual iBase 00076 { 00077 SCF_INTERFACE (iEditorObjectIterator, 0, 0, 1); 00078 00079 virtual bool HasNext () const = 0; 00080 00081 virtual iEditorObject* Next () = 0; 00082 00083 virtual void Reset () = 0; 00084 }; 00085 00089 struct iEditorObject : public virtual iBase 00090 { 00091 SCF_INTERFACE (iEditorObject, 0, 0, 1); 00092 00094 virtual const char* GetName () const = 0; 00095 00097 virtual void SetName (const char* name) = 0; 00098 00100 virtual iBase* GetParent () = 0; 00101 00103 virtual void SetParent (iBase* parent) = 0; 00104 00106 virtual csPtr<iBaseIterator> GetIterator () = 0; 00107 00109 virtual EditorObjectType GetType () const = 0; 00110 00112 virtual wxBitmap* GetIcon () const = 0; 00113 00114 // TODO: Add property get/set functions 00115 00117 virtual iBase* GetIBase () = 0; 00118 00122 virtual bool HasInterface (scfInterfaceID id) = 0; 00123 00125 virtual void AddListener (iEditorObjectChangeListener* listener) = 0; 00126 00128 virtual void RemoveListener (iEditorObjectChangeListener* listener) = 0; 00129 }; 00130 00131 } // namespace EditorApp 00132 } // namespace CS 00133 00134 #endif
Generated for Crystal Space 2.1 by doxygen 1.6.1
