| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- #include "precompiled.h"
- #include "ElementFormControlTextArea.h"
- #include <Rocket/Controls/ElementFormControl.h>
- using Rocket::Controls::ElementFormControl;
- namespace Rocket {
- namespace Core {
- namespace Lua {
- //getters
- int ElementFormControlTextAreaGetAttrcols(lua_State* L)
- {
- ElementFormControlTextArea* obj = LuaType<ElementFormControlTextArea>::check(L,1);
- LUACHECKOBJ(obj);
- lua_pushinteger(L,obj->GetNumColumns());
- return 1;
- }
- int ElementFormControlTextAreaGetAttrmaxlength(lua_State* L)
- {
- ElementFormControlTextArea* obj = LuaType<ElementFormControlTextArea>::check(L,1);
- LUACHECKOBJ(obj);
- lua_pushinteger(L,obj->GetMaxLength());
- return 1;
- }
- int ElementFormControlTextAreaGetAttrrows(lua_State* L)
- {
- ElementFormControlTextArea* obj = LuaType<ElementFormControlTextArea>::check(L,1);
- LUACHECKOBJ(obj);
- lua_pushinteger(L,obj->GetNumRows());
- return 1;
- }
- int ElementFormControlTextAreaGetAttrwordwrap(lua_State* L)
- {
- ElementFormControlTextArea* obj = LuaType<ElementFormControlTextArea>::check(L,1);
- LUACHECKOBJ(obj);
- lua_pushboolean(L,obj->GetWordWrap());
- return 1;
- }
- //setters
- int ElementFormControlTextAreaSetAttrcols(lua_State* L)
- {
- ElementFormControlTextArea* obj = LuaType<ElementFormControlTextArea>::check(L,1);
- LUACHECKOBJ(obj);
- int cols = luaL_checkint(L,2);
- obj->SetNumColumns(cols);
- return 0;
- }
- int ElementFormControlTextAreaSetAttrmaxlength(lua_State* L)
- {
- ElementFormControlTextArea* obj = LuaType<ElementFormControlTextArea>::check(L,1);
- LUACHECKOBJ(obj);
- int ml = luaL_checkint(L,2);
- obj->SetMaxLength(ml);
- return 0;
- }
- int ElementFormControlTextAreaSetAttrrows(lua_State* L)
- {
- ElementFormControlTextArea* obj = LuaType<ElementFormControlTextArea>::check(L,1);
- LUACHECKOBJ(obj);
- int rows = luaL_checkint(L,2);
- obj->SetNumRows(rows);
- return 0;
- }
- int ElementFormControlTextAreaSetAttrwordwrap(lua_State* L)
- {
- ElementFormControlTextArea* obj = LuaType<ElementFormControlTextArea>::check(L,1);
- LUACHECKOBJ(obj);
- bool ww = CHECK_BOOL(L,2);
- obj->SetWordWrap(ww);
- return 0;
- }
- RegType<ElementFormControlTextArea> ElementFormControlTextAreaMethods[] =
- {
- { NULL, NULL },
- };
- luaL_reg ElementFormControlTextAreaGetters[] =
- {
- LUAGETTER(ElementFormControlTextArea,cols)
- LUAGETTER(ElementFormControlTextArea,maxlength)
- LUAGETTER(ElementFormControlTextArea,rows)
- LUAGETTER(ElementFormControlTextArea,wordwrap)
- { NULL, NULL },
- };
- luaL_reg ElementFormControlTextAreaSetters[] =
- {
- LUASETTER(ElementFormControlTextArea,cols)
- LUASETTER(ElementFormControlTextArea,maxlength)
- LUASETTER(ElementFormControlTextArea,rows)
- LUASETTER(ElementFormControlTextArea,wordwrap)
- { NULL, NULL },
- };
- /*
- template<> const char* GetTClassName<ElementFormControlTextArea>() { return "ElementFormControlTextArea"; }
- template<> RegType<ElementFormControlTextArea>* GetMethodTable<ElementFormControlTextArea>() { return ElementFormControlTextAreaMethods; }
- template<> luaL_reg* GetAttrTable<ElementFormControlTextArea>() { return ElementFormControlTextAreaGetters; }
- template<> luaL_reg* SetAttrTable<ElementFormControlTextArea>() { return ElementFormControlTextAreaSetters; }
- */
- }
- }
- }
|