CGCTclTkTarget
class defines the tkSetup
stream for Tcl/Tk stars.There is no special code generation function for this stream, so its name must be used with addCode
. This is usually done from within the initCode
method.
tkMain.c
, can be used within codeblocks of Tcl/Tk stars in the CGC domain.
void errorReport (char* message)
message
.void makeEntry (char* window, char* name, char* desc, char* initValue, Tcl CmdProc* callback)
window
. The name
of the entry box must be unique (e.g. derived from the star name). The description of the entry box is desc. The initial value in the entry box is initValue
.callback
function is called whenever the user enters a RET
in the box. The argument to the callback
function will be the value that the user has put in the entry box. The return value of the callback
function should be TCL_OK
.void makeButton (char* window, char* name, char* desc, Tcl CmdProc* callback)
window
. The name of
the push button must be unique (e.g. derived from the star name). The description of the push button is desc
.callback
function is called whenever the user pushes the button. The return value of the callback
function should be TCL_OK
.void makeScale (char* window, char* name, char* desc, int position, Tcl CmdProc* callback)
window
. The name of the scale must be unique (e.g., derived from the star name). The description of the push button is desc. The initial position of the slider must be between 0
and 100
.callback
function is called whenever the user moves the slider in the scale. The argument to the callback
function will be the current position of the slider, which can range from 0
to 100
. The return value of the callback
function should be TCL_OK
.void displaySliderValue (char* window, char* name, char* value)
window
it is in. This function must be called by the user of the slider. Only the first 6 characters of the value will be used.