HoverRace
2.0
|
Limited environment for stylesheets. More...
#include <StyleEnv.h>
Public Member Functions | |
StyleEnv (Script::Core &scripting, Display::Display &display, const Util::OS::path_t &basePath) | |
Constructor. More... | |
virtual | ~StyleEnv () |
bool | RunStylesheet () |
Run the stylesheet. More... | |
Static Public Member Functions | |
static void | Register (Script::Core &scripting) |
Register bindings in an environment. More... | |
Protected Member Functions | |
virtual void | InitEnv () |
Initialize the environment in which scripts will run in. More... | |
Protected Member Functions inherited from HoverRace::Client::HoverScript::RuntimeEnv | |
RuntimeEnv (Script::Core &scripting) | |
virtual | ~RuntimeEnv () |
Protected Member Functions inherited from HoverRace::Script::Env | |
void | CopyGlobals () |
Copy the global environment into the current table at the top of the stack. More... | |
template<class ReturnPolicy = Core::PrintReturn> | |
int | Execute (const Core::Chunk &chunk, ReturnPolicy rp=ReturnPolicy()) |
Execute a chunk of code in the current environment. More... | |
Core & | GetScripting () const |
lua_State * | GetState () const |
void | LogScriptError (const Script::ScriptExn &ex) |
void | PushEnv () |
Push the environment onto the stack. More... | |
void | SetHelpHandler (Help::HelpHandler *helpHandler) |
Env (Core &scripting) | |
Constructor. More... | |
Env (const Env &)=delete | |
virtual | ~Env () |
Env & | operator= (const Env &)=delete |
bool | RunScript (const Util::OS::path_t &filename) |
Execute a script from a file. More... | |
Private Types | |
using | SUPER = RuntimeEnv |
Private Attributes | |
Util::OS::path_t | basePath |
Display::Display & | display |
Additional Inherited Members | |
Static Protected Member Functions inherited from HoverRace::Script::Env | |
static Core::Chunk | LoadChunkFromFile (const Util::OS::path_t &filename) |
Load a chunk from a file. More... | |
Limited environment for stylesheets.
|
private |
HoverRace::Client::HoverScript::StyleEnv::StyleEnv | ( | Script::Core & | scripting, |
Display::Display & | display, | ||
const Util::OS::path_t & | basePath | ||
) |
Constructor.
The base path is the directory of the theme that will be loaded.
scripting | The scripting context. |
display | The display to which the styles will be applied. |
basePath | The root directory of the theme. |
|
inlinevirtual |
|
protectedvirtual |
Initialize the environment in which scripts will run in.
Upon entry, the Lua stack will have at least one entry, the table which represents the environment. Implementing functions will fill this table with the globals which will be available to the functions which are run in this environment. Upon return, this same table must be at the top of the stack.
Implements HoverRace::Script::Env.
|
static |
Register bindings in an environment.
scripting | The target environment. |
bool HoverRace::Client::HoverScript::StyleEnv::RunStylesheet | ( | ) |
Run the stylesheet.
|
private |
|
private |