Re: easy display system?

Jan Wielemaker <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 07/17/2013 11:30 AM, Carlo Capelli wrote:
> I would say the console has little role in this, apart introducing the
> Qt dependency.

I understand that.  It is merely whether keeping the window under 
control of Prolog can give a better integrated experience, for example
for showing manual pages than opening a browser.  I also prefer writing
a more advanced view for complex terms in HTML/CSS/JavaScript than in
yet some other proprietary infrastructure.  I also hope that having
this option makes it more likely that people will contribute useful
stuff.

> Since we have introduced win_... family, eventually I would prefer to
> extend the family (something like win_web_console...)

Consistent naming is important.  It is blurring a bit now because win_*
used to stand for non-portable Windows predicates, which also includes
the stuff that talks to the Windows registry, fetch Windows environment
information, etc.  Possibly we should reconsider win_* for the new 
console and use something new (such as con_*).  No hurry yet.  Sed will
do a good job.

> Opening a WebKit browser it's matter of a couple of lines (we can start
> in literally 10 lines :), but IMHO the interesting part would be about
> seamless integration with current prolog stream IO.
> In the past I ported (part of) an RDF/XPCE application to HTTP, and
> can't say that programming a GUI it's really easy...
> Maybe today things are better, thanks to Anne tutorial (sorry Annie, I
> didn't tried it, because it come after I completed my task...).

Yes, things have improved hugely in the past 5 years or so.  Frameworks
such as bootstrap or fuelux make it really easy to build something nice
with not too much effort.  The new quasi quotations make including HTML
and JavaScript a lot more fun too.

> Anyway, apart QtWebKit, also the current console has HTML capabilities.
> Then exposing the DOM through reflection could be rewarding.
> I've begun to follow this route for easy things like line wrapping, max
> block count, fonts, colors....

That is of course very interesting news.  If we can have something that
allows us to send HTML to the console (using a dedicated predicate, we
do not want format('<b>bold</b>') to render as *bold*) you can do a lot
of useful things.  Does this also allow for JavaScript and CSS?  That
would allow for portray rules that render terms nicely and allow for
expand/collapse, etc.

	Cheers --- Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.