Page 1 of 1

Help reqd for creating HTML help viewer control using CEGUI

Posted: Wed Mar 16, 2005 04:51
by krithigal
WE need to create a HTML help viewer using CEGUI lib. We have found that we need to create a .chm file, parse it to display in the viewer.

At the back end it should have a map and an alias file to define the ID and to associate the ID's with the html file.


Regarding creating of the front end control using CEGUI lib can you provide a few guidelines?


Looking forward towards your help.


regards
krithiga

Re: Help reqd for creating HTML help viewer control using CE

Posted: Wed Mar 16, 2005 09:43
by CrazyEddie
If you're talking about how to go about rendering the HTML content, then I would suggest parsing the HTML and constructing a list of items to be drawn; like text segments, images, and so on. Each item would need to store the position of the item and any other information to draw what is required for the item. When you need to render, just iterate through the list drawing the required items.

You're bound to want a scroll bar, so set this up so that the document size is the vertical pixel extent of the entire HTML output, and the page size is the vertical pixel height of the view area. Then when you draw, subtract the current scroll position from every item.

CE.