Tk_Commands in EuLisp.

eul-associatetk-find-canvas-alltk-make-scale
Tcl_DoOneEvent tk-find-canvas-below tk-make-scrollbar
tk-add-arc-canvastk-find-canvas-enclosed tk-make-text
tk-add-bitmap-canvastk-find-canvas-overlapping tk-make-toplevel
tk-add-image-canvastk-find-canvas-withtag tk-map-widget
tk-add-line-canvastk-focustk-menu-add
tk-add-oval-canvastk-get-resulttk-move-item-canvas
tk-add-polygon-canvastk-get-value-widgettk-name
tk-add-rectangle-canvastk-get-variabletk-names-image
tk-add-text-canvastk-grab-settk-object-p
tk-add-window-canvastk-handlertk-pack
tk-bindtk-height-imagetk-scrollbar-p
tk-bind-item-canvastk-inserttk-scroll-set
tk-bind-tag-texttk-item-canvas-ptk-selection-get
tk-button-flashtk-listbox-curselectiontk-set-variable
tk-button-ptk-listbox-ptk-text-index
tk-canvas-ptk-lower-item-canvastk-text-mark
tk-conf-item-canvasTk_MainLoop tk-text-p
tk-conf-tag-texttk-make-buttontk-text-tag-add
tk-conf-widgettk-make-canvastk-toplevel-p
tk-coords-item-canvastk-make-checkbuttontk-type-image
tk-create-imagetk-make-entrytk-types-image
tk-deletetk-make-frametk-unmap-widget
tk-delete-imagetk-make-labeltk-width-image
tk-delete-item-canvastk-make-listboxtk-wm
tk-destroytk-make-menutk-xview
tk-entry-ptk-make-menubuttontk-yview
tk-exittk-make-messageTypes-Supported
tk-find-canvas-above tk-make-radiobutton


Types-Supported

<tk-button>
<tk-label>
<tk-frame>
<tk-canvas>
<tk-checkbutton>
<tk-entry>
<tk-listbox>
<tk-menu>
<tk-menubutton>
<tk-message>
<tk-radiobutton>
<tk-scale>
<tk-scrollbar>
<tk-text>
<tk-toplevel>
<tk-object>


eul-associate

Possible invocations:

