1
(** Gui completion for the MACHINE component. *)
4
type env = string Environment.string_env
5
let mkenv = Environment.make_string_env
7
module Make_menus (State : sig val st:State.globalState end) = struct
11
module Toolbar_entry = struct
12
let imagefile = <<FILL-HERE>> (* Ex: "ico.machine.palette.png" *)
13
let tooltip = <<FILL-HERE>> (* Ex: "Machine" *)
17
let key = <<FILL-HERE>> (* Ex: Some GdkKeysyms._M *)
18
let dialog = <<FILL-HERE>> (* Ex: let module M = Gui_dialog_MACHINE.Make (State) in M.dialog ~title:"Machine ajout" ~update:None *)
19
let reaction r = <<FILL-HERE>>
22
module Properties = struct
24
let dynlist = <<FILL-HERE>>
26
fun name -> <<FILL-HERE>> (* Ex:
27
let m = (st#network#getMachineByName name) in
28
let title = "Machine propriétés" in
29
let module M = Gui_dialog_MACHINE.Make (State) in M.dialog ~title:(title^" "^name) ~update:(Some m) *)
31
let reaction r = <<FILL-HERE>>
34
module Remove = struct
36
let dynlist = <<FILL-HERE>>
37
let dialog name = <<FILL-HERE>> (* Ex:
38
Talking.EDialog.ask_question ~help:None ~cancel:false
39
~enrich:(mkenv [("name",name)])
42
~question:("Confirmez-vous la suppression de "^name^"\net de tous le cables éventuellement branchés à cette machine ?") *)
44
let reaction r = <<FILL-HERE>>
48
module Startup = struct
50
let dynlist = <<FILL-HERE>>
51
let dialog = <<FILL-HERE>>
52
let reaction r = <<FILL-HERE>>
58
let dynlist = <<FILL-HERE>>
59
let dialog = <<FILL-HERE>>
60
let reaction r = <<FILL-HERE>>
63
module Suspend = struct
65
let dynlist = <<FILL-HERE>>
66
let dialog = <<FILL-HERE>>
67
let reaction r = <<FILL-HERE>>
71
module Resume = struct
73
let dynlist = <<FILL-HERE>>
74
let dialog = <<FILL-HERE>>
75
let reaction r = <<FILL-HERE>>
79
module Ungracefully_stop = struct
81
let dynlist = <<FILL-HERE>>
82
let dialog name = <<FILL-HERE>>
83
let reaction r = <<FILL-HERE>>
87
module Create_entries_for_MY_COMPONENT =
88
Gui_toolbar_COMPONENTS_layouts.Layout_for_network_node_with_state (State) (Toolbar_entry) (Add) (Properties) (Remove) (Startup) (Stop) (Suspend) (Resume) (Ungracefully_stop)