Index: Makefile.in =================================================================== RCS file: /cvsroot/tktable/htmlwidget/Makefile.in,v retrieving revision 1.1 diff -u -p -u -p -r1.1 Makefile.in --- Makefile.in 17 Dec 2002 18:31:04 -0000 1.1 +++ Makefile.in 4 Jun 2005 10:37:29 -0000 @@ -232,8 +232,8 @@ install-binaries: binaries install-lib-b #======================================================================== install-libraries: libraries - @mkdir -p $(DESTDIR)$(includedir) - @echo "Installing header files in $(DESTDIR)$(includedir)" +# @mkdir -p $(DESTDIR)$(includedir) +# @echo "Installing header files in $(DESTDIR)$(includedir)" # @for i in $(GENERIC_HDRS) ; do \ # echo "Installing $$i" ; \ # $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \ @@ -327,7 +327,9 @@ mktclapp: $(srcdir)/tools/mktclapp.c htmltokens.c: $(srcdir)/src/tokenlist.txt $(srcdir)/tools/maketokens.tcl $(TCLSH_PROG) $(srcdir)/tools/maketokens.tcl $(srcdir)/src/tokenlist.txt > htmltokens.c -headers: makeheaders htmltokens.c +headers: htmltokens.h +$($(PACKAGE)_OBJECTS): htmltokens.h +htmltokens.h: makeheaders $($(PACKAGE)_SOURCES) ./makeheaders $(srcdir)/src/htmlcmd.c:htmlcmd.h \ $(srcdir)/src/htmldraw.c:htmldraw.h \ $(srcdir)/src/htmlform.c:htmlform.h \ @@ -557,7 +559,7 @@ dist_orig: clean: -test -z "$(BINARIES)" || rm -f $(BINARIES) - -rm -f *.$(OBJEXT) core *.core + -rm -f *.$(OBJEXT) core *.core htmltokens.c $($(PACKAGE)_SOURCES:.c=.h) -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean: clean Index: configure.in =================================================================== RCS file: /cvsroot/tktable/htmlwidget/configure.in,v retrieving revision 1.16 diff -u -p -u -p -r1.16 configure.in --- configure.in 17 Dec 2002 18:31:04 -0000 1.16 +++ configure.in 4 Jun 2005 10:37:29 -0000 @@ -208,7 +208,9 @@ then gcclibdir=`echo $gcclibdir | sed -e "s|^Reading specs from ||"` if test "X$gcclibdir" != "X" ; then gcclibdir=`dirname $gcclibdir` - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -L$gcclibdir -lgcc" + if test "X`uname -s`" != "XDarwin"; then + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -L$gcclibdir -lgcc" + fi fi fi fi Index: hv/hv.tcl =================================================================== RCS file: /cvsroot/tktable/htmlwidget/hv/hv.tcl,v retrieving revision 1.31 diff -u -p -u -p -r1.31 hv.tcl --- hv/hv.tcl 28 Jan 2003 09:43:23 -0000 1.31 +++ hv/hv.tcl 4 Jun 2005 10:37:29 -0000 @@ -117,7 +117,8 @@ html .h.h \ -scriptcommand ScriptCmd \ -appletcommand AppletCmd \ -underlinehyperlinks 0 \ - -bg white -tablerelief raised + -unvisitedcolor blue \ + -bg beige -tablerelief raised # If the tracemask is not 0, then draw the outline of all # tables as a blank line, not a 3D relief. @@ -140,7 +141,7 @@ proc pickFont {size attrs} { # This routine is called for each form element # -proc FormCmd {n cmd style args} { +proc FormCmd {n cmd args} { # puts "FormCmd: $n $cmd $args" switch $cmd { select - @@ -316,10 +317,13 @@ proc ClearBigImages {} { # Read a file # proc ReadFile {name} { + # dgroth fix for files containing anchors + regexp {(.+)#} $name match name if {[catch {open $name r} fp]} { tk_messageBox -icon error -message $fp -type ok return {} } else { + fconfigure $fp -translation binary set r [read $fp [file size $name]] close $fp return $r @@ -329,16 +333,104 @@ proc ReadFile {name} { # Load a file into the HTML widget # proc LoadFile {name} { - set html [ReadFile $name] + # jcw 06/10/2000 - drop "#tag", if present + set basename [lindex [split $name #] 0] + set html [ReadFile $basename] if {$html==""} return Clear global LastFile + + # jcw: new code for back/forward history + # PrevFiles are previous pages, last seen is at end + # NextFiles are next pages, pushed back while retreating + global PrevFiles NextFiles + #puts "$name: $PrevFiles << $LastFile >> $NextFiles" + if {$name != $LastFile && $LastFile != ""} { + if {$name == [lindex $PrevFiles end]} { + set NextFiles [linsert $NextFiles 0 $LastFile] + set PrevFiles [lreplace $PrevFiles end end] + } else { + lappend PrevFiles $LastFile + + if {$name == [lindex $NextFiles 0]} { + set NextFiles [lrange $NextFiles 1 end] + } else { + set NextFiles {} + } + } + } + # jcw: show which page is being displayed + wm title . $name + # jcw: end of new code + set LastFile $name .h.h config -base $name + # jcw 06/10/2000 - deal with text files (as suggested by Uwe Koloska) + if {![regexp -nocase {|$html\n" + } + # jcw: end of changed code .h.h parse $html ClearOldImages -} + # dgroth 13/11/2003 add jimping to internal name + if {[regexp {(.+)#(.+)} $LastFile match file anchor]} { + #tk_messageBox -title "Info!" -icon info -message "message jumping to $anchor" -type ok + .h.h yview $anchor + } +} +# jcw: init +set LastFile {} +set PrevFiles {} +set NextFiles {} + +# jcw: menu bindings +set m .mbar.view.m +$m add separator +$m add command -label Home -underline 1 -command \ + {LoadFile [lindex $PrevFiles 0]} +$m add command -label Back -underline 1 -command \ + {LoadFile [lindex $PrevFiles end]} +$m add command -label Forward -underline 1 -command \ + {LoadFile [lindex $NextFiles 0]} + +# dgroths popup +menu .popup -tearoff 0 +.popup add command -label Refresh -underline 0 -command Refresh +.popup add separator +.popup add command -label Home -underline 1 -command \ + {LoadFile [lindex $PrevFiles 0]} +.popup add command -label Back -underline 1 -command \ + {LoadFile [lindex $PrevFiles end]} +.popup add command -label Forward -underline 1 -command \ + {LoadFile [lindex $NextFiles 0]} +bind all { + if { [winfo exists .popup] } { + set x [winfo pointerx .] + + set y [winfo pointery .] + + tk_popup .popup $x $y + } +} +bind all { + .h.h yview scroll +1 pages +} +bind all { + .h.h yview scroll +1 pages +} +bind all { + .h.h yview scroll +2 units +} +bind all { + .h.h yview scroll -1 pages +} +bind all { + .h.h yview scroll -1 pages +} +bind all { + .h.h yview scroll -2 units +} # Refresh the current file. # proc Refresh {args} { Index: src/htmlexts.c =================================================================== RCS file: /cvsroot/tktable/htmlwidget/src/htmlexts.c,v retrieving revision 1.7 diff -u -p -u -p -r1.7 htmlexts.c --- src/htmlexts.c 27 Jan 2003 03:22:31 -0000 1.7 +++ src/htmlexts.c 4 Jun 2005 10:37:29 -0000 @@ -2717,8 +2717,6 @@ void HtmlTclizeFind(Tcl_Interp *interp, Tcl_DStringResult(interp, &str); } -extern int (*HtmlFetchSelectionPtr)(ClientData , int, char *, int ); - #if INTERFACE #define DLL_EXPORT #endif Index: tclconfig/tcl.m4 =================================================================== RCS file: /cvsroot/tktable/htmlwidget/tclconfig/tcl.m4,v retrieving revision 1.1 diff -u -p -u -p -r1.1 tcl.m4 --- tclconfig/tcl.m4 17 Dec 2002 18:31:05 -0000 1.1 +++ tclconfig/tcl.m4 4 Jun 2005 10:37:29 -0000 @@ -1905,7 +1905,21 @@ closedir(d); AC_DEFUN(TEA_PATH_X, [ if test "${TEA_PLATFORM}" = "unix" ; then - TEA_PATH_UNIX_X + case ${TK_DEFS} in + *_OSX_TK*) + AC_DEFINE(MAC_OSX_TK) + TEA_WINDOWINGSYSTEM="aqua" + if test -z "${ac_cv_c_tkh}" -o ! -r "${ac_cv_c_tkh}/X11/Xlib.h"; then + TK_XINCLUDES='-I${TK_SRC_DIR}/xlib' + fi + ;; + *) + TEA_PATH_UNIX_X + TEA_WINDOWINGSYSTEM="x11" + ;; + esac + elif test "${TEA_PLATFORM}" = "windows" ; then + TEA_WINDOWINGSYSTEM="windows" fi ])