defs.m 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*---------------------------------------------------
  2. -----------------------------------------------------
  3. Filename: defs.m
  4. Version: 1.0
  5. Type: maki
  6. Date: 08. Jun. 2007 - 23:32
  7. Author: Martin Poehlmann aka Deimos
  8. E-Mail: [email protected]
  9. Internet: www.skinconsortium.com
  10. www.martin.deimos.de.vu
  11. -----------------------------------------------------
  12. Depending Files:
  13. scripts/infocompcore.maki
  14. -----------------------------------------------------
  15. ---------------------------------------------------*/
  16. #ifndef included
  17. #error This script can only be compiled as a #include
  18. #endif
  19. Function _##CURR_COMP##_switchTo();
  20. Function _##CURR_COMP##_show();
  21. Function _##CURR_COMP##_hide();
  22. Function _##CURR_COMP##_onHide();
  23. Function _##CURR_COMP##_onShow();
  24. Function _##CURR_COMP##_dc_show();
  25. Function _##CURR_COMP##_dc_hide();
  26. Global Group _##CURR_COMP##_sui;
  27. Global Boolean _##CURR_COMP##_callback_hiding, _##CURR_COMP##_callback_showing;
  28. Global Boolean _##CURR_COMP##_showing, _##CURR_COMP##_hiding;
  29. _##CURR_COMP##_show()
  30. {
  31. debugString(DEBUG_PREFIX "_##CURR_COMP##_show() {", D_WTF);
  32. _##CURR_COMP##_showing = 1;
  33. GuiObject o = _##CURR_COMP##_sui;
  34. if (o != NULL)
  35. {
  36. bypasscancel = 1;
  37. if (o) o.show();
  38. bypasscancel = 0;
  39. debugString(DEBUG_PREFIX " --> ok", D_WTF);
  40. }
  41. #ifdef DEBUG
  42. else debugString(DEBUG_PREFIX " --> (!) ##CURR_COMP## object not provided (show)", D_WTF);
  43. #endif
  44. _##CURR_COMP##_onShow();
  45. _##CURR_COMP##_showing = 0;
  46. debugString(DEBUG_PREFIX "}", D_WTF);
  47. }
  48. _##CURR_COMP##_hide()
  49. {
  50. debugString(DEBUG_PREFIX "_##CURR_COMP##_hide() {", D_WTF);
  51. _##CURR_COMP##_hiding = 1;
  52. GuiObject o = _##CURR_COMP##_sui;
  53. if (o != NULL) {
  54. bypasscancel = 1;
  55. if (o) o.hide();
  56. bypasscancel = 0;
  57. debugString(DEBUG_PREFIX " --> ok", D_WTF);
  58. }
  59. #ifdef DEBUG
  60. else debugString(DEBUG_PREFIX " --> (!) ##CURR_COMP## object not provided (hide)", D_WTF);
  61. #endif
  62. _##CURR_COMP##_onHide();
  63. _##CURR_COMP##_hiding = 0;
  64. debugString(DEBUG_PREFIX "}", D_WTF);
  65. }
  66. _##CURR_COMP##_dc_show ()
  67. {
  68. debugString(DEBUG_PREFIX "_##CURR_COMP##__dc_show();", D_WTF);
  69. _##CURR_COMP##_callback_showing = 1;
  70. _##CURR_COMP##_callback_hiding = 0;
  71. callbackTimer.start();
  72. }
  73. _##CURR_COMP##_dc_hide()
  74. {
  75. _##CURR_COMP##_callback_showing = 0;
  76. _##CURR_COMP##_callback_hiding = 1;
  77. callbackTimer.start();
  78. }
  79. _##CURR_COMP##_onShow() {}
  80. _##CURR_COMP##_onHide() {}