|
Packit |
bd2e5d |
(***********************************************************************)
|
|
Packit |
bd2e5d |
(* *)
|
|
Packit |
bd2e5d |
(* MLTk, Tcl/Tk interface of OCaml *)
|
|
Packit |
bd2e5d |
(* *)
|
|
Packit |
bd2e5d |
(* Francois Rouaix, Francois Pessaux, Jun Furuse and Pierre Weis *)
|
|
Packit |
bd2e5d |
(* projet Cristal, INRIA Rocquencourt *)
|
|
Packit |
bd2e5d |
(* Jacques Garrigue, Kyoto University RIMS *)
|
|
Packit |
bd2e5d |
(* *)
|
|
Packit |
bd2e5d |
(* Copyright 2002 Institut National de Recherche en Informatique et *)
|
|
Packit |
bd2e5d |
(* en Automatique and Kyoto University. All rights reserved. *)
|
|
Packit |
bd2e5d |
(* This file is distributed under the terms of the GNU Library *)
|
|
Packit |
bd2e5d |
(* General Public License, with the special exception on linking *)
|
|
Packit |
bd2e5d |
(* described in file LICENSE found in the OCaml source tree. *)
|
|
Packit |
bd2e5d |
(* *)
|
|
Packit |
bd2e5d |
(***********************************************************************)
|
|
Packit |
bd2e5d |
open Camltk
|
|
Packit |
bd2e5d |
|
|
Packit |
bd2e5d |
(* Temporary focus *)
|
|
Packit |
bd2e5d |
|
|
Packit |
bd2e5d |
(* ? use bind tag ? how about the global reference then *)
|
|
Packit |
bd2e5d |
let auto w =
|
|
Packit |
bd2e5d |
let old_focus = ref w in
|
|
Packit |
bd2e5d |
bind w [[],Enter]
|
|
Packit |
bd2e5d |
(BindSet([], fun _ -> old_focus := Focus.get (); Focus.set w));
|
|
Packit |
bd2e5d |
bind w [[],Leave]
|
|
Packit |
bd2e5d |
(BindSet([], fun _ -> Focus.set !old_focus))
|