35
36:- module(pce_manual,
37 [ manpce/0,
38 manpce/1
39 ]). 40:- use_module(library(pce)). 41:- consult([ man/util 42 , man/p_card 43 , man/p_data 44 , man/v_manual 45 ]). 46:- require([ pce_warn/1
47 , pce_to_method/2
48 ]).
53:- pce_autoload(man_class_browser, library('man/v_class')). 54:- pce_autoload(man_editor, library('man/v_editor')). 55:- pce_autoload(man_card_editor, library('man/v_card')). 56:- pce_autoload(man_summary_browser, library('man/v_summary')). 57:- pce_autoload(man_class_hierarchy, library('man/v_hierarchy')). 58:- pce_autoload(man_search_tool, library('man/v_search')). 59:- pce_autoload(man_index_manager, library('man/man_index')). 60:- pce_autoload(man_topic_browser, library('man/v_topic')). 61:- pce_autoload(man_module_browser, library('man/v_module')). 62:- pce_autoload(man_statistics, library('man/v_statistics')). 63:- pce_autoload(isp_frame, library('man/v_inspector')). 64:- pce_autoload(vis_frame, library('man/v_visual')). 65:- pce_autoload(man_instance_browser, library('man/v_instance')). 66:- pce_autoload(man_global, library('man/v_global')). 67:- pce_autoload(man_object_browser, library('man/v_global')). 68:- pce_autoload(man_error_browser, library('man/v_error')). 69:- pce_autoload(man_group_browser, library('man/v_group')). 70
71:- pce_global(@manual, new(man_manual)).
77manpce :-
78 in_pce_thread(send(@manual, expose)).
92manpce(Spec) :-
93 in_pce_thread(manpce_(Spec)).
94
95manpce_(Spec) :-
96 ( method(Spec, Object)
97 -> send(@manual, manual, Object)
98 ; pce_warn(pce(no_help(Spec))),
99 fail
100 ).
101
102method(Spec, Method) :-
103 object(Spec),
104 send(Spec, '_instance_of', var),
105 !,
106 Spec = @Ref,
107 new(Method, man_global(Ref)).
108method(Spec, Method) :-
109 pce_to_method(Spec, Method),
110 !.
111method(Atom, Method) :-
112 atom(Atom),
113 catch(term_to_atom(Spec, Atom), _, fail),
114 pce_to_method(Spec, Method)
Start XPCE manual
*/