<widget class="GtkHBox" id="UriHBox">
<property name="visible">True</property>
<child>
- <placeholder/>
+ <widget class="GtkEntry" id="browserUri">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_focus">True</property>
+ <property name="invisible_char">●</property>
+ </widget>
+ <packing>
+ <property name="position">0</property>
+ </packing>
</child>
</widget>
<packing>
end
-class type browserWin =
- (* this class exists only because GEdit.combo_box_entry is not supported by
- * lablgladecc :-(((( *)
-object
- inherit MatitaGeneratedGui.browserWin
- method browserUri: GEdit.entry
-end
-
class console ~(buffer: GText.buffer) () =
object (self)
val error_tag = buffer#create_tag [ `FOREGROUND "red" ]
method private findRepl = findRepl
method main = main
- method newBrowserWin () =
- object (self)
- inherit browserWin ()
- val combo = GEdit.entry ()
- initializer
- let combo_widget = combo#coerce in
- uriHBox#pack ~from:`END ~fill:true ~expand:true combo_widget;
- combo#misc#grab_focus ()
- method browserUri = combo
- end
-
method private addKeyBinding key callback =
List.iter (fun evbox -> add_key_binding key callback evbox)
keyBindingBoxes
* http://helm.cs.unibo.it/
*)
-class type browserWin =
-object
- inherit MatitaGeneratedGui.browserWin
- method browserUri: GEdit.entry
-end
-
class type gui =
object
(** {2 Access to singleton instances of lower-level GTK widgets} *)
method main: MatitaGeneratedGui.mainWin
- (** {2 Dialogs instantiation}
- * methods below create a new window on each invocation. You should
- * remember to destroy windows after use *)
- method newBrowserWin: unit -> browserWin
-
(** {2 Utility methods} *)
-
method newScript: unit -> unit
method loadScript: string -> unit
end
let is_uri txt = Pcre.pmatch ~rex:uri_RE txt in
let is_dir txt = Pcre.pmatch ~rex:dir_RE txt in
let gui = MatitaMisc.get_gui () in
- let (win: MatitaGuiTypes.browserWin) = gui#newBrowserWin () in
+ let win = new MatitaGeneratedGui.browserWin () in
+ let _ = win#browserUri#misc#grab_focus () in
let gviz = LablGraphviz.graphviz ~packing:win#graphScrolledWin#add () in
let searchText =
GSourceView2.source_view ~auto_indent:false ~editable:false ()