/*
** Lua binding: Cegui
** Generated automatically by tolua++-1.0.92 on Fri Feb 21 16:29:06 2014.
*/

#ifndef __cplusplus
#include "stdlib.h"
#endif
#include "string.h"

#include "components/lua/tolua++.h"

/* Exported function */
TOLUA_API int  tolua_Cegui_open (lua_State* tolua_S);

#include "Helper.h"

/* function to register type */
static void tolua_reg_types (lua_State* tolua_S)
{
 tolua_usertype(tolua_S,"Ember::Cegui::Helper");
 tolua_usertype(tolua_S,"CEGUI::ImageManager");
 tolua_usertype(tolua_S,"CEGUI::Window");
}

/* method: notifyScreenAreaChanged of class  Ember::Cegui::Helper */
#ifndef TOLUA_DISABLE_tolua_Cegui_Ember_Cegui_Helper_notifyScreenAreaChanged00
static int tolua_Cegui_Ember_Cegui_Helper_notifyScreenAreaChanged00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"Ember::Cegui::Helper",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"CEGUI::Window",0,&tolua_err) ||
     !tolua_isboolean(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  CEGUI::Window* window = ((CEGUI::Window*)  tolua_tousertype(tolua_S,2,0));
  bool recursive = ((bool)  tolua_toboolean(tolua_S,3,0));
  {
   Ember::Cegui::Helper::notifyScreenAreaChanged(window,recursive);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'notifyScreenAreaChanged'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: Window_getChildCount of class  Ember::Cegui::Helper */
#ifndef TOLUA_DISABLE_tolua_Cegui_Ember_Cegui_Helper_Window_getChildCount00
static int tolua_Cegui_Ember_Cegui_Helper_Window_getChildCount00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"Ember::Cegui::Helper",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"CEGUI::Window",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  CEGUI::Window* window = ((CEGUI::Window*)  tolua_tousertype(tolua_S,2,0));
  {
   unsigned int tolua_ret = (unsigned int)  Ember::Cegui::Helper::Window_getChildCount(window);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Window_getChildCount'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: ImageManager_getSingleton of class  Ember::Cegui::Helper */
#ifndef TOLUA_DISABLE_tolua_Cegui_Ember_Cegui_Helper_ImageManager_getSingleton00
static int tolua_Cegui_Ember_Cegui_Helper_ImageManager_getSingleton00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"Ember::Cegui::Helper",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   CEGUI::ImageManager& tolua_ret = (CEGUI::ImageManager&)  Ember::Cegui::Helper::ImageManager_getSingleton();
    tolua_pushusertype(tolua_S,(void*)&tolua_ret,"CEGUI::ImageManager");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'ImageManager_getSingleton'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: Window_getChildRecursive of class  Ember::Cegui::Helper */
#ifndef TOLUA_DISABLE_tolua_Cegui_Ember_Cegui_Helper_Window_getChildRecursive00
static int tolua_Cegui_Ember_Cegui_Helper_Window_getChildRecursive00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"Ember::Cegui::Helper",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"CEGUI::Window",0,&tolua_err) ||
     !tolua_iscppstring(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  CEGUI::Window* window = ((CEGUI::Window*)  tolua_tousertype(tolua_S,2,0));
  const std::string name = ((const std::string)  tolua_tocppstring(tolua_S,3,0));
  {
   CEGUI::Window* tolua_ret = (CEGUI::Window*)  Ember::Cegui::Helper::Window_getChildRecursive(window,name);
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"CEGUI::Window");
   tolua_pushcppstring(tolua_S,(const char*)name);
  }
 }
 return 2;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Window_getChildRecursive'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: Window_removeChild of class  Ember::Cegui::Helper */
#ifndef TOLUA_DISABLE_tolua_Cegui_Ember_Cegui_Helper_Window_removeChild00
static int tolua_Cegui_Ember_Cegui_Helper_Window_removeChild00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"Ember::Cegui::Helper",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"CEGUI::Window",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,3,"CEGUI::Window",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  CEGUI::Window* window = ((CEGUI::Window*)  tolua_tousertype(tolua_S,2,0));
  CEGUI::Window* child = ((CEGUI::Window*)  tolua_tousertype(tolua_S,3,0));
  {
   Ember::Cegui::Helper::Window_removeChild(window,child);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Window_removeChild'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: calculateRenderedCentredStringVerticalExtent of class  Ember::Cegui::Helper */
#ifndef TOLUA_DISABLE_tolua_Cegui_Ember_Cegui_Helper_calculateRenderedCentredStringVerticalExtent00
static int tolua_Cegui_Ember_Cegui_Helper_calculateRenderedCentredStringVerticalExtent00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"Ember::Cegui::Helper",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"CEGUI::Window",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  CEGUI::Window* window = ((CEGUI::Window*)  tolua_tousertype(tolua_S,2,0));
  {
   float tolua_ret = (float)  Ember::Cegui::Helper::calculateRenderedCentredStringVerticalExtent(window);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'calculateRenderedCentredStringVerticalExtent'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* Open function */
TOLUA_API int tolua_Cegui_open (lua_State* tolua_S)
{
 tolua_open(tolua_S);
 tolua_reg_types(tolua_S);
 tolua_module(tolua_S,NULL,0);
 tolua_beginmodule(tolua_S,NULL);
  tolua_module(tolua_S,"Ember",0);
  tolua_beginmodule(tolua_S,"Ember");
   tolua_module(tolua_S,"Cegui",0);
   tolua_beginmodule(tolua_S,"Cegui");
    tolua_cclass(tolua_S,"Helper","Ember::Cegui::Helper","",NULL);
    tolua_beginmodule(tolua_S,"Helper");
     tolua_function(tolua_S,"notifyScreenAreaChanged",tolua_Cegui_Ember_Cegui_Helper_notifyScreenAreaChanged00);
     tolua_function(tolua_S,"Window_getChildCount",tolua_Cegui_Ember_Cegui_Helper_Window_getChildCount00);
     tolua_function(tolua_S,"ImageManager_getSingleton",tolua_Cegui_Ember_Cegui_Helper_ImageManager_getSingleton00);
     tolua_function(tolua_S,"Window_getChildRecursive",tolua_Cegui_Ember_Cegui_Helper_Window_getChildRecursive00);
     tolua_function(tolua_S,"Window_removeChild",tolua_Cegui_Ember_Cegui_Helper_Window_removeChild00);
     tolua_function(tolua_S,"calculateRenderedCentredStringVerticalExtent",tolua_Cegui_Ember_Cegui_Helper_calculateRenderedCentredStringVerticalExtent00);
    tolua_endmodule(tolua_S);
   tolua_endmodule(tolua_S);
  tolua_endmodule(tolua_S);
 tolua_endmodule(tolua_S);
 return 1;
}


#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
 TOLUA_API int luaopen_Cegui (lua_State* tolua_S) {
 return tolua_Cegui_open(tolua_S);
};
#endif

