CLuaInstance: Replace cwindow header_height & footer_height

- Replace with headerHeight & footerHeight
- Set header_height & footer_height to deprecated
This commit is contained in:
M. Liebmann
2014-03-16 11:57:14 +01:00
parent 1e78781d18
commit 2dbdb8798e
2 changed files with 20 additions and 2 deletions

View File

@@ -1319,8 +1319,10 @@ void CLuaInstance::CWindowRegister(lua_State *L)
{ "hide", CLuaInstance::CWindowHide },
{ "setCaption", CLuaInstance::CWindowSetCaption },
{ "paintHeader", CLuaInstance::CWindowPaintHeader },
{ "header_height", CLuaInstance::CWindowGetHeaderHeight },
{ "footer_height", CLuaInstance::CWindowGetFooterHeight },
{ "headerHeight", CLuaInstance::CWindowGetHeaderHeight },
{ "footerHeight", CLuaInstance::CWindowGetFooterHeight },
{ "header_height", CLuaInstance::CWindowGetHeaderHeight_dep }, /* function 'header_height' is deprecated */
{ "footer_height", CLuaInstance::CWindowGetFooterHeight_dep }, /* function 'footer_height' is deprecated */
{ "__gc", CLuaInstance::CWindowDelete },
{ NULL, NULL }
};
@@ -1455,6 +1457,20 @@ int CLuaInstance::CWindowPaintHeader(lua_State *L)
return 0;
}
// function 'header_height' is deprecated
int CLuaInstance::CWindowGetHeaderHeight_dep(lua_State *L)
{
functionDeprecated(L, "header_height", "headerHeight");
return CWindowGetHeaderHeight(L);
}
// function 'footer_height' is deprecated
int CLuaInstance::CWindowGetFooterHeight_dep(lua_State *L)
{
functionDeprecated(L, "footer_height", "footerHeight");
return CWindowGetFooterHeight(L);
}
int CLuaInstance::CWindowGetHeaderHeight(lua_State *L)
{
CLuaCWindow *m = CWindowCheck(L, 1);