Inspector.cs 935 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using BansheeEngine;
  6. namespace BansheeEditor
  7. {
  8. public abstract class Inspector
  9. {
  10. protected GUIPanel GUI;
  11. protected GUILayout layout;
  12. protected object referencedObject;
  13. internal void Initialize(GUIPanel gui, object instance)
  14. {
  15. GUI = gui;
  16. layout = gui.layout.AddLayoutY();
  17. referencedObject = instance;
  18. }
  19. internal void SetArea(int x, int y, int width, int height)
  20. {
  21. GUI.SetArea(x, y, width, height);
  22. }
  23. internal void SetVisible(bool visible)
  24. {
  25. GUI.SetVisible(visible);
  26. }
  27. internal void Destroy()
  28. {
  29. layout.Destroy();
  30. GUI.Destroy();
  31. }
  32. internal abstract void Refresh();
  33. internal abstract int GetOptimalHeight();
  34. }
  35. }