1999-11-30 06:59:39 -08:00
|
|
|
(* Various indexes
|
|
|
|
canvas
|
|
|
|
entry
|
|
|
|
listbox
|
|
|
|
*)
|
|
|
|
|
2002-04-26 05:16:26 -07:00
|
|
|
##ifdef CAMLTK
|
|
|
|
|
|
|
|
(* A large type for all indices in all widgets *)
|
|
|
|
(* a bit overkill though *)
|
|
|
|
|
|
|
|
(* type *)
|
|
|
|
type index =
|
2002-07-23 07:12:03 -07:00
|
|
|
| Number of int (* no keyword *)
|
2002-04-26 05:16:26 -07:00
|
|
|
| ActiveElement (* tk keyword: active *)
|
2002-07-23 07:12:03 -07:00
|
|
|
| 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 *)
|
2002-04-26 05:16:26 -07:00
|
|
|
| AtXY of int * int (* tk keyword: @x,y *)
|
2002-07-23 07:12:03 -07:00
|
|
|
| AnchorPoint (* tk keyword: anchor *)
|
2002-04-26 05:16:26 -07:00
|
|
|
| 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 *)
|
2002-07-23 07:12:03 -07:00
|
|
|
| Embedded of widget (* no keyword *)
|
2002-04-26 05:16:26 -07:00
|
|
|
;;
|
|
|
|
(* /type *)
|
|
|
|
|
|
|
|
##else
|
|
|
|
|
1999-11-30 06:59:39 -08:00
|
|
|
type canvas_index = [
|
2000-04-02 18:57:52 -07:00
|
|
|
| `Num of int
|
|
|
|
| `End
|
|
|
|
| `Insert
|
|
|
|
| `Selfirst
|
|
|
|
| `Sellast
|
|
|
|
| `Atxy of int * int
|
1999-11-30 06:59:39 -08:00
|
|
|
]
|
2002-04-26 05:16:26 -07:00
|
|
|
;;
|
1999-11-30 06:59:39 -08:00
|
|
|
|
|
|
|
type entry_index = [
|
2000-04-02 18:57:52 -07:00
|
|
|
| `Num of int
|
1999-11-30 06:59:39 -08:00
|
|
|
| `End
|
2000-04-02 18:57:52 -07:00
|
|
|
| `Insert
|
|
|
|
| `Selfirst
|
|
|
|
| `Sellast
|
|
|
|
| `At of int
|
1999-11-30 06:59:39 -08:00
|
|
|
| `Anchor
|
|
|
|
]
|
2002-04-26 05:16:26 -07:00
|
|
|
;;
|
1999-11-30 06:59:39 -08:00
|
|
|
|
|
|
|
type listbox_index = [
|
2000-04-02 18:57:52 -07:00
|
|
|
| `Num of int
|
1999-11-30 06:59:39 -08:00
|
|
|
| `Active
|
|
|
|
| `Anchor
|
|
|
|
| `End
|
2000-04-02 18:57:52 -07:00
|
|
|
| `Atxy of int * int
|
1999-11-30 06:59:39 -08:00
|
|
|
]
|
2002-04-26 05:16:26 -07:00
|
|
|
;;
|
1999-11-30 06:59:39 -08:00
|
|
|
|
|
|
|
type menu_index = [
|
2000-04-02 18:57:52 -07:00
|
|
|
| `Num of int
|
1999-11-30 06:59:39 -08:00
|
|
|
| `Active
|
|
|
|
| `End
|
2000-04-02 18:57:52 -07:00
|
|
|
| `Last
|
|
|
|
| `None
|
|
|
|
| `At of int
|
|
|
|
| `Pattern of string
|
1999-11-30 06:59:39 -08:00
|
|
|
]
|
2002-04-26 05:16:26 -07:00
|
|
|
;;
|
1999-11-30 06:59:39 -08:00
|
|
|
|
|
|
|
type text_index = [
|
2000-04-02 18:57:52 -07:00
|
|
|
| `Linechar of int * int
|
|
|
|
| `Atxy of int * int
|
1999-11-30 06:59:39 -08:00
|
|
|
| `End
|
2000-04-02 18:57:52 -07:00
|
|
|
| `Mark of string
|
|
|
|
| `Tagfirst of string
|
|
|
|
| `Taglast of string
|
|
|
|
| `Window of any widget
|
|
|
|
| `Image of string
|
1999-11-30 06:59:39 -08:00
|
|
|
]
|
2002-04-26 05:16:26 -07:00
|
|
|
;;
|
|
|
|
|
|
|
|
type linechar_index = int * int;;
|
|
|
|
type num_index = int;;
|
1999-11-30 06:59:39 -08:00
|
|
|
|
2002-04-26 05:16:26 -07:00
|
|
|
##endif
|