1 (***********************************************************************)
3 (* MLTk, Tcl/Tk interface of Objective Caml *)
5 (* Francois Rouaix, Francois Pessaux, Jun Furuse and Pierre Weis *)
6 (* projet Cristal, INRIA Rocquencourt *)
7 (* Jacques Garrigue, Kyoto University RIMS *)
9 (* Copyright 2002 Institut National de Recherche en Informatique et *)
10 (* en Automatique and Kyoto University. All rights reserved. *)
11 (* This file is distributed under the terms of the GNU Library *)
12 (* General Public License, with the special exception on linking *)
13 (* described in file LICENSE found in the Objective Caml source tree. *)
15 (***********************************************************************)
17 (* $Id: rawwidget.mli 4745 2002-04-26 12:16:26Z furuse $ *)
19 (* Support for widget manipulations *)
22 (* widget is an abstract type *)
41 val forget_type : 'a raw_widget -> raw_any raw_widget
42 val coe : 'a raw_widget -> raw_any raw_widget
44 val default_toplevel : toplevel raw_widget
45 (* [default_toplevel] is "." in Tk, the toplevel widget that is
46 always existing during a Tk session. Destroying [default_toplevel]
50 val atom : parent: 'a raw_widget -> name: string -> raw_any raw_widget
51 (* [atom parent name] returns the widget [parent.name]. The widget is
52 not created. Only its name is returned. In a given parent, there may
53 only exist one children for a given name.
54 This function should only be used to check the existence of a widget
55 with a known name. It doesn't add the widget to the internal tables
59 val name : 'a raw_widget -> string
60 (* [name w] returns the name (tk "path") of a widget *)
63 (* The following functions are used internally.
64 There is normally no need for them in users programs
67 val known_class : 'a raw_widget -> string
68 (* [known_class w] returns the class of a widget (e.g. toplevel, frame),
69 as known by the CamlTk interface.
70 Not equivalent to "winfo w" in Tk.
73 val dummy : raw_any raw_widget
74 (* [dummy] is a widget used as context when we don't have any.
75 It is *not* a real widget.
78 val new_atom : parent:'a raw_widget -> ?name: string -> string -> 'b raw_widget
80 val get_atom : string -> raw_any raw_widget
81 (* [get_atom path] returns the widget with Tk path [path] *)
83 val remove : 'a raw_widget -> unit
84 (* [remove w] removes widget from the internal tables *)
87 val widget_any_table : string list
88 val widget_button_table : string list
89 val widget_canvas_table : string list
90 val widget_checkbutton_table : string list
91 val widget_entry_table : string list
92 val widget_frame_table : string list
93 val widget_label_table : string list
94 val widget_listbox_table : string list
95 val widget_menu_table : string list
96 val widget_menubutton_table : string list
97 val widget_message_table : string list
98 val widget_radiobutton_table : string list
99 val widget_scale_table : string list
100 val widget_scrollbar_table : string list
101 val widget_text_table : string list
102 val widget_toplevel_table : string list
104 val chk_sub : string -> 'a list -> 'a -> unit
105 val check_class : 'a raw_widget -> string list -> unit
106 (* Widget subtyping *)
108 exception IllegalWidgetType of string
109 (* Raised when widget command applied illegally*)