BsScriptGUISceneTreeView.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. #include "BsScriptEditorPrerequisites.h"
  3. #include "BsScriptGUIElement.h"
  4. namespace BansheeEngine
  5. {
  6. /** Interop class between C++ & CLR for GUISceneTreeView. */
  7. class BS_SCR_BED_EXPORT ScriptGUISceneTreeView : public TScriptGUIElement<ScriptGUISceneTreeView>
  8. {
  9. public:
  10. SCRIPT_OBJ(EDITOR_ASSEMBLY, "BansheeEditor", "GUISceneTreeView")
  11. private:
  12. ScriptGUISceneTreeView(MonoObject* instance, GUISceneTreeView* treeView);
  13. ~ScriptGUISceneTreeView();
  14. /** Triggered when the native scene tree view modifies the scene. */
  15. void sceneModified();
  16. /** Triggered when a resource is dragged and dropped over the native scene tree view. */
  17. void resourceDropped(const HSceneObject& parent, const Vector<Path>& resourcePaths);
  18. HEvent mOnModifiedConn;
  19. HEvent mOnResourceDroppedConn;
  20. /************************************************************************/
  21. /* CLR HOOKS */
  22. /************************************************************************/
  23. static void internal_createInstance(MonoObject* instance, MonoString* style, MonoArray* guiOptions);
  24. static void internal_update(ScriptGUISceneTreeView* thisPtr);
  25. static void internal_cutSelection(ScriptGUISceneTreeView* thisPtr);
  26. static void internal_copySelection(ScriptGUISceneTreeView* thisPtr);
  27. static void internal_pasteToSelection(ScriptGUISceneTreeView* thisPtr);
  28. static void internal_duplicateSelection(ScriptGUISceneTreeView* thisPtr);
  29. static void internal_deleteSelection(ScriptGUISceneTreeView* thisPtr);
  30. typedef void(__stdcall *OnModifiedThunkDef) (MonoObject*, MonoException**);
  31. typedef void(__stdcall *OnResourceDroppedThunkDef) (MonoObject*, MonoObject*, MonoArray*, MonoException**);
  32. static OnModifiedThunkDef onModifiedThunk;
  33. static OnResourceDroppedThunkDef onResourceDroppedThunk;
  34. };
  35. }