SFML community forums
Help => General => Topic started 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.
-
Have you searched (http://en.sfml-dev.org/forums/index.php?action=search2;params=eJwtzksOwjAMBNCrIDZsZoH772mqNDEqKG2Qk1Ih5fA4qLuZJ9uycR-zWXb5lilf8ywlNQRChRqk4Y56RD2gQYsOPQaMoArUgHpQC9KxTlfjEo7JhvXtObEeKbTPL7ZpCpv_nhIkTe4p2hxHe4o2Yc__TwqxEbsozhKOyHKJj9X_ADDROO4.) before posting?
-
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.
-
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.
-
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).
-
a HTML rendering/layout engine
This seems like a much more approachable...approach.
-
Thank You guys, this is the answer i was looking for :)