Module Chamo.View

Views

class type gui_view = object ... end
class type topwin = object ... end
class virtual dyn_label : object ... end
class virtual dyn_destroyable : (unit -> unit) -> object ... end
class virtual pickable : bool -> object ... end
class type view_factory = object ... end
val register_view_factory : string -> view_factory -> unit
val get_factory : string -> view_factory
val iter_factories : (view_factory -> unit) -> unit
val on_factory : string -> (view_factory -> 'a) -> 'a
val factory_open_file : factory:string -> topwin -> gui_view option -> ?attributes:(string * string) list -> ?xmls:Xml.t list -> string -> [ `New_view of gui_view | `Use_view of gui_view ]
val factory_open_hidden : factory:string -> ?attributes:(string * string) list -> ?xmls:Xml.t list -> string -> unit

Associations between filenames and factories

val set_default_factory_name : string -> unit

Set the name of the default factory to use to open files.

val factory_of_filename : string -> string

Return the name of the view factory to use to open the given filename.

  • raises Failure

    if no factory is found and no default factory name is set.