SFML community forums

Help => General => Topic started by: Arch1eN on September 30, 2014, 11:14:38 am

Title: Viewing website cotent in SFML window.
Post by: Arch1eN on September 30, 2014, 11:14:38 am
Hi !

I would like to make an application in SFML that will show a web based document in SFML window just like in web browsers. What kind of tools do i need to do this ? I was looking for some informations, but i couldnt find any.
Title: Re: Viewing website cotent in SFML window.
Post by: Nexus on September 30, 2014, 11:21:56 am
Have you searched (http://en.sfml-dev.org/forums/index.php?action=search2;params=eJwtzksOwjAMBNCrIDZsZoH772mqNDEqKG2Qk1Ih5fA4qLuZJ9uycR-zWXb5lilf8ywlNQRChRqk4Y56RD2gQYsOPQaMoArUgHpQC9KxTlfjEo7JhvXtObEeKbTPL7ZpCpv_nhIkTe4p2hxHe4o2Yc__TwqxEbsozhKOyHKJj9X_ADDROO4.) before posting?
Title: Re: Viewing website cotent in SFML window.
Post by: Arch1eN on September 30, 2014, 01:31:21 pm
Have you searched (http://en.sfml-dev.org/forums/index.php?action=search2;params=eJwtzksOwjAMBNCrIDZsZoH772mqNDEqKG2Qk1Ih5fA4qLuZJ9uycR-zWXb5lilf8ywlNQRChRqk4Y56RD2gQYsOPQaMoArUgHpQC9KxTlfjEo7JhvXtObEeKbTPL7ZpCpv_nhIkTe4p2hxHe4o2Yc__TwqxEbsozhKOyHKJj9X_ADDROO4.) before posting?

I did, but i have never found an answer, thats why i have posted a topic.
Title: Re: Viewing website cotent in SFML window.
Post by: Hapax on September 30, 2014, 05:40:42 pm
The first thing you will need to do is parse an HTML file.

After this, the details of how you implement how to display each part is entirely up to you. SFML provides access to text and image drawing and that's all you really need. You may need to customise the way you use it to allow for text altering mid-word, for example.

You should look into using views (http://sfml-dev.org/tutorials/2.1/graphics-view.php) to help with scrolling, although you will have to create your own scroll-bar/-control.
Title: Re: Viewing website cotent in SFML window.
Post by: Jesper Juhl on September 30, 2014, 05:47:20 pm
You'll need a HTML rendering/layout engine like KHTML/WebKit (http://en.m.wikipedia.org/wiki/KHTML) or similar (or write one yourself - major task).
Title: Re: Viewing website cotent in SFML window.
Post by: Hapax on September 30, 2014, 06:04:57 pm
a HTML rendering/layout engine
This seems like a much more approachable...approach.
Title: Re: Viewing website cotent in SFML window.
Post by: Arch1eN on October 01, 2014, 08:16:34 pm
Thank You guys, this is the answer i was looking for :)