<child>
<widget class="GtkMenu" id="BrowserViewMenu_menu">
- <child>
- <widget class="GtkMenuItem" id="BrowserMetadataMenuItem">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Metadata</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
<child>
<widget class="GtkMenuItem" id="DepGraphMenuItem">
<property name="visible">True</property>
</child>
<child>
- <widget class="GtkSeparatorMenuItem" id="separator11">
+ <widget class="GtkMenuItem" id="univMenuItem">
<property name="visible">True</property>
+ <property name="label" translatable="yes">Universes</property>
+ <property name="use_underline">True</property>
</widget>
</child>
<property name="type">tab</property>
</packing>
</child>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow15">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="universesTreeview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">True</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ <property name="fixed_height_mode">False</property>
+ <property name="hover_selection">False</property>
+ <property name="hover_expand">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="universes">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Universes</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
win#hBugsTutorsMenuItem#misc#hide ();
connect_menu_item win#browserUrlMenuItem (fun () ->
win#browserUri#entry#misc#grab_focus ());
+ connect_menu_item win#univMenuItem (fun () ->
+ match self#currentCicUri with
+ | Some uri -> self#load (`Univs uri)
+ | None -> ());
(* fill dep graph contextual menu *)
let go_menu_item =
val model =
new MatitaGtkMisc.taggedStringListModel tags win#whelpResultTreeview
+ val model_univs =
+ new MatitaGtkMisc.multiStringListModel ~cols:2 win#universesTreeview
val mutable lastDir = "" (* last loaded "directory" *)
*)
method private _showMath = win#mathOrListNotebook#goto_page 0
method private _showList = win#mathOrListNotebook#goto_page 1
+ method private _showList2 = win#mathOrListNotebook#goto_page 5
method private _showGviz = win#mathOrListNotebook#goto_page 3
method private _showHBugs = win#mathOrListNotebook#goto_page 4
| `Metadata (`Deps ((`Fwd | `Back) as dir, uri)) ->
self#dependencies dir uri ()
| `Uri uri -> self#_loadUriManagerUri uri
+ | `Univs uri -> self#_loadUnivs uri
| `Whelp (query, results) ->
set_whelp_query query;
self#_loadList (List.map (fun r -> "obj",
let uri = UriManager.strip_xpointer uri in
let (obj, _) = CicEnvironment.get_obj CicUniv.empty_ugraph uri in
self#_loadObj obj
+
+ method private _loadUnivs uri =
+ let uri = UriManager.strip_xpointer uri in
+ let (_, u) = CicEnvironment.get_obj CicUniv.empty_ugraph uri in
+ let _,us = CicUniv.do_rank u in
+ let l =
+ List.map
+ (fun u ->
+ [ CicUniv.string_of_universe u ; string_of_int (CicUniv.get_rank u)])
+ us
+ in
+ self#_loadList2 l
method private _loadDir dir =
let content = Http_getter.ls ~local:false dir in
model#list_store#clear ();
List.iter (fun (tag, s) -> model#easy_append ~tag s) l;
self#_showList
+
+ method private _loadList2 l =
+ model_univs#list_store#clear ();
+ List.iter model_univs#easy_mappend l;
+ self#_showList2
(** { public methods, all must call _load!! } *)
| `Metadata of [ `Deps of [`Fwd | `Back] * UriManager.uri ]
| `Uri of UriManager.uri (* cic object uri *)
| `Whelp of string * UriManager.uri list (* query and results *)
+ | `Univs of UriManager.uri
]
let string_of_entry = function
(match dir with | `Fwd -> "forward" | `Back -> "backward") ^ suri)
| `Uri uri -> UriManager.string_of_uri uri
| `Whelp (query, _) -> query
+ | `Univs uri -> "univs:" ^ UriManager.string_of_uri uri
let entry_of_string = function
| "about:blank" -> `About `Blank
| `HBugs of [ `Tutors ]
| `Metadata of [ `Deps of [`Fwd | `Back] * UriManager.uri ]
| `Uri of UriManager.uri
- | `Whelp of string * UriManager.uri list ]
+ | `Whelp of string * UriManager.uri list
+ | `Univs of UriManager.uri
+ ]
val string_of_entry : mathViewer_entry -> string
val entry_of_string : string -> mathViewer_entry