LuaElementInstancer.h 958 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include <RmlUi/Core/Element.h>
  3. #include <RmlUi/Core/ElementInstancer.h>
  4. #include <RmlUi/Lua/IncludeLua.h>
  5. namespace Rml {
  6. namespace Lua {
  7. class LuaElementInstancer : public ::Rml::ElementInstancer {
  8. public:
  9. LuaElementInstancer(lua_State* L);
  10. /// Instances an element given the tag name and attributes.
  11. /// @param[in] parent The element the new element is destined to be parented to.
  12. /// @param[in] tag The tag of the element to instance.
  13. /// @param[in] attributes Dictionary of attributes.
  14. ElementPtr InstanceElement(Element* parent, const String& tag, const XMLAttributes& attributes) override;
  15. /// Releases an element instanced by this instancer.
  16. /// @param[in] element The element to release.
  17. void ReleaseElement(Element* element) override;
  18. int ref_InstanceElement;
  19. // Pushes on to the top of the stack the table named EVENTINSTNACERFUNCTIONS
  20. void PushFunctionsTable(lua_State* L);
  21. };
  22. } // namespace Lua
  23. } // namespace Rml