BsScriptGUISceneTreeView.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. static void internal_renameSelection(ScriptGUISceneTreeView* thisPtr);
  33. typedef void(__stdcall *OnModifiedThunkDef) (MonoObject*, MonoException**);
  34. typedef void(__stdcall *OnResourceDroppedThunkDef) (MonoObject*, MonoObject*, MonoArray*, MonoException**);
  35. static OnModifiedThunkDef onModifiedThunk;
  36. static OnResourceDroppedThunkDef onResourceDroppedThunk;
  37. };
  38. }