guiWindowCtrl_ScriptBinding.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) 2013 GarageGames, LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to
  6. // deal in the Software without restriction, including without limitation the
  7. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8. // sell copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. // IN THE SOFTWARE.
  21. //-----------------------------------------------------------------------------
  22. ConsoleMethodGroupBeginWithDocs(GuiWindowCtrl, GuiControl)
  23. /*! Sets the profile that will be used for the content of the window
  24. @param p The content profile
  25. @return No return value
  26. */
  27. ConsoleMethodWithDocs(GuiWindowCtrl, setContentProfile, ConsoleVoid, 3, 3, (GuiControlProfile p))
  28. {
  29. GuiControlProfile* profile;
  30. if (Sim::findObject(argv[2], profile))
  31. object->setControlContentProfile(profile);
  32. }
  33. /*! Sets the profile that will be used for the close button
  34. @param p The close button profile
  35. @return No return value
  36. */
  37. ConsoleMethodWithDocs(GuiWindowCtrl, setCloseButtonProfile, ConsoleVoid, 3, 3, (GuiControlProfile p))
  38. {
  39. GuiControlProfile* profile;
  40. if (Sim::findObject(argv[2], profile))
  41. object->setControlCloseButtonProfile(profile);
  42. }
  43. /*! Sets the profile that will be used for the minimize button
  44. @param p The minimize button profile
  45. @return No return value
  46. */
  47. ConsoleMethodWithDocs(GuiWindowCtrl, setMinButtonProfile, ConsoleVoid, 3, 3, (GuiControlProfile p))
  48. {
  49. GuiControlProfile* profile;
  50. if (Sim::findObject(argv[2], profile))
  51. object->setControlMinButtonProfile(profile);
  52. }
  53. /*! Sets the profile that will be used for the maximize button
  54. @param p The maximize button profile
  55. @return No return value
  56. */
  57. ConsoleMethodWithDocs(GuiWindowCtrl, setMaxButtonProfile, ConsoleVoid, 3, 3, (GuiControlProfile p))
  58. {
  59. GuiControlProfile* profile;
  60. if (Sim::findObject(argv[2], profile))
  61. object->setControlMaxButtonProfile(profile);
  62. }
  63. /*! Sets the GuiCursor that will be used when resizing the GuiWindow
  64. @param c The GuiCursor that will be used when resizing
  65. @return No return value
  66. */
  67. ConsoleMethodWithDocs(GuiWindowCtrl, setLeftRightCursor, ConsoleVoid, 3, 3, (GuiCursor c))
  68. {
  69. GuiCursor* cursor;
  70. if (Sim::findObject(argv[2], cursor))
  71. object->setControlLeftRightCursor(cursor);
  72. }
  73. /*! Sets the GuiCursor that will be used when resizing the GuiWindow
  74. @param c The GuiCursor that will be used when resizing
  75. @return No return value
  76. */
  77. ConsoleMethodWithDocs(GuiWindowCtrl, setUpDownCursor, ConsoleVoid, 3, 3, (GuiCursor c))
  78. {
  79. GuiCursor* cursor;
  80. if (Sim::findObject(argv[2], cursor))
  81. object->setControlUpDownCursor(cursor);
  82. }
  83. /*! Sets the GuiCursor that will be used when resizing the GuiWindow
  84. @param c The GuiCursor that will be used when resizing
  85. @return No return value
  86. */
  87. ConsoleMethodWithDocs(GuiWindowCtrl, setNWSECursor, ConsoleVoid, 3, 3, (GuiCursor c))
  88. {
  89. GuiCursor* cursor;
  90. if (Sim::findObject(argv[2], cursor))
  91. object->setControlNWSECursor(cursor);
  92. }
  93. ConsoleMethodGroupEndWithDocs(GuiWindowCtrl)