LuaDataFormatter.h 685 B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include <Rocket/Core/Lua/lua.hpp>
  3. #include <Rocket/Controls/DataFormatter.h>
  4. using Rocket::Controls::DataFormatter;
  5. namespace Rocket {
  6. namespace Core {
  7. namespace Lua {
  8. class LuaDataFormatter : public Rocket::Controls::DataFormatter
  9. {
  10. public:
  11. LuaDataFormatter(const String& name = "");
  12. ~LuaDataFormatter();
  13. virtual void FormatData(Rocket::Core::String& formatted_data, const Rocket::Core::StringList& raw_data);
  14. //Helper function used to push on to the stack the table where the function ref should be stored
  15. static void PushDataFormatterFunctionTable(lua_State* L);
  16. int ref_FormatData; //the lua reference to the FormatData function
  17. };
  18. }
  19. }
  20. }