]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/ocaml/contrib/otherlibs/labltk/support/rawwidget.mli
Update
[l4.git] / l4 / pkg / ocaml / ocaml / contrib / otherlibs / labltk / support / rawwidget.mli
1 (***********************************************************************)
2 (*                                                                     *)
3 (*                 MLTk, Tcl/Tk interface of Objective Caml            *)
4 (*                                                                     *)
5 (*    Francois Rouaix, Francois Pessaux, Jun Furuse and Pierre Weis    *)
6 (*               projet Cristal, INRIA Rocquencourt                    *)
7 (*            Jacques Garrigue, Kyoto University RIMS                  *)
8 (*                                                                     *)
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. *)
14 (*                                                                     *)
15 (***********************************************************************)
16
17 (* $Id: rawwidget.mli 4745 2002-04-26 12:16:26Z furuse $ *)
18
19 (* Support for widget manipulations *)
20
21 type 'a raw_widget
22   (* widget is an abstract type *)
23
24 type raw_any
25 and button
26 and canvas
27 and checkbutton
28 and entry
29 and frame
30 and label
31 and listbox
32 and menu
33 and menubutton
34 and message
35 and radiobutton
36 and scale
37 and scrollbar
38 and text
39 and toplevel
40
41 val forget_type : 'a raw_widget -> raw_any raw_widget
42 val coe : 'a raw_widget -> raw_any raw_widget
43
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]
47      ends the main loop
48    *)
49
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
56      of CamlTk.
57    *)
58
59 val name : 'a raw_widget -> string
60   (* [name w] returns the name (tk "path") of a widget *)
61
62 (*--*)
63 (* The following functions are used internally.
64    There is normally no need for them in users programs
65  *)
66
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.
71    *)
72
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.
76    *)
77           
78 val new_atom : parent:'a raw_widget -> ?name: string -> string -> 'b raw_widget
79
80 val get_atom : string -> raw_any raw_widget
81   (* [get_atom path] returns the widget with Tk path [path] *)
82
83 val remove : 'a raw_widget -> unit
84   (* [remove w] removes widget from the internal tables *)
85
86 (* Subtypes 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
103
104 val chk_sub : string -> 'a list -> 'a -> unit
105 val check_class : 'a raw_widget -> string list -> unit
106       (* Widget subtyping *)
107
108 exception IllegalWidgetType of string
109       (* Raised when widget command applied illegally*)