Inspector.cs 916 B

123456789101112131415161718192021222324252627282930313233343536373839
  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 GUILayoutY layout;
  12. protected object referencedObject;
  13. private InspectorWindow parentWindow;
  14. internal void Initialize(InspectorWindow parentWindow, GUIPanel gui, object instance)
  15. {
  16. GUI = gui;
  17. layout = gui.AddLayoutY();
  18. referencedObject = instance;
  19. this.parentWindow = parentWindow;
  20. }
  21. internal void SetVisible(bool visible)
  22. {
  23. GUI.Visible = visible;
  24. }
  25. internal void Destroy()
  26. {
  27. layout.Destroy();
  28. GUI.Destroy();
  29. }
  30. internal abstract bool Refresh();
  31. internal abstract int GetOptimalHeight();
  32. }
  33. }