Lua 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield
  2. *
  3. * This library is open source and may be redistributed and/or modified under
  4. * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
  5. * (at your option) any later version. The full license is in LICENSE file
  6. * included with this distribution, and on the openscenegraph.org website.
  7. *
  8. * This library is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * OpenSceneGraph Public License for more details.
  12. */
  13. // Code by: Jeremy Moles (cubicool) 2007-2008
  14. #ifndef OSGWIDGET_LUA
  15. #define OSGWIDGET_LUA
  16. #include <osgWidget/WindowManager>
  17. namespace osgWidget {
  18. // Externally defined; does this work in Windows?
  19. struct LuaEngineData;
  20. // The actual Engine itself. Every attempt is made to export the implementation into the
  21. // source file, rather than having it here.
  22. class OSGWIDGET_EXPORT LuaEngine: public ScriptEngine
  23. {
  24. public:
  25. LuaEngine(WindowManager* = 0);
  26. bool initialize ();
  27. bool close ();
  28. bool eval (const std::string&);
  29. bool runFile (const std::string&);
  30. protected:
  31. LuaEngineData* _data;
  32. WindowManager* _wm;
  33. };
  34. }
  35. #endif