blob: a42af5539065be96cb3d4a652be87844d08df0b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
(* Various indexes
canvas
entry
listbox
*)
##ifdef CAMLTK
(* A large type for all indices in all widgets *)
(* a bit overkill though *)
(* type *)
type index =
| Number of int (* no keyword *)
| ActiveElement (* tk keyword: active *)
| End (* tk keyword: end *)
| Last (* tk keyword: last *)
| NoIndex (* tk keyword: none *)
| Insert (* tk keyword: insert *)
| SelFirst (* tk keyword: sel.first *)
| SelLast (* tk keyword: sel.last *)
| At of int (* tk keyword: @n *)
| AtXY of int * int (* tk keyword: @x,y *)
| AnchorPoint (* tk keyword: anchor *)
| Pattern of string (* no keyword *)
| LineChar of int * int (* tk keyword: l.c *)
| Mark of string (* no keyword *)
| TagFirst of string (* tk keyword: tag.first *)
| TagLast of string (* tk keyword: tag.last *)
| Embedded of widget (* no keyword *)
;;
(* /type *)
##else
type canvas_index = [
| `Num of int
| `End
| `Insert
| `Selfirst
| `Sellast
| `Atxy of int * int
]
;;
type entry_index = [
| `Num of int
| `End
| `Insert
| `Selfirst
| `Sellast
| `At of int
| `Anchor
]
;;
type listbox_index = [
| `Num of int
| `Active
| `Anchor
| `End
| `Atxy of int * int
]
;;
type menu_index = [
| `Num of int
| `Active
| `End
| `Last
| `None
| `At of int
| `Pattern of string
]
;;
type text_index = [
| `Linechar of int * int
| `Atxy of int * int
| `End
| `Mark of string
| `Tagfirst of string
| `Taglast of string
| `Window of any widget
| `Image of string
]
;;
type linechar_index = int * int;;
type num_index = int;;
##endif
|