HoverRace  2.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
HoverRace::Client::HoverScript::StyleEnv Class Reference

Limited environment for stylesheets. More...

#include <StyleEnv.h>

+ Inheritance diagram for HoverRace::Client::HoverScript::StyleEnv:

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...
 
CoreGetScripting () 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 ()
 
Envoperator= (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::Displaydisplay
 

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...
 

Detailed Description

Limited environment for stylesheets.

Author
Michael Imamura

Member Typedef Documentation

Constructor & Destructor Documentation

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.

Parameters
scriptingThe scripting context.
displayThe display to which the styles will be applied.
basePathThe root directory of the theme.
virtual HoverRace::Client::HoverScript::StyleEnv::~StyleEnv ( )
inlinevirtual

Member Function Documentation

void HoverRace::Client::HoverScript::StyleEnv::InitEnv ( )
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.

void HoverRace::Client::HoverScript::StyleEnv::Register ( Script::Core scripting)
static

Register bindings in an environment.

Parameters
scriptingThe target environment.
bool HoverRace::Client::HoverScript::StyleEnv::RunStylesheet ( )

Run the stylesheet.

Member Data Documentation

Util::OS::path_t HoverRace::Client::HoverScript::StyleEnv::basePath
private
Display::Display& HoverRace::Client::HoverScript::StyleEnv::display
private

The documentation for this class was generated from the following files: