#!/afs/ece/usr/tcl/bin/wish -f
# The next line is executed by most shells, but not Tcl \
wish $0 $*


set Bind_Keyword [file tail [info script]]
source "[file dirname [info script]]/../aux/frame.tcl"

# Help text.
set Help "" ; append Help {Marketh -- Add special marks to text in a text widget

This program teaches text widgets to highlight some of their text with a mark,
and to quickly find marked text.

} $TH_Bindings_Help {

Widgets of Marketh

Configuration of Marked Text Entry

This entry is filled with the configuration of the mark tag. Any text
highlighted with the tag mark will get this configuration.

} $TH_Frame_Help


# Gives app all the code necessary to do our functions.
proc teach_code {} {
  global Class Marked_Tag
  if {$Class != "Text"} {return ""}

  include_files {mark.tcl th_mark_region} \
	{browse.Text.tcl th_Text_goto}
  do_cmd_set TH(Mark,Tag) $Marked_Tag
}

# For a widget, returns the appropriate bindings. (They will depend on the
# widget)
proc widget_bindings {} {
  global Bindings Class
  if {$Class != "Text"} {return ""}
  return $Bindings(Mark)
}


create_form_entry .fmc "Configuration of Marked Text" Marked_Tag \
	"-background blue"
