Hi All,
We are creating HTML Viewer widget using CEGUI. This is the sequence of activities that we nned follow for drawing an Image:
a) If Image tag is found, send a message to Container Application.
c) If Image is with container, it sets it back to the widget by calling a function and widget can draw the image
Now Widget needs to keep check on time in which image should be set by container application. For implementing this we want to wait for some time, till we get the response for image from container application.
Can any body please suggest how do i achieve this functionality.
regards
parul
HTML - Image draw
Moderators: CEGUI MVP, CEGUI Team
Re: HTML - Image draw
I'd suggest running the widget from its own thread, and just Sleep'ing while waiting. Of course, you'll have to have some signal to indicate when it's OK to draw. Perhaps I'd have the data gathering done in this seperate thread, and have a Draw routine for the widget that displays the data it's already received, to be called from your normal Render routine.
Dave
Dave
Re: HTML - Image draw
Hi,
Thanks for reply.
Can you please tell me how i can implement threads in CEGUI system.
Regards,
Parul
Thanks for reply.
Can you please tell me how i can implement threads in CEGUI system.
Regards,
Parul
Re: HTML - Image draw
I would think the HTML portion of your code (the sending and getting of data) would be seperate from the GUI. I would create a class (if using C++) to handle the web page, and within that class, create a thread to handle the IO. Also as part of that class, but seperate from the thread, create a Render routine that draws the current data set. Be sure to put some kind of mutex around the data to prevent drawing while updating.
Dave
Dave
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 7 guests