Draw method in photon framework

Hi All,
What is the GUI Drawing Mechanism in photon framework. As i want to call my drawing function within the framework draw method.

There are different Drawing options

Pg*

will be the most relevant in your case i think. Be sure to draw in a PtRaw or similar

Thanks micro,
still it is not clear. Let me give you a scenario. Suppose i have a DrawLine() function. On the click of a buttton i want to call this function, it will draw a line on the Gui. But as soon as i go for minimise and maximise it, it disappers.
Now i want this function to be called from within the GUI drawing method. I believe their must be some callback function for drawing that is invoked as a paint event fires.

Ok, I can see that some things are not clear. When your button is clicked, you call a PgDraw function. This does not draw exactly. It puts a draw command into a buffer. When you exit the button callback, this draw command (and any other’s that have been buffered) will be turned into draw events which will then be caught by the video driver, updating the screen. The problem with drawing is that Photon does not keep track of what has been drawn, so if you min and then max a wiindow, what was previously drawn is gone. You must restore the drawing yourself. The Raw widgets helps by giving you a callback in which you should do your drawing. What happens at the Photon kernel is that when you max your window (or an overlapping windows is removed) a “reveal” event occurs, causing the callback to be called.

This is often seems awkward at first, especially if you have a dynamic drawing. If you call draw events in a loop with a delay of some kind, you will never see them. One way around this is to have a timer wake up your program periodically to do the updates.