* (eul-associate ((canvas <tk-canvas>) (scroll <tk-scrollbar>) 'horizontal)) * (eul-associate ((canvas <tk-canvas>) (scroll <tk-scrollbar>) 'vertical)) * (eul-associate ((listbox <tk-listbox>) (scroll <tk-scrollbar>) 'horizontal)) * (eul-associate ((listbox <tk-listbox>) (scroll <tk-scrollbar>) 'vertical)) * (eul-associate ((text <tk-text>) (scroll <tk-scrollbar>) 'horizontal)) * (eul-associate ((text <tk-text>) (scroll <tk-scrollbar>) 'vertical)) * (eul-associate ((entry <tk-entry>) (scroll <tk-scrollbar>) 'horizontal))

Lisp Module:

tk_class.em

Comments:

This special function allows the user to avoid the tedious callback system that the scrollbars associated to widge require. (See general information about How to manage Scrolls for more detail.)

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

N/A

Foreign C function:

N/A

C Module:

N/A


Tcl_DoOneEvent

Possible invocations:

* (Tcl_DoOneEvent 0) * (Tcl_DoOneEvent 1)

Lisp Module:

tk_general.em

Comments:

This function dispatches one event. The user can decide if the function will block or not. 0 Wait until one event is served. 1 Do not wait. If there is an event waiting, then it is served. If there is no event, then return without doing nothing. (See general information about Event-Driven Applications for more detail.)

Result:

1 whether an event has been served. 0 otherwise.

Tcl/Tk command:

N/A

Foreign C function:

Tcl_DoOneEvent(int flags)

C Module:

(tk library)


tk-add-arc-canvas
tk-add-bitmap-canvas
tk-add-image-canvas
tk-add-line-canvas
tk-add-oval-canvas
tk-add-polygon-canvas
tk-add-rectangle-canvas
tk-add-text-canvas
tk-add-window-canvas

Possible invocations:

* (tk-add-arc-canvas ((canvas <tk-canvas>) (x1 <int>) (y1 <int>) (x2 <int>) (y2 <int>) options)) * (tk-add-bitmap-canvas ((canvas <tk-canvas>) (x <int>) (y <int>) options)) * (tk-add-image-canvas ((canvas <tk-canvas>) (x <int>) (y <int>) options)) * (tk-add-line-canvas ((canvas <tk-canvas>)(x1 <int>) (y1 <int>) ... (xn <int>) (yn <int>) options)) * (tk-add-oval-canvas ((canvas <tk-canvas>) (x1 <int>) (y1 <int>) (x2 <int>) (y2 <int>) options)) * (tk-add-polygon-canvas ((canvas <tk-canvas>) (x1 <int>) (y1 <int>) (x2 <int>) (y2 <int>) ... (xn <int>) (yn <int>) options)) * (tk-add-rectangle-canvas ((canvas <tk-canvas>) (x1 <int>) (y1 <int>) (x2 <int>) (y2 <int>) options)) * (tk-add-text-canvas ((canvas <tk-canvas>) (x <int>) (y <int>) options)) (tk-add-window-canvas ((canvas <tk-canvas>) (x <int>) (y <int>) options))

Lisp Module:

tk_class2.em

Comments:

The options argument represents a succession of pairs {accessor: value}*. The accessor: represents the tcl/tk option, and value is the value. The value in that case has always to be a number or a string. Options argument is optional. The three dots wants to say that the function can receive an unlimited number of coordinates. It is useful for cases like lines and polygons. The quantity of coordinates has to be even.

Result:

() Failure in the creation of the item.
<tk-item-canvas> The new created item for the canvas.

Tcl/Tk command:

pathname create arc x1 y1 x2 y2 ?option value option value....? pathname create bitmap x y ?option value option value....? pathname create image x y ?option value option value....? pathname create line x1 y1 ... xn yn ?option value option value....? pathname create oval x1 y1 x2 y2 ?option value option value....? pathname create polygon x1 y1 x2 y2 ... xn yn ?option value option value....? pathname create rectangle x1 y1 x2 y2 ?option value option value....? pathname create text x y ?option value option value....? pathname create window x y ?option value option value....?

Foreign C function:

eul_create_item_canvas (char* type, char* nameWidget, Command* cmdPtr, LispRef options) where type says the kind of item canvas that is going to be created.

C Module:

FnCwidgets.c


tk-bind

Possible invocations:

* (tk-bind ((widget <tk-object>) (event <string>) (function <simple-function>))) * (tk-bind ((widget <tk-object>) (event <string>) (function <simple-function>) (list-accessors <cons>)))

Lisp Module:

tk_commands.em

Comments:

list-accessors is a list of event information parameters that the function will receive. It also can have infomation about the possible normal parameters that the callback function will be expecting.
The notation has been adapted to EuLisp world. (See general information about How to manage callbacks for more detail.)

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

bind tag sequence script

Foreign C function:

eul_tk_bind (char* nameWidget, char* event, char* fn_key, LispRef args)

C Module:

FnCcommands.c


tk-bind-item-canvas

Possible invocations:

* (tk-bind-item-canvas ((canvas <tk-canvas>) (tag <string>) (event <string>) (function <simple-function>))) * (tk-bind-item-canvas ((canvas <tk-canvas>) (tag <string>) (event <string>) (function <simple-function>) (list-accessors <cons>))) * (tk-bind-item-canvas ((item <tk-item-canvas>) (tag <string>) (event <string>) (function <simple-function>))) * (tk-bind-item-canvas ((item <tk-item-canvas>) (event <string>) (function <simple-function>) (list-accessors <cons>)))

Lisp Module:

tk_class2.em

Comments:

list-accessors is a list of event information parameters that the function will receive. It also can have infomation about the possible normal parameters that the callback function will be expecting.
The notation has been adapted to EuLisp world. (See general information about How to manage callbacks for more detail.)

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

pathname tagOrId ?sequence? ?command? where pathname refers to a canvas widget.

Foreign C function:

eul_tk_bind_element (char* nameWidget, Command* cmdPtr, char* id_or_tag, char* event, char* fn_key, LispRef,args) where the last argument will conatin the list of parameters that the function will receive.

C Module:

FnCwidgets.c


tk-bind-tag-text

Possible invocations:

* (tk-bind-tag-text ((text <tk-text>) (tag <string>) (event <string>) (tag <string>) (function <simple-function>))) * (tk-bind-tag-text ((text <tk-text>) (tag <string>) (event <string>) (tag <string>) (function <simple-function>) (list-accessors <cons>)))

Lisp Module:

tk_class2.em

Comments:

list-accessors is a list of event information parameters that the function will receive. It also can have infomation about the possible normal parameters that the callback function will be expecting.
The notation has been adapted to EuLisp world. (See general information about How to manage callbacks for more detail.)

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

pathname tag bind tagName sequence script where pathname points to a text widget.

Foreign C function:

eul_tk_bind_element (char* nameWidget, Command* cmdPtr, char *type, char* id_or_tag, char* event, char* fn_key, LispRef,args)

C Module:

FnCwidgets.c


tk-button-flash

Possible invocations:

* (tk-button-flash (button <tk-button>))

Lisp Module:

tk_class.em

Comments:

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

pathname flash where pathname represents the button widget that is going to be flashed.

Foreign C function:

eul_tk_button_flash (char* name, Command* cmdPtr)

C Module:

FnCwidgets.c


tk-conf-item-canvas

Possible invocations:

* (tk-conf-item-canvas ((canvas <tk-canvas>) (tag <string>) options)) (tk-conf-item-canvas ((item <tk-item-canvas>) options))

Lisp Module:

tk_class2.em

Comments:

The options argument represents a succession of pairs {accessor: value}*. The accessor: represents the tcl/tk option, and value is the value. The value in that case has always to be a number or a string. Options argument is optional.

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

pathname itemconfigure tagOrId ?option value? ?option value....? where pathname should represent a widget canvas.

Foreign C function:

eul_tk_cmd_item_canvas (char* nameWidget, Command* cmdPtr, char* id_or_tag, LispRef args, char* nameCommand) where the nameCommand is "itemconfigure"

C Module:

FnCwidgets.c


tk-conf-tag-text

Possible invocations:

* (tk-conf-tag-text ((text <tk-text>) (tag <string>) options))

Lisp Module:

tk_class2.em

Comments:

The options argument represents a succession of pairs {accessor: value}*. The accessor: represents the tcl/tk option, and value is the value. The value in that case has always to be a number or a string. Options argument is optional.

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

pathname tag configure tagName ?option? ?value? ?option value...? where pathname represents a text widget.

Foreign C function:

eul_tk_cmd_text (char* name, Command* cmdPtr, char* command, LispRef args) where the command will be "tag" and the specification of the "configure" type will be given in the last argument, as part of a list.

C Module:

FnCwidgets.c


tk-conf-widget

Possible invocations:

* (tk-conf-widget ((x <tk-object>) options))

Lisp Module:

tk_class.em

Comments:

The options argument represents a succession of pairs {accessor: value}*. The accessor: represents the tcl/tk option, and value is the value. The value in that case has always to be a number or a string. Options argument is optional.

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

pathname configure ?option? ?value option value ...?

Foreign C function:

eul_tk_conf_widget (char* name, Command* cmdPtr, LispRef listArgs)

C Module:

FnCwidgets.c


tk-coords-item-canvas

Possible invocations:

(tk-coords-item-canvas ((canvas <tk-canvas>) (tag <string>))) (tk-coords-item-canvas ((canvas <tk-canvas>) (tag <string>) (x1 <int>) (y1 <int>) ... (xn <int>) (yn <int>))) * (tk-coords-item-canvas ((item <tk-item-canvas>)) * (tk-coords-item-canvas ((item <tk-item-canvas>) (x1 <int>) (y1 <int>) ... (xn <int>) (yn <int>)))

Lisp Module:

tk_class2.em

Comments:

Result:

Call without coordinates acts as a consultant. It returns: a list of strings with the coordinates for the specfied item: (<string> ... <string>) Call with coordinates will return () or t depending on the failure or success of the Lisp function.

Tcl/Tk command:

pathname coords tagOrId ?x0 y0 ...? where pathname correponds to a canvas widget.

Foreign C function:

eul_tk_cmd_item_canvas (char* nameWidget, Command* cmdPtr, char* id_or_tag, LispRef args, char* nameCommand) where the nameCommand is "coords"

C Module:

FnCwidgets.c


tk-create-image

Possible invocations:

* (tk-create-image 'bitmap options) * (tk-create-image 'photo options)

Lisp Module:

tk_images.em

Comments:

The options argument represents a succession of pairs {accessor: value}*. The accessor: represents the tcl/tk option, and value is the value. The value in that case has always to be a number or a string. Options argument is optional.

Result:

The name of the image in a string.

Tcl/Tk command:

image create type ?name ?option value ...?

Foreign C function:

eul_tk_image_cmd (char* nameImage, char* command, LispRef args)

C Module:

FnCimages.c


tk-delete

Possible invocations:

* (tk-delete ((entry <tk-entry>) (first <string>))) * (tk-delete ((entry <tk-entry>) (first <string>) (last <string>))) * (tk-delete ((listbox <tk-listbox>) (first <string>))) * (tk-delete ((listbox <tk-listbox>) (first <string>) (last <string>))) * (tk-delete ((text <tk-listbox>) (first <string>))) * (tk-delete ((text <tk-listbox>) (first <string>) (last <string>)))

Lisp Module:

tk_class.em

Comments:

first and last are indexes. If the last index is not specified, then a single character is deleted (the first one).

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

pathname delete first ?last? where pathname could represent either an entry, a listbox or a text widget.

Foreign C function:

eul_delete_command (char* nameWidget, Command* cmdPtr, char* first, LispRef,last)

C Module:

FnCwidgets.c


tk-delete-image

Possible invocations:

* (tk-delete-image ((image <string>))) * (tk-delete-image ((image1 <string>) ... (imagen <string>)))

Lisp Module:

tk_images.em

Comments:

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

image delete ?name name ...?

Foreign C function:

eul_tk_image_cmd (char* nameImage, char* command, LispRef args)

C Module:

FnCimages.c


tk-delete-item-canvas

Possible invocations:

* (tk-delete-item-canvas ((canvas <tk-canvas>) item-or-tag1 ... item-or-tagn))

Lisp Module:

tk_class2.em

Comments:

list-or-tag arguments could be either a tag, that is, an string, or a <tk-item-canvas-object>.

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

pathname delete tagOrId ... tagOrId where pathname represents the canvas.

Foreign C function:

eul_tk_cmd_item_canvas (char* nameWidget, Command* cmdPtr, char* id_or_tag, LispRef args, char* nameCommand)

C Module:

FnCwidgets.c


tk-destroy

Possible invocations:

* (tk-destroy ((widget1 <tk-object>) ... (widgetn <tk-object>)))

Lisp Module:

tk_commands.em

Comments:

This command could receive one or more widgets. All of them will be destroyed

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

detroy ?window window...?

Foreign C function:

eul_tk_destroy(char * nameWidget, LispRef moreObjects)

C Module:

FnCcommands.c


tk-exit

Possible invocations:

* (tk-exit)

Lisp Module:

tk_commands.em

Comments:

This command destroys the root window.

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

exit

Foreign C function:

eul_tk_exit ()

C Module:

FnCcommands.c


tk-find-canvas-above
tk-find-canvas-all
tk-find-canvas-below
tk-find-canvas-enclosed
tk-find-canvas-overlapping
tk-find-canvas-withtag

Possible invocations:

(tk-find-canvas-above ((canvas <tk-canvas>) (tag <string>))) (tk-find-canvas-above ((item <tk-item-canvas>))) * (tk-find-canvas-all ((canvas <tk-canvas>))) (tk-find-canvas-below ((canvas <tk-canvas>) (tag <string>))) (tk-find-canvas-below ((item <tk-item-canvas>))) * (tk-find-canvas-enclosed ((canvas <tk-canvas>) (x1 <int>) (y1 <int>) (x2 <int>) (y2 <int>))) * (tk-find-canvas-overlapping ((canvas <tk-canvas>)(x1 <int>) (y1 <int>) (x2 <int>) (y2 <int>))) * (tk-find-canvas-withtag ((canvas <tk-canvas>) (tag <string>))) * (tk-find-canvas-withtag ((item <tk-item-canvas>)))

Lisp Module:

tk_class2.em

Comments:

Result:

List with the identifiers of the selected items. The identifiers are strings.

Tcl/Tk command:

pathname find above tagOrId pathname find all pathname find below tagOrId pathname find enclosed x1 y1 x2 y2 pathname find overlapping x1 y1 x2 y2 pathname withtag tagOrId where pathname refers to a canvas widget.

Foreign C function:

eul_tk_find_canvas (char* nameWidget, Command* cmdPtr, char* search_cmd, LispRef args) where search_cmd could be above, all, below, enclosed, overlapping or withtag.

C Module:

FnCwidgets.c


tk-focus

Possible invocations:

* (tk-focus) * (tk-focus ()) * (tk-focus ((item-canvas <tk-item-canvas>))) * (tk-focus ((widget <tk-object>)))

Lisp Module:

tk_commands.em

Comments:

The first one allows the user to know which widow is having the focus. The other ones are use to get the focus.

Result:

String with the window containing the focus, in the first case. () or t depending on the success or the failure of the operation.

Tcl/Tk command:

focus focus window

Foreign C function:

eul_tk_focus (char* name, char* id)

C Module:

FnCcommands.c


tk-get-result

Possible invocations:

* (tk-get-result)

Lisp Module:

tk_commands.em

Comments:

It is usefull to consult the tcl/tk messages.

Result:

String containing tcl/tk message.

Tcl/Tk command:

N/A

Foreign C function:

eul_tk_get_result()

C Module:

FnCcommands.c


tk-get-value-widget

Possible invocations:

* (tk-get-value-widget ((entry <tk-entry>))) * (tk-get-value-widget ((scale <tk-scale>))) * (tk-get-value-widget ((text <tk-text>) (index1 <string>))) * (tk-get-value-widget ((text <tk-text>) (index1 <string>) (index2 <string>)))

Lisp Module:

tk_class.em

Comments:

Result:

Value of the specified widget. In the case of the text, there are two possibilities. - If one index is given , the result is the character represented by this index is given - If both indexes are given, the result is the string of characters between the two indexes.

Tcl/Tk command:

pathname get where pathname is either a scale or an entry pathname get index1 ?index2? where pathname is representing a text widget.

Foreign C function:

eul_tk_get_value_widget (char* name, Command* cmdPtr, LispRef indexs)

C Module:

FnCwidgets.c


tk-get-variable

Possible invocations:

* (tk-get-variable ((tcl-variable <string>)))

Lisp Module:

tk_commands.em

Comments:

At the moment only integer varibles can be consulted.
An extension to string values can be easily done.

Result:

<int> containing the value of the tcl variable.

Tcl/Tk command:

set varName

Foreign C function:

eul_tk_get_variable (char* nameVar)

C Module:

FnCcommands.em


tk-grab-set

Possible invocations:

* (tk-grab-set ((toplevel <tk-toplevel>)))

Lisp Module:

tk_commands.em

Comments:

This function is only permitted if the received widget is a top-level widget.
Only local grab will be set. No global grabs are possible.

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

grab set window

Foreign C function:

eul_tk_grab_set (char* name)

C Module:

FnCcommands.c


tk-handler

Possible invocations:

* (tk-handler ((widget <tk-object>)))

Lisp Module:

tk_general.em

Comments:

The use of this command makes sense when a foreign function is going to be called.

Result:

Pointer reference to the C structure storing the information of this widget.

Tcl/Tk command:

N/A

Foreign C function:

N/A

C Module:

N/A


tk-height-image

Possible invocations:

* (tk-height-image ((image <string>)))

Lisp Module:

tk_images.em

Comments:

Result:

String containig the height of the specified image.

Tcl/Tk command:

image height name

Foreign C function:

eul_tk_image_cmd (char* nameImage, char* command, LispRef args)

C Module:

FnCimages.c


tk-insert

Possible invocations:

* (tk-insert ((entry <tk-entry>) (index <string>) (text <string>))) * (tk-insert ((listbox <tk-listbox>) (index <string>) (text <string>))) * (tk-insert ((listbox <tk-listbox>) (index <string>) (num <int>))) * (tk-insert ((text <tk-text>) (index <string>) (text <string>)))

Lisp Module:

tk_class.em

Comments:

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

pathname insert index string where pathname could represent either an entry, a listbox or a text widget.

Foreign C function:

eul_insert_command (char* nameWidget, Command* cmdPtr, char* type, char* text)

C Module:

FnCwidgets.c


tk-listbox-curselection

Possible invocations:

(tk-listbox-curselection ((listbox <tk-listbox>)))

Lisp Module:

tk_class.em

Comments:

Result:

String containing the numerical indices of all the elements selected in the listbox.

Tcl/Tk command:

pathname curselection

Foreign C function:

eul_tk_listbox_command (char* name, Command* cmdPtr, char* command)

C Module:

FnCwidgets.c


tk-lower-item-canvas

Possible invocations:

(tk-lower-item-canvas ((canvas <tk-canvas>) (tag <string>))) (tk-lower-item-canvas ((canvas <tk-canvas>) (tag <string>) (belowThis <string>))) (tk-lower-item-canvas ((canvas <tk-canvas>) (tag <string>) (belowThis <tk-item-canvas>))) * (tk-lower-item-canvas ((<item <tk-item-canvas>))) (tk-lower-item-canvas ((item <tk-item-canvas>) (belowThis <string>))) (tk-lower-item-canvas ((item <tk-item-canvas>) (belowThis <tk-item-canvas>)))

Lisp Module:

tk_class2.em

Comments:

This function can receive either a <tk-canvas>, specifying the tag or an <tk-item-canvas>. The belowThis argument can be either tag or and specific item in the canvas.

Result:

() or t depending on the failure or the success of the operation.

Tcl/Tk command:

pathname lower tagOrId ?belowThis? where pathname should correspond to a canvas widget.

Foreign C function:

eul_tk_cmd_item_canvas (char* nameWidget, Command* cmdPtr, char* id_or_tag, LispRef args, char* nameCommand) where nameCommand represents the name of the Tcl/Tk command to be executed. In that case we will use "lower" as the name of the command.

C Module:

FnCwidgets.c


Tk_MainLoop

Possible invocations:

* (Tk_MainLoop)

Lisp Module:

tk_general.em

Comments:

This command loops dispatching tcl/tk events. It finishes when all the widgets are destroyed. (See general information about Event-Driven Applications for more detail.)

Result:

Tcl/Tk command:

N/A

Foreign C function:

TK_MainLoop()

C Module:

(tk library)


tk-make-button tk-make-label tk-make-frame tk-make-canvas tk-make-checkbutton tk-make-entry tk-make-listbox tk-make-menu tk-make-menubutton tk-make-message tk-make-radiobutton tk-make-scale tk-make-scrollbar tk-make-text tk-make-toplevel

Possible invocations:

* (tk-make-button (parent options)) * (tk-make-label (parent options)) * (tk-make-frame (parent options)) * (tk-make-canvas (parent options)) * (tk-make-checkbutton (parent options)) * (tk-make-entry (parent options)) * (tk-make-listbox (parent options)) * (tk-make-menu (parent options)) * (tk-make-menubutton (parent options)) * (tk-make-message (parent options)) * (tk-make-radiobutton (parent options)) * (tk-make-scale (parent options)) * (tk-make-scrollbar (parent options)) * (tk-make-text (parent options))

Lisp Module:

tk_class.em

Comments:

The parent could be either a <tk-object> or (). The empty list represents the root widget (or window) The options argument represents a succession of pairs {accessor: value}*. The accessor: represents the tcl/tk option, and value is the value. The value in that case has always to be a number or a string. Options argument is optional.

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

button pathname options label pathname options frame pathname options canvas pathname options checkbutton pathname options listbox pathname options menubutton pathname options message pathname options radiobutton pathname options scale pathname options scrollbar pathname options text pathname options toplevel pathname options

Foreign C function:

eul_tk_create_widget(char* type, char* name, LispRef listArgs)

C Module:

FnCwidgets.c


tk-map-widget

Possible invocations:

* (tk-map-widget ()) * (tk-map-widget ((widget <tk-object>)))

Lisp Module:

tk_commands.em

Comments:

The first one maps the root window. That is, the main widget. THe second one maps the specified widget.

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

N/A

Foreign C function:

eul_tk_map_widget (char* name)

C Module:

FnCcommands.c


tk-menu-add

Possible invocations:

* (tk-menu-add ((menu <tk-menu>) 'command options)) * (tk-menu-add ((menu <tk-menu>) 'checkbutton options)) * (tk-menu-add ((menu <tk-menu>) 'radiobutton options)) * (tk-menu-add ((menu <tk-menu>) 'separator options)) * (tk-menu-add ((menu <tk-menu>) 'cascade options))

Lisp Module:

tk_class.em

Comments:

The options argument represents a succession of pairs {accessor: value}*. The accessor: represents the tcl/tk option, and value is the value. The value in that case has always to be a number or a string. Options argument is optional.

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

pathname add command ?option value option value...? pathname add checkbutton ?option value option value...? pathname add radiobutton ?option value option value...? pathname add separator ?option value option value...? pathname add cascade ?option value option value...?

Foreign C function:

eul_add_menu_command (char* nameMenu, Command* cmdPtr, LispRef listArgs)

C Module:

FnCwidgets.c


tk-move-item-canvas

Possible invocations:

(tk-move-item-canvas ((canvas <tk-canvas>) (tag <string>) (x-incr <int>) (y-incr <int>))) * (tk-move-item-canvas ((item <tk-item-canvas>) (x-incr <int>) (y-incr <int>)))

Lisp Module:

tk_class2.em

Comments:
Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

pathname move tagOrId xAmount yAmount where pathname should correspont to a canvas widget

Foreign C function:

eul_tk_cmd_item_canvas (char* nameWidget, Command* cmdPtr, char* id_or_tag,

LispRef args, char* nameCommand)
where the nameCommand is "move"

C Module:

FnCwidgets.c


tk-name

Possible invocations:

* (tk-name ((widget <tk-object>)))

Lisp Module:

tk_general.em

Comments:

Result:

The string containing the internal name of the widget.

Tcl/Tk command:

N/A

Foreign C function:

N/A

C Module:

N/A


tk-names-image

Possible invocations:

* (tk-names-image)

Lisp Module:

tk_images.em

Comments:

Result:

List of strings with the names of the current images.

Tcl/Tk command:

image names

Foreign C function:

eul_tk_image_cmd (char* nameImage, char* command, LispRef args)

C Module:

FnCimages.c


tk-object-p
tk-button-p
tk-canvas-p
tk-entry-p
tk-listbox-p
tk-scrollbar-p
tk-text-p
tk-toplevel-p
tk-item-canvas-p

Possible invocations:

* (tk-object-p x) * (tk-button-p x) * (tk-canvas-p x) * (tk-entry-p x) * (tk-listbox-p x) * (tk-scrollbar-p x) * (tk-text-p x) * (tk-toplevel-p x) * (tk-item-canvas-p x)

Lisp Module:

tk_general.em

Comments:

Result:

Gives () or t depending whether or not the object corresponts to the specific class.

Tcl/Tk command:

N/A

Foreign C function:

N/A

C Module:

N/A


tk-pack

Possible invocations:

* (tk-pack ((widget1 <tk-object>) ... (widgetn <tk-object>) options))

Lisp Module:

tk_commands.em

Comments:

THis function can pack more than one object at a time. The options argument represents a succession of pairs {accessor: value}*. The accessor: represents the tcl/tk option, and value is the value. The value in that case has always to be a number or a string. Options argument is optional.

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

pack window ... ?window option value option value...?

Foreign C function:

eul_tk_pack (char* name, LispRef options)

C Module:

FnCcommands.c


tk-scroll-set

Possible invocations:

* (tk-scroll-set ((scroll <tk-scrollbar>) (first-entry <string>) (last-entry <string>)))

Lisp Module:

tk_class.em

Comments:

The last two arguments, that is, first-entry, last-entry, are added automatically by tcl/tk when the callback function, set with xscollcommand: or yscrollcommand: in the widget creation or configuration, is invoked. The user do not have to worry about it. The callback function associated to the widget will be the responsible of calling tk-scroll-set. (See general information about How to manage Scrolls for more detail.)

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

pathname set first last where pathname is the name of the scrollbar widget.

Foreign C function:

eul_set_scrollbar_command (char* nameWidget, Command* cmdPtr, char* first_entry, char* last_entry)

C Module:

FnCwidgets.c


tk-selection-get

Possible invocations:

* (tk-selection-get) * (tk-selection-get ((option <string>)))

Lisp Module:

tk_commands.em

Comments:

option could be one of the representations formats, like: "STRING","ATOM","INTEGER"...

Result:

Information of the selected element.

Tcl/Tk command:

selection get

Foreign C function:

eul_tk_selection_get (LispRef option)

C Module:

FnCcommands.c


tk-set-variable

Possible invocations:

* (tk-set-variable ((tcl-variable <string>) (value <string>)))

Lisp Module:

tk_commands.em

Comments:

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

set varName value

Foreign C function:

eul_tk_set_variable (char* nameVar,char* value)

C Module:

FnCcommands.c


tk-text-index

Possible invocations:

* (tk-text-index ((text <tk-text>) (index <string>)))

Lisp Module:

tk_class2.em

Comments:

Result:

Returns the string with the information of the index in the form "line.char"

Tcl/Tk command:

pathname index index where pathname represents the text widget.

Foreign C function:

eul_tk_cmd_text (char* name, Command* cmdPtr, char* command, LispRef args)

C Module:

FnCwidgets.c


tk-text-mark

Possible invocations:

(tk-text-mark ((text <tk-text>) 'set (mark <string>) (index <string>))) (tk-text-mark ((text <tk-text>) 'unset (mark <string>)))

Lisp Module:

tk_class2.em

Comments:

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

pathname mark set markName index pathname mark unset markName where pathname represents the text widget.

Foreign C function:

eul_tk_cmd_text (char* name, Command* cmdPtr, char* command, LispRef args)

C Module:

FnCwidgets.c


tk-text-tag-add

Possible invocations:

* (tk-text-tag-add ((text <tk-text>) (tag <string>) (index1 <string>) ... (index2 <string>)))

Lisp Module:

tk_class2.em

Comments:

This commanmd could receive an even number of indexes. The tag is added to all the characters between the first and the last index of every pair of indexes.

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

pathname tag add tagName index1 ?index2 index1 index2 ...? where pathname represents the text widget.

Foreign C function:

eul_tk_cmd_text (char* name, Command* cmdPtr, char* command, LispRef args) where the command will be "tag" and the specification of the "add" type will be given in the last argument, as part of a list.

C Module:

FnCwidgets.c


tk-type-image

Possible invocations:

* (tk-type-image ((image <string>)))

Lisp Module:

tk_images.em

Comments:

Result:

String stroing the type of the image: bitmap or photo.

Tcl/Tk command:

image type name

Foreign C function:

eul_tk_image_cmd (char* nameImage, char* command, LispRef args)

C Module:

FnCimages.c


tk-types-image

Possible invocations:

* (tk-types-image)

Lisp Module:

tk_images.em

Comments:

Result:

List of strings containing the information of the supported image types.

Tcl/Tk command:

image types

Foreign C function:

eul_tk_image_cmd (char* nameImage, char* command, LispRef args)

C Module:

FnCimages.c


tk-unmap-widget

Possible invocations:

* (tk-unmap-widget ()) * (tk-unmap-widget ((widget <tk-object>)))

Lisp Module:

tk_commands.em

Comments:

The first one unmaps the main widget. The second one unmaps the specified widget.

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

N/A

Foreign C function:

eul_tk_unmap_widget (char* name)

C Module:

FnCcommands.c


tk-width-image

Possible invocations:

* (tk-width-image ((image <string>)))

Lisp Module:

tk_images.em

Comments:

Result:

String containing the width of the specified image.

Tcl/Tk command:

image width name

Foreign C function:

eul_tk_image_cmd (char* nameImage, char* command, LispRef args)

C Module:

FnCimages.c


tk-wm

Possible invocations:

* (tk-wm ((operation <string>) () options)) * (tk-wm ((operation <string>) (widget <tk-object>) options))

Lisp Module:

tk_commands.em

Comments:

This method permits to call the widow manager. The user will be able to arrange some aspects of the general window.
options argument could be a list of arguments, accepted by wm tk command.

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

wm option window ?args?

Foreign C function:

eul_tk_wm (char* operation, LispRef listArgs)

C Module:

FnCcommands.c


tk-xview
tk-yview

Possible invocations:

* (tk-xview ((listbox <tk-listbox>) (type <string>) (entry <string>) units)) * (tk-yview ((listbox <tk-listbox>) (type <string>) (entry <string>) units)) * (tk-xview ((text <tk-text>) (type <string>) (entry <string>) units)) * (tk-yview ((text <tk-text>) (type <string>) (entry <string>) units)) * (tk-xview ((entryWidget <tk-entry>) (type <string>) (entry <string>) units))

Lisp Module:

tk_class.em

Comments:

The last three arguments, that is, type entry units, are added automatically by tcl/tk when the callabck function associated to the scrollbar widget is invoked. The user do not have to worry about it. The callback function associated to the scrollbar widget will be the responsible of calling tk-xview or tk-yview. (See general information about How to manage Scrolls for more detail.)

Result:

() or t depending on the success or the failure of the operation.

Tcl/Tk command:

pathname xview pathname yview

Foreign C function:

eul_xview_command (char* nameWidget, Command* cmdPtr, char* type, char* entry, LispRef units) eul_yview_command (char* nameWidget, Command* cmdPtr, char* type, char* entry, LispRef units)

C Module:

FnCwidgets.c


Possible invocations:

Lisp Module:

Comments:

Result:

Tcl/Tk command:

Foreign C function:

C Module: