BsScriptGUISceneTreeView.h 2.1 KB

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