mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-23 04:23:08 +00:00
a15faa6309
interface to the user interface description and command language Tcl/Tk. It allows the implementation of graphical user interfaces in a structured and reusable way, supported by the powerful module system of Standard ML. WWW: http://www.informatik.uni-bremen.de/~cxl/sml_tk PR: ports/119640 Submitted by: Timothy Bourke <timbob at bigpond.com>
64 lines
2.0 KiB
Standard ML
64 lines
2.0 KiB
Standard ML
--- src/widget_tree.sml.orig Sun Jan 13 12:42:32 2008
|
|
+++ src/widget_tree.sml Sun Jan 13 12:44:14 2008
|
|
@@ -1171,9 +1171,9 @@
|
|
if (List.exists (Config.confEq fdef) nc) then nc else fdef::nc
|
|
in
|
|
(packWid doP "frame" tp ip wid p [] [] grid ^
|
|
+ packWid true "scrollbar" sctp scip wid [si,Fill Y] [] [] false ^
|
|
packWid true "text" btp bip wid [siquer,Fill Both,Expand true] nc'
|
|
b false ^
|
|
- packWid true "scrollbar" sctp scip wid [si,Fill Y] [] [] false ^
|
|
btp ^ " configure -yscrollcommand \"" ^ sctp ^ " set \" " ^ "\n" ^
|
|
sctp^" configure -command \""^ btp ^ " yview\"" ^ "\n" ^
|
|
tt ^ stt ^
|
|
@@ -1547,6 +1547,49 @@
|
|
end
|
|
|
|
fun clearText wid = deleteText wid (Mark(0, 0), MarkEnd)
|
|
+
|
|
+fun configureLItem wid cf m =
|
|
+ let
|
|
+ fun litempack [] = ""
|
|
+ | litempack ((Foreground c)::xs) = let
|
|
+ val coltext = Config.showColor c
|
|
+ in
|
|
+ " -foreground " ^ coltext ^
|
|
+ " -selectforeground " ^ coltext ^ litempack xs
|
|
+ end
|
|
+ | litempack ((Background c)::xs) =
|
|
+ " -background " ^ (Config.showColor c) ^ litempack xs
|
|
+ | litempack (_::xs) = litempack xs
|
|
+ val ip = Paths.getIntPathGUI wid
|
|
+ val tp = Paths.getTclPathGUI ip
|
|
+ val w = getWidgetGUIPath ip
|
|
+ val (m1, _)= StringUtil.breakAtDot (Mark.show m)
|
|
+ in
|
|
+ case w of
|
|
+ Listbox _ =>
|
|
+ Com.putTclCmd (tp ^ ".box itemconfigure " ^ m1 ^ " " ^
|
|
+ litempack cf)
|
|
+ | _ =>
|
|
+ raise WIDGET "text insertion in illegal window"
|
|
+ end
|
|
+
|
|
+fun clearLItemConfig wid m =
|
|
+ let
|
|
+ val ip = Paths.getIntPathGUI wid
|
|
+ val tp = Paths.getTclPathGUI ip
|
|
+ val tp = Paths.getTclPathGUI (Paths.getIntPathGUI wid)
|
|
+ val w = getWidgetGUIPath ip
|
|
+ val (m1,_)= StringUtil.breakAtDot (Mark.show m)
|
|
+ in
|
|
+ case w of
|
|
+ Listbox _ =>
|
|
+ Com.putTclCmd (tp ^ ".box itemconfigure " ^ m1 ^
|
|
+ " -foreground \"\" -selectforeground \"\" " ^
|
|
+ " -background \"\" -selectbackground \"\"")
|
|
+ | _ =>
|
|
+ raise WIDGET "text insertion in illegal window"
|
|
+ end
|
|
+
|
|
|
|
fun focus win =
|
|
if ( win = "main" orelse win = "." ) then
|