Advertisement
snake5

sgs-ui - current cppbc_ui_control.cpp

Sep 27th, 2014
387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 122.63 KB | None | 0 0
  1. // SGS/CPP-BC
  2. // warning: do not modify this file, it may be regenerated during any build
  3. // generated: 09/27/14 13:53:42
  4.  
  5. #include "src/ui_control.h"
  6.  
  7. int UIColor::_sgs_destruct( SGS_CTX, sgs_VarObj* obj )
  8. {
  9.     static_cast<UIColor*>( obj->data )->~UIColor();
  10.     return SGS_SUCCESS;
  11. }
  12.  
  13. int UIColor::_sgs_gcmark( SGS_CTX, sgs_VarObj* obj )
  14. {
  15.     return SGS_SUCCESS;
  16. }
  17.  
  18. int UIColor::_sgs_getindex( SGS_ARGS_GETINDEXFUNC )
  19. {
  20.     SGS_BEGIN_INDEXFUNC
  21.         SGS_CASE( "r" ){ sgs_PushVar( C, static_cast<UIColor*>( obj->data )->r ); return SGS_SUCCESS; }
  22.         SGS_CASE( "g" ){ sgs_PushVar( C, static_cast<UIColor*>( obj->data )->g ); return SGS_SUCCESS; }
  23.         SGS_CASE( "b" ){ sgs_PushVar( C, static_cast<UIColor*>( obj->data )->b ); return SGS_SUCCESS; }
  24.         SGS_CASE( "a" ){ sgs_PushVar( C, static_cast<UIColor*>( obj->data )->a ); return SGS_SUCCESS; }
  25.         SGS_CASE( "size" ){ sgs_PushVar( C, static_cast<UIColor*>( obj->data )->_get_size() ); return SGS_SUCCESS; }
  26.     SGS_END_INDEXFUNC;
  27. }
  28.  
  29. int UIColor::_sgs_setindex( SGS_ARGS_SETINDEXFUNC )
  30. {
  31.     SGS_BEGIN_INDEXFUNC
  32.         SGS_CASE( "r" ){ static_cast<UIColor*>( obj->data )->r = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  33.         SGS_CASE( "g" ){ static_cast<UIColor*>( obj->data )->g = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  34.         SGS_CASE( "b" ){ static_cast<UIColor*>( obj->data )->b = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  35.         SGS_CASE( "a" ){ static_cast<UIColor*>( obj->data )->a = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  36.     SGS_END_INDEXFUNC;
  37. }
  38.  
  39. int UIColor::_sgs_dump( SGS_CTX, sgs_VarObj* obj, int depth )
  40. {
  41.     char bfr[ 39 ];
  42.     sprintf( bfr, "UIColor (%p) %s", obj->data, depth > 0 ? "\n{" : " ..." );
  43.     sgs_PushString( C, bfr );
  44.     if( depth > 0 )
  45.     {
  46.         { sgs_PushString( C, "\nr = " ); sgs_DumpData( C, static_cast<UIColor*>( obj->data )->r, depth ).push( C ); }
  47.         { sgs_PushString( C, "\ng = " ); sgs_DumpData( C, static_cast<UIColor*>( obj->data )->g, depth ).push( C ); }
  48.         { sgs_PushString( C, "\nb = " ); sgs_DumpData( C, static_cast<UIColor*>( obj->data )->b, depth ).push( C ); }
  49.         { sgs_PushString( C, "\na = " ); sgs_DumpData( C, static_cast<UIColor*>( obj->data )->a, depth ).push( C ); }
  50.         { sgs_PushString( C, "\nsize = " ); sgs_DumpData( C, static_cast<UIColor*>( obj->data )->_get_size(), depth ).push( C ); }
  51.         sgs_StringConcat( C, 10 );
  52.         sgs_PadString( C );
  53.         sgs_PushString( C, "\n}" );
  54.         sgs_StringConcat( C, 3 );
  55.     }
  56.     return SGS_SUCCESS;
  57. }
  58.  
  59. sgs_ObjInterface UIColor::_sgs_interface[1] =
  60. {{
  61.     "UIColor",
  62.     UIColor::_sgs_destruct, UIColor::_sgs_gcmark, UIColor::sgs_getindex, UIColor::_sgs_setindex, NULL, NULL, UIColor::_sgs_dump, NULL, NULL, UIColor::sgs_expr,
  63. }};
  64.  
  65.  
  66. int UIEvent::_sgs_destruct( SGS_CTX, sgs_VarObj* obj )
  67. {
  68.     static_cast<UIEvent*>( obj->data )->~UIEvent();
  69.     return SGS_SUCCESS;
  70. }
  71.  
  72. int UIEvent::_sgs_gcmark( SGS_CTX, sgs_VarObj* obj )
  73. {
  74.     return SGS_SUCCESS;
  75. }
  76.  
  77. int UIEvent::_sgs_getindex( SGS_ARGS_GETINDEXFUNC )
  78. {
  79.     SGS_BEGIN_INDEXFUNC
  80.         SGS_CASE( "type" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->type ); return SGS_SUCCESS; }
  81.         SGS_CASE( "key" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->key ); return SGS_SUCCESS; }
  82.         SGS_CASE( "subtype" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->key ); return SGS_SUCCESS; }
  83.         SGS_CASE( "button" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->key ); return SGS_SUCCESS; }
  84.         SGS_CASE( "uchar" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->uchar ); return SGS_SUCCESS; }
  85.         SGS_CASE( "clicks" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->uchar ); return SGS_SUCCESS; }
  86.         SGS_CASE( "x" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->x ); return SGS_SUCCESS; }
  87.         SGS_CASE( "y" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->y ); return SGS_SUCCESS; }
  88.         SGS_CASE( "rx" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->rx ); return SGS_SUCCESS; }
  89.         SGS_CASE( "ry" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->ry ); return SGS_SUCCESS; }
  90.         SGS_CASE( "target" ){ sgs_PushVar( C, static_cast<UIEvent*>( obj->data )->target ); return SGS_SUCCESS; }
  91.     SGS_END_INDEXFUNC;
  92. }
  93.  
  94. int UIEvent::_sgs_setindex( SGS_ARGS_SETINDEXFUNC )
  95. {
  96.     SGS_BEGIN_INDEXFUNC
  97.         SGS_CASE( "type" ){ static_cast<UIEvent*>( obj->data )->type = sgs_GetVarP<int>()( C, val ); return SGS_SUCCESS; }
  98.         SGS_CASE( "key" ){ static_cast<UIEvent*>( obj->data )->key = sgs_GetVarP<int>()( C, val ); return SGS_SUCCESS; }
  99.         SGS_CASE( "subtype" ){ static_cast<UIEvent*>( obj->data )->key = sgs_GetVarP<int>()( C, val ); return SGS_SUCCESS; }
  100.         SGS_CASE( "button" ){ static_cast<UIEvent*>( obj->data )->key = sgs_GetVarP<int>()( C, val ); return SGS_SUCCESS; }
  101.         SGS_CASE( "uchar" ){ static_cast<UIEvent*>( obj->data )->uchar = sgs_GetVarP<uint32_t>()( C, val ); return SGS_SUCCESS; }
  102.         SGS_CASE( "clicks" ){ static_cast<UIEvent*>( obj->data )->uchar = sgs_GetVarP<uint32_t>()( C, val ); return SGS_SUCCESS; }
  103.         SGS_CASE( "x" ){ static_cast<UIEvent*>( obj->data )->x = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  104.         SGS_CASE( "y" ){ static_cast<UIEvent*>( obj->data )->y = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  105.         SGS_CASE( "rx" ){ static_cast<UIEvent*>( obj->data )->rx = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  106.         SGS_CASE( "ry" ){ static_cast<UIEvent*>( obj->data )->ry = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  107.         SGS_CASE( "target" ){ static_cast<UIEvent*>( obj->data )->target = sgs_GetVarP<sgsHandle<struct UIControl> >()( C, val ); return SGS_SUCCESS; }
  108.     SGS_END_INDEXFUNC;
  109. }
  110.  
  111. int UIEvent::_sgs_dump( SGS_CTX, sgs_VarObj* obj, int depth )
  112. {
  113.     char bfr[ 39 ];
  114.     sprintf( bfr, "UIEvent (%p) %s", obj->data, depth > 0 ? "\n{" : " ..." );
  115.     sgs_PushString( C, bfr );
  116.     if( depth > 0 )
  117.     {
  118.         { sgs_PushString( C, "\ntype = " ); sgs_DumpData( C, static_cast<UIEvent*>( obj->data )->type, depth ).push( C ); }
  119.         { sgs_PushString( C, "\nkey = " ); sgs_DumpData( C, static_cast<UIEvent*>( obj->data )->key, depth ).push( C ); }
  120.         { sgs_PushString( C, "\nuchar = " ); sgs_DumpData( C, static_cast<UIEvent*>( obj->data )->uchar, depth ).push( C ); }
  121.         { sgs_PushString( C, "\nx = " ); sgs_DumpData( C, static_cast<UIEvent*>( obj->data )->x, depth ).push( C ); }
  122.         { sgs_PushString( C, "\ny = " ); sgs_DumpData( C, static_cast<UIEvent*>( obj->data )->y, depth ).push( C ); }
  123.         { sgs_PushString( C, "\nrx = " ); sgs_DumpData( C, static_cast<UIEvent*>( obj->data )->rx, depth ).push( C ); }
  124.         { sgs_PushString( C, "\nry = " ); sgs_DumpData( C, static_cast<UIEvent*>( obj->data )->ry, depth ).push( C ); }
  125.         { sgs_PushString( C, "\ntarget = " ); sgs_DumpData( C, static_cast<UIEvent*>( obj->data )->target, depth ).push( C ); }
  126.         sgs_StringConcat( C, 16 );
  127.         sgs_PadString( C );
  128.         sgs_PushString( C, "\n}" );
  129.         sgs_StringConcat( C, 3 );
  130.     }
  131.     return SGS_SUCCESS;
  132. }
  133.  
  134. sgs_ObjInterface UIEvent::_sgs_interface[1] =
  135. {{
  136.     "UIEvent",
  137.     UIEvent::_sgs_destruct, UIEvent::_sgs_gcmark, UIEvent::_sgs_getindex, UIEvent::_sgs_setindex, NULL, NULL, UIEvent::_sgs_dump, NULL, NULL, NULL,
  138. }};
  139.  
  140.  
  141. int UIStyle::_sgs_destruct( SGS_CTX, sgs_VarObj* obj )
  142. {
  143.     static_cast<UIStyle*>( obj->data )->~UIStyle();
  144.     return SGS_SUCCESS;
  145. }
  146.  
  147. int UIStyle::_sgs_gcmark( SGS_CTX, sgs_VarObj* obj )
  148. {
  149.     return SGS_SUCCESS;
  150. }
  151.  
  152. int UIStyle::_sgs_getindex( SGS_ARGS_GETINDEXFUNC )
  153. {
  154.     SGS_BEGIN_INDEXFUNC
  155.         SGS_CASE( "x" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->x ); return SGS_SUCCESS; }
  156.         SGS_CASE( "y" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->y ); return SGS_SUCCESS; }
  157.         SGS_CASE( "width" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->width ); return SGS_SUCCESS; }
  158.         SGS_CASE( "height" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->height ); return SGS_SUCCESS; }
  159.         SGS_CASE( "q0x" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->q0x ); return SGS_SUCCESS; }
  160.         SGS_CASE( "q0y" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->q0y ); return SGS_SUCCESS; }
  161.         SGS_CASE( "q1x" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->q1x ); return SGS_SUCCESS; }
  162.         SGS_CASE( "q1y" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->q1y ); return SGS_SUCCESS; }
  163.         SGS_CASE( "nonClientTop" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->nonClientTop ); return SGS_SUCCESS; }
  164.         SGS_CASE( "nonClientLeft" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->nonClientLeft ); return SGS_SUCCESS; }
  165.         SGS_CASE( "nonClientRight" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->nonClientRight ); return SGS_SUCCESS; }
  166.         SGS_CASE( "nonClientBottom" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->nonClientBottom ); return SGS_SUCCESS; }
  167.         SGS_CASE( "visible" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->visible ); return SGS_SUCCESS; }
  168.         SGS_CASE( "index" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->index ); return SGS_SUCCESS; }
  169.         SGS_CASE( "topmost" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->topmost ); return SGS_SUCCESS; }
  170.         SGS_CASE( "minWidth" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->minWidth ); return SGS_SUCCESS; }
  171.         SGS_CASE( "maxWidth" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->maxWidth ); return SGS_SUCCESS; }
  172.         SGS_CASE( "minHeight" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->minHeight ); return SGS_SUCCESS; }
  173.         SGS_CASE( "maxHeight" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->maxHeight ); return SGS_SUCCESS; }
  174.         SGS_CASE( "marginLeft" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->marginLeft ); return SGS_SUCCESS; }
  175.         SGS_CASE( "marginRight" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->marginRight ); return SGS_SUCCESS; }
  176.         SGS_CASE( "marginTop" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->marginTop ); return SGS_SUCCESS; }
  177.         SGS_CASE( "marginBottom" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->marginBottom ); return SGS_SUCCESS; }
  178.         SGS_CASE( "paddingLeft" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->paddingLeft ); return SGS_SUCCESS; }
  179.         SGS_CASE( "paddingRight" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->paddingRight ); return SGS_SUCCESS; }
  180.         SGS_CASE( "paddingTop" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->paddingTop ); return SGS_SUCCESS; }
  181.         SGS_CASE( "paddingBottom" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->paddingBottom ); return SGS_SUCCESS; }
  182.         SGS_CASE( "posMode" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->posMode ); return SGS_SUCCESS; }
  183.         SGS_CASE( "stackMode" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->stackMode ); return SGS_SUCCESS; }
  184.         SGS_CASE( "overflow" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->overflow ); return SGS_SUCCESS; }
  185.         SGS_CASE( "backgroundColor" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->backgroundColor ); return SGS_SUCCESS; }
  186.         SGS_CASE( "textColor" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->textColor ); return SGS_SUCCESS; }
  187.         SGS_CASE( "halign" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->halign ); return SGS_SUCCESS; }
  188.         SGS_CASE( "valign" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->valign ); return SGS_SUCCESS; }
  189.         SGS_CASE( "cursor" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->cursor ); return SGS_SUCCESS; }
  190.         SGS_CASE( "font" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->font ); return SGS_SUCCESS; }
  191.         SGS_CASE( "fontSize" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->fontSize ); return SGS_SUCCESS; }
  192.         SGS_CASE( "image" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->image ); return SGS_SUCCESS; }
  193.         SGS_CASE( "icon" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->icon ); return SGS_SUCCESS; }
  194.         SGS_CASE( "renderfunc" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->renderfunc ); return SGS_SUCCESS; }
  195.         SGS_CASE( "nonClientH" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->get_nonClientH() ); return SGS_SUCCESS; }
  196.         SGS_CASE( "nonClientV" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->get_nonClientV() ); return SGS_SUCCESS; }
  197.         SGS_CASE( "nonClient" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->get_nonClient() ); return SGS_SUCCESS; }
  198.         SGS_CASE( "marginH" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->get_marginH() ); return SGS_SUCCESS; }
  199.         SGS_CASE( "marginV" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->get_marginV() ); return SGS_SUCCESS; }
  200.         SGS_CASE( "margin" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->get_margin() ); return SGS_SUCCESS; }
  201.         SGS_CASE( "paddingH" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->get_paddingH() ); return SGS_SUCCESS; }
  202.         SGS_CASE( "paddingV" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->get_paddingV() ); return SGS_SUCCESS; }
  203.         SGS_CASE( "padding" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->get_padding() ); return SGS_SUCCESS; }
  204.         SGS_CASE( "anchorMode" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->get_anchorMode() ); return SGS_SUCCESS; }
  205.         SGS_CASE( "align" ){ sgs_PushVar( C, static_cast<UIStyle*>( obj->data )->get_align() ); return SGS_SUCCESS; }
  206.     SGS_END_INDEXFUNC;
  207. }
  208.  
  209. int UIStyle::_sgs_setindex( SGS_ARGS_SETINDEXFUNC )
  210. {
  211.     SGS_BEGIN_INDEXFUNC
  212.         SGS_CASE( "x" ){ static_cast<UIStyle*>( obj->data )->x = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  213.         SGS_CASE( "y" ){ static_cast<UIStyle*>( obj->data )->y = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  214.         SGS_CASE( "width" ){ static_cast<UIStyle*>( obj->data )->width = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  215.         SGS_CASE( "height" ){ static_cast<UIStyle*>( obj->data )->height = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  216.         SGS_CASE( "q0x" ){ static_cast<UIStyle*>( obj->data )->q0x = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  217.         SGS_CASE( "q0y" ){ static_cast<UIStyle*>( obj->data )->q0y = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  218.         SGS_CASE( "q1x" ){ static_cast<UIStyle*>( obj->data )->q1x = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  219.         SGS_CASE( "q1y" ){ static_cast<UIStyle*>( obj->data )->q1y = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  220.         SGS_CASE( "nonClientTop" ){ static_cast<UIStyle*>( obj->data )->nonClientTop = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  221.         SGS_CASE( "nonClientLeft" ){ static_cast<UIStyle*>( obj->data )->nonClientLeft = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  222.         SGS_CASE( "nonClientRight" ){ static_cast<UIStyle*>( obj->data )->nonClientRight = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  223.         SGS_CASE( "nonClientBottom" ){ static_cast<UIStyle*>( obj->data )->nonClientBottom = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  224.         SGS_CASE( "visible" ){ static_cast<UIStyle*>( obj->data )->visible = sgs_GetVarP<sgsMaybe<bool> >()( C, val ); return SGS_SUCCESS; }
  225.         SGS_CASE( "index" ){ static_cast<UIStyle*>( obj->data )->index = sgs_GetVarP<sgsMaybe<int> >()( C, val ); return SGS_SUCCESS; }
  226.         SGS_CASE( "topmost" ){ static_cast<UIStyle*>( obj->data )->topmost = sgs_GetVarP<sgsMaybe<bool> >()( C, val ); return SGS_SUCCESS; }
  227.         SGS_CASE( "minWidth" ){ static_cast<UIStyle*>( obj->data )->minWidth = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  228.         SGS_CASE( "maxWidth" ){ static_cast<UIStyle*>( obj->data )->maxWidth = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  229.         SGS_CASE( "minHeight" ){ static_cast<UIStyle*>( obj->data )->minHeight = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  230.         SGS_CASE( "maxHeight" ){ static_cast<UIStyle*>( obj->data )->maxHeight = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  231.         SGS_CASE( "marginLeft" ){ static_cast<UIStyle*>( obj->data )->marginLeft = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  232.         SGS_CASE( "marginRight" ){ static_cast<UIStyle*>( obj->data )->marginRight = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  233.         SGS_CASE( "marginTop" ){ static_cast<UIStyle*>( obj->data )->marginTop = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  234.         SGS_CASE( "marginBottom" ){ static_cast<UIStyle*>( obj->data )->marginBottom = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  235.         SGS_CASE( "paddingLeft" ){ static_cast<UIStyle*>( obj->data )->paddingLeft = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  236.         SGS_CASE( "paddingRight" ){ static_cast<UIStyle*>( obj->data )->paddingRight = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  237.         SGS_CASE( "paddingTop" ){ static_cast<UIStyle*>( obj->data )->paddingTop = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  238.         SGS_CASE( "paddingBottom" ){ static_cast<UIStyle*>( obj->data )->paddingBottom = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  239.         SGS_CASE( "posMode" ){ static_cast<UIStyle*>( obj->data )->posMode = sgs_GetVarP<sgsMaybe<int8_t> >()( C, val ); return SGS_SUCCESS; }
  240.         SGS_CASE( "stackMode" ){ static_cast<UIStyle*>( obj->data )->stackMode = sgs_GetVarP<sgsMaybe<int8_t> >()( C, val ); return SGS_SUCCESS; }
  241.         SGS_CASE( "overflow" ){ static_cast<UIStyle*>( obj->data )->overflow = sgs_GetVarP<sgsMaybe<bool> >()( C, val ); return SGS_SUCCESS; }
  242.         SGS_CASE( "backgroundColor" ){ static_cast<UIStyle*>( obj->data )->backgroundColor = sgs_GetVarP<sgsMaybe<UIColor> >()( C, val ); return SGS_SUCCESS; }
  243.         SGS_CASE( "textColor" ){ static_cast<UIStyle*>( obj->data )->textColor = sgs_GetVarP<sgsMaybe<UIColor> >()( C, val ); return SGS_SUCCESS; }
  244.         SGS_CASE( "halign" ){ static_cast<UIStyle*>( obj->data )->halign = sgs_GetVarP<sgsMaybe<uint16_t> >()( C, val ); return SGS_SUCCESS; }
  245.         SGS_CASE( "valign" ){ static_cast<UIStyle*>( obj->data )->valign = sgs_GetVarP<sgsMaybe<uint16_t> >()( C, val ); return SGS_SUCCESS; }
  246.         SGS_CASE( "cursor" ){ static_cast<UIStyle*>( obj->data )->cursor = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  247.         SGS_CASE( "font" ){ static_cast<UIStyle*>( obj->data )->font = sgs_GetVarP<sgsString>()( C, val ); return SGS_SUCCESS; }
  248.         SGS_CASE( "fontSize" ){ static_cast<UIStyle*>( obj->data )->fontSize = sgs_GetVarP<sgsMaybe<float> >()( C, val ); return SGS_SUCCESS; }
  249.         SGS_CASE( "image" ){ static_cast<UIStyle*>( obj->data )->image = sgs_GetVarP<sgsString>()( C, val ); return SGS_SUCCESS; }
  250.         SGS_CASE( "icon" ){ static_cast<UIStyle*>( obj->data )->icon = sgs_GetVarP<sgsString>()( C, val ); return SGS_SUCCESS; }
  251.         SGS_CASE( "renderfunc" ){ static_cast<UIStyle*>( obj->data )->renderfunc = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  252.         SGS_CASE( "nonClientH" ){ static_cast<UIStyle*>( obj->data )->set_nonClientH( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  253.         SGS_CASE( "nonClientV" ){ static_cast<UIStyle*>( obj->data )->set_nonClientV( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  254.         SGS_CASE( "nonClient" ){ static_cast<UIStyle*>( obj->data )->set_nonClient( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  255.         SGS_CASE( "marginH" ){ static_cast<UIStyle*>( obj->data )->set_marginH( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  256.         SGS_CASE( "marginV" ){ static_cast<UIStyle*>( obj->data )->set_marginV( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  257.         SGS_CASE( "margin" ){ static_cast<UIStyle*>( obj->data )->set_margin( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  258.         SGS_CASE( "paddingH" ){ static_cast<UIStyle*>( obj->data )->set_paddingH( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  259.         SGS_CASE( "paddingV" ){ static_cast<UIStyle*>( obj->data )->set_paddingV( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  260.         SGS_CASE( "padding" ){ static_cast<UIStyle*>( obj->data )->set_padding( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  261.         SGS_CASE( "anchorMode" ){ static_cast<UIStyle*>( obj->data )->set_anchorMode( sgs_GetVarP<int>()( C, val ) ); return SGS_SUCCESS; }
  262.         SGS_CASE( "align" ){ static_cast<UIStyle*>( obj->data )->set_align( sgs_GetVarP<uint16_t>()( C, val ) ); return SGS_SUCCESS; }
  263.     SGS_END_INDEXFUNC;
  264. }
  265.  
  266. int UIStyle::_sgs_dump( SGS_CTX, sgs_VarObj* obj, int depth )
  267. {
  268.     char bfr[ 39 ];
  269.     sprintf( bfr, "UIStyle (%p) %s", obj->data, depth > 0 ? "\n{" : " ..." );
  270.     sgs_PushString( C, bfr );
  271.     if( depth > 0 )
  272.     {
  273.         { sgs_PushString( C, "\nx = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->x, depth ).push( C ); }
  274.         { sgs_PushString( C, "\ny = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->y, depth ).push( C ); }
  275.         { sgs_PushString( C, "\nwidth = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->width, depth ).push( C ); }
  276.         { sgs_PushString( C, "\nheight = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->height, depth ).push( C ); }
  277.         { sgs_PushString( C, "\nq0x = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->q0x, depth ).push( C ); }
  278.         { sgs_PushString( C, "\nq0y = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->q0y, depth ).push( C ); }
  279.         { sgs_PushString( C, "\nq1x = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->q1x, depth ).push( C ); }
  280.         { sgs_PushString( C, "\nq1y = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->q1y, depth ).push( C ); }
  281.         { sgs_PushString( C, "\nnonClientTop = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->nonClientTop, depth ).push( C ); }
  282.         { sgs_PushString( C, "\nnonClientLeft = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->nonClientLeft, depth ).push( C ); }
  283.         { sgs_PushString( C, "\nnonClientRight = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->nonClientRight, depth ).push( C ); }
  284.         { sgs_PushString( C, "\nnonClientBottom = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->nonClientBottom, depth ).push( C ); }
  285.         { sgs_PushString( C, "\nvisible = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->visible, depth ).push( C ); }
  286.         { sgs_PushString( C, "\nindex = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->index, depth ).push( C ); }
  287.         { sgs_PushString( C, "\ntopmost = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->topmost, depth ).push( C ); }
  288.         { sgs_PushString( C, "\nminWidth = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->minWidth, depth ).push( C ); }
  289.         { sgs_PushString( C, "\nmaxWidth = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->maxWidth, depth ).push( C ); }
  290.         { sgs_PushString( C, "\nminHeight = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->minHeight, depth ).push( C ); }
  291.         { sgs_PushString( C, "\nmaxHeight = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->maxHeight, depth ).push( C ); }
  292.         { sgs_PushString( C, "\nmarginLeft = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->marginLeft, depth ).push( C ); }
  293.         { sgs_PushString( C, "\nmarginRight = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->marginRight, depth ).push( C ); }
  294.         { sgs_PushString( C, "\nmarginTop = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->marginTop, depth ).push( C ); }
  295.         { sgs_PushString( C, "\nmarginBottom = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->marginBottom, depth ).push( C ); }
  296.         { sgs_PushString( C, "\npaddingLeft = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->paddingLeft, depth ).push( C ); }
  297.         { sgs_PushString( C, "\npaddingRight = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->paddingRight, depth ).push( C ); }
  298.         { sgs_PushString( C, "\npaddingTop = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->paddingTop, depth ).push( C ); }
  299.         { sgs_PushString( C, "\npaddingBottom = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->paddingBottom, depth ).push( C ); }
  300.         { sgs_PushString( C, "\nposMode = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->posMode, depth ).push( C ); }
  301.         { sgs_PushString( C, "\nstackMode = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->stackMode, depth ).push( C ); }
  302.         { sgs_PushString( C, "\noverflow = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->overflow, depth ).push( C ); }
  303.         { sgs_PushString( C, "\nbackgroundColor = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->backgroundColor, depth ).push( C ); }
  304.         { sgs_PushString( C, "\ntextColor = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->textColor, depth ).push( C ); }
  305.         { sgs_PushString( C, "\nhalign = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->halign, depth ).push( C ); }
  306.         { sgs_PushString( C, "\nvalign = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->valign, depth ).push( C ); }
  307.         { sgs_PushString( C, "\ncursor = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->cursor, depth ).push( C ); }
  308.         { sgs_PushString( C, "\nfont = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->font, depth ).push( C ); }
  309.         { sgs_PushString( C, "\nfontSize = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->fontSize, depth ).push( C ); }
  310.         { sgs_PushString( C, "\nimage = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->image, depth ).push( C ); }
  311.         { sgs_PushString( C, "\nicon = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->icon, depth ).push( C ); }
  312.         { sgs_PushString( C, "\nrenderfunc = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->renderfunc, depth ).push( C ); }
  313.         { sgs_PushString( C, "\nnonClientH = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->get_nonClientH(), depth ).push( C ); }
  314.         { sgs_PushString( C, "\nnonClientV = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->get_nonClientV(), depth ).push( C ); }
  315.         { sgs_PushString( C, "\nnonClient = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->get_nonClient(), depth ).push( C ); }
  316.         { sgs_PushString( C, "\nmarginH = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->get_marginH(), depth ).push( C ); }
  317.         { sgs_PushString( C, "\nmarginV = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->get_marginV(), depth ).push( C ); }
  318.         { sgs_PushString( C, "\nmargin = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->get_margin(), depth ).push( C ); }
  319.         { sgs_PushString( C, "\npaddingH = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->get_paddingH(), depth ).push( C ); }
  320.         { sgs_PushString( C, "\npaddingV = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->get_paddingV(), depth ).push( C ); }
  321.         { sgs_PushString( C, "\npadding = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->get_padding(), depth ).push( C ); }
  322.         { sgs_PushString( C, "\nanchorMode = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->get_anchorMode(), depth ).push( C ); }
  323.         { sgs_PushString( C, "\nalign = " ); sgs_DumpData( C, static_cast<UIStyle*>( obj->data )->get_align(), depth ).push( C ); }
  324.         sgs_StringConcat( C, 102 );
  325.         sgs_PadString( C );
  326.         sgs_PushString( C, "\n}" );
  327.         sgs_StringConcat( C, 3 );
  328.     }
  329.     return SGS_SUCCESS;
  330. }
  331.  
  332. sgs_ObjInterface UIStyle::_sgs_interface[1] =
  333. {{
  334.     "UIStyle",
  335.     UIStyle::_sgs_destruct, UIStyle::_sgs_gcmark, UIStyle::_sgs_getindex, UIStyle::_sgs_setindex, NULL, NULL, UIStyle::_sgs_dump, NULL, NULL, NULL,
  336. }};
  337.  
  338.  
  339. static int _sgs_method__UIStyleRule__addSelector( SGS_CTX )
  340. {
  341.     UIStyleRule* data; if( !SGS_PARSE_METHOD( C, UIStyleRule::_sgs_interface, data, UIStyleRule, addSelector ) ) return 0;
  342.     return data->addSelector( sgs_GetVar<sgsString>()(C,0) );
  343. }
  344.  
  345. static int _sgs_method__UIStyleRule__addSelectors( SGS_CTX )
  346. {
  347.     UIStyleRule* data; if( !SGS_PARSE_METHOD( C, UIStyleRule::_sgs_interface, data, UIStyleRule, addSelectors ) ) return 0;
  348.     return data->addSelectors( sgs_GetVar<sgsString>()(C,0) );
  349. }
  350.  
  351. static int _sgs_method__UIStyleRule__checkMatch( SGS_CTX )
  352. {
  353.     UIStyleRule* data; if( !SGS_PARSE_METHOD( C, UIStyleRule::_sgs_interface, data, UIStyleRule, checkMatch ) ) return 0;
  354.     sgs_PushVar(C,data->checkMatch( sgs_GetVar<sgsHandle< struct UIControl > >()(C,0) )); return 1;
  355. }
  356.  
  357. int UIStyleRule::_sgs_destruct( SGS_CTX, sgs_VarObj* obj )
  358. {
  359.     static_cast<UIStyleRule*>( obj->data )->~UIStyleRule();
  360.     return SGS_SUCCESS;
  361. }
  362.  
  363. int UIStyleRule::_sgs_gcmark( SGS_CTX, sgs_VarObj* obj )
  364. {
  365.     return SGS_SUCCESS;
  366. }
  367.  
  368. int UIStyleRule::_sgs_getindex( SGS_ARGS_GETINDEXFUNC )
  369. {
  370.     SGS_BEGIN_INDEXFUNC
  371.         SGS_CASE( "style" ){ sgs_PushVar( C, static_cast<UIStyleRule*>( obj->data )->style ); return SGS_SUCCESS; }
  372.         SGS_CASE( "addSelector" ){ sgs_PushCFunction( C, _sgs_method__UIStyleRule__addSelector ); return SGS_SUCCESS; }
  373.         SGS_CASE( "addSelectors" ){ sgs_PushCFunction( C, _sgs_method__UIStyleRule__addSelectors ); return SGS_SUCCESS; }
  374.         SGS_CASE( "checkMatch" ){ sgs_PushCFunction( C, _sgs_method__UIStyleRule__checkMatch ); return SGS_SUCCESS; }
  375.     SGS_END_INDEXFUNC;
  376. }
  377.  
  378. int UIStyleRule::_sgs_setindex( SGS_ARGS_SETINDEXFUNC )
  379. {
  380.     SGS_BEGIN_INDEXFUNC
  381.         SGS_CASE( "style" ){ static_cast<UIStyleRule*>( obj->data )->style = sgs_GetVarP<UIStyle>()( C, val ); return SGS_SUCCESS; }
  382.     SGS_END_INDEXFUNC;
  383. }
  384.  
  385. int UIStyleRule::_sgs_dump( SGS_CTX, sgs_VarObj* obj, int depth )
  386. {
  387.     char bfr[ 43 ];
  388.     sprintf( bfr, "UIStyleRule (%p) %s", obj->data, depth > 0 ? "\n{" : " ..." );
  389.     sgs_PushString( C, bfr );
  390.     if( depth > 0 )
  391.     {
  392.         { sgs_PushString( C, "\nstyle = " ); sgs_DumpData( C, static_cast<UIStyleRule*>( obj->data )->style, depth ).push( C ); }
  393.         sgs_StringConcat( C, 2 );
  394.         sgs_PadString( C );
  395.         sgs_PushString( C, "\n}" );
  396.         sgs_StringConcat( C, 3 );
  397.     }
  398.     return SGS_SUCCESS;
  399. }
  400.  
  401. sgs_ObjInterface UIStyleRule::_sgs_interface[1] =
  402. {{
  403.     "UIStyleRule",
  404.     UIStyleRule::_sgs_destruct, UIStyleRule::_sgs_gcmark, UIStyleRule::_sgs_getindex, UIStyleRule::_sgs_setindex, NULL, NULL, UIStyleRule::_sgs_dump, NULL, NULL, NULL,
  405. }};
  406.  
  407.  
  408. static int _sgs_method__UIStyleSheet__addRule( SGS_CTX )
  409. {
  410.     UIStyleSheet* data; if( !SGS_PARSE_METHOD( C, UIStyleSheet::_sgs_interface, data, UIStyleSheet, addRule ) ) return 0;
  411.     return data->addRule( sgs_GetVar<UIStyleRule::Handle>()(C,0) );
  412. }
  413.  
  414. static int _sgs_method__UIStyleSheet__build( SGS_CTX )
  415. {
  416.     UIStyleSheet* data; if( !SGS_PARSE_METHOD( C, UIStyleSheet::_sgs_interface, data, UIStyleSheet, build ) ) return 0;
  417.     data->build( sgs_GetVar<sgsVariable>()(C,0) ); return 0;
  418. }
  419.  
  420. int UIStyleSheet::_sgs_destruct( SGS_CTX, sgs_VarObj* obj )
  421. {
  422.     static_cast<UIStyleSheet*>( obj->data )->~UIStyleSheet();
  423.     return SGS_SUCCESS;
  424. }
  425.  
  426. int UIStyleSheet::_sgs_gcmark( SGS_CTX, sgs_VarObj* obj )
  427. {
  428.     return SGS_SUCCESS;
  429. }
  430.  
  431. int UIStyleSheet::_sgs_getindex( SGS_ARGS_GETINDEXFUNC )
  432. {
  433.     SGS_BEGIN_INDEXFUNC
  434.         SGS_CASE( "ruleCount" ){ sgs_PushVar( C, static_cast<UIStyleSheet*>( obj->data )->_get_ruleCount() ); return SGS_SUCCESS; }
  435.         SGS_CASE( "addRule" ){ sgs_PushCFunction( C, _sgs_method__UIStyleSheet__addRule ); return SGS_SUCCESS; }
  436.         SGS_CASE( "build" ){ sgs_PushCFunction( C, _sgs_method__UIStyleSheet__build ); return SGS_SUCCESS; }
  437.     SGS_END_INDEXFUNC;
  438. }
  439.  
  440. int UIStyleSheet::_sgs_setindex( SGS_ARGS_SETINDEXFUNC )
  441. {
  442.     SGS_BEGIN_INDEXFUNC
  443.     SGS_END_INDEXFUNC;
  444. }
  445.  
  446. int UIStyleSheet::_sgs_dump( SGS_CTX, sgs_VarObj* obj, int depth )
  447. {
  448.     char bfr[ 44 ];
  449.     sprintf( bfr, "UIStyleSheet (%p) %s", obj->data, depth > 0 ? "\n{" : " ..." );
  450.     sgs_PushString( C, bfr );
  451.     if( depth > 0 )
  452.     {
  453.         { sgs_PushString( C, "\nruleCount = " ); sgs_DumpData( C, static_cast<UIStyleSheet*>( obj->data )->_get_ruleCount(), depth ).push( C ); }
  454.         sgs_StringConcat( C, 2 );
  455.         sgs_PadString( C );
  456.         sgs_PushString( C, "\n}" );
  457.         sgs_StringConcat( C, 3 );
  458.     }
  459.     return SGS_SUCCESS;
  460. }
  461.  
  462. sgs_ObjInterface UIStyleSheet::_sgs_interface[1] =
  463. {{
  464.     "UIStyleSheet",
  465.     UIStyleSheet::_sgs_destruct, UIStyleSheet::sgs_gcmark, UIStyleSheet::_sgs_getindex, UIStyleSheet::_sgs_setindex, NULL, NULL, UIStyleSheet::_sgs_dump, NULL, NULL, NULL,
  466. }};
  467.  
  468.  
  469. static int _sgs_method__UIFrame__createControl( SGS_CTX )
  470. {
  471.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, createControl ) ) return 0;
  472.     sgs_PushVar(C,data->createControl( sgs_GetVar<sgsString>()(C,0) )); return 1;
  473. }
  474.  
  475. static int _sgs_method__UIFrame__find( SGS_CTX )
  476. {
  477.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, find ) ) return 0;
  478.     sgs_PushVar(C,data->find(  )); return 1;
  479. }
  480.  
  481. static int _sgs_method__UIFrame__event( SGS_CTX )
  482. {
  483.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, event ) ) return 0;
  484.     data->event( sgs_GetVar<sgsVariable>()(C,0) ); return 0;
  485. }
  486.  
  487. static int _sgs_method__UIFrame__render( SGS_CTX )
  488. {
  489.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, render ) ) return 0;
  490.     data->render(  ); return 0;
  491. }
  492.  
  493. static int _sgs_method__UIFrame__handleMouseMove( SGS_CTX )
  494. {
  495.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, handleMouseMove ) ) return 0;
  496.     data->handleMouseMove( sgs_GetVar<bool>()(C,0) ); return 0;
  497. }
  498.  
  499. static int _sgs_method__UIFrame__setFocus( SGS_CTX )
  500. {
  501.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, setFocus ) ) return 0;
  502.     data->setFocus( sgs_GetVarObj<UIControl>()(C,0) ); return 0;
  503. }
  504.  
  505. static int _sgs_method__UIFrame__doMouseMove( SGS_CTX )
  506. {
  507.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, doMouseMove ) ) return 0;
  508.     data->doMouseMove( sgs_GetVar<float>()(C,0), sgs_GetVar<float>()(C,1) ); return 0;
  509. }
  510.  
  511. static int _sgs_method__UIFrame__doMouseButton( SGS_CTX )
  512. {
  513.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, doMouseButton ) ) return 0;
  514.     data->doMouseButton( sgs_GetVar<int>()(C,0), sgs_GetVar<bool>()(C,1) ); return 0;
  515. }
  516.  
  517. static int _sgs_method__UIFrame__doMouseWheel( SGS_CTX )
  518. {
  519.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, doMouseWheel ) ) return 0;
  520.     data->doMouseWheel( sgs_GetVar<float>()(C,0), sgs_GetVar<float>()(C,1) ); return 0;
  521. }
  522.  
  523. static int _sgs_method__UIFrame__doKeyPress( SGS_CTX )
  524. {
  525.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, doKeyPress ) ) return 0;
  526.     data->doKeyPress( sgs_GetVar<int>()(C,0), sgs_GetVar<bool>()(C,1) ); return 0;
  527. }
  528.  
  529. static int _sgs_method__UIFrame__doPutChar( SGS_CTX )
  530. {
  531.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, doPutChar ) ) return 0;
  532.     data->doPutChar( sgs_GetVar<int>()(C,0) ); return 0;
  533. }
  534.  
  535. static int _sgs_method__UIFrame__setTimeout( SGS_CTX )
  536. {
  537.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, setTimeout ) ) return 0;
  538.     sgs_PushVar(C,data->setTimeout( sgs_GetVar<float>()(C,0), sgs_GetVar<sgsVariable>()(C,1) )); return 1;
  539. }
  540.  
  541. static int _sgs_method__UIFrame__setInterval( SGS_CTX )
  542. {
  543.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, setInterval ) ) return 0;
  544.     sgs_PushVar(C,data->setInterval( sgs_GetVar<float>()(C,0), sgs_GetVar<sgsVariable>()(C,1) )); return 1;
  545. }
  546.  
  547. static int _sgs_method__UIFrame__clearTimeout( SGS_CTX )
  548. {
  549.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, clearTimeout ) ) return 0;
  550.     data->clearTimeout( sgs_GetVar<int64_t>()(C,0) ); return 0;
  551. }
  552.  
  553. static int _sgs_method__UIFrame__clearInterval( SGS_CTX )
  554. {
  555.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, clearInterval ) ) return 0;
  556.     data->clearInterval( sgs_GetVar<int64_t>()(C,0) ); return 0;
  557. }
  558.  
  559. static int _sgs_method__UIFrame__processTimers( SGS_CTX )
  560. {
  561.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, processTimers ) ) return 0;
  562.     data->processTimers( sgs_GetVar<float>()(C,0) ); return 0;
  563. }
  564.  
  565. static int _sgs_method__UIFrame__pushScissorRect( SGS_CTX )
  566. {
  567.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, pushScissorRect ) ) return 0;
  568.     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;
  569. }
  570.  
  571. static int _sgs_method__UIFrame__pushScissorRectUnclipped( SGS_CTX )
  572. {
  573.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, pushScissorRectUnclipped ) ) return 0;
  574.     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;
  575. }
  576.  
  577. static int _sgs_method__UIFrame__popScissorRect( SGS_CTX )
  578. {
  579.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, popScissorRect ) ) return 0;
  580.     sgs_PushVar(C,data->popScissorRect(  )); return 1;
  581. }
  582.  
  583. static int _sgs_method__UIFrame__getScissorRectCount( SGS_CTX )
  584. {
  585.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, getScissorRectCount ) ) return 0;
  586.     sgs_PushVar(C,data->getScissorRectCount(  )); return 1;
  587. }
  588.  
  589. static int _sgs_method__UIFrame__addStyleSheet( SGS_CTX )
  590. {
  591.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, addStyleSheet ) ) return 0;
  592.     data->addStyleSheet( sgs_GetVar<UIStyleSheet::Handle>()(C,0) ); return 0;
  593. }
  594.  
  595. static int _sgs_method__UIFrame__removeStyleSheet( SGS_CTX )
  596. {
  597.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, removeStyleSheet ) ) return 0;
  598.     data->removeStyleSheet( sgs_GetVar<UIStyleSheet::Handle>()(C,0) ); return 0;
  599. }
  600.  
  601. static int _sgs_method__UIFrame__getStyleSheets( SGS_CTX )
  602. {
  603.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, getStyleSheets ) ) return 0;
  604.     sgs_PushVar(C,data->getStyleSheets(  )); return 1;
  605. }
  606.  
  607. static int _sgs_method__UIFrame__getStyleSheet( SGS_CTX )
  608. {
  609.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, getStyleSheet ) ) return 0;
  610.     sgs_PushVar(C,data->getStyleSheet( sgs_GetVar<size_t>()(C,0) )); return 1;
  611. }
  612.  
  613. static int _sgs_method__UIFrame__getStyleSheetCount( SGS_CTX )
  614. {
  615.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, getStyleSheetCount ) ) return 0;
  616.     sgs_PushVar(C,data->getStyleSheetCount(  )); return 1;
  617. }
  618.  
  619. static int _sgs_method__UIFrame__getClickOffsetX( SGS_CTX )
  620. {
  621.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, getClickOffsetX ) ) return 0;
  622.     sgs_PushVar(C,data->getClickOffsetX( sgs_GetVar<int>()(C,0) )); return 1;
  623. }
  624.  
  625. static int _sgs_method__UIFrame__getClickOffsetY( SGS_CTX )
  626. {
  627.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, getClickOffsetY ) ) return 0;
  628.     sgs_PushVar(C,data->getClickOffsetY( sgs_GetVar<int>()(C,0) )); return 1;
  629. }
  630.  
  631. static int _sgs_method__UIFrame__getHoverControl( SGS_CTX )
  632. {
  633.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, getHoverControl ) ) return 0;
  634.     sgs_PushVar(C,data->getHoverControl(  )); return 1;
  635. }
  636.  
  637. static int _sgs_method__UIFrame__getFocusControl( SGS_CTX )
  638. {
  639.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, getFocusControl ) ) return 0;
  640.     sgs_PushVar(C,data->getFocusControl(  )); return 1;
  641. }
  642.  
  643. static int _sgs_method__UIFrame__getControlUnderCursor( SGS_CTX )
  644. {
  645.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, getControlUnderCursor ) ) return 0;
  646.     sgs_PushVar(C,data->getControlUnderCursor(  )); return 1;
  647. }
  648.  
  649. static int _sgs_method__UIFrame__getControlUnderPoint( SGS_CTX )
  650. {
  651.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, getControlUnderPoint ) ) return 0;
  652.     sgs_PushVar(C,data->getControlUnderPoint( sgs_GetVar<float>()(C,0), sgs_GetVar<float>()(C,1) )); return 1;
  653. }
  654.  
  655. static int _sgs_method__UIFrame__isControlUnderCursor( SGS_CTX )
  656. {
  657.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, isControlUnderCursor ) ) return 0;
  658.     sgs_PushVar(C,data->isControlUnderCursor( sgs_GetVar<sgsHandle< UIControl > >()(C,0) )); return 1;
  659. }
  660.  
  661. static int _sgs_method__UIFrame__isControlUnderPoint( SGS_CTX )
  662. {
  663.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, isControlUnderPoint ) ) return 0;
  664.     sgs_PushVar(C,data->isControlUnderPoint( sgs_GetVar<sgsHandle< UIControl > >()(C,0), sgs_GetVar<float>()(C,1), sgs_GetVar<float>()(C,2) )); return 1;
  665. }
  666.  
  667. static int _sgs_method__UIFrame__setTheme( SGS_CTX )
  668. {
  669.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, setTheme ) ) return 0;
  670.     data->setTheme( sgs_GetVar<sgsVariable>()(C,0) ); return 0;
  671. }
  672.  
  673. static int _sgs_method__UIFrame__resize( SGS_CTX )
  674. {
  675.     UIFrame* data; if( !SGS_PARSE_METHOD( C, UIFrame::_sgs_interface, data, UIFrame, resize ) ) return 0;
  676.     data->resize( sgs_GetVar<float>()(C,0), sgs_GetVar<float>()(C,1) ); return 0;
  677. }
  678.  
  679. int UIFrame::_sgs_destruct( SGS_CTX, sgs_VarObj* obj )
  680. {
  681.     static_cast<UIFrame*>( obj->data )->~UIFrame();
  682.     return SGS_SUCCESS;
  683. }
  684.  
  685. int UIFrame::_sgs_gcmark( SGS_CTX, sgs_VarObj* obj )
  686. {
  687.     return SGS_SUCCESS;
  688. }
  689.  
  690. int UIFrame::_sgs_getindex( SGS_ARGS_GETINDEXFUNC )
  691. {
  692.     SGS_BEGIN_INDEXFUNC
  693.         SGS_CASE( "createControl" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__createControl ); return SGS_SUCCESS; }
  694.         SGS_CASE( "find" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__find ); return SGS_SUCCESS; }
  695.         SGS_CASE( "event" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__event ); return SGS_SUCCESS; }
  696.         SGS_CASE( "render" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__render ); return SGS_SUCCESS; }
  697.         SGS_CASE( "handleMouseMove" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__handleMouseMove ); return SGS_SUCCESS; }
  698.         SGS_CASE( "setFocus" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__setFocus ); return SGS_SUCCESS; }
  699.         SGS_CASE( "doMouseMove" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__doMouseMove ); return SGS_SUCCESS; }
  700.         SGS_CASE( "doMouseButton" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__doMouseButton ); return SGS_SUCCESS; }
  701.         SGS_CASE( "doMouseWheel" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__doMouseWheel ); return SGS_SUCCESS; }
  702.         SGS_CASE( "doKeyPress" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__doKeyPress ); return SGS_SUCCESS; }
  703.         SGS_CASE( "doPutChar" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__doPutChar ); return SGS_SUCCESS; }
  704.         SGS_CASE( "setTimeout" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__setTimeout ); return SGS_SUCCESS; }
  705.         SGS_CASE( "setInterval" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__setInterval ); return SGS_SUCCESS; }
  706.         SGS_CASE( "clearTimeout" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__clearTimeout ); return SGS_SUCCESS; }
  707.         SGS_CASE( "clearInterval" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__clearInterval ); return SGS_SUCCESS; }
  708.         SGS_CASE( "processTimers" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__processTimers ); return SGS_SUCCESS; }
  709.         SGS_CASE( "pushScissorRect" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__pushScissorRect ); return SGS_SUCCESS; }
  710.         SGS_CASE( "pushScissorRectUnclipped" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__pushScissorRectUnclipped ); return SGS_SUCCESS; }
  711.         SGS_CASE( "popScissorRect" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__popScissorRect ); return SGS_SUCCESS; }
  712.         SGS_CASE( "getScissorRectCount" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__getScissorRectCount ); return SGS_SUCCESS; }
  713.         SGS_CASE( "addStyleSheet" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__addStyleSheet ); return SGS_SUCCESS; }
  714.         SGS_CASE( "removeStyleSheet" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__removeStyleSheet ); return SGS_SUCCESS; }
  715.         SGS_CASE( "getStyleSheets" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__getStyleSheets ); return SGS_SUCCESS; }
  716.         SGS_CASE( "getStyleSheet" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__getStyleSheet ); return SGS_SUCCESS; }
  717.         SGS_CASE( "getStyleSheetCount" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__getStyleSheetCount ); return SGS_SUCCESS; }
  718.         SGS_CASE( "getClickOffsetX" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__getClickOffsetX ); return SGS_SUCCESS; }
  719.         SGS_CASE( "getClickOffsetY" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__getClickOffsetY ); return SGS_SUCCESS; }
  720.         SGS_CASE( "getHoverControl" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__getHoverControl ); return SGS_SUCCESS; }
  721.         SGS_CASE( "getFocusControl" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__getFocusControl ); return SGS_SUCCESS; }
  722.         SGS_CASE( "getControlUnderCursor" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__getControlUnderCursor ); return SGS_SUCCESS; }
  723.         SGS_CASE( "getControlUnderPoint" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__getControlUnderPoint ); return SGS_SUCCESS; }
  724.         SGS_CASE( "isControlUnderCursor" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__isControlUnderCursor ); return SGS_SUCCESS; }
  725.         SGS_CASE( "isControlUnderPoint" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__isControlUnderPoint ); return SGS_SUCCESS; }
  726.         SGS_CASE( "scissor_func" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->scissor_func ); return SGS_SUCCESS; }
  727.         SGS_CASE( "clipboard_func" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->clipboard_func ); return SGS_SUCCESS; }
  728.         SGS_CASE( "cursor_func" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->cursor_func ); return SGS_SUCCESS; }
  729.         SGS_CASE( "font_func" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->font_func ); return SGS_SUCCESS; }
  730.         SGS_CASE( "image_func" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->image_func ); return SGS_SUCCESS; }
  731.         SGS_CASE( "icon_func" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->icon_func ); return SGS_SUCCESS; }
  732.         SGS_CASE( "theme" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->theme ); return SGS_SUCCESS; }
  733.         SGS_CASE( "setTheme" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__setTheme ); return SGS_SUCCESS; }
  734.         SGS_CASE( "clickTime" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->clickTime ); return SGS_SUCCESS; }
  735.         SGS_CASE( "x" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->x ); return SGS_SUCCESS; }
  736.         SGS_CASE( "y" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->y ); return SGS_SUCCESS; }
  737.         SGS_CASE( "width" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->width ); return SGS_SUCCESS; }
  738.         SGS_CASE( "height" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->height ); return SGS_SUCCESS; }
  739.         SGS_CASE( "resize" ){ sgs_PushCFunction( C, _sgs_method__UIFrame__resize ); return SGS_SUCCESS; }
  740.         SGS_CASE( "root" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->root ); return SGS_SUCCESS; }
  741.         SGS_CASE( "mouseX" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->mouseX ); return SGS_SUCCESS; }
  742.         SGS_CASE( "mouseY" ){ sgs_PushVar( C, static_cast<UIFrame*>( obj->data )->mouseY ); return SGS_SUCCESS; }
  743.     SGS_END_INDEXFUNC;
  744. }
  745.  
  746. int UIFrame::_sgs_setindex( SGS_ARGS_SETINDEXFUNC )
  747. {
  748.     SGS_BEGIN_INDEXFUNC
  749.         SGS_CASE( "scissor_func" ){ static_cast<UIFrame*>( obj->data )->scissor_func = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  750.         SGS_CASE( "clipboard_func" ){ static_cast<UIFrame*>( obj->data )->clipboard_func = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  751.         SGS_CASE( "cursor_func" ){ static_cast<UIFrame*>( obj->data )->cursor_func = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  752.         SGS_CASE( "font_func" ){ static_cast<UIFrame*>( obj->data )->font_func = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  753.         SGS_CASE( "image_func" ){ static_cast<UIFrame*>( obj->data )->image_func = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  754.         SGS_CASE( "icon_func" ){ static_cast<UIFrame*>( obj->data )->icon_func = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  755.         SGS_CASE( "clickTime" ){ static_cast<UIFrame*>( obj->data )->clickTime = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  756.         SGS_CASE( "x" ){ static_cast<UIFrame*>( obj->data )->x = sgs_GetVarP<float>()( C, val );
  757.             static_cast<UIFrame*>( obj->data )->onLayoutChange(); return SGS_SUCCESS; }
  758.         SGS_CASE( "y" ){ static_cast<UIFrame*>( obj->data )->y = sgs_GetVarP<float>()( C, val );
  759.             static_cast<UIFrame*>( obj->data )->onLayoutChange(); return SGS_SUCCESS; }
  760.         SGS_CASE( "width" ){ static_cast<UIFrame*>( obj->data )->width = sgs_GetVarP<float>()( C, val );
  761.             static_cast<UIFrame*>( obj->data )->onLayoutChange(); return SGS_SUCCESS; }
  762.         SGS_CASE( "height" ){ static_cast<UIFrame*>( obj->data )->height = sgs_GetVarP<float>()( C, val );
  763.             static_cast<UIFrame*>( obj->data )->onLayoutChange(); return SGS_SUCCESS; }
  764.     SGS_END_INDEXFUNC;
  765. }
  766.  
  767. int UIFrame::_sgs_dump( SGS_CTX, sgs_VarObj* obj, int depth )
  768. {
  769.     char bfr[ 39 ];
  770.     sprintf( bfr, "UIFrame (%p) %s", obj->data, depth > 0 ? "\n{" : " ..." );
  771.     sgs_PushString( C, bfr );
  772.     if( depth > 0 )
  773.     {
  774.         { sgs_PushString( C, "\nscissor_func = " ); sgs_DumpData( C, static_cast<UIFrame*>( obj->data )->scissor_func, depth ).push( C ); }
  775.         { sgs_PushString( C, "\nclipboard_func = " ); sgs_DumpData( C, static_cast<UIFrame*>( obj->data )->clipboard_func, depth ).push( C ); }
  776.         { sgs_PushString( C, "\ncursor_func = " ); sgs_DumpData( C, static_cast<UIFrame*>( obj->data )->cursor_func, depth ).push( C ); }
  777.         { sgs_PushString( C, "\nfont_func = " ); sgs_DumpData( C, static_cast<UIFrame*>( obj->data )->font_func, depth ).push( C ); }
  778.         { sgs_PushString( C, "\nimage_func = " ); sgs_DumpData( C, static_cast<UIFrame*>( obj->data )->image_func, depth ).push( C ); }
  779.         { sgs_PushString( C, "\nicon_func = " ); sgs_DumpData( C, static_cast<UIFrame*>( obj->data )->icon_func, depth ).push( C ); }
  780.         { sgs_PushString( C, "\ntheme = " ); sgs_DumpData( C, static_cast<UIFrame*>( obj->data )->theme, depth ).push( C ); }
  781.         { sgs_PushString( C, "\nclickTime = " ); sgs_DumpData( C, static_cast<UIFrame*>( obj->data )->clickTime, depth ).push( C ); }
  782.         { sgs_PushString( C, "\nx = " ); sgs_DumpData( C, static_cast<UIFrame*>( obj->data )->x, depth ).push( C ); }
  783.         { sgs_PushString( C, "\ny = " ); sgs_DumpData( C, static_cast<UIFrame*>( obj->data )->y, depth ).push( C ); }
  784.         { sgs_PushString( C, "\nwidth = " ); sgs_DumpData( C, static_cast<UIFrame*>( obj->data )->width, depth ).push( C ); }
  785.         { sgs_PushString( C, "\nheight = " ); sgs_DumpData( C, static_cast<UIFrame*>( obj->data )->height, depth ).push( C ); }
  786.         { sgs_PushString( C, "\nroot = " ); sgs_DumpData( C, static_cast<UIFrame*>( obj->data )->root, depth ).push( C ); }
  787.         { sgs_PushString( C, "\nmouseX = " ); sgs_DumpData( C, static_cast<UIFrame*>( obj->data )->mouseX, depth ).push( C ); }
  788.         { sgs_PushString( C, "\nmouseY = " ); sgs_DumpData( C, static_cast<UIFrame*>( obj->data )->mouseY, depth ).push( C ); }
  789.         sgs_StringConcat( C, 30 );
  790.         sgs_PadString( C );
  791.         sgs_PushString( C, "\n}" );
  792.         sgs_StringConcat( C, 3 );
  793.     }
  794.     return SGS_SUCCESS;
  795. }
  796.  
  797. sgs_ObjInterface UIFrame::_sgs_interface[1] =
  798. {{
  799.     "UIFrame",
  800.     UIFrame::_sgs_destruct, UIFrame::sgs_gcmark, UIFrame::_sgs_getindex, UIFrame::_sgs_setindex, NULL, NULL, UIFrame::_sgs_dump, NULL, NULL, NULL,
  801. }};
  802.  
  803.  
  804. int UIComponent::_sgs_destruct( SGS_CTX, sgs_VarObj* obj )
  805. {
  806.     static_cast<UIComponent*>( obj->data )->~UIComponent();
  807.     return SGS_SUCCESS;
  808. }
  809.  
  810. int UIComponent::_sgs_gcmark( SGS_CTX, sgs_VarObj* obj )
  811. {
  812.     return SGS_SUCCESS;
  813. }
  814.  
  815. int UIComponent::_sgs_getindex( SGS_ARGS_GETINDEXFUNC )
  816. {
  817.     SGS_BEGIN_INDEXFUNC
  818.         SGS_CASE( "type" ){ sgs_PushVar( C, static_cast<UIComponent*>( obj->data )->type ); return SGS_SUCCESS; }
  819.         SGS_CASE( "func" ){ sgs_PushVar( C, static_cast<UIComponent*>( obj->data )->func ); return SGS_SUCCESS; }
  820.         SGS_CASE( "data" ){ sgs_PushVar( C, static_cast<UIComponent*>( obj->data )->data ); return SGS_SUCCESS; }
  821.     SGS_END_INDEXFUNC;
  822. }
  823.  
  824. int UIComponent::_sgs_setindex( SGS_ARGS_SETINDEXFUNC )
  825. {
  826.     SGS_BEGIN_INDEXFUNC
  827.         SGS_CASE( "type" ){ static_cast<UIComponent*>( obj->data )->type = sgs_GetVarP<sgsString>()( C, val ); return SGS_SUCCESS; }
  828.         SGS_CASE( "func" ){ static_cast<UIComponent*>( obj->data )->func = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  829.         SGS_CASE( "data" ){ static_cast<UIComponent*>( obj->data )->data = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  830.     SGS_END_INDEXFUNC;
  831. }
  832.  
  833. int UIComponent::_sgs_dump( SGS_CTX, sgs_VarObj* obj, int depth )
  834. {
  835.     char bfr[ 43 ];
  836.     sprintf( bfr, "UIComponent (%p) %s", obj->data, depth > 0 ? "\n{" : " ..." );
  837.     sgs_PushString( C, bfr );
  838.     if( depth > 0 )
  839.     {
  840.         { sgs_PushString( C, "\ntype = " ); sgs_DumpData( C, static_cast<UIComponent*>( obj->data )->type, depth ).push( C ); }
  841.         { sgs_PushString( C, "\nfunc = " ); sgs_DumpData( C, static_cast<UIComponent*>( obj->data )->func, depth ).push( C ); }
  842.         { sgs_PushString( C, "\ndata = " ); sgs_DumpData( C, static_cast<UIComponent*>( obj->data )->data, depth ).push( C ); }
  843.         sgs_StringConcat( C, 6 );
  844.         sgs_PadString( C );
  845.         sgs_PushString( C, "\n}" );
  846.         sgs_StringConcat( C, 3 );
  847.     }
  848.     return SGS_SUCCESS;
  849. }
  850.  
  851. sgs_ObjInterface UIComponent::_sgs_interface[1] =
  852. {{
  853.     "UIComponent",
  854.     UIComponent::_sgs_destruct, UIComponent::_sgs_gcmark, UIComponent::_sgs_getindex, UIComponent::_sgs_setindex, NULL, NULL, UIComponent::_sgs_dump, NULL, NULL, NULL,
  855. }};
  856.  
  857.  
  858. static int _sgs_method__UIControl__updateScroll( SGS_CTX )
  859. {
  860.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, updateScroll ) ) return 0;
  861.     data->updateScroll(  ); return 0;
  862. }
  863.  
  864. static int _sgs_method__UIControl__updateTheme( SGS_CTX )
  865. {
  866.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, updateTheme ) ) return 0;
  867.     data->updateTheme(  ); return 0;
  868. }
  869.  
  870. static int _sgs_method__UIControl__onLayoutChange( SGS_CTX )
  871. {
  872.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, onLayoutChange ) ) return 0;
  873.     data->onLayoutChange(  ); return 0;
  874. }
  875.  
  876. static int _sgs_method__UIControl__insertChild( SGS_CTX )
  877. {
  878.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, insertChild ) ) return 0;
  879.     sgs_PushVar(C,data->insertChild( sgs_GetVar<UIControl::Handle>()(C,0), sgs_GetVar<ssize_t>()(C,1) )); return 1;
  880. }
  881.  
  882. static int _sgs_method__UIControl__removeChild( SGS_CTX )
  883. {
  884.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, removeChild ) ) return 0;
  885.     sgs_PushVar(C,data->removeChild( sgs_GetVar<UIControl::Handle>()(C,0) )); return 1;
  886. }
  887.  
  888. static int _sgs_method__UIControl__removeAllChildren( SGS_CTX )
  889. {
  890.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, removeAllChildren ) ) return 0;
  891.     sgs_PushVar(C,data->removeAllChildren(  )); return 1;
  892. }
  893.  
  894. static int _sgs_method__UIControl__detach( SGS_CTX )
  895. {
  896.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, detach ) ) return 0;
  897.     data->detach(  ); return 0;
  898. }
  899.  
  900. static int _sgs_method__UIControl__destroy( SGS_CTX )
  901. {
  902.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, destroy ) ) return 0;
  903.     data->destroy( sgs_GetVar<bool>()(C,0) ); return 0;
  904. }
  905.  
  906. static int _sgs_method__UIControl__destroyAllChildren( SGS_CTX )
  907. {
  908.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, destroyAllChildren ) ) return 0;
  909.     data->destroyAllChildren( sgs_GetVar<bool>()(C,0), sgs_GetVar<int>()(C,1) ); return 0;
  910. }
  911.  
  912. static int _sgs_method__UIControl__swapChild( SGS_CTX )
  913. {
  914.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, swapChild ) ) return 0;
  915.     sgs_PushVar(C,data->swapChild( sgs_GetVar<UIControl::Handle>()(C,0), sgs_GetVar<UIControl::Handle>()(C,1) )); return 1;
  916. }
  917.  
  918. static int _sgs_method__UIControl__findChild( SGS_CTX )
  919. {
  920.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, findChild ) ) return 0;
  921.     sgs_PushVar(C,data->findChild( sgs_GetVar<sgsString>()(C,0) )); return 1;
  922. }
  923.  
  924. static int _sgs_method__UIControl__children( SGS_CTX )
  925. {
  926.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, children ) ) return 0;
  927.     sgs_PushVar(C,data->children( sgs_GetVar<bool>()(C,0) )); return 1;
  928. }
  929.  
  930. static int _sgs_method__UIControl__allChildren( SGS_CTX )
  931. {
  932.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, allChildren ) ) return 0;
  933.     sgs_PushVar(C,data->allChildren(  )); return 1;
  934. }
  935.  
  936. static int _sgs_method__UIControl__sortChildren( SGS_CTX )
  937. {
  938.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, sortChildren ) ) return 0;
  939.     data->sortChildren(  ); return 0;
  940. }
  941.  
  942. static int _sgs_method__UIControl__sortSiblings( SGS_CTX )
  943. {
  944.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, sortSiblings ) ) return 0;
  945.     data->sortSiblings(  ); return 0;
  946. }
  947.  
  948. static int _sgs_method__UIControl__getChildIndex( SGS_CTX )
  949. {
  950.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, getChildIndex ) ) return 0;
  951.     sgs_PushVar(C,data->getChildIndex( sgs_GetVar<UIControl::Handle>()(C,0) )); return 1;
  952. }
  953.  
  954. static int _sgs_method__UIControl__getChildCount( SGS_CTX )
  955. {
  956.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, getChildCount ) ) return 0;
  957.     sgs_PushVar(C,data->getChildCount( sgs_GetVar<bool>()(C,0) )); return 1;
  958. }
  959.  
  960. static int _sgs_method__UIControl__prependChild( SGS_CTX )
  961. {
  962.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, prependChild ) ) return 0;
  963.     sgs_PushVar(C,data->prependChild( sgs_GetVar<UIControl::Handle>()(C,0) )); return 1;
  964. }
  965.  
  966. static int _sgs_method__UIControl__appendChild( SGS_CTX )
  967. {
  968.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, appendChild ) ) return 0;
  969.     sgs_PushVar(C,data->appendChild( sgs_GetVar<UIControl::Handle>()(C,0) )); return 1;
  970. }
  971.  
  972. static int _sgs_method__UIControl__addChild( SGS_CTX )
  973. {
  974.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, addChild ) ) return 0;
  975.     sgs_PushVar(C,data->addChild( sgs_GetVar<UIControl::Handle>()(C,0) )); return 1;
  976. }
  977.  
  978. static int _sgs_method__UIControl__getOrderIndex( SGS_CTX )
  979. {
  980.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, getOrderIndex ) ) return 0;
  981.     sgs_PushVar(C,data->getOrderIndex(  )); return 1;
  982. }
  983.  
  984. static int _sgs_method__UIControl__getAllChildCount( SGS_CTX )
  985. {
  986.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, getAllChildCount ) ) return 0;
  987.     sgs_PushVar(C,data->getAllChildCount(  )); return 1;
  988. }
  989.  
  990. static int _sgs_method__UIControl__moveUp( SGS_CTX )
  991. {
  992.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, moveUp ) ) return 0;
  993.     sgs_PushVar(C,data->moveUp(  )); return 1;
  994. }
  995.  
  996. static int _sgs_method__UIControl__moveDown( SGS_CTX )
  997. {
  998.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, moveDown ) ) return 0;
  999.     sgs_PushVar(C,data->moveDown(  )); return 1;
  1000. }
  1001.  
  1002. static int _sgs_method__UIControl__moveToIndex( SGS_CTX )
  1003. {
  1004.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, moveToIndex ) ) return 0;
  1005.     sgs_PushVar(C,data->moveToIndex( sgs_GetVar<int>()(C,0) )); return 1;
  1006. }
  1007.  
  1008. static int _sgs_method__UIControl__swapOutFor( SGS_CTX )
  1009. {
  1010.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, swapOutFor ) ) return 0;
  1011.     sgs_PushVar(C,data->swapOutFor( sgs_GetVar<UIControl::Handle>()(C,0) )); return 1;
  1012. }
  1013.  
  1014. static int _sgs_method__UIControl__getChildAABB( SGS_CTX )
  1015. {
  1016.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, getChildAABB ) ) return 0;
  1017.     return data->getChildAABB( sgs_GetVar<int>()(C,0) );
  1018. }
  1019.  
  1020. static int _sgs_method__UIControl__setAnchorRect( SGS_CTX )
  1021. {
  1022.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, setAnchorRect ) ) return 0;
  1023.     data->setAnchorRect( sgs_GetVar<float>()(C,0), sgs_GetVar<float>()(C,1), sgs_GetVar<float>()(C,2), sgs_GetVar<float>()(C,3) ); return 0;
  1024. }
  1025.  
  1026. static int _sgs_method__UIControl__getPrev( SGS_CTX )
  1027. {
  1028.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, getPrev ) ) return 0;
  1029.     sgs_PushVar(C,data->getPrev(  )); return 1;
  1030. }
  1031.  
  1032. static int _sgs_method__UIControl__getNext( SGS_CTX )
  1033. {
  1034.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, getNext ) ) return 0;
  1035.     sgs_PushVar(C,data->getNext(  )); return 1;
  1036. }
  1037.  
  1038. static int _sgs_method__UIControl__hasEventBinding( SGS_CTX )
  1039. {
  1040.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, hasEventBinding ) ) return 0;
  1041.     sgs_PushVar(C,data->hasEventBinding( sgs_GetVar<sgsString>()(C,0), sgs_GetVar<sgsVariable>()(C,1) )); return 1;
  1042. }
  1043.  
  1044. static int _sgs_method__UIControl__bindEvent( SGS_CTX )
  1045. {
  1046.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, bindEvent ) ) return 0;
  1047.     sgs_PushVar(C,data->bindEvent( sgs_GetVar<sgsString>()(C,0), sgs_GetVar<sgsVariable>()(C,1) )); return 1;
  1048. }
  1049.  
  1050. static int _sgs_method__UIControl__unbindEvent( SGS_CTX )
  1051. {
  1052.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, unbindEvent ) ) return 0;
  1053.     sgs_PushVar(C,data->unbindEvent( sgs_GetVar<sgsString>()(C,0), sgs_GetVar<sgsVariable>()(C,1) )); return 1;
  1054. }
  1055.  
  1056. static int _sgs_method__UIControl__unbindEventAll( SGS_CTX )
  1057. {
  1058.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, unbindEventAll ) ) return 0;
  1059.     sgs_PushVar(C,data->unbindEventAll( sgs_GetVar<sgsString>()(C,0) )); return 1;
  1060. }
  1061.  
  1062. static int _sgs_method__UIControl__unbindEverything( SGS_CTX )
  1063. {
  1064.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, unbindEverything ) ) return 0;
  1065.     data->unbindEverything(  ); return 0;
  1066. }
  1067.  
  1068. static int _sgs_method__UIControl__callEvent( SGS_CTX )
  1069. {
  1070.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, callEvent ) ) return 0;
  1071.     sgs_PushVar(C,data->callEvent( sgs_GetVar<sgsString>()(C,0), sgs_GetVar<sgsVariable>()(C,1) )); return 1;
  1072. }
  1073.  
  1074. static int _sgs_method__UIControl__addComponent( SGS_CTX )
  1075. {
  1076.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, addComponent ) ) return 0;
  1077.     data->addComponent( sgs_GetVar<sgsString>()(C,0), sgs_GetVar<sgsVariable>()(C,1), sgs_GetVar<sgsVariable>()(C,2) ); return 0;
  1078. }
  1079.  
  1080. static int _sgs_method__UIControl__getComponentCount( SGS_CTX )
  1081. {
  1082.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, getComponentCount ) ) return 0;
  1083.     sgs_PushVar(C,data->getComponentCount(  )); return 1;
  1084. }
  1085.  
  1086. static int _sgs_method__UIControl__getComponent( SGS_CTX )
  1087. {
  1088.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, getComponent ) ) return 0;
  1089.     sgs_PushVar(C,data->getComponent( sgs_GetVar<int>()(C,0) )); return 1;
  1090. }
  1091.  
  1092. static int _sgs_method__UIControl__findComponentByType( SGS_CTX )
  1093. {
  1094.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, findComponentByType ) ) return 0;
  1095.     sgs_PushVar(C,data->findComponentByType( sgs_GetVar<sgsString>()(C,0) )); return 1;
  1096. }
  1097.  
  1098. static int _sgs_method__UIControl__removeComponentByType( SGS_CTX )
  1099. {
  1100.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, removeComponentByType ) ) return 0;
  1101.     sgs_PushVar(C,data->removeComponentByType( sgs_GetVar<sgsString>()(C,0) )); return 1;
  1102. }
  1103.  
  1104. static int _sgs_method__UIControl__removeComponentAtIndex( SGS_CTX )
  1105. {
  1106.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, removeComponentAtIndex ) ) return 0;
  1107.     sgs_PushVar(C,data->removeComponentAtIndex( sgs_GetVar<int>()(C,0) )); return 1;
  1108. }
  1109.  
  1110. static int _sgs_method__UIControl__animate( SGS_CTX )
  1111. {
  1112.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, animate ) ) return 0;
  1113.     sgs_PushVar(C,data->animate( sgs_GetVar<sgsVariable>()(C,0), sgs_GetVar<float>()(C,1), sgs_GetVar<sgsVariable>()(C,2), sgs_GetVar<sgsVariable>()(C,3) )); return 1;
  1114. }
  1115.  
  1116. static int _sgs_method__UIControl__stop( SGS_CTX )
  1117. {
  1118.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, stop ) ) return 0;
  1119.     sgs_PushVar(C,data->stop( sgs_GetVar<bool>()(C,0) )); return 1;
  1120. }
  1121.  
  1122. static int _sgs_method__UIControl__dequeue( SGS_CTX )
  1123. {
  1124.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, dequeue ) ) return 0;
  1125.     sgs_PushVar(C,data->dequeue(  )); return 1;
  1126. }
  1127.  
  1128. static int _sgs_method__UIControl__skip( SGS_CTX )
  1129. {
  1130.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, skip ) ) return 0;
  1131.     sgs_PushVar(C,data->skip( sgs_GetVar<bool>()(C,0) )); return 1;
  1132. }
  1133.  
  1134. static int _sgs_method__UIControl__queueSize( SGS_CTX )
  1135. {
  1136.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, queueSize ) ) return 0;
  1137.     sgs_PushVar(C,data->queueSize(  )); return 1;
  1138. }
  1139.  
  1140. static int _sgs_method__UIControl__addClass( SGS_CTX )
  1141. {
  1142.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, addClass ) ) return 0;
  1143.     sgs_PushVar(C,data->addClass( sgs_GetVar<sgsString>()(C,0) )); return 1;
  1144. }
  1145.  
  1146. static int _sgs_method__UIControl__removeClass( SGS_CTX )
  1147. {
  1148.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, removeClass ) ) return 0;
  1149.     sgs_PushVar(C,data->removeClass( sgs_GetVar<sgsString>()(C,0) )); return 1;
  1150. }
  1151.  
  1152. static int _sgs_method__UIControl__addRemClass( SGS_CTX )
  1153. {
  1154.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, addRemClass ) ) return 0;
  1155.     sgs_PushVar(C,data->addRemClass( sgs_GetVar<sgsString>()(C,0), sgs_GetVar<bool>()(C,1) )); return 1;
  1156. }
  1157.  
  1158. static int _sgs_method__UIControl__hasClass( SGS_CTX )
  1159. {
  1160.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, hasClass ) ) return 0;
  1161.     sgs_PushVar(C,data->hasClass( sgs_GetVar<sgsString>()(C,0) )); return 1;
  1162. }
  1163.  
  1164. static int _sgs_method__UIControl___getMatchedSelectors( SGS_CTX )
  1165. {
  1166.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, _getMatchedSelectors ) ) return 0;
  1167.     sgs_PushVar(C,data->_getMatchedSelectors(  )); return 1;
  1168. }
  1169.  
  1170. static int _sgs_method__UIControl__setFont( SGS_CTX )
  1171. {
  1172.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, setFont ) ) return 0;
  1173.     data->setFont( sgs_GetVar<sgsString>()(C,0), sgs_GetVar<float>()(C,1) ); return 0;
  1174. }
  1175.  
  1176. static int _sgs_method__UIControl___updateFullRect( SGS_CTX )
  1177. {
  1178.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, _updateFullRect ) ) return 0;
  1179.     data->_updateFullRect(  ); return 0;
  1180. }
  1181.  
  1182. static int _sgs_method__UIControl___updateChildRects( SGS_CTX )
  1183. {
  1184.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, _updateChildRects ) ) return 0;
  1185.     data->_updateChildRects(  ); return 0;
  1186. }
  1187.  
  1188. static int _sgs_method__UIControl___changedFullRect( SGS_CTX )
  1189. {
  1190.     UIControl* data; if( !SGS_PARSE_METHOD( C, UIControl::_sgs_interface, data, UIControl, _changedFullRect ) ) return 0;
  1191.     data->_changedFullRect(  ); return 0;
  1192. }
  1193.  
  1194. int UIControl::_sgs_destruct( SGS_CTX, sgs_VarObj* obj )
  1195. {
  1196.     static_cast<UIControl*>( obj->data )->~UIControl();
  1197.     return SGS_SUCCESS;
  1198. }
  1199.  
  1200. int UIControl::_sgs_gcmark( SGS_CTX, sgs_VarObj* obj )
  1201. {
  1202.     if( SGS_FAILED( sgs_GCMarkVar( C, static_cast<UIControl*>( obj->data )->parent ) ) ) return SGS_EINPROC;
  1203.     if( SGS_FAILED( sgs_GCMarkVar( C, static_cast<UIControl*>( obj->data )->frame ) ) ) return SGS_EINPROC;
  1204.     if( SGS_FAILED( sgs_GCMarkVar( C, static_cast<UIControl*>( obj->data )->styleParent ) ) ) return SGS_EINPROC;
  1205.     if( SGS_FAILED( sgs_GCMarkVar( C, static_cast<UIControl*>( obj->data )->filteredStyle ) ) ) return SGS_EINPROC;
  1206.     if( SGS_FAILED( sgs_GCMarkVar( C, static_cast<UIControl*>( obj->data )->style ) ) ) return SGS_EINPROC;
  1207.     if( SGS_FAILED( sgs_GCMarkVar( C, static_cast<UIControl*>( obj->data )->_cachedFont ) ) ) return SGS_EINPROC;
  1208.     if( SGS_FAILED( sgs_GCMarkVar( C, static_cast<UIControl*>( obj->data )->_cachedImage ) ) ) return SGS_EINPROC;
  1209.     if( SGS_FAILED( sgs_GCMarkVar( C, static_cast<UIControl*>( obj->data )->_cachedIcon ) ) ) return SGS_EINPROC;
  1210.     if( SGS_FAILED( sgs_GCMarkVar( C, static_cast<UIControl*>( obj->data )->callback ) ) ) return SGS_EINPROC;
  1211.     if( SGS_FAILED( sgs_GCMarkVar( C, static_cast<UIControl*>( obj->data )->data ) ) ) return SGS_EINPROC;
  1212.     if( SGS_FAILED( sgs_GCMarkVar( C, static_cast<UIControl*>( obj->data )->_interface ) ) ) return SGS_EINPROC;
  1213.     if( SGS_FAILED( sgs_GCMarkVar( C, static_cast<UIControl*>( obj->data )->m_children ) ) ) return SGS_EINPROC;
  1214.     if( SGS_FAILED( sgs_GCMarkVar( C, static_cast<UIControl*>( obj->data )->m_events ) ) ) return SGS_EINPROC;
  1215.     if( SGS_FAILED( sgs_GCMarkVar( C, static_cast<UIControl*>( obj->data )->m_components ) ) ) return SGS_EINPROC;
  1216.     if( SGS_FAILED( sgs_GCMarkVar( C, static_cast<UIControl*>( obj->data )->m_animQueue ) ) ) return SGS_EINPROC;
  1217.     return SGS_SUCCESS;
  1218. }
  1219.  
  1220. int UIControl::_sgs_getindex( SGS_ARGS_GETINDEXFUNC )
  1221. {
  1222.     SGS_BEGIN_INDEXFUNC
  1223.         SGS_CASE( "updateScroll" ){ sgs_PushCFunction( C, _sgs_method__UIControl__updateScroll ); return SGS_SUCCESS; }
  1224.         SGS_CASE( "updateTheme" ){ sgs_PushCFunction( C, _sgs_method__UIControl__updateTheme ); return SGS_SUCCESS; }
  1225.         SGS_CASE( "onLayoutChange" ){ sgs_PushCFunction( C, _sgs_method__UIControl__onLayoutChange ); return SGS_SUCCESS; }
  1226.         SGS_CASE( "insertChild" ){ sgs_PushCFunction( C, _sgs_method__UIControl__insertChild ); return SGS_SUCCESS; }
  1227.         SGS_CASE( "removeChild" ){ sgs_PushCFunction( C, _sgs_method__UIControl__removeChild ); return SGS_SUCCESS; }
  1228.         SGS_CASE( "removeAllChildren" ){ sgs_PushCFunction( C, _sgs_method__UIControl__removeAllChildren ); return SGS_SUCCESS; }
  1229.         SGS_CASE( "detach" ){ sgs_PushCFunction( C, _sgs_method__UIControl__detach ); return SGS_SUCCESS; }
  1230.         SGS_CASE( "destroy" ){ sgs_PushCFunction( C, _sgs_method__UIControl__destroy ); return SGS_SUCCESS; }
  1231.         SGS_CASE( "destroyAllChildren" ){ sgs_PushCFunction( C, _sgs_method__UIControl__destroyAllChildren ); return SGS_SUCCESS; }
  1232.         SGS_CASE( "swapChild" ){ sgs_PushCFunction( C, _sgs_method__UIControl__swapChild ); return SGS_SUCCESS; }
  1233.         SGS_CASE( "findChild" ){ sgs_PushCFunction( C, _sgs_method__UIControl__findChild ); return SGS_SUCCESS; }
  1234.         SGS_CASE( "children" ){ sgs_PushCFunction( C, _sgs_method__UIControl__children ); return SGS_SUCCESS; }
  1235.         SGS_CASE( "allChildren" ){ sgs_PushCFunction( C, _sgs_method__UIControl__allChildren ); return SGS_SUCCESS; }
  1236.         SGS_CASE( "sortChildren" ){ sgs_PushCFunction( C, _sgs_method__UIControl__sortChildren ); return SGS_SUCCESS; }
  1237.         SGS_CASE( "sortSiblings" ){ sgs_PushCFunction( C, _sgs_method__UIControl__sortSiblings ); return SGS_SUCCESS; }
  1238.         SGS_CASE( "getChildIndex" ){ sgs_PushCFunction( C, _sgs_method__UIControl__getChildIndex ); return SGS_SUCCESS; }
  1239.         SGS_CASE( "getChildCount" ){ sgs_PushCFunction( C, _sgs_method__UIControl__getChildCount ); return SGS_SUCCESS; }
  1240.         SGS_CASE( "prependChild" ){ sgs_PushCFunction( C, _sgs_method__UIControl__prependChild ); return SGS_SUCCESS; }
  1241.         SGS_CASE( "appendChild" ){ sgs_PushCFunction( C, _sgs_method__UIControl__appendChild ); return SGS_SUCCESS; }
  1242.         SGS_CASE( "addChild" ){ sgs_PushCFunction( C, _sgs_method__UIControl__addChild ); return SGS_SUCCESS; }
  1243.         SGS_CASE( "getOrderIndex" ){ sgs_PushCFunction( C, _sgs_method__UIControl__getOrderIndex ); return SGS_SUCCESS; }
  1244.         SGS_CASE( "getAllChildCount" ){ sgs_PushCFunction( C, _sgs_method__UIControl__getAllChildCount ); return SGS_SUCCESS; }
  1245.         SGS_CASE( "moveUp" ){ sgs_PushCFunction( C, _sgs_method__UIControl__moveUp ); return SGS_SUCCESS; }
  1246.         SGS_CASE( "moveDown" ){ sgs_PushCFunction( C, _sgs_method__UIControl__moveDown ); return SGS_SUCCESS; }
  1247.         SGS_CASE( "moveToIndex" ){ sgs_PushCFunction( C, _sgs_method__UIControl__moveToIndex ); return SGS_SUCCESS; }
  1248.         SGS_CASE( "swapOutFor" ){ sgs_PushCFunction( C, _sgs_method__UIControl__swapOutFor ); return SGS_SUCCESS; }
  1249.         SGS_CASE( "getChildAABB" ){ sgs_PushCFunction( C, _sgs_method__UIControl__getChildAABB ); return SGS_SUCCESS; }
  1250.         SGS_CASE( "setAnchorRect" ){ sgs_PushCFunction( C, _sgs_method__UIControl__setAnchorRect ); return SGS_SUCCESS; }
  1251.         SGS_CASE( "getPrev" ){ sgs_PushCFunction( C, _sgs_method__UIControl__getPrev ); return SGS_SUCCESS; }
  1252.         SGS_CASE( "getNext" ){ sgs_PushCFunction( C, _sgs_method__UIControl__getNext ); return SGS_SUCCESS; }
  1253.         SGS_CASE( "hasEventBinding" ){ sgs_PushCFunction( C, _sgs_method__UIControl__hasEventBinding ); return SGS_SUCCESS; }
  1254.         SGS_CASE( "bindEvent" ){ sgs_PushCFunction( C, _sgs_method__UIControl__bindEvent ); return SGS_SUCCESS; }
  1255.         SGS_CASE( "unbindEvent" ){ sgs_PushCFunction( C, _sgs_method__UIControl__unbindEvent ); return SGS_SUCCESS; }
  1256.         SGS_CASE( "unbindEventAll" ){ sgs_PushCFunction( C, _sgs_method__UIControl__unbindEventAll ); return SGS_SUCCESS; }
  1257.         SGS_CASE( "unbindEverything" ){ sgs_PushCFunction( C, _sgs_method__UIControl__unbindEverything ); return SGS_SUCCESS; }
  1258.         SGS_CASE( "callEvent" ){ sgs_PushCFunction( C, _sgs_method__UIControl__callEvent ); return SGS_SUCCESS; }
  1259.         SGS_CASE( "addComponent" ){ sgs_PushCFunction( C, _sgs_method__UIControl__addComponent ); return SGS_SUCCESS; }
  1260.         SGS_CASE( "getComponentCount" ){ sgs_PushCFunction( C, _sgs_method__UIControl__getComponentCount ); return SGS_SUCCESS; }
  1261.         SGS_CASE( "getComponent" ){ sgs_PushCFunction( C, _sgs_method__UIControl__getComponent ); return SGS_SUCCESS; }
  1262.         SGS_CASE( "findComponentByType" ){ sgs_PushCFunction( C, _sgs_method__UIControl__findComponentByType ); return SGS_SUCCESS; }
  1263.         SGS_CASE( "removeComponentByType" ){ sgs_PushCFunction( C, _sgs_method__UIControl__removeComponentByType ); return SGS_SUCCESS; }
  1264.         SGS_CASE( "removeComponentAtIndex" ){ sgs_PushCFunction( C, _sgs_method__UIControl__removeComponentAtIndex ); return SGS_SUCCESS; }
  1265.         SGS_CASE( "animate" ){ sgs_PushCFunction( C, _sgs_method__UIControl__animate ); return SGS_SUCCESS; }
  1266.         SGS_CASE( "stop" ){ sgs_PushCFunction( C, _sgs_method__UIControl__stop ); return SGS_SUCCESS; }
  1267.         SGS_CASE( "dequeue" ){ sgs_PushCFunction( C, _sgs_method__UIControl__dequeue ); return SGS_SUCCESS; }
  1268.         SGS_CASE( "skip" ){ sgs_PushCFunction( C, _sgs_method__UIControl__skip ); return SGS_SUCCESS; }
  1269.         SGS_CASE( "queueSize" ){ sgs_PushCFunction( C, _sgs_method__UIControl__queueSize ); return SGS_SUCCESS; }
  1270.         SGS_CASE( "id" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->id ); return SGS_SUCCESS; }
  1271.         SGS_CASE( "name" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->name ); return SGS_SUCCESS; }
  1272.         SGS_CASE( "caption" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->caption ); return SGS_SUCCESS; }
  1273.         SGS_CASE( "type" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->type ); return SGS_SUCCESS; }
  1274.         SGS_CASE( "parent" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->parent ); return SGS_SUCCESS; }
  1275.         SGS_CASE( "frame" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->frame ); return SGS_SUCCESS; }
  1276.         SGS_CASE( "class" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->classes ); return SGS_SUCCESS; }
  1277.         SGS_CASE( "addClass" ){ sgs_PushCFunction( C, _sgs_method__UIControl__addClass ); return SGS_SUCCESS; }
  1278.         SGS_CASE( "removeClass" ){ sgs_PushCFunction( C, _sgs_method__UIControl__removeClass ); return SGS_SUCCESS; }
  1279.         SGS_CASE( "addRemClass" ){ sgs_PushCFunction( C, _sgs_method__UIControl__addRemClass ); return SGS_SUCCESS; }
  1280.         SGS_CASE( "hasClass" ){ sgs_PushCFunction( C, _sgs_method__UIControl__hasClass ); return SGS_SUCCESS; }
  1281.         SGS_CASE( "styleParent" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->styleParent ); return SGS_SUCCESS; }
  1282.         SGS_CASE( "filteredStyle" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->filteredStyle ); return SGS_SUCCESS; }
  1283.         SGS_CASE( "style" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->style ); return SGS_SUCCESS; }
  1284.         SGS_CASE( "_getMatchedSelectors" ){ sgs_PushCFunction( C, _sgs_method__UIControl___getMatchedSelectors ); return SGS_SUCCESS; }
  1285.         SGS_CASE( "x" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_x() ); return SGS_SUCCESS; }
  1286.         SGS_CASE( "y" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_y() ); return SGS_SUCCESS; }
  1287.         SGS_CASE( "width" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_width() ); return SGS_SUCCESS; }
  1288.         SGS_CASE( "height" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_height() ); return SGS_SUCCESS; }
  1289.         SGS_CASE( "q0x" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_q0x() ); return SGS_SUCCESS; }
  1290.         SGS_CASE( "q0y" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_q0y() ); return SGS_SUCCESS; }
  1291.         SGS_CASE( "q1x" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_q1x() ); return SGS_SUCCESS; }
  1292.         SGS_CASE( "q1y" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_q1y() ); return SGS_SUCCESS; }
  1293.         SGS_CASE( "nonClientTop" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_nonClientTop() ); return SGS_SUCCESS; }
  1294.         SGS_CASE( "nonClientLeft" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_nonClientLeft() ); return SGS_SUCCESS; }
  1295.         SGS_CASE( "nonClientRight" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_nonClientRight() ); return SGS_SUCCESS; }
  1296.         SGS_CASE( "nonClientBottom" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_nonClientBottom() ); return SGS_SUCCESS; }
  1297.         SGS_CASE( "visible" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_visible() ); return SGS_SUCCESS; }
  1298.         SGS_CASE( "index" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_index() ); return SGS_SUCCESS; }
  1299.         SGS_CASE( "topmost" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_topmost() ); return SGS_SUCCESS; }
  1300.         SGS_CASE( "minWidth" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_minWidth() ); return SGS_SUCCESS; }
  1301.         SGS_CASE( "maxWidth" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_maxWidth() ); return SGS_SUCCESS; }
  1302.         SGS_CASE( "minHeight" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_minHeight() ); return SGS_SUCCESS; }
  1303.         SGS_CASE( "maxHeight" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_maxHeight() ); return SGS_SUCCESS; }
  1304.         SGS_CASE( "marginLeft" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_marginLeft() ); return SGS_SUCCESS; }
  1305.         SGS_CASE( "marginRight" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_marginRight() ); return SGS_SUCCESS; }
  1306.         SGS_CASE( "marginTop" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_marginTop() ); return SGS_SUCCESS; }
  1307.         SGS_CASE( "marginBottom" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_marginBottom() ); return SGS_SUCCESS; }
  1308.         SGS_CASE( "paddingLeft" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_paddingLeft() ); return SGS_SUCCESS; }
  1309.         SGS_CASE( "paddingRight" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_paddingRight() ); return SGS_SUCCESS; }
  1310.         SGS_CASE( "paddingTop" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_paddingTop() ); return SGS_SUCCESS; }
  1311.         SGS_CASE( "paddingBottom" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_paddingBottom() ); return SGS_SUCCESS; }
  1312.         SGS_CASE( "posMode" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_posMode() ); return SGS_SUCCESS; }
  1313.         SGS_CASE( "stackMode" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_stackMode() ); return SGS_SUCCESS; }
  1314.         SGS_CASE( "overflow" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_overflow() ); return SGS_SUCCESS; }
  1315.         SGS_CASE( "backgroundColor" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_backgroundColor() ); return SGS_SUCCESS; }
  1316.         SGS_CASE( "textColor" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_textColor() ); return SGS_SUCCESS; }
  1317.         SGS_CASE( "halign" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_halign() ); return SGS_SUCCESS; }
  1318.         SGS_CASE( "valign" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_valign() ); return SGS_SUCCESS; }
  1319.         SGS_CASE( "cursor" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_cursor() ); return SGS_SUCCESS; }
  1320.         SGS_CASE( "font" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_font() ); return SGS_SUCCESS; }
  1321.         SGS_CASE( "image" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_image() ); return SGS_SUCCESS; }
  1322.         SGS_CASE( "icon" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_icon() ); return SGS_SUCCESS; }
  1323.         SGS_CASE( "fontSize" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_fontSize() ); return SGS_SUCCESS; }
  1324.         SGS_CASE( "renderfunc" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_renderfunc() ); return SGS_SUCCESS; }
  1325.         SGS_CASE( "nonClientH" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_nonClientH() ); return SGS_SUCCESS; }
  1326.         SGS_CASE( "nonClientV" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_nonClientV() ); return SGS_SUCCESS; }
  1327.         SGS_CASE( "nonClient" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_nonClient() ); return SGS_SUCCESS; }
  1328.         SGS_CASE( "marginH" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_marginH() ); return SGS_SUCCESS; }
  1329.         SGS_CASE( "marginV" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_marginV() ); return SGS_SUCCESS; }
  1330.         SGS_CASE( "margin" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_margin() ); return SGS_SUCCESS; }
  1331.         SGS_CASE( "paddingH" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_paddingH() ); return SGS_SUCCESS; }
  1332.         SGS_CASE( "paddingV" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_paddingV() ); return SGS_SUCCESS; }
  1333.         SGS_CASE( "padding" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_padding() ); return SGS_SUCCESS; }
  1334.         SGS_CASE( "anchorMode" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_anchorMode() ); return SGS_SUCCESS; }
  1335.         SGS_CASE( "align" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_align() ); return SGS_SUCCESS; }
  1336.         SGS_CASE( "scroll_x" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->scroll_x ); return SGS_SUCCESS; }
  1337.         SGS_CASE( "scroll_y" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->scroll_y ); return SGS_SUCCESS; }
  1338.         SGS_CASE( "nonclient" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->nonclient ); return SGS_SUCCESS; }
  1339.         SGS_CASE( "offsetLeft" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_offsetLeft() ); return SGS_SUCCESS; }
  1340.         SGS_CASE( "offsetRight" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_offsetRight() ); return SGS_SUCCESS; }
  1341.         SGS_CASE( "offsetTop" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_offsetTop() ); return SGS_SUCCESS; }
  1342.         SGS_CASE( "offsetBottom" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_offsetBottom() ); return SGS_SUCCESS; }
  1343.         SGS_CASE( "_cachedFont" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_cachedFont ); return SGS_SUCCESS; }
  1344.         SGS_CASE( "setFont" ){ sgs_PushCFunction( C, _sgs_method__UIControl__setFont ); return SGS_SUCCESS; }
  1345.         SGS_CASE( "_cachedImage" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_cachedImage ); return SGS_SUCCESS; }
  1346.         SGS_CASE( "_cachedIcon" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_cachedIcon ); return SGS_SUCCESS; }
  1347.         SGS_CASE( "callback" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->callback ); return SGS_SUCCESS; }
  1348.         SGS_CASE( "data" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->data ); return SGS_SUCCESS; }
  1349.         SGS_CASE( "_interface" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_interface ); return SGS_SUCCESS; }
  1350.         SGS_CASE( "autoWidth" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->autoWidth ); return SGS_SUCCESS; }
  1351.         SGS_CASE( "autoHeight" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->autoHeight ); return SGS_SUCCESS; }
  1352.         SGS_CASE( "rx0" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->rx0 ); return SGS_SUCCESS; }
  1353.         SGS_CASE( "rx1" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->rx1 ); return SGS_SUCCESS; }
  1354.         SGS_CASE( "ry0" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->ry0 ); return SGS_SUCCESS; }
  1355.         SGS_CASE( "ry1" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->ry1 ); return SGS_SUCCESS; }
  1356.         SGS_CASE( "realWidth" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_realWidth() ); return SGS_SUCCESS; }
  1357.         SGS_CASE( "realHeight" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_realHeight() ); return SGS_SUCCESS; }
  1358.         SGS_CASE( "cx0" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->cx0 ); return SGS_SUCCESS; }
  1359.         SGS_CASE( "cx1" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->cx1 ); return SGS_SUCCESS; }
  1360.         SGS_CASE( "cy0" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->cy0 ); return SGS_SUCCESS; }
  1361.         SGS_CASE( "cy1" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->cy1 ); return SGS_SUCCESS; }
  1362.         SGS_CASE( "clientWidth" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_clientWidth() ); return SGS_SUCCESS; }
  1363.         SGS_CASE( "clientHeight" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_clientHeight() ); return SGS_SUCCESS; }
  1364.         SGS_CASE( "px0" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->px0 ); return SGS_SUCCESS; }
  1365.         SGS_CASE( "px1" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->px1 ); return SGS_SUCCESS; }
  1366.         SGS_CASE( "py0" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->py0 ); return SGS_SUCCESS; }
  1367.         SGS_CASE( "py1" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->py1 ); return SGS_SUCCESS; }
  1368.         SGS_CASE( "paddedWidth" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_paddedWidth() ); return SGS_SUCCESS; }
  1369.         SGS_CASE( "paddedHeight" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->get_paddedHeight() ); return SGS_SUCCESS; }
  1370.         SGS_CASE( "_updateFullRect" ){ sgs_PushCFunction( C, _sgs_method__UIControl___updateFullRect ); return SGS_SUCCESS; }
  1371.         SGS_CASE( "_updateChildRects" ){ sgs_PushCFunction( C, _sgs_method__UIControl___updateChildRects ); return SGS_SUCCESS; }
  1372.         SGS_CASE( "_changedFullRect" ){ sgs_PushCFunction( C, _sgs_method__UIControl___changedFullRect ); return SGS_SUCCESS; }
  1373.         SGS_CASE( "_updatingLayout" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_updatingLayout ); return SGS_SUCCESS; }
  1374.         SGS_CASE( "_roundedCoords" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_roundedCoords ); return SGS_SUCCESS; }
  1375.         SGS_CASE( "_childAffectsLayout" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_childAffectsLayout ); return SGS_SUCCESS; }
  1376.         SGS_CASE( "_clientRectFromPadded" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_clientRectFromPadded ); return SGS_SUCCESS; }
  1377.         SGS_CASE( "_neverHit" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_neverHit ); return SGS_SUCCESS; }
  1378.         SGS_CASE( "_layoutRectOverride" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_layoutRectOverride ); return SGS_SUCCESS; }
  1379.         SGS_CASE( "_disableClickBubbling" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->_disableClickBubbling ); return SGS_SUCCESS; }
  1380.         SGS_CASE( "mouseOn" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->mouseOn ); return SGS_SUCCESS; }
  1381.         SGS_CASE( "keyboardFocus" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->keyboardFocus ); return SGS_SUCCESS; }
  1382.         SGS_CASE( "clicked" ){ sgs_PushVar( C, static_cast<UIControl*>( obj->data )->clicked ); return SGS_SUCCESS; }
  1383.     SGS_END_INDEXFUNC;
  1384. }
  1385.  
  1386. int UIControl::_sgs_setindex( SGS_ARGS_SETINDEXFUNC )
  1387. {
  1388.     SGS_BEGIN_INDEXFUNC
  1389.         SGS_CASE( "name" ){ static_cast<UIControl*>( obj->data )->name = sgs_GetVarP<sgsString>()( C, val ); return SGS_SUCCESS; }
  1390.         SGS_CASE( "caption" ){ static_cast<UIControl*>( obj->data )->caption = sgs_GetVarP<sgsString>()( C, val ); return SGS_SUCCESS; }
  1391.         SGS_CASE( "type" ){ static_cast<UIControl*>( obj->data )->type = sgs_GetVarP<sgsString>()( C, val ); return SGS_SUCCESS; }
  1392.         SGS_CASE( "class" ){ static_cast<UIControl*>( obj->data )->classes = sgs_GetVarP<sgsString>()( C, val );
  1393.             static_cast<UIControl*>( obj->data )->_classUpdated(); return SGS_SUCCESS; }
  1394.         SGS_CASE( "styleParent" ){ static_cast<UIControl*>( obj->data )->styleParent = sgs_GetVarP<Handle>()( C, val ); return SGS_SUCCESS; }
  1395.         SGS_CASE( "style" ){ static_cast<UIControl*>( obj->data )->style = sgs_GetVarP<UIStyle>()( C, val );
  1396.             static_cast<UIControl*>( obj->data )->_remergeStyle(); return SGS_SUCCESS; }
  1397.         SGS_CASE( "x" ){ static_cast<UIControl*>( obj->data )->set_x( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1398.         SGS_CASE( "y" ){ static_cast<UIControl*>( obj->data )->set_y( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1399.         SGS_CASE( "width" ){ static_cast<UIControl*>( obj->data )->set_width( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1400.         SGS_CASE( "height" ){ static_cast<UIControl*>( obj->data )->set_height( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1401.         SGS_CASE( "q0x" ){ static_cast<UIControl*>( obj->data )->set_q0x( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1402.         SGS_CASE( "q0y" ){ static_cast<UIControl*>( obj->data )->set_q0y( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1403.         SGS_CASE( "q1x" ){ static_cast<UIControl*>( obj->data )->set_q1x( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1404.         SGS_CASE( "q1y" ){ static_cast<UIControl*>( obj->data )->set_q1y( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1405.         SGS_CASE( "nonClientTop" ){ static_cast<UIControl*>( obj->data )->set_nonClientTop( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1406.         SGS_CASE( "nonClientLeft" ){ static_cast<UIControl*>( obj->data )->set_nonClientLeft( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1407.         SGS_CASE( "nonClientRight" ){ static_cast<UIControl*>( obj->data )->set_nonClientRight( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1408.         SGS_CASE( "nonClientBottom" ){ static_cast<UIControl*>( obj->data )->set_nonClientBottom( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1409.         SGS_CASE( "visible" ){ static_cast<UIControl*>( obj->data )->set_visible( sgs_GetVarP<sgsMaybe<bool> >()( C, val ) ); return SGS_SUCCESS; }
  1410.         SGS_CASE( "index" ){ static_cast<UIControl*>( obj->data )->set_index( sgs_GetVarP<sgsMaybe<int> >()( C, val ) ); return SGS_SUCCESS; }
  1411.         SGS_CASE( "topmost" ){ static_cast<UIControl*>( obj->data )->set_topmost( sgs_GetVarP<sgsMaybe<bool> >()( C, val ) ); return SGS_SUCCESS; }
  1412.         SGS_CASE( "minWidth" ){ static_cast<UIControl*>( obj->data )->set_minWidth( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1413.         SGS_CASE( "maxWidth" ){ static_cast<UIControl*>( obj->data )->set_maxWidth( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1414.         SGS_CASE( "minHeight" ){ static_cast<UIControl*>( obj->data )->set_minHeight( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1415.         SGS_CASE( "maxHeight" ){ static_cast<UIControl*>( obj->data )->set_maxHeight( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1416.         SGS_CASE( "marginLeft" ){ static_cast<UIControl*>( obj->data )->set_marginLeft( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1417.         SGS_CASE( "marginRight" ){ static_cast<UIControl*>( obj->data )->set_marginRight( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1418.         SGS_CASE( "marginTop" ){ static_cast<UIControl*>( obj->data )->set_marginTop( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1419.         SGS_CASE( "marginBottom" ){ static_cast<UIControl*>( obj->data )->set_marginBottom( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1420.         SGS_CASE( "paddingLeft" ){ static_cast<UIControl*>( obj->data )->set_paddingLeft( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1421.         SGS_CASE( "paddingRight" ){ static_cast<UIControl*>( obj->data )->set_paddingRight( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1422.         SGS_CASE( "paddingTop" ){ static_cast<UIControl*>( obj->data )->set_paddingTop( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1423.         SGS_CASE( "paddingBottom" ){ static_cast<UIControl*>( obj->data )->set_paddingBottom( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1424.         SGS_CASE( "posMode" ){ static_cast<UIControl*>( obj->data )->set_posMode( sgs_GetVarP<sgsMaybe<int8_t> >()( C, val ) ); return SGS_SUCCESS; }
  1425.         SGS_CASE( "stackMode" ){ static_cast<UIControl*>( obj->data )->set_stackMode( sgs_GetVarP<sgsMaybe<int8_t> >()( C, val ) ); return SGS_SUCCESS; }
  1426.         SGS_CASE( "overflow" ){ static_cast<UIControl*>( obj->data )->set_overflow( sgs_GetVarP<sgsMaybe<bool> >()( C, val ) ); return SGS_SUCCESS; }
  1427.         SGS_CASE( "backgroundColor" ){ static_cast<UIControl*>( obj->data )->set_backgroundColor( sgs_GetVarP<sgsMaybe<UIColor> >()( C, val ) ); return SGS_SUCCESS; }
  1428.         SGS_CASE( "textColor" ){ static_cast<UIControl*>( obj->data )->set_textColor( sgs_GetVarP<sgsMaybe<UIColor> >()( C, val ) ); return SGS_SUCCESS; }
  1429.         SGS_CASE( "halign" ){ static_cast<UIControl*>( obj->data )->set_halign( sgs_GetVarP<sgsMaybe<uint16_t> >()( C, val ) ); return SGS_SUCCESS; }
  1430.         SGS_CASE( "valign" ){ static_cast<UIControl*>( obj->data )->set_valign( sgs_GetVarP<sgsMaybe<uint16_t> >()( C, val ) ); return SGS_SUCCESS; }
  1431.         SGS_CASE( "cursor" ){ static_cast<UIControl*>( obj->data )->set_cursor( sgs_GetVarP<sgsVariable>()( C, val ) ); return SGS_SUCCESS; }
  1432.         SGS_CASE( "font" ){ static_cast<UIControl*>( obj->data )->set_font( sgs_GetVarP<sgsString>()( C, val ) ); return SGS_SUCCESS; }
  1433.         SGS_CASE( "image" ){ static_cast<UIControl*>( obj->data )->set_image( sgs_GetVarP<sgsString>()( C, val ) ); return SGS_SUCCESS; }
  1434.         SGS_CASE( "icon" ){ static_cast<UIControl*>( obj->data )->set_icon( sgs_GetVarP<sgsString>()( C, val ) ); return SGS_SUCCESS; }
  1435.         SGS_CASE( "fontSize" ){ static_cast<UIControl*>( obj->data )->set_fontSize( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1436.         SGS_CASE( "renderfunc" ){ static_cast<UIControl*>( obj->data )->set_renderfunc( sgs_GetVarP<sgsVariable>()( C, val ) ); return SGS_SUCCESS; }
  1437.         SGS_CASE( "nonClientH" ){ static_cast<UIControl*>( obj->data )->set_nonClientH( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1438.         SGS_CASE( "nonClientV" ){ static_cast<UIControl*>( obj->data )->set_nonClientV( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1439.         SGS_CASE( "nonClient" ){ static_cast<UIControl*>( obj->data )->set_nonClient( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1440.         SGS_CASE( "marginH" ){ static_cast<UIControl*>( obj->data )->set_marginH( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1441.         SGS_CASE( "marginV" ){ static_cast<UIControl*>( obj->data )->set_marginV( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1442.         SGS_CASE( "margin" ){ static_cast<UIControl*>( obj->data )->set_margin( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1443.         SGS_CASE( "paddingH" ){ static_cast<UIControl*>( obj->data )->set_paddingH( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1444.         SGS_CASE( "paddingV" ){ static_cast<UIControl*>( obj->data )->set_paddingV( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1445.         SGS_CASE( "padding" ){ static_cast<UIControl*>( obj->data )->set_padding( sgs_GetVarP<sgsMaybe<float> >()( C, val ) ); return SGS_SUCCESS; }
  1446.         SGS_CASE( "anchorMode" ){ static_cast<UIControl*>( obj->data )->set_anchorMode( sgs_GetVarP<int>()( C, val ) ); return SGS_SUCCESS; }
  1447.         SGS_CASE( "align" ){ static_cast<UIControl*>( obj->data )->set_align( sgs_GetVarP<uint16_t>()( C, val ) ); return SGS_SUCCESS; }
  1448.         SGS_CASE( "scroll_x" ){ static_cast<UIControl*>( obj->data )->scroll_x = sgs_GetVarP<float>()( C, val );
  1449.             static_cast<UIControl*>( obj->data )->updateScroll(); return SGS_SUCCESS; }
  1450.         SGS_CASE( "scroll_y" ){ static_cast<UIControl*>( obj->data )->scroll_y = sgs_GetVarP<float>()( C, val );
  1451.             static_cast<UIControl*>( obj->data )->updateScroll(); return SGS_SUCCESS; }
  1452.         SGS_CASE( "nonclient" ){ static_cast<UIControl*>( obj->data )->nonclient = sgs_GetVarP<bool>()( C, val );
  1453.             static_cast<UIControl*>( obj->data )->onLayoutChange(); return SGS_SUCCESS; }
  1454.         SGS_CASE( "offsetLeft" ){ static_cast<UIControl*>( obj->data )->set_offsetLeft( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  1455.         SGS_CASE( "offsetRight" ){ static_cast<UIControl*>( obj->data )->set_offsetRight( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  1456.         SGS_CASE( "offsetTop" ){ static_cast<UIControl*>( obj->data )->set_offsetTop( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  1457.         SGS_CASE( "offsetBottom" ){ static_cast<UIControl*>( obj->data )->set_offsetBottom( sgs_GetVarP<float>()( C, val ) ); return SGS_SUCCESS; }
  1458.         SGS_CASE( "_cachedFont" ){ static_cast<UIControl*>( obj->data )->_cachedFont = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  1459.         SGS_CASE( "_cachedImage" ){ static_cast<UIControl*>( obj->data )->_cachedImage = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  1460.         SGS_CASE( "_cachedIcon" ){ static_cast<UIControl*>( obj->data )->_cachedIcon = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  1461.         SGS_CASE( "callback" ){ static_cast<UIControl*>( obj->data )->callback = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  1462.         SGS_CASE( "data" ){ static_cast<UIControl*>( obj->data )->data = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  1463.         SGS_CASE( "_interface" ){ static_cast<UIControl*>( obj->data )->_interface = sgs_GetVarP<sgsVariable>()( C, val ); return SGS_SUCCESS; }
  1464.         SGS_CASE( "rx0" ){ static_cast<UIControl*>( obj->data )->rx0 = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  1465.         SGS_CASE( "rx1" ){ static_cast<UIControl*>( obj->data )->rx1 = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  1466.         SGS_CASE( "ry0" ){ static_cast<UIControl*>( obj->data )->ry0 = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  1467.         SGS_CASE( "ry1" ){ static_cast<UIControl*>( obj->data )->ry1 = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  1468.         SGS_CASE( "cx0" ){ static_cast<UIControl*>( obj->data )->cx0 = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  1469.         SGS_CASE( "cx1" ){ static_cast<UIControl*>( obj->data )->cx1 = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  1470.         SGS_CASE( "cy0" ){ static_cast<UIControl*>( obj->data )->cy0 = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  1471.         SGS_CASE( "cy1" ){ static_cast<UIControl*>( obj->data )->cy1 = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  1472.         SGS_CASE( "px0" ){ static_cast<UIControl*>( obj->data )->px0 = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  1473.         SGS_CASE( "px1" ){ static_cast<UIControl*>( obj->data )->px1 = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  1474.         SGS_CASE( "py0" ){ static_cast<UIControl*>( obj->data )->py0 = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  1475.         SGS_CASE( "py1" ){ static_cast<UIControl*>( obj->data )->py1 = sgs_GetVarP<float>()( C, val ); return SGS_SUCCESS; }
  1476.         SGS_CASE( "_updatingLayout" ){ static_cast<UIControl*>( obj->data )->_updatingLayout = sgs_GetVarP<bool>()( C, val ); return SGS_SUCCESS; }
  1477.         SGS_CASE( "_roundedCoords" ){ static_cast<UIControl*>( obj->data )->_roundedCoords = sgs_GetVarP<bool>()( C, val ); return SGS_SUCCESS; }
  1478.         SGS_CASE( "_childAffectsLayout" ){ static_cast<UIControl*>( obj->data )->_childAffectsLayout = sgs_GetVarP<bool>()( C, val ); return SGS_SUCCESS; }
  1479.         SGS_CASE( "_clientRectFromPadded" ){ static_cast<UIControl*>( obj->data )->_clientRectFromPadded = sgs_GetVarP<bool>()( C, val ); return SGS_SUCCESS; }
  1480.         SGS_CASE( "_neverHit" ){ static_cast<UIControl*>( obj->data )->_neverHit = sgs_GetVarP<bool>()( C, val ); return SGS_SUCCESS; }
  1481.         SGS_CASE( "_layoutRectOverride" ){ static_cast<UIControl*>( obj->data )->_layoutRectOverride = sgs_GetVarP<bool>()( C, val ); return SGS_SUCCESS; }
  1482.         SGS_CASE( "_disableClickBubbling" ){ static_cast<UIControl*>( obj->data )->_disableClickBubbling = sgs_GetVarP<bool>()( C, val ); return SGS_SUCCESS; }
  1483.     SGS_END_INDEXFUNC;
  1484. }
  1485.  
  1486. int UIControl::_sgs_dump( SGS_CTX, sgs_VarObj* obj, int depth )
  1487. {
  1488.     char bfr[ 41 ];
  1489.     sprintf( bfr, "UIControl (%p) %s", obj->data, depth > 0 ? "\n{" : " ..." );
  1490.     sgs_PushString( C, bfr );
  1491.     if( depth > 0 )
  1492.     {
  1493.         { sgs_PushString( C, "\nid = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->id, depth ).push( C ); }
  1494.         { sgs_PushString( C, "\nname = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->name, depth ).push( C ); }
  1495.         { sgs_PushString( C, "\ncaption = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->caption, depth ).push( C ); }
  1496.         { sgs_PushString( C, "\ntype = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->type, depth ).push( C ); }
  1497.         { sgs_PushString( C, "\nfilteredStyle = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->filteredStyle, depth ).push( C ); }
  1498.         { sgs_PushString( C, "\nstyle = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->style, depth ).push( C ); }
  1499.         { sgs_PushString( C, "\nx = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_x(), depth ).push( C ); }
  1500.         { sgs_PushString( C, "\ny = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_y(), depth ).push( C ); }
  1501.         { sgs_PushString( C, "\nwidth = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_width(), depth ).push( C ); }
  1502.         { sgs_PushString( C, "\nheight = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_height(), depth ).push( C ); }
  1503.         { sgs_PushString( C, "\nq0x = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_q0x(), depth ).push( C ); }
  1504.         { sgs_PushString( C, "\nq0y = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_q0y(), depth ).push( C ); }
  1505.         { sgs_PushString( C, "\nq1x = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_q1x(), depth ).push( C ); }
  1506.         { sgs_PushString( C, "\nq1y = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_q1y(), depth ).push( C ); }
  1507.         { sgs_PushString( C, "\nnonClientTop = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_nonClientTop(), depth ).push( C ); }
  1508.         { sgs_PushString( C, "\nnonClientLeft = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_nonClientLeft(), depth ).push( C ); }
  1509.         { sgs_PushString( C, "\nnonClientRight = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_nonClientRight(), depth ).push( C ); }
  1510.         { sgs_PushString( C, "\nnonClientBottom = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_nonClientBottom(), depth ).push( C ); }
  1511.         { sgs_PushString( C, "\nvisible = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_visible(), depth ).push( C ); }
  1512.         { sgs_PushString( C, "\nindex = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_index(), depth ).push( C ); }
  1513.         { sgs_PushString( C, "\ntopmost = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_topmost(), depth ).push( C ); }
  1514.         { sgs_PushString( C, "\nminWidth = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_minWidth(), depth ).push( C ); }
  1515.         { sgs_PushString( C, "\nmaxWidth = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_maxWidth(), depth ).push( C ); }
  1516.         { sgs_PushString( C, "\nminHeight = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_minHeight(), depth ).push( C ); }
  1517.         { sgs_PushString( C, "\nmaxHeight = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_maxHeight(), depth ).push( C ); }
  1518.         { sgs_PushString( C, "\nmarginLeft = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_marginLeft(), depth ).push( C ); }
  1519.         { sgs_PushString( C, "\nmarginRight = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_marginRight(), depth ).push( C ); }
  1520.         { sgs_PushString( C, "\nmarginTop = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_marginTop(), depth ).push( C ); }
  1521.         { sgs_PushString( C, "\nmarginBottom = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_marginBottom(), depth ).push( C ); }
  1522.         { sgs_PushString( C, "\npaddingLeft = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_paddingLeft(), depth ).push( C ); }
  1523.         { sgs_PushString( C, "\npaddingRight = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_paddingRight(), depth ).push( C ); }
  1524.         { sgs_PushString( C, "\npaddingTop = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_paddingTop(), depth ).push( C ); }
  1525.         { sgs_PushString( C, "\npaddingBottom = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_paddingBottom(), depth ).push( C ); }
  1526.         { sgs_PushString( C, "\nposMode = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_posMode(), depth ).push( C ); }
  1527.         { sgs_PushString( C, "\nstackMode = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_stackMode(), depth ).push( C ); }
  1528.         { sgs_PushString( C, "\noverflow = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_overflow(), depth ).push( C ); }
  1529.         { sgs_PushString( C, "\nbackgroundColor = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_backgroundColor(), depth ).push( C ); }
  1530.         { sgs_PushString( C, "\ntextColor = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_textColor(), depth ).push( C ); }
  1531.         { sgs_PushString( C, "\nhalign = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_halign(), depth ).push( C ); }
  1532.         { sgs_PushString( C, "\nvalign = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_valign(), depth ).push( C ); }
  1533.         { sgs_PushString( C, "\ncursor = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_cursor(), depth ).push( C ); }
  1534.         { sgs_PushString( C, "\nfont = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_font(), depth ).push( C ); }
  1535.         { sgs_PushString( C, "\nimage = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_image(), depth ).push( C ); }
  1536.         { sgs_PushString( C, "\nicon = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_icon(), depth ).push( C ); }
  1537.         { sgs_PushString( C, "\nfontSize = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_fontSize(), depth ).push( C ); }
  1538.         { sgs_PushString( C, "\nrenderfunc = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_renderfunc(), depth ).push( C ); }
  1539.         { sgs_PushString( C, "\nnonClientH = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_nonClientH(), depth ).push( C ); }
  1540.         { sgs_PushString( C, "\nnonClientV = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_nonClientV(), depth ).push( C ); }
  1541.         { sgs_PushString( C, "\nnonClient = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_nonClient(), depth ).push( C ); }
  1542.         { sgs_PushString( C, "\nmarginH = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_marginH(), depth ).push( C ); }
  1543.         { sgs_PushString( C, "\nmarginV = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_marginV(), depth ).push( C ); }
  1544.         { sgs_PushString( C, "\nmargin = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_margin(), depth ).push( C ); }
  1545.         { sgs_PushString( C, "\npaddingH = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_paddingH(), depth ).push( C ); }
  1546.         { sgs_PushString( C, "\npaddingV = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_paddingV(), depth ).push( C ); }
  1547.         { sgs_PushString( C, "\npadding = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_padding(), depth ).push( C ); }
  1548.         { sgs_PushString( C, "\nanchorMode = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_anchorMode(), depth ).push( C ); }
  1549.         { sgs_PushString( C, "\nalign = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_align(), depth ).push( C ); }
  1550.         { sgs_PushString( C, "\nscroll_x = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->scroll_x, depth ).push( C ); }
  1551.         { sgs_PushString( C, "\nscroll_y = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->scroll_y, depth ).push( C ); }
  1552.         { sgs_PushString( C, "\nnonclient = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->nonclient, depth ).push( C ); }
  1553.         { sgs_PushString( C, "\noffsetLeft = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_offsetLeft(), depth ).push( C ); }
  1554.         { sgs_PushString( C, "\noffsetRight = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_offsetRight(), depth ).push( C ); }
  1555.         { sgs_PushString( C, "\noffsetTop = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_offsetTop(), depth ).push( C ); }
  1556.         { sgs_PushString( C, "\noffsetBottom = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_offsetBottom(), depth ).push( C ); }
  1557.         { sgs_PushString( C, "\n_cachedFont = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->_cachedFont, depth ).push( C ); }
  1558.         { sgs_PushString( C, "\n_cachedImage = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->_cachedImage, depth ).push( C ); }
  1559.         { sgs_PushString( C, "\n_cachedIcon = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->_cachedIcon, depth ).push( C ); }
  1560.         { sgs_PushString( C, "\ncallback = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->callback, depth ).push( C ); }
  1561.         { sgs_PushString( C, "\ndata = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->data, depth ).push( C ); }
  1562.         { sgs_PushString( C, "\n_interface = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->_interface, depth ).push( C ); }
  1563.         { sgs_PushString( C, "\nautoWidth = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->autoWidth, depth ).push( C ); }
  1564.         { sgs_PushString( C, "\nautoHeight = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->autoHeight, depth ).push( C ); }
  1565.         { sgs_PushString( C, "\nrx0 = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->rx0, depth ).push( C ); }
  1566.         { sgs_PushString( C, "\nrx1 = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->rx1, depth ).push( C ); }
  1567.         { sgs_PushString( C, "\nry0 = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->ry0, depth ).push( C ); }
  1568.         { sgs_PushString( C, "\nry1 = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->ry1, depth ).push( C ); }
  1569.         { sgs_PushString( C, "\nrealWidth = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_realWidth(), depth ).push( C ); }
  1570.         { sgs_PushString( C, "\nrealHeight = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_realHeight(), depth ).push( C ); }
  1571.         { sgs_PushString( C, "\ncx0 = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->cx0, depth ).push( C ); }
  1572.         { sgs_PushString( C, "\ncx1 = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->cx1, depth ).push( C ); }
  1573.         { sgs_PushString( C, "\ncy0 = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->cy0, depth ).push( C ); }
  1574.         { sgs_PushString( C, "\ncy1 = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->cy1, depth ).push( C ); }
  1575.         { sgs_PushString( C, "\nclientWidth = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_clientWidth(), depth ).push( C ); }
  1576.         { sgs_PushString( C, "\nclientHeight = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_clientHeight(), depth ).push( C ); }
  1577.         { sgs_PushString( C, "\npx0 = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->px0, depth ).push( C ); }
  1578.         { sgs_PushString( C, "\npx1 = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->px1, depth ).push( C ); }
  1579.         { sgs_PushString( C, "\npy0 = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->py0, depth ).push( C ); }
  1580.         { sgs_PushString( C, "\npy1 = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->py1, depth ).push( C ); }
  1581.         { sgs_PushString( C, "\npaddedWidth = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_paddedWidth(), depth ).push( C ); }
  1582.         { sgs_PushString( C, "\npaddedHeight = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->get_paddedHeight(), depth ).push( C ); }
  1583.         { sgs_PushString( C, "\n_updatingLayout = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->_updatingLayout, depth ).push( C ); }
  1584.         { sgs_PushString( C, "\n_roundedCoords = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->_roundedCoords, depth ).push( C ); }
  1585.         { sgs_PushString( C, "\n_childAffectsLayout = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->_childAffectsLayout, depth ).push( C ); }
  1586.         { sgs_PushString( C, "\n_clientRectFromPadded = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->_clientRectFromPadded, depth ).push( C ); }
  1587.         { sgs_PushString( C, "\n_neverHit = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->_neverHit, depth ).push( C ); }
  1588.         { sgs_PushString( C, "\n_layoutRectOverride = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->_layoutRectOverride, depth ).push( C ); }
  1589.         { sgs_PushString( C, "\n_disableClickBubbling = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->_disableClickBubbling, depth ).push( C ); }
  1590.         { sgs_PushString( C, "\nmouseOn = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->mouseOn, depth ).push( C ); }
  1591.         { sgs_PushString( C, "\nkeyboardFocus = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->keyboardFocus, depth ).push( C ); }
  1592.         { sgs_PushString( C, "\nclicked = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->clicked, depth ).push( C ); }
  1593.         { sgs_PushString( C, "\nm_children = " ); sgs_DumpData( C, static_cast<UIControl*>( obj->data )->m_children, depth ).push( C ); }
  1594.         sgs_StringConcat( C, 202 );
  1595.         sgs_PadString( C );
  1596.         sgs_PushString( C, "\n}" );
  1597.         sgs_StringConcat( C, 3 );
  1598.     }
  1599.     return SGS_SUCCESS;
  1600. }
  1601.  
  1602. sgs_ObjInterface UIControl::_sgs_interface[1] =
  1603. {{
  1604.     "UIControl",
  1605.     UIControl::_sgs_destruct, UIControl::_sgs_gcmark, UIControl::sgs_getindex, UIControl::sgs_setindex, NULL, NULL, UIControl::_sgs_dump, NULL, NULL, NULL,
  1606. }};
  1607.  
  1608.  
  1609. static int _sgs_method__UIQuery__find( SGS_CTX )
  1610. {
  1611.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, find ) ) return 0;
  1612.     sgs_PushVar(C,data->find(  )); return 1;
  1613. }
  1614.  
  1615. static int _sgs_method__UIQuery__children( SGS_CTX )
  1616. {
  1617.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, children ) ) return 0;
  1618.     sgs_PushVar(C,data->children(  )); return 1;
  1619. }
  1620.  
  1621. static int _sgs_method__UIQuery__parent( SGS_CTX )
  1622. {
  1623.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, parent ) ) return 0;
  1624.     sgs_PushVar(C,data->parent(  )); return 1;
  1625. }
  1626.  
  1627. static int _sgs_method__UIQuery__closest( SGS_CTX )
  1628. {
  1629.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, closest ) ) return 0;
  1630.     sgs_PushVar(C,data->closest(  )); return 1;
  1631. }
  1632.  
  1633. static int _sgs_method__UIQuery__prev( SGS_CTX )
  1634. {
  1635.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, prev ) ) return 0;
  1636.     sgs_PushVar(C,data->prev(  )); return 1;
  1637. }
  1638.  
  1639. static int _sgs_method__UIQuery__next( SGS_CTX )
  1640. {
  1641.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, next ) ) return 0;
  1642.     sgs_PushVar(C,data->next(  )); return 1;
  1643. }
  1644.  
  1645. static int _sgs_method__UIQuery__prevAll( SGS_CTX )
  1646. {
  1647.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, prevAll ) ) return 0;
  1648.     sgs_PushVar(C,data->prevAll(  )); return 1;
  1649. }
  1650.  
  1651. static int _sgs_method__UIQuery__nextAll( SGS_CTX )
  1652. {
  1653.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, nextAll ) ) return 0;
  1654.     sgs_PushVar(C,data->nextAll(  )); return 1;
  1655. }
  1656.  
  1657. static int _sgs_method__UIQuery__filter( SGS_CTX )
  1658. {
  1659.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, filter ) ) return 0;
  1660.     sgs_PushVar(C,data->filter(  )); return 1;
  1661. }
  1662.  
  1663. static int _sgs_method__UIQuery__first( SGS_CTX )
  1664. {
  1665.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, first ) ) return 0;
  1666.     sgs_PushVar(C,data->first(  )); return 1;
  1667. }
  1668.  
  1669. static int _sgs_method__UIQuery__last( SGS_CTX )
  1670. {
  1671.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, last ) ) return 0;
  1672.     sgs_PushVar(C,data->last(  )); return 1;
  1673. }
  1674.  
  1675. static int _sgs_method__UIQuery__getAttr( SGS_CTX )
  1676. {
  1677.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, getAttr ) ) return 0;
  1678.     sgs_PushVar(C,data->getAttr( sgs_GetVar<sgsString>()(C,0) )); return 1;
  1679. }
  1680.  
  1681. static int _sgs_method__UIQuery__setAttr( SGS_CTX )
  1682. {
  1683.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, setAttr ) ) return 0;
  1684.     sgs_PushVar(C,data->setAttr( sgs_GetVar<sgsString>()(C,0), sgs_GetVar<sgsVariable>()(C,1) )); return 1;
  1685. }
  1686.  
  1687. static int _sgs_method__UIQuery__addClass( SGS_CTX )
  1688. {
  1689.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, addClass ) ) return 0;
  1690.     sgs_PushVar(C,data->addClass( sgs_GetVar<sgsString>()(C,0) )); return 1;
  1691. }
  1692.  
  1693. static int _sgs_method__UIQuery__removeClass( SGS_CTX )
  1694. {
  1695.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, removeClass ) ) return 0;
  1696.     sgs_PushVar(C,data->removeClass( sgs_GetVar<sgsString>()(C,0) )); return 1;
  1697. }
  1698.  
  1699. static int _sgs_method__UIQuery__bindEvent( SGS_CTX )
  1700. {
  1701.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, bindEvent ) ) return 0;
  1702.     sgs_PushVar(C,data->bindEvent( sgs_GetVar<sgsString>()(C,0), sgs_GetVar<sgsVariable>()(C,1) )); return 1;
  1703. }
  1704.  
  1705. static int _sgs_method__UIQuery__unbindEvent( SGS_CTX )
  1706. {
  1707.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, unbindEvent ) ) return 0;
  1708.     sgs_PushVar(C,data->unbindEvent( sgs_GetVar<sgsString>()(C,0), sgs_GetVar<sgsVariable>()(C,1) )); return 1;
  1709. }
  1710.  
  1711. static int _sgs_method__UIQuery__unbindEventAll( SGS_CTX )
  1712. {
  1713.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, unbindEventAll ) ) return 0;
  1714.     sgs_PushVar(C,data->unbindEventAll( sgs_GetVar<sgsString>()(C,0) )); return 1;
  1715. }
  1716.  
  1717. static int _sgs_method__UIQuery__callEvent( SGS_CTX )
  1718. {
  1719.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, callEvent ) ) return 0;
  1720.     sgs_PushVar(C,data->callEvent( sgs_GetVar<sgsString>()(C,0), sgs_GetVar<sgsVariable>()(C,1) )); return 1;
  1721. }
  1722.  
  1723. static int _sgs_method__UIQuery__animate( SGS_CTX )
  1724. {
  1725.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, animate ) ) return 0;
  1726.     sgs_PushVar(C,data->animate( sgs_GetVar<sgsVariable>()(C,0), sgs_GetVar<float>()(C,1), sgs_GetVar<sgsVariable>()(C,2), sgs_GetVar<sgsVariable>()(C,3) )); return 1;
  1727. }
  1728.  
  1729. static int _sgs_method__UIQuery__stop( SGS_CTX )
  1730. {
  1731.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, stop ) ) return 0;
  1732.     sgs_PushVar(C,data->stop( sgs_GetVar<bool>()(C,0) )); return 1;
  1733. }
  1734.  
  1735. static int _sgs_method__UIQuery__dequeue( SGS_CTX )
  1736. {
  1737.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, dequeue ) ) return 0;
  1738.     sgs_PushVar(C,data->dequeue(  )); return 1;
  1739. }
  1740.  
  1741. static int _sgs_method__UIQuery__skip( SGS_CTX )
  1742. {
  1743.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, skip ) ) return 0;
  1744.     sgs_PushVar(C,data->skip( sgs_GetVar<bool>()(C,0) )); return 1;
  1745. }
  1746.  
  1747. static int _sgs_method__UIQuery__setVisible( SGS_CTX )
  1748. {
  1749.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, setVisible ) ) return 0;
  1750.     sgs_PushVar(C,data->setVisible( sgs_GetVar<bool>()(C,0) )); return 1;
  1751. }
  1752.  
  1753. static int _sgs_method__UIQuery__show( SGS_CTX )
  1754. {
  1755.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, show ) ) return 0;
  1756.     sgs_PushVar(C,data->show(  )); return 1;
  1757. }
  1758.  
  1759. static int _sgs_method__UIQuery__hide( SGS_CTX )
  1760. {
  1761.     UIQuery* data; if( !SGS_PARSE_METHOD( C, UIQuery::_sgs_interface, data, UIQuery, hide ) ) return 0;
  1762.     sgs_PushVar(C,data->hide(  )); return 1;
  1763. }
  1764.  
  1765. int UIQuery::_sgs_destruct( SGS_CTX, sgs_VarObj* obj )
  1766. {
  1767.     static_cast<UIQuery*>( obj->data )->~UIQuery();
  1768.     return SGS_SUCCESS;
  1769. }
  1770.  
  1771. int UIQuery::_sgs_gcmark( SGS_CTX, sgs_VarObj* obj )
  1772. {
  1773.     if( SGS_FAILED( sgs_GCMarkVar( C, static_cast<UIQuery*>( obj->data )->m_frame ) ) ) return SGS_EINPROC;
  1774.     if( SGS_FAILED( sgs_GCMarkVar( C, static_cast<UIQuery*>( obj->data )->m_items ) ) ) return SGS_EINPROC;
  1775.     return SGS_SUCCESS;
  1776. }
  1777.  
  1778. int UIQuery::_sgs_getindex( SGS_ARGS_GETINDEXFUNC )
  1779. {
  1780.     SGS_BEGIN_INDEXFUNC
  1781.         SGS_CASE( "find" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__find ); return SGS_SUCCESS; }
  1782.         SGS_CASE( "children" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__children ); return SGS_SUCCESS; }
  1783.         SGS_CASE( "parent" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__parent ); return SGS_SUCCESS; }
  1784.         SGS_CASE( "closest" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__closest ); return SGS_SUCCESS; }
  1785.         SGS_CASE( "prev" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__prev ); return SGS_SUCCESS; }
  1786.         SGS_CASE( "next" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__next ); return SGS_SUCCESS; }
  1787.         SGS_CASE( "prevAll" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__prevAll ); return SGS_SUCCESS; }
  1788.         SGS_CASE( "nextAll" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__nextAll ); return SGS_SUCCESS; }
  1789.         SGS_CASE( "filter" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__filter ); return SGS_SUCCESS; }
  1790.         SGS_CASE( "first" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__first ); return SGS_SUCCESS; }
  1791.         SGS_CASE( "last" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__last ); return SGS_SUCCESS; }
  1792.         SGS_CASE( "getAttr" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__getAttr ); return SGS_SUCCESS; }
  1793.         SGS_CASE( "setAttr" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__setAttr ); return SGS_SUCCESS; }
  1794.         SGS_CASE( "addClass" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__addClass ); return SGS_SUCCESS; }
  1795.         SGS_CASE( "removeClass" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__removeClass ); return SGS_SUCCESS; }
  1796.         SGS_CASE( "bindEvent" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__bindEvent ); return SGS_SUCCESS; }
  1797.         SGS_CASE( "unbindEvent" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__unbindEvent ); return SGS_SUCCESS; }
  1798.         SGS_CASE( "unbindEventAll" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__unbindEventAll ); return SGS_SUCCESS; }
  1799.         SGS_CASE( "callEvent" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__callEvent ); return SGS_SUCCESS; }
  1800.         SGS_CASE( "animate" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__animate ); return SGS_SUCCESS; }
  1801.         SGS_CASE( "stop" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__stop ); return SGS_SUCCESS; }
  1802.         SGS_CASE( "dequeue" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__dequeue ); return SGS_SUCCESS; }
  1803.         SGS_CASE( "skip" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__skip ); return SGS_SUCCESS; }
  1804.         SGS_CASE( "setVisible" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__setVisible ); return SGS_SUCCESS; }
  1805.         SGS_CASE( "show" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__show ); return SGS_SUCCESS; }
  1806.         SGS_CASE( "hide" ){ sgs_PushCFunction( C, _sgs_method__UIQuery__hide ); return SGS_SUCCESS; }
  1807.         SGS_CASE( "m_frame" ){ sgs_PushVar( C, static_cast<UIQuery*>( obj->data )->m_frame ); return SGS_SUCCESS; }
  1808.     SGS_END_INDEXFUNC;
  1809. }
  1810.  
  1811. int UIQuery::_sgs_setindex( SGS_ARGS_SETINDEXFUNC )
  1812. {
  1813.     SGS_BEGIN_INDEXFUNC
  1814.     SGS_END_INDEXFUNC;
  1815. }
  1816.  
  1817. int UIQuery::_sgs_dump( SGS_CTX, sgs_VarObj* obj, int depth )
  1818. {
  1819.     char bfr[ 39 ];
  1820.     sprintf( bfr, "UIQuery (%p) %s", obj->data, depth > 0 ? "\n{" : " ..." );
  1821.     sgs_PushString( C, bfr );
  1822.     if( depth > 0 )
  1823.     {
  1824.         { sgs_PushString( C, "\nm_frame = " ); sgs_DumpData( C, static_cast<UIQuery*>( obj->data )->m_frame, depth ).push( C ); }
  1825.         sgs_StringConcat( C, 2 );
  1826.         sgs_PadString( C );
  1827.         sgs_PushString( C, "\n}" );
  1828.         sgs_StringConcat( C, 3 );
  1829.     }
  1830.     return SGS_SUCCESS;
  1831. }
  1832.  
  1833. sgs_ObjInterface UIQuery::_sgs_interface[1] =
  1834. {{
  1835.     "UIQuery",
  1836.     UIQuery::_sgs_destruct, UIQuery::_sgs_gcmark, UIQuery::sgs_getindex, UIQuery::_sgs_setindex, UIQuery::sgs_convert, NULL, UIQuery::_sgs_dump, NULL, NULL, NULL,
  1837. }};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement