Advertisement
snake5

sgs-ui - code generated by cppbc

Jun 5th, 2014
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 30.66 KB | None | 0 0
  1. // SGS/CPP-BC
  2. // warning: do not modify this file, it may be regenerated during any build
  3. // generated: 06/05/14 11:03:44
  4.  
  5. #include "src/ui_control.h"
  6.  
  7. int UIEvent::_sgs_destruct( SGS_CTX, sgs_VarObj* obj )
  8. {
  9.     static_cast<UIEvent*>( obj->data )->~UIEvent();
  10.     return SGS_SUCCESS;
  11. }
  12.  
  13. int UIEvent::_sgs_getindex( SGS_ARGS_GETINDEXFUNC )
  14. {
  15.     SGS_BEGIN_INDEXFUNC
  16.         SGS_CASE( "type" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->type ); return SGS_SUCCESS; }
  17.         SGS_CASE( "key" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->key ); return SGS_SUCCESS; }
  18.         SGS_CASE( "button" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->button ); return SGS_SUCCESS; }
  19.         SGS_CASE( "uchar" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->uchar ); return SGS_SUCCESS; }
  20.         SGS_CASE( "x" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->x ); return SGS_SUCCESS; }
  21.         SGS_CASE( "y" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->y ); return SGS_SUCCESS; }
  22.         SGS_CASE( "rx" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->rx ); return SGS_SUCCESS; }
  23.         SGS_CASE( "ry" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->ry ); return SGS_SUCCESS; }
  24.     SGS_END_INDEXFUNC;
  25. }
  26.  
  27. int UIEvent::_sgs_setindex( SGS_ARGS_SETINDEXFUNC )
  28. {
  29.     SGS_BEGIN_INDEXFUNC
  30.         SGS_CASE( "type" ){ static_cast<UIEvent*>( obj->data )->type = sgs_GetVarP<int>()( C, val ); return SGS_SUCCESS; }
  31.         SGS_CASE( "key" ){ static_cast<UIEvent*>( obj->data )->key = sgs_GetVarP<int>()( C, val ); return SGS_SUCCESS; }
  32.         SGS_CASE( "button" ){ static_cast<UIEvent*>( obj->data )->button = sgs_GetVarP<int>()( C, val ); return SGS_SUCCESS; }
  33.         SGS_CASE( "uchar" ){ static_cast<UIEvent*>( obj->data )->uchar = sgs_GetVarP<int>()( C, val ); return SGS_SUCCESS; }
  34.         SGS_CASE( "x" ){ static_cast<UIEvent*>( obj->data )->x = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  35.         SGS_CASE( "y" ){ static_cast<UIEvent*>( obj->data )->y = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  36.         SGS_CASE( "rx" ){ static_cast<UIEvent*>( obj->data )->rx = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  37.         SGS_CASE( "ry" ){ static_cast<UIEvent*>( obj->data )->ry = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  38.     SGS_END_INDEXFUNC;
  39. }
  40.  
  41. sgs_ObjInterface UIEvent::_sgs_interface[1] =
  42. {{
  43.     "UIEvent",
  44.     UIEvent::_sgs_destruct, NULL, UIEvent::_sgs_getindex, UIEvent::_sgs_setindex, NULL, NULL, NULL, NULL, NULL, NULL,
  45. }};
  46.  
  47.  
  48. static int _sgs_method__UIFrame__createControl( SGS_CTX )
  49. {
  50.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, createControl ) ) return 0;
  51.     sgs_PushVar(C,data->createControl( sgs_GetVar<sgsString>()(C,0) )); return 1;
  52. }
  53.  
  54. static int _sgs_method__UIFrame__event( SGS_CTX )
  55. {
  56.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, event ) ) return 0;
  57.     data->event( sgs_GetVarObj<UIEvent>()(C,0) ); return 0;
  58. }
  59.  
  60. static int _sgs_method__UIFrame__render( SGS_CTX )
  61. {
  62.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, render ) ) return 0;
  63.     data->render(  ); return 0;
  64. }
  65.  
  66. static int _sgs_method__UIFrame__handleMouseMove( SGS_CTX )
  67. {
  68.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, handleMouseMove ) ) return 0;
  69.     data->handleMouseMove(  ); return 0;
  70. }
  71.  
  72. static int _sgs_method__UIFrame__setFocus( SGS_CTX )
  73. {
  74.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, setFocus ) ) return 0;
  75.     data->setFocus( sgs_GetVarObj<UIControl>()(C,0) ); return 0;
  76. }
  77.  
  78. static int _sgs_method__UIFrame__doMouseMove( SGS_CTX )
  79. {
  80.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, doMouseMove ) ) return 0;
  81.     data->doMouseMove( sgs_GetVar<float>()(C,0), sgs_GetVar<float>()(C,1) ); return 0;
  82. }
  83.  
  84. static int _sgs_method__UIFrame__doMouseButton( SGS_CTX )
  85. {
  86.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, doMouseButton ) ) return 0;
  87.     data->doMouseButton( sgs_GetVar<int>()(C,0), sgs_GetVar<bool>()(C,1) ); return 0;
  88. }
  89.  
  90. static int _sgs_method__UIFrame__doMouseWheel( SGS_CTX )
  91. {
  92.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, doMouseWheel ) ) return 0;
  93.     data->doMouseWheel( sgs_GetVar<float>()(C,0), sgs_GetVar<float>()(C,1) ); return 0;
  94. }
  95.  
  96. static int _sgs_method__UIFrame__doKeyPress( SGS_CTX )
  97. {
  98.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, doKeyPress ) ) return 0;
  99.     data->doKeyPress( sgs_GetVar<int>()(C,0), sgs_GetVar<bool>()(C,1) ); return 0;
  100. }
  101.  
  102. static int _sgs_method__UIFrame__doPutChar( SGS_CTX )
  103. {
  104.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, doPutChar ) ) return 0;
  105.     data->doPutChar( sgs_GetVar<int>()(C,0) ); return 0;
  106. }
  107.  
  108. static int _sgs_method__UIFrame__setTimeout( SGS_CTX )
  109. {
  110.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, setTimeout ) ) return 0;
  111.     sgs_PushVar(C,data->setTimeout( sgs_GetVar<float>()(C,0), sgs_GetVar<sgsVariable>()(C,1) )); return 1;
  112. }
  113.  
  114. static int _sgs_method__UIFrame__setInterval( SGS_CTX )
  115. {
  116.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, setInterval ) ) return 0;
  117.     sgs_PushVar(C,data->setInterval( sgs_GetVar<float>()(C,0), sgs_GetVar<sgsVariable>()(C,1) )); return 1;
  118. }
  119.  
  120. static int _sgs_method__UIFrame__clearTimeout( SGS_CTX )
  121. {
  122.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, clearTimeout ) ) return 0;
  123.     data->clearTimeout( sgs_GetVar<int64_t>()(C,0) ); return 0;
  124. }
  125.  
  126. static int _sgs_method__UIFrame__clearInterval( SGS_CTX )
  127. {
  128.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, clearInterval ) ) return 0;
  129.     data->clearInterval( sgs_GetVar<int64_t>()(C,0) ); return 0;
  130. }
  131.  
  132. static int _sgs_method__UIFrame__processTimers( SGS_CTX )
  133. {
  134.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, processTimers ) ) return 0;
  135.     data->processTimers( sgs_GetVar<float>()(C,0) ); return 0;
  136. }
  137.  
  138. static int _sgs_method__UIFrame__pushScissorRect( SGS_CTX )
  139. {
  140.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, pushScissorRect ) ) return 0;
  141.     sgs_PushVar(C,data->pushScissorRect( sgs_GetVar<float>()(C,0), sgs_GetVar<float>()(C,1), sgs_GetVar<float>()(C,2), sgs_GetVar<float>()(C,3) )); return 1;
  142. }
  143.  
  144. static int _sgs_method__UIFrame__pushScissorRectUnclipped( SGS_CTX )
  145. {
  146.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, pushScissorRectUnclipped ) ) return 0;
  147.     sgs_PushVar(C,data->pushScissorRectUnclipped( sgs_GetVar<float>()(C,0), sgs_GetVar<float>()(C,1), sgs_GetVar<float>()(C,2), sgs_GetVar<float>()(C,3) )); return 1;
  148. }
  149.  
  150. static int _sgs_method__UIFrame__popScissorRect( SGS_CTX )
  151. {
  152.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, popScissorRect ) ) return 0;
  153.     sgs_PushVar(C,data->popScissorRect(  )); return 1;
  154. }
  155.  
  156. static int _sgs_method__UIFrame__getScissorRectCount( SGS_CTX )
  157. {
  158.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, getScissorRectCount ) ) return 0;
  159.     sgs_PushVar(C,data->getScissorRectCount(  )); return 1;
  160. }
  161.  
  162. static int _sgs_method__UIFrame__getClickOffsetX( SGS_CTX )
  163. {
  164.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, getClickOffsetX ) ) return 0;
  165.     sgs_PushVar(C,data->getClickOffsetX( sgs_GetVar<int>()(C,0) )); return 1;
  166. }
  167.  
  168. static int _sgs_method__UIFrame__getClickOffsetY( SGS_CTX )
  169. {
  170.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, getClickOffsetY ) ) return 0;
  171.     sgs_PushVar(C,data->getClickOffsetY( sgs_GetVar<int>()(C,0) )); return 1;
  172. }
  173.  
  174. static int _sgs_method__UIFrame__getHoverControl( SGS_CTX )
  175. {
  176.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, getHoverControl ) ) return 0;
  177.     sgs_PushVar(C,data->getHoverControl(  )); return 1;
  178. }
  179.  
  180. static int _sgs_method__UIFrame__getFocusControl( SGS_CTX )
  181. {
  182.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, getFocusControl ) ) return 0;
  183.     sgs_PushVar(C,data->getFocusControl(  )); return 1;
  184. }
  185.  
  186. static int _sgs_method__UIFrame__getControlUnderCursor( SGS_CTX )
  187. {
  188.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, getControlUnderCursor ) ) return 0;
  189.     sgs_PushVar(C,data->getControlUnderCursor(  )); return 1;
  190. }
  191.  
  192. static int _sgs_method__UIFrame__getControlUnderPoint( SGS_CTX )
  193. {
  194.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, getControlUnderPoint ) ) return 0;
  195.     sgs_PushVar(C,data->getControlUnderPoint( sgs_GetVar<float>()(C,0), sgs_GetVar<float>()(C,1) )); return 1;
  196. }
  197.  
  198. int UIFrame::_sgs_destruct( SGS_CTX, sgs_VarObj* obj )
  199. {
  200.     static_cast<UIFrame*>( obj->data )->~UIFrame();
  201.     return SGS_SUCCESS;
  202. }
  203.  
  204. int UIFrame::_sgs_getindex( SGS_ARGS_GETINDEXFUNC )
  205. {
  206.     SGS_BEGIN_INDEXFUNC
  207.         SGS_CASE( "createControl" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__createControl ); return SGS_SUCCESS; }
  208.         SGS_CASE( "event" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__event ); return SGS_SUCCESS; }
  209.         SGS_CASE( "render" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__render ); return SGS_SUCCESS; }
  210.         SGS_CASE( "handleMouseMove" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__handleMouseMove ); return SGS_SUCCESS; }
  211.         SGS_CASE( "setFocus" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__setFocus ); return SGS_SUCCESS; }
  212.         SGS_CASE( "doMouseMove" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__doMouseMove ); return SGS_SUCCESS; }
  213.         SGS_CASE( "doMouseButton" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__doMouseButton ); return SGS_SUCCESS; }
  214.         SGS_CASE( "doMouseWheel" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__doMouseWheel ); return SGS_SUCCESS; }
  215.         SGS_CASE( "doKeyPress" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__doKeyPress ); return SGS_SUCCESS; }
  216.         SGS_CASE( "doPutChar" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__doPutChar ); return SGS_SUCCESS; }
  217.         SGS_CASE( "setTimeout" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__setTimeout ); return SGS_SUCCESS; }
  218.         SGS_CASE( "setInterval" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__setInterval ); return SGS_SUCCESS; }
  219.         SGS_CASE( "clearTimeout" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__clearTimeout ); return SGS_SUCCESS; }
  220.         SGS_CASE( "clearInterval" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__clearInterval ); return SGS_SUCCESS; }
  221.         SGS_CASE( "processTimers" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__processTimers ); return SGS_SUCCESS; }
  222.         SGS_CASE( "pushScissorRect" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__pushScissorRect ); return SGS_SUCCESS; }
  223.         SGS_CASE( "pushScissorRectUnclipped" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__pushScissorRectUnclipped ); return SGS_SUCCESS; }
  224.         SGS_CASE( "popScissorRect" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__popScissorRect ); return SGS_SUCCESS; }
  225.         SGS_CASE( "getScissorRectCount" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__getScissorRectCount ); return SGS_SUCCESS; }
  226.         SGS_CASE( "getClickOffsetX" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__getClickOffsetX ); return SGS_SUCCESS; }
  227.         SGS_CASE( "getClickOffsetY" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__getClickOffsetY ); return SGS_SUCCESS; }
  228.         SGS_CASE( "getHoverControl" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__getHoverControl ); return SGS_SUCCESS; }
  229.         SGS_CASE( "getFocusControl" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__getFocusControl ); return SGS_SUCCESS; }
  230.         SGS_CASE( "getControlUnderCursor" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__getControlUnderCursor ); return SGS_SUCCESS; }
  231.         SGS_CASE( "getControlUnderPoint" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__getControlUnderPoint ); return SGS_SUCCESS; }
  232.         SGS_CASE( "render_image" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->render_image ); return SGS_SUCCESS; }
  233.         SGS_CASE( "render_text" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->render_text ); return SGS_SUCCESS; }
  234.         SGS_CASE( "scissor_func" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->scissor_func ); return SGS_SUCCESS; }
  235.         SGS_CASE( "clipboard_func" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->clipboard_func ); return SGS_SUCCESS; }
  236.         SGS_CASE( "cursor_func" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->cursor_func ); return SGS_SUCCESS; }
  237.         SGS_CASE( "theme" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->theme ); return SGS_SUCCESS; }
  238.         SGS_CASE( "x" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->x ); return SGS_SUCCESS; }
  239.         SGS_CASE( "y" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->y ); return SGS_SUCCESS; }
  240.         SGS_CASE( "width" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->width ); return SGS_SUCCESS; }
  241.         SGS_CASE( "height" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->height ); return SGS_SUCCESS; }
  242.         SGS_CASE( "root" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->root ); return SGS_SUCCESS; }
  243.         SGS_CASE( "mouseX" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->mouseX ); return SGS_SUCCESS; }
  244.         SGS_CASE( "mouseY" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->mouseY ); return SGS_SUCCESS; }
  245.     SGS_END_INDEXFUNC;
  246. }
  247.  
  248. int UIFrame::_sgs_setindex( SGS_ARGS_SETINDEXFUNC )
  249. {
  250.     SGS_BEGIN_INDEXFUNC
  251.         SGS_CASE( "render_image" ){ static_cast<UIFrame*>( obj->data )->render_image = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  252.         SGS_CASE( "render_text" ){ static_cast<UIFrame*>( obj->data )->render_text = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  253.         SGS_CASE( "scissor_func" ){ static_cast<UIFrame*>( obj->data )->scissor_func = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  254.         SGS_CASE( "clipboard_func" ){ static_cast<UIFrame*>( obj->data )->clipboard_func = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  255.         SGS_CASE( "cursor_func" ){ static_cast<UIFrame*>( obj->data )->cursor_func = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  256.         SGS_CASE( "theme" ){ static_cast<UIFrame*>( obj->data )->theme = sgs_GetVarP<sgsVariable>()( C, val );
  257.             static_cast<UIFrame*>( obj->data )->updateTheme(); return SGS_SUCCESS; }
  258.         SGS_CASE( "x" ){ static_cast<UIFrame*>( obj->data )->x = sgs_GetVarP<float>()( C, val );
  259.             static_cast<UIFrame*>( obj->data )->updateLayout(); return SGS_SUCCESS; }
  260.         SGS_CASE( "y" ){ static_cast<UIFrame*>( obj->data )->y = sgs_GetVarP<float>()( C, val );
  261.             static_cast<UIFrame*>( obj->data )->updateLayout(); return SGS_SUCCESS; }
  262.         SGS_CASE( "width" ){ static_cast<UIFrame*>( obj->data )->width = sgs_GetVarP<float>()( C, val );
  263.             static_cast<UIFrame*>( obj->data )->updateLayout(); return SGS_SUCCESS; }
  264.         SGS_CASE( "height" ){ static_cast<UIFrame*>( obj->data )->height = sgs_GetVarP<float>()( C, val );
  265.             static_cast<UIFrame*>( obj->data )->updateLayout(); return SGS_SUCCESS; }
  266.     SGS_END_INDEXFUNC;
  267. }
  268.  
  269. sgs_ObjInterface UIFrame::_sgs_interface[1] =
  270. {{
  271.     "UIFrame",
  272.     UIFrame::_sgs_destruct, UIFrame::sgs_gcmark, UIFrame::_sgs_getindex, UIFrame::_sgs_setindex, NULL, NULL, NULL, NULL, NULL, NULL,
  273. }};
  274.  
  275.  
  276. static int _sgs_method__UIControl__updateLayout( SGS_CTX )
  277. {
  278.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, updateLayout ) ) return 0;
  279.     data->updateLayout(  ); return 0;
  280. }
  281.  
  282. static int _sgs_method__UIControl__updateTheme( SGS_CTX )
  283. {
  284.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, updateTheme ) ) return 0;
  285.     data->updateTheme(  ); return 0;
  286. }
  287.  
  288. static int _sgs_method__UIControl__addChild( SGS_CTX )
  289. {
  290.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, addChild ) ) return 0;
  291.     sgs_PushVar(C,data->addChild( sgs_GetVar<UIControl::Handle>()(C,0) )); return 1;
  292. }
  293.  
  294. static int _sgs_method__UIControl__removeChild( SGS_CTX )
  295. {
  296.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, removeChild ) ) return 0;
  297.     sgs_PushVar(C,data->removeChild( sgs_GetVar<UIControl::Handle>()(C,0) )); return 1;
  298. }
  299.  
  300. static int _sgs_method__UIControl__findChild( SGS_CTX )
  301. {
  302.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, findChild ) ) return 0;
  303.     sgs_PushVar(C,data->findChild( sgs_GetVar<sgsString>()(C,0) )); return 1;
  304. }
  305.  
  306. static int _sgs_method__UIControl__children( SGS_CTX )
  307. {
  308.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, children ) ) return 0;
  309.     sgs_PushVar(C,data->children( sgs_GetVar<bool>()(C,0) )); return 1;
  310. }
  311.  
  312. static int _sgs_method__UIControl__sortChildren( SGS_CTX )
  313. {
  314.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, sortChildren ) ) return 0;
  315.     data->sortChildren(  ); return 0;
  316. }
  317.  
  318. static int _sgs_method__UIControl__sortSiblings( SGS_CTX )
  319. {
  320.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, sortSiblings ) ) return 0;
  321.     data->sortSiblings(  ); return 0;
  322. }
  323.  
  324. static int _sgs_method__UIControl__setAnchorMode( SGS_CTX )
  325. {
  326.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, setAnchorMode ) ) return 0;
  327.     data->setAnchorMode( sgs_GetVar<int>()(C,0) ); return 0;
  328. }
  329.  
  330. static int _sgs_method__UIControl__bindEvent( SGS_CTX )
  331. {
  332.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, bindEvent ) ) return 0;
  333.     sgs_PushVar(C,data->bindEvent( sgs_GetVar<sgsString>()(C,0), sgs_GetVar<sgsVariable>()(C,1) )); return 1;
  334. }
  335.  
  336. static int _sgs_method__UIControl__unbindEvent( SGS_CTX )
  337. {
  338.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, unbindEvent ) ) return 0;
  339.     sgs_PushVar(C,data->unbindEvent( sgs_GetVar<sgsString>()(C,0), sgs_GetVar<sgsVariable>()(C,1) )); return 1;
  340. }
  341.  
  342. static int _sgs_method__UIControl__callEvent( SGS_CTX )
  343. {
  344.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, callEvent ) ) return 0;
  345.     sgs_PushVar(C,data->callEvent( sgs_GetVar<sgsString>()(C,0), sgs_GetVarObj<UIEvent>()(C,1) )); return 1;
  346. }
  347.  
  348. int UIControl::_sgs_destruct( SGS_CTX, sgs_VarObj* obj )
  349. {
  350.     static_cast<UIControl*>( obj->data )->~UIControl();
  351.     return SGS_SUCCESS;
  352. }
  353.  
  354. int UIControl::_sgs_getindex( SGS_ARGS_GETINDEXFUNC )
  355. {
  356.     SGS_BEGIN_INDEXFUNC
  357.         SGS_CASE( "updateLayout" ){ sgs_PushCFunction( C, _sgs_method__UIControl__updateLayout ); return SGS_SUCCESS; }
  358.         SGS_CASE( "updateTheme" ){ sgs_PushCFunction( C, _sgs_method__UIControl__updateTheme ); return SGS_SUCCESS; }
  359.         SGS_CASE( "addChild" ){ sgs_PushCFunction( C, _sgs_method__UIControl__addChild ); return SGS_SUCCESS; }
  360.         SGS_CASE( "removeChild" ){ sgs_PushCFunction( C, _sgs_method__UIControl__removeChild ); return SGS_SUCCESS; }
  361.         SGS_CASE( "findChild" ){ sgs_PushCFunction( C, _sgs_method__UIControl__findChild ); return SGS_SUCCESS; }
  362.         SGS_CASE( "children" ){ sgs_PushCFunction( C, _sgs_method__UIControl__children ); return SGS_SUCCESS; }
  363.         SGS_CASE( "sortChildren" ){ sgs_PushCFunction( C, _sgs_method__UIControl__sortChildren ); return SGS_SUCCESS; }
  364.         SGS_CASE( "sortSiblings" ){ sgs_PushCFunction( C, _sgs_method__UIControl__sortSiblings ); return SGS_SUCCESS; }
  365.         SGS_CASE( "setAnchorMode" ){ sgs_PushCFunction( C, _sgs_method__UIControl__setAnchorMode ); return SGS_SUCCESS; }
  366.         SGS_CASE( "bindEvent" ){ sgs_PushCFunction( C, _sgs_method__UIControl__bindEvent ); return SGS_SUCCESS; }
  367.         SGS_CASE( "unbindEvent" ){ sgs_PushCFunction( C, _sgs_method__UIControl__unbindEvent ); return SGS_SUCCESS; }
  368.         SGS_CASE( "callEvent" ){ sgs_PushCFunction( C, _sgs_method__UIControl__callEvent ); return SGS_SUCCESS; }
  369.         SGS_CASE( "id" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->id ); return SGS_SUCCESS; }
  370.         SGS_CASE( "name" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->name ); return SGS_SUCCESS; }
  371.         SGS_CASE( "caption" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->caption ); return SGS_SUCCESS; }
  372.         SGS_CASE( "x" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->x ); return SGS_SUCCESS; }
  373.         SGS_CASE( "y" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->y ); return SGS_SUCCESS; }
  374.         SGS_CASE( "width" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->width ); return SGS_SUCCESS; }
  375.         SGS_CASE( "height" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->height ); return SGS_SUCCESS; }
  376.         SGS_CASE( "q0x" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->q0x ); return SGS_SUCCESS; }
  377.         SGS_CASE( "q0y" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->q0y ); return SGS_SUCCESS; }
  378.         SGS_CASE( "q1x" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->q1x ); return SGS_SUCCESS; }
  379.         SGS_CASE( "q1y" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->q1y ); return SGS_SUCCESS; }
  380.         SGS_CASE( "scroll_x" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->scroll_x ); return SGS_SUCCESS; }
  381.         SGS_CASE( "scroll_y" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->scroll_y ); return SGS_SUCCESS; }
  382.         SGS_CASE( "nc_top" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->nc_top ); return SGS_SUCCESS; }
  383.         SGS_CASE( "nc_left" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->nc_left ); return SGS_SUCCESS; }
  384.         SGS_CASE( "nc_right" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->nc_right ); return SGS_SUCCESS; }
  385.         SGS_CASE( "nc_bottom" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->nc_bottom ); return SGS_SUCCESS; }
  386.         SGS_CASE( "visible" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->visible ); return SGS_SUCCESS; }
  387.         SGS_CASE( "index" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->index ); return SGS_SUCCESS; }
  388.         SGS_CASE( "topmost" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->topmost ); return SGS_SUCCESS; }
  389.         SGS_CASE( "nonclient" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->nonclient ); return SGS_SUCCESS; }
  390.         SGS_CASE( "minWidth" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->minWidth ); return SGS_SUCCESS; }
  391.         SGS_CASE( "maxWidth" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->maxWidth ); return SGS_SUCCESS; }
  392.         SGS_CASE( "minHeight" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->minHeight ); return SGS_SUCCESS; }
  393.         SGS_CASE( "maxHeight" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->maxHeight ); return SGS_SUCCESS; }
  394.         SGS_CASE( "marginLeft" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_get_marginLeft() ); return SGS_SUCCESS; }
  395.         SGS_CASE( "marginRight" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_get_marginRight() ); return SGS_SUCCESS; }
  396.         SGS_CASE( "marginTop" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_get_marginTop() ); return SGS_SUCCESS; }
  397.         SGS_CASE( "marginBottom" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_get_marginBottom() ); return SGS_SUCCESS; }
  398.         SGS_CASE( "type" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->type ); return SGS_SUCCESS; }
  399.         SGS_CASE( "parent" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->parent ); return SGS_SUCCESS; }
  400.         SGS_CASE( "frame" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->frame ); return SGS_SUCCESS; }
  401.         SGS_CASE( "cursor" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->cursor ); return SGS_SUCCESS; }
  402.         SGS_CASE( "callback" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->callback ); return SGS_SUCCESS; }
  403.         SGS_CASE( "renderfunc" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->renderfunc ); return SGS_SUCCESS; }
  404.         SGS_CASE( "data" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->data ); return SGS_SUCCESS; }
  405.         SGS_CASE( "_interface" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_interface ); return SGS_SUCCESS; }
  406.         SGS_CASE( "rx0" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->rx0 ); return SGS_SUCCESS; }
  407.         SGS_CASE( "rx1" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->rx1 ); return SGS_SUCCESS; }
  408.         SGS_CASE( "ry0" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->ry0 ); return SGS_SUCCESS; }
  409.         SGS_CASE( "ry1" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->ry1 ); return SGS_SUCCESS; }
  410.         SGS_CASE( "_updatingLayout" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_updatingLayout ); return SGS_SUCCESS; }
  411.         SGS_CASE( "_updatingMinMaxWH" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_updatingMinMaxWH ); return SGS_SUCCESS; }
  412.         SGS_CASE( "_whNoAuth" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_whNoAuth ); return SGS_SUCCESS; }
  413.         SGS_CASE( "mouseOn" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->mouseOn ); return SGS_SUCCESS; }
  414.         SGS_CASE( "clicked" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->clicked ); return SGS_SUCCESS; }
  415.         SGS_CASE( "keyboardFocus" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->keyboardFocus ); return SGS_SUCCESS; }
  416.     SGS_END_INDEXFUNC;
  417. }
  418.  
  419. int UIControl::_sgs_setindex( SGS_ARGS_SETINDEXFUNC )
  420. {
  421.     SGS_BEGIN_INDEXFUNC
  422.         SGS_CASE( "name" ){ static_cast<UIControl*>( obj->data )->name = sgs_GetVarP<sgsString>()( C, val ); return SGS_SUCCESS; }
  423.         SGS_CASE( "caption" ){ static_cast<UIControl*>( obj->data )->caption = sgs_GetVarP<sgsString>()( C, val ); return SGS_SUCCESS; }
  424.         SGS_CASE( "x" ){ static_cast<UIControl*>( obj->data )->x = sgs_GetVarP<float>()( C, val );
  425.             static_cast<UIControl*>( obj->data )->updateLayout(); return SGS_SUCCESS; }
  426.         SGS_CASE( "y" ){ static_cast<UIControl*>( obj->data )->y = sgs_GetVarP<float>()( C, val );
  427.             static_cast<UIControl*>( obj->data )->updateLayout(); return SGS_SUCCESS; }
  428.         SGS_CASE( "width" ){ static_cast<UIControl*>( obj->data )->_set_width( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  429.         SGS_CASE( "height" ){ static_cast<UIControl*>( obj->data )->_set_height( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  430.         SGS_CASE( "q0x" ){ static_cast<UIControl*>( obj->data )->q0x = sgs_GetVarP<float>()( C, val );
  431.             static_cast<UIControl*>( obj->data )->updateLayout(); return SGS_SUCCESS; }
  432.         SGS_CASE( "q0y" ){ static_cast<UIControl*>( obj->data )->q0y = sgs_GetVarP<float>()( C, val );
  433.             static_cast<UIControl*>( obj->data )->updateLayout(); return SGS_SUCCESS; }
  434.         SGS_CASE( "q1x" ){ static_cast<UIControl*>( obj->data )->q1x = sgs_GetVarP<float>()( C, val );
  435.             static_cast<UIControl*>( obj->data )->updateLayout(); return SGS_SUCCESS; }
  436.         SGS_CASE( "q1y" ){ static_cast<UIControl*>( obj->data )->q1y = sgs_GetVarP<float>()( C, val );
  437.             static_cast<UIControl*>( obj->data )->updateLayout(); return SGS_SUCCESS; }
  438.         SGS_CASE( "scroll_x" ){ static_cast<UIControl*>( obj->data )->scroll_x = sgs_GetVarP<float>()( C, val );
  439.             static_cast<UIControl*>( obj->data )->updateLayout(); return SGS_SUCCESS; }
  440.         SGS_CASE( "scroll_y" ){ static_cast<UIControl*>( obj->data )->scroll_y = sgs_GetVarP<float>()( C, val );
  441.             static_cast<UIControl*>( obj->data )->updateLayout(); return SGS_SUCCESS; }
  442.         SGS_CASE( "nc_top" ){ static_cast<UIControl*>( obj->data )->nc_top = sgs_GetVarP<float>()( C, val );
  443.             static_cast<UIControl*>( obj->data )->updateLayout(); return SGS_SUCCESS; }
  444.         SGS_CASE( "nc_left" ){ static_cast<UIControl*>( obj->data )->nc_left = sgs_GetVarP<float>()( C, val );
  445.             static_cast<UIControl*>( obj->data )->updateLayout(); return SGS_SUCCESS; }
  446.         SGS_CASE( "nc_right" ){ static_cast<UIControl*>( obj->data )->nc_right = sgs_GetVarP<float>()( C, val );
  447.             static_cast<UIControl*>( obj->data )->updateLayout(); return SGS_SUCCESS; }
  448.         SGS_CASE( "nc_bottom" ){ static_cast<UIControl*>( obj->data )->nc_bottom = sgs_GetVarP<float>()( C, val );
  449.             static_cast<UIControl*>( obj->data )->updateLayout(); return SGS_SUCCESS; }
  450.         SGS_CASE( "visible" ){ static_cast<UIControl*>( obj->data )->visible = sgs_GetVarP<bool>()( C, val );
  451.             static_cast<UIControl*>( obj->data )->updateLayout(); return SGS_SUCCESS; }
  452.         SGS_CASE( "index" ){ static_cast<UIControl*>( obj->data )->index = sgs_GetVarP<int>()( C, val );
  453.             static_cast<UIControl*>( obj->data )->sortSiblings(); return SGS_SUCCESS; }
  454.         SGS_CASE( "topmost" ){ static_cast<UIControl*>( obj->data )->topmost = sgs_GetVarP<bool>()( C, val );
  455.             static_cast<UIControl*>( obj->data )->sortSiblings(); return SGS_SUCCESS; }
  456.         SGS_CASE( "nonclient" ){ static_cast<UIControl*>( obj->data )->nonclient = sgs_GetVarP<bool>()( C, val );
  457.             static_cast<UIControl*>( obj->data )->updateLayout(); return SGS_SUCCESS; }
  458.         SGS_CASE( "minWidth" ){ static_cast<UIControl*>( obj->data )->_set_minWidth( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  459.         SGS_CASE( "maxWidth" ){ static_cast<UIControl*>( obj->data )->_set_maxWidth( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  460.         SGS_CASE( "minHeight" ){ static_cast<UIControl*>( obj->data )->_set_minHeight( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  461.         SGS_CASE( "maxHeight" ){ static_cast<UIControl*>( obj->data )->_set_maxHeight( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  462.         SGS_CASE( "marginLeft" ){ static_cast<UIControl*>( obj->data )->_set_marginLeft( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  463.         SGS_CASE( "marginRight" ){ static_cast<UIControl*>( obj->data )->_set_marginRight( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  464.         SGS_CASE( "marginTop" ){ static_cast<UIControl*>( obj->data )->_set_marginTop( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  465.         SGS_CASE( "marginBottom" ){ static_cast<UIControl*>( obj->data )->_set_marginBottom( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  466.         SGS_CASE( "type" ){ static_cast<UIControl*>( obj->data )->type = sgs_GetVarP<sgsString>()( C, val ); return SGS_SUCCESS; }
  467.         SGS_CASE( "cursor" ){ static_cast<UIControl*>( obj->data )->cursor = sgs_GetVarP<sgsVariable>()( C, val );
  468.             static_cast<UIControl*>( obj->data )->updateCursor(); return SGS_SUCCESS; }
  469.         SGS_CASE( "callback" ){ static_cast<UIControl*>( obj->data )->callback = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  470.         SGS_CASE( "renderfunc" ){ static_cast<UIControl*>( obj->data )->renderfunc = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  471.         SGS_CASE( "data" ){ static_cast<UIControl*>( obj->data )->data = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  472.         SGS_CASE( "_interface" ){ static_cast<UIControl*>( obj->data )->_interface = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  473.         SGS_CASE( "_updatingLayout" ){ static_cast<UIControl*>( obj->data )->_updatingLayout = sgs_GetVarP<bool>()( C, val ); return SGS_SUCCESS; }
  474.         SGS_CASE( "_updatingMinMaxWH" ){ static_cast<UIControl*>( obj->data )->_updatingMinMaxWH = sgs_GetVarP<bool>()( C, val ); return SGS_SUCCESS; }
  475.         SGS_CASE( "_whNoAuth" ){ static_cast<UIControl*>( obj->data )->_whNoAuth = sgs_GetVarP<bool>()( C, val ); return SGS_SUCCESS; }
  476.     SGS_END_INDEXFUNC;
  477. }
  478.  
  479. sgs_ObjInterface UIControl::_sgs_interface[1] =
  480. {{
  481.     "UIControl",
  482.     UIControl::_sgs_destruct, UIControl::sgs_gcmark, UIControl::sgs_getindex, UIControl::_sgs_setindex, NULL, NULL, NULL, NULL, NULL, NULL,
  483. }};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement