Thanks for the info. I have a couple questions:
With a PtRaw widget, do you never enter the MainEventLoop? Basically I’ll
execute my own user input code and redraw as needed?
I forgot to mention that I may be updating my GUI based on input from
Is this most easily done with Pulses or messages? I saw some documentation
but no real examples. I just want to be able to easily send quick messages
to a running Photon application.
in article 3CE9A846.firstname.lastname@example.org, Michel Belanger at
email@example.com wrote on 5/20/02 6:52 PM:
Multi-threading in a Photon Application should be use as a last resort
One word PtRaw.
1 ) Create a PtRaw (PtCreateWidget() ).
2 ) Set the Pt_ARG_RAW_DRAW_F of your PtRaw. This will be called when
your widget is damage ( you do your drawing in it ).
3 ) Add a event handler to your PtRaw use PtAddEventHandler(). This will
be call on user inputs.At the end of your event handler, if your need to
redraw, damage ( PtDamageWidget ) your PtRaw.
Multi-threading is a nice feature, but it is like C++, it should not be
Sachin Agarwal wrote:
I want to make an application that does this:
Photon displays some graphics and text on screen.
Application enters a loop in which the user can select one of the following
Add graphic (provide path) (This will be a PtLabel?)
So basically I want to be able to dynamically create and update the Photon
GUI. I am not using AP Builder at all for this.
What’s the easiest way to do this? I was thinking of having 1 process be the
Photon App which will InitGraphics and then enter the MainLoop. A second
thread will block on user input. When the user selects something, it will
message the Photon process to update the display.
Does this sound right? How exactly do I do something like this?
Specifically, how can my Photon application accept messages while in its