| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
type color = GDraw.color |
| 12 |
|
| 13 |
type model_event = [ `INSERT | `REMOVE | `SET of int * color ] |
| 14 |
|
| 15 |
class type segment_signals = |
| 16 |
object |
| 17 |
inherit GObj.misc_signals |
| 18 |
inherit GUtil.add_ml_signals |
| 19 |
method clicked : callback:(int -> unit) -> GtkSignal.id |
| 20 |
end |
| 21 |
|
| 22 |
class type model = |
| 23 |
object |
| 24 |
method changed : callback:(model_event -> unit) -> unit |
| 25 |
method length : int |
| 26 |
method fold : 'a. ('a -> color -> 'a) -> 'a -> 'a |
| 27 |
end |
| 28 |
|
| 29 |
class segment : unit -> |
| 30 |
object |
| 31 |
inherit GObj.widget |
| 32 |
val obj : Gtk.widget Gtk.obj |
| 33 |
method set_model : model -> unit |
| 34 |
method connect : segment_signals |
| 35 |
method default_color : color |
| 36 |
method set_default_color : color -> unit |
| 37 |
end |