Blame browser/jg_button.ml

Packit bd2e5d
(*************************************************************************)
Packit bd2e5d
(*                                                                       *)
Packit bd2e5d
(*                         OCaml LablTk library                          *)
Packit bd2e5d
(*                                                                       *)
Packit bd2e5d
(*            Jacques Garrigue, Kyoto University RIMS                    *)
Packit bd2e5d
(*                                                                       *)
Packit bd2e5d
(*   Copyright 1999 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.                                 *)
Packit bd2e5d
(*                                                                       *)
Packit bd2e5d
(*************************************************************************)
Packit bd2e5d
Packit bd2e5d
(* $Id$ *)
Packit bd2e5d
Packit bd2e5d
open Tk
Packit bd2e5d
Packit bd2e5d
let create_destroyer ~parent ?(text="Ok") tl =
Packit bd2e5d
    Button.create parent ~text ~command:(fun () -> destroy tl)
Packit bd2e5d
Packit bd2e5d
let add_destroyer ?text tl =
Packit bd2e5d
    let b = create_destroyer tl ~parent:tl ?text in
Packit bd2e5d
    pack [b] ~side:`Bottom ~fill:`X;
Packit bd2e5d
    b