- let new_text content = mathml#createTextNode (Gdome.domString content) in
- let b_v = new_box_elt "v" in
- List.iter
- (fun item ->
- let b_text = new_box_elt "text" in
- let uri, elt =
- match item with
- | Http_getter_types.Ls_section subdir ->
- (dir ^ subdir ^ "/"), (new_text (subdir ^ "/"))
- | Http_getter_types.Ls_object obj ->
- (dir ^ obj.Http_getter_types.uri),
- (new_text obj.Http_getter_types.uri)
- in
- b_text#setAttributeNS ~namespaceURI:(Some Misc.xlink_ns)
- ~qualifiedName:(Gdome.domString "xlink:href")
- ~value:(Gdome.domString uri);
- ignore (b_v#appendChild ~newChild:(b_text :> Gdome.node));
- ignore (b_text#appendChild ~newChild:(elt :> Gdome.node)))
- content;
- ignore (root#appendChild ~newChild:(b_v :> Gdome.node));
-(* Misc.domImpl#saveDocumentToFile ~doc:mathml ~name:"pippo" (); *)
- mathView#load_root ~root:root
-
- method private setUri uri =
- win#browserUri#set_text uri;
- current_uri <- uri
-
- method private loadObj obj =
+ self#_loadList l
+
+ method private setEntry entry =
+ win#browserUri#set_text (string_of_entry entry);
+ current_entry <- entry
+
+ method private _loadObj obj =
+ self#_showMath;
+ (* this must be _before_ loading the document, since
+ * if the widget is not mapped (hidden by the notebook)
+ * the document is not rendered *)