#!/afs/ece/usr/tcl/bin/wish -f

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 {} {
  if {[widget_bindings] != ""} {
    include_files {mark.tcl th_mark_region} \
	{browse.Text.tcl th_Text_goto} \
  	{common.tcl th_beep}
  }
  global Marked_Tag
  do_cmd "set TH(Mark,Tag) \{$Marked_Tag\}\n" 0
}

# 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"


