method get_active_view_container =
match active_view with
None -> None
| Some gv ->
match contents with
None -> None
| Some (`View v) ->
if Oo.id v = Oo.id gv then
Some (`Window (self :> gui_window))
else
None
| Some (`Paned gp) ->
gp#find_view_container gv
| Some (`Notebook gn) ->
gn#find_view_container gv