ElementFormControlInput.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * This source file is part of libRocket, the HTML/CSS Interface Middleware
  3. *
  4. * For the latest information, see http://www.librocket.com
  5. *
  6. * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
  7. *
  8. * Permission is hereby granted, free of charge, to any person obtaining a copy
  9. * of this software and associated documentation files (the "Software"), to deal
  10. * in the Software without restriction, including without limitation the rights
  11. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  12. * copies of the Software, and to permit persons to whom the Software is
  13. * furnished to do so, subject to the following conditions:
  14. *
  15. * The above copyright notice and this permission notice shall be included in
  16. * all copies or substantial portions of the Software.
  17. *
  18. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  19. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  21. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  22. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  23. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  24. * THE SOFTWARE.
  25. *
  26. */
  27. #ifndef ROCKETCORELUAELEMENTFORMCONTROLINPUT_H
  28. #define ROCKETCORELUAELEMENTFORMCONTROLINPUT_H
  29. /*
  30. This defines the type ElementFormControlInput in the Lua globla namespace, refered to in this documentation by EFCInput
  31. It inherits from ELementFormControl which inherits from Element
  32. all of the properties are read and write
  33. bool EFCInput.checked
  34. int EFCInput.maxlength
  35. int EFCInput.size
  36. int EFCInput.max
  37. int EFCInput.min
  38. int EFCInput.step
  39. */
  40. #include <Rocket/Core/Lua/lua.hpp>
  41. #include <Rocket/Core/Lua/LuaType.h>
  42. #include <Rocket/Controls/ElementFormControlInput.h>
  43. using Rocket::Controls::ElementFormControlInput;
  44. namespace Rocket {
  45. namespace Core {
  46. namespace Lua {
  47. //inherits from ElementFormControl which inherits from Element
  48. template<> void LuaType<ElementFormControlInput>::extra_init(lua_State* L, int metatable_index);
  49. template<> bool LuaType<ElementFormControlInput>::is_reference_counted();
  50. //getters
  51. int ElementFormControlInputGetAttrchecked(lua_State* L);
  52. int ElementFormControlInputGetAttrmaxlength(lua_State* L);
  53. int ElementFormControlInputGetAttrsize(lua_State* L);
  54. int ElementFormControlInputGetAttrmax(lua_State* L);
  55. int ElementFormControlInputGetAttrmin(lua_State* L);
  56. int ElementFormControlInputGetAttrstep(lua_State* L);
  57. //setters
  58. int ElementFormControlInputSetAttrchecked(lua_State* L);
  59. int ElementFormControlInputSetAttrmaxlength(lua_State* L);
  60. int ElementFormControlInputSetAttrsize(lua_State* L);
  61. int ElementFormControlInputSetAttrmax(lua_State* L);
  62. int ElementFormControlInputSetAttrmin(lua_State* L);
  63. int ElementFormControlInputSetAttrstep(lua_State* L);
  64. RegType<ElementFormControlInput> ElementFormControlInputMethods[];
  65. luaL_reg ElementFormControlInputGetters[];
  66. luaL_reg ElementFormControlInputSetters[];
  67. /*
  68. template<> const char* GetTClassName<ElementFormControlInput>();
  69. template<> RegType<ElementFormControlInput>* GetMethodTable<ElementFormControlInput>();
  70. template<> luaL_reg* GetAttrTable<ElementFormControlInput>();
  71. template<> luaL_reg* SetAttrTable<ElementFormControlInput>();
  72. */
  73. }
  74. }
  75. }
  76. #endif