Skip to content

A tk extension to the bind command with query, replace and delete functions.

License

Notifications You must be signed in to change notification settings

scottypitcher/tkbindex

Repository files navigation

bindex - extended version of the Tk bind command.


The bindex command implements some extensions to the internal Tk bind command for querying, removing,
and replacing the bind script.

This page only describes the bindex extensions. Please refer to the Tk bind man page for complete details.

The legal forms for the bindex command are:

bindex tag
	Return a list whose elements are all the sequences for which there exist bindings for tag.  Refer
	to bind for complete details.

bindex tag sequence
	Return the script currently bound to sequence.  Refer to bind for complete details.

bindex tag sequence script
	Arrange  for  script to be evaluated whenever the event(s) given by sequence occur in the window(s)
	given by tag.  Refer to bind for complete details.

bindex tag sequence +script
	Add script to the scripts that will be evaluated whenever the event(s) given by sequence occur in the
	window(s)  given  by  tag. Refer to bind for complete details.

bindex tag sequence ?script
	Search the scripts that will be evaluated whenever the event(s) given by sequence occur in the window(s)
	given by tag for script script, and return true if found, otherwise false.

bindex tag sequence -script
	Remove script from the scripts that will be evaluated whenever the event(s) given by sequence occur in the 
	window(s) given by tag and return true, else return false. Any trailing or leading carriage return will
	also be removed.  

bindex tag sequence -script1 script2
	Remove  script1  from the scripts that will be evaluated whenever the event(s) given by sequence occur in
	the window(s) given by tag, and add script2 to those scripts and return true, else return false.

bindex tag sequence *script
	If script does not exist in the scripts that will be evaluated whenever the event(s) given by sequence occur
	in  the  window(s) given by tag, then add it to those scripts and return true, else return false.



---BUILD INSTRUCTIONS---

1. Configure

    $ make config

2. Build

    $ make all

3. Test

    $ wish tests/tests.tcl		# Runs all tests by default.

    or -

    $ wish tests/tests.tcl ABC	# Runs only tests A, B and C.

    Tests A-J are available. Some are dependant on previous tests.

4. To Debug.

    $ debugging/run_gdb.sh

* Note I changed the build system from autoconf to a set of make scripts. It doesn't install yet and it probably won't detect
your TCL installation. But the tkbindex package will be left in build/lib after the "make all" step.


Written by:  Scott Pitcher (scottypitcher@gmail.com)

About

A tk extension to the bind command with query, replace and delete functions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published