GUIArea.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. namespace BansheeEngine
  4. {
  5. public sealed class GUIArea : ScriptObject
  6. {
  7. private GUILayout _layout;
  8. public GUILayout layout
  9. {
  10. get { return _layout;}
  11. }
  12. internal GUIArea()
  13. { }
  14. internal static GUIArea Create(GUIBase parent, int x, int y, int width, int height, short depth)
  15. {
  16. GUIArea newArea = new GUIArea();
  17. Internal_CreateInstance(newArea, parent, x, y, width, height, depth);
  18. newArea._layout = new GUILayoutX(newArea);
  19. return newArea;
  20. }
  21. internal static GUIArea CreateResizableX(GUIBase parent, int offsetLeft, int offsetRight, int offsetTop, int height, short depth)
  22. {
  23. GUIArea newArea = new GUIArea();
  24. Internal_CreateInstanceResizableX(newArea, parent, offsetLeft, offsetRight, offsetTop, height, depth);
  25. newArea._layout = new GUILayoutX(newArea);
  26. return newArea;
  27. }
  28. internal static GUIArea CreateResizableY(GUIBase parent, int offsetTop, int offsetBottom, int offsetLeft, int width, short depth)
  29. {
  30. GUIArea newArea = new GUIArea();
  31. Internal_CreateInstanceResizableY(newArea, parent, offsetTop, offsetBottom, offsetLeft, width, depth);
  32. newArea._layout = new GUILayoutX(newArea);
  33. return newArea;
  34. }
  35. internal static GUIArea CreateResizableXY(GUIBase parent, int offsetLeft, int offsetRight, int offsetTop, int offsetBottom, short depth)
  36. {
  37. GUIArea newArea = new GUIArea();
  38. Internal_CreateInstanceResizableXY(newArea, parent, offsetLeft, offsetRight, offsetTop, offsetBottom, depth);
  39. newArea._layout = new GUILayoutX(newArea);
  40. return newArea;
  41. }
  42. [MethodImpl(MethodImplOptions.InternalCall)]
  43. private static extern void Internal_CreateInstance(GUIArea instance, GUIBase parent, int x, int y, int width, int height, short depth);
  44. [MethodImpl(MethodImplOptions.InternalCall)]
  45. private static extern void Internal_CreateInstanceResizableX(GUIArea instance, GUIBase parent, int offsetLeft, int offsetRight, int offsetTop,
  46. int height, short depth);
  47. [MethodImpl(MethodImplOptions.InternalCall)]
  48. private static extern void Internal_CreateInstanceResizableY(GUIArea instance, GUIBase parent, int offsetTop, int offsetBottom, int offsetLeft,
  49. int width, short depth);
  50. [MethodImpl(MethodImplOptions.InternalCall)]
  51. private static extern void Internal_CreateInstanceResizableXY(GUIArea instance, GUIBase parent, int offsetLeft, int offsetRight, int offsetTop,
  52. int offsetBottom, short depth);
  53. }
  54. }