Tk

Simple singleton wrapper for the Tk interpreter.

Constructors

this
this()
Undocumented in source.

Members

Functions

run
void run()

Run the tk main loop, show the gui and start processing events.

Static functions

getInstance
Tk getInstance()

Get an instance of this class.

Inherited Members

From Tcl

_interpreter
Tcl_Interp* _interpreter;
Undocumented in source.
_log
Logger _log;
Undocumented in source.
~this
~this()
Undocumented in source.
getInstance
Tcl getInstance()

Get an instance of this class.

escape
string[] escape(string[] args)

Escape harmful characters in arguments that are to be used in a script.

escape
string escape(string arg)

Escape harmful characters in the passed argument that is to be used in a script.

eval
void eval(string script, A args)

Evaluate a script fragment using the interpreter.

setResult
void setResult(string result, A args)

Set the result of the interpreter. This is sometimes used to set the result to an error if things go bad.

getResult
T getResult()

Get the result string from the interpreter.

createCommand
Tcl_Command createCommand(string name, Tcl_CmdProc commandProcedure, ClientData data, Tcl_CmdDeleteProc deleteProcedure)

Create a new command in the Tcl interpreter.

deleteCommand
void deleteCommand(string name)

Delete a command in the Tcl interpreter.

setVariable
void setVariable(string name, T value)

Set the value of a variable. If the variable doesn't exist it is created.

getVariable
string getVariable(string name)

Get the value of a variable.

deleteVariable
void deleteVariable(string name)

Delete a variable from the interpreter.

Meta