~ubuntu-branches/ubuntu/wily/marionnet/wily

« back to all changes in this revision

Viewing changes to gui/gui_component-node-with-state.ml-template

  • Committer: Package Import Robot
  • Author(s): Lucas Nussbaum
  • Date: 2013-03-29 15:57:12 UTC
  • Revision ID: package-import@ubuntu.com-20130329155712-o0b9b96w8av68ktq
Tags: upstream-0.90.6+bzr407
Import upstream version 0.90.6+bzr407

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(** Gui completion for the MACHINE component. *)
 
2
 
 
3
(* Shortcuts *)
 
4
type env  = string Environment.string_env
 
5
let mkenv = Environment.make_string_env
 
6
 
 
7
module Make_menus (State : sig val st:State.globalState end) = struct
 
8
 
 
9
  open State
 
10
 
 
11
  module Toolbar_entry = struct
 
12
   let imagefile = <<FILL-HERE>> (* Ex: "ico.machine.palette.png" *)
 
13
   let tooltip   = <<FILL-HERE>> (* Ex: "Machine" *)
 
14
  end
 
15
 
 
16
  module Add = struct
 
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>>
 
20
  end
 
21
 
 
22
  module Properties = struct
 
23
 
 
24
    let dynlist = <<FILL-HERE>>
 
25
    let dialog =
 
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) *)
 
30
 
 
31
    let reaction r = <<FILL-HERE>>
 
32
  end
 
33
 
 
34
  module Remove = struct
 
35
 
 
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)])
 
40
                   ~gen_id:"answer"
 
41
                   ~title:"Supprimer"
 
42
                   ~question:("Confirmez-vous la suppression de "^name^"\net de tous le cables éventuellement branchés à cette machine ?") *)
 
43
 
 
44
    let reaction r = <<FILL-HERE>>
 
45
 
 
46
  end
 
47
 
 
48
  module Startup = struct
 
49
 
 
50
    let dynlist    = <<FILL-HERE>>
 
51
    let dialog     = <<FILL-HERE>>
 
52
    let reaction r = <<FILL-HERE>>
 
53
 
 
54
  end
 
55
 
 
56
  module Stop = struct
 
57
 
 
58
    let dynlist    = <<FILL-HERE>>
 
59
    let dialog     = <<FILL-HERE>>
 
60
    let reaction r = <<FILL-HERE>>
 
61
  end
 
62
 
 
63
  module Suspend = struct
 
64
 
 
65
    let dynlist    = <<FILL-HERE>>
 
66
    let dialog     = <<FILL-HERE>>
 
67
    let reaction r = <<FILL-HERE>>
 
68
 
 
69
  end
 
70
 
 
71
  module Resume = struct
 
72
 
 
73
    let dynlist    = <<FILL-HERE>>
 
74
    let dialog     = <<FILL-HERE>>
 
75
    let reaction r = <<FILL-HERE>>
 
76
 
 
77
  end
 
78
 
 
79
  module Ungracefully_stop = struct
 
80
 
 
81
    let dynlist     = <<FILL-HERE>>
 
82
    let dialog name = <<FILL-HERE>>
 
83
    let reaction r  = <<FILL-HERE>>
 
84
 
 
85
  end
 
86
 
 
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)
 
89
 
 
90
end