BsScriptGUISceneTreeView.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 "Wrappers/GUI/BsScriptGUIElement.h"
  6. namespace bs
  7. {
  8. /** @addtogroup ScriptInteropEditor
  9. * @{
  10. */
  11. /** Interop class between C++ & CLR for GUISceneTreeView. */
  12. class BS_SCR_BED_EXPORT ScriptGUISceneTreeView : public TScriptGUIElement<ScriptGUISceneTreeView>
  13. {
  14. public:
  15. SCRIPT_OBJ(EDITOR_ASSEMBLY, EDITOR_NS, "GUISceneTreeView")
  16. private:
  17. ScriptGUISceneTreeView(MonoObject* instance, GUISceneTreeView* treeView);
  18. ~ScriptGUISceneTreeView();
  19. /** Triggered when the native scene tree view modifies the scene. */
  20. void sceneModified();
  21. /** Triggered when a resource is dragged and dropped over the native scene tree view. */
  22. void resourceDropped(const HSceneObject& parent, const Vector<Path>& resourcePaths);
  23. HEvent mOnModifiedConn;
  24. HEvent mOnResourceDroppedConn;
  25. /************************************************************************/
  26. /* CLR HOOKS */
  27. /************************************************************************/
  28. static void internal_createInstance(MonoObject* instance, MonoString* style, MonoArray* guiOptions);
  29. static void internal_update(ScriptGUISceneTreeView* thisPtr);
  30. static void internal_cutSelection(ScriptGUISceneTreeView* thisPtr);
  31. static void internal_copySelection(ScriptGUISceneTreeView* thisPtr);
  32. static void internal_pasteToSelection(ScriptGUISceneTreeView* thisPtr);
  33. static void internal_duplicateSelection(ScriptGUISceneTreeView* thisPtr);
  34. static void internal_deleteSelection(ScriptGUISceneTreeView* thisPtr);
  35. static void internal_renameSelection(ScriptGUISceneTreeView* thisPtr);
  36. static MonoObject* internal_getState(ScriptGUISceneTreeView* thisPtr);
  37. static void internal_setState(ScriptGUISceneTreeView* thisPtr, MonoObject* obj);
  38. typedef void(BS_THUNKCALL *OnModifiedThunkDef) (MonoObject*, MonoException**);
  39. typedef void(BS_THUNKCALL *OnResourceDroppedThunkDef) (MonoObject*, MonoObject*, MonoArray*, MonoException**);
  40. static OnModifiedThunkDef onModifiedThunk;
  41. static OnResourceDroppedThunkDef onResourceDroppedThunk;
  42. };
  43. /** @} */
  44. }