mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 17:01:15 +02:00
CLuaInstance: Add footer_height function
This commit is contained in:
@@ -1293,6 +1293,7 @@ void CLuaInstance::CWindowRegister(lua_State *L)
|
|||||||
{ "paint", CLuaInstance::CWindowPaint },
|
{ "paint", CLuaInstance::CWindowPaint },
|
||||||
{ "hide", CLuaInstance::CWindowHide },
|
{ "hide", CLuaInstance::CWindowHide },
|
||||||
{ "header_height", CLuaInstance::CWindowGetHeaderHeight },
|
{ "header_height", CLuaInstance::CWindowGetHeaderHeight },
|
||||||
|
{ "footer_height", CLuaInstance::CWindowGetFooterHeight },
|
||||||
{ "__gc", CLuaInstance::CWindowDelete },
|
{ "__gc", CLuaInstance::CWindowDelete },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
@@ -1415,6 +1416,20 @@ int CLuaInstance::CWindowGetHeaderHeight(lua_State *L)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CLuaInstance::CWindowGetFooterHeight(lua_State *L)
|
||||||
|
{
|
||||||
|
CLuaCWindow *m = CWindowCheck(L, 1);
|
||||||
|
if (!m)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
CComponentsFooter* footer = m->w->getFooterObject();
|
||||||
|
int fh = 0;
|
||||||
|
if (footer)
|
||||||
|
fh = footer->getHeight();
|
||||||
|
lua_pushinteger(L, fh);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int CLuaInstance::CWindowDelete(lua_State *L)
|
int CLuaInstance::CWindowDelete(lua_State *L)
|
||||||
{
|
{
|
||||||
CLuaCWindow *m = CWindowCheck(L, 1);
|
CLuaCWindow *m = CWindowCheck(L, 1);
|
||||||
|
@@ -199,6 +199,7 @@ private:
|
|||||||
static int CWindowPaint(lua_State *L);
|
static int CWindowPaint(lua_State *L);
|
||||||
static int CWindowHide(lua_State *L);
|
static int CWindowHide(lua_State *L);
|
||||||
static int CWindowGetHeaderHeight(lua_State *L);
|
static int CWindowGetHeaderHeight(lua_State *L);
|
||||||
|
static int CWindowGetFooterHeight(lua_State *L);
|
||||||
static int CWindowDelete(lua_State *L);
|
static int CWindowDelete(lua_State *L);
|
||||||
|
|
||||||
static CLuaSignalBox *SignalBoxCheck(lua_State *L, int n);
|
static CLuaSignalBox *SignalBoxCheck(lua_State *L, int n);
|
||||||
|
Reference in New Issue
Block a user