ElementForm.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #pragma once
  2. /*
  3. This defines the ElementForm type in the Lua global namespace
  4. methods:
  5. ElementForm:Submit(string name,string value)
  6. for everything else, see the documentation for "Element"
  7. */
  8. #include <Rocket/Core/Lua/LuaType.h>
  9. #include <Rocket/Core/Lua/lua.hpp>
  10. #include <Rocket/Controls/ElementForm.h>
  11. /*
  12. This defines the ElementForm type in the Lua global namespace
  13. It has one method
  14. noreturn ElementForm:Submit(string name,string value)
  15. */
  16. using Rocket::Controls::ElementForm;
  17. namespace Rocket {
  18. namespace Core {
  19. namespace Lua {
  20. //this will be used to "inherit" from Element
  21. template<> void LuaType<ElementForm>::extra_init(lua_State* L, int metatable_index);
  22. //method
  23. int ElementFormSubmit(lua_State* L, ElementForm* obj);
  24. RegType<ElementForm> ElementFormMethods[];
  25. luaL_reg ElementFormGetters[];
  26. luaL_reg ElementFormSetters[];
  27. template<> const char* GetTClassName<ElementForm>();
  28. template<> RegType<ElementForm>* GetMethodTable<ElementForm>();
  29. template<> luaL_reg* GetAttrTable<ElementForm>();
  30. template<> luaL_reg* SetAttrTable<ElementForm>();
  31. }
  32. }
  33. }