Hello,
I have been trying to use the PtDamageExtent and PtDamageWidget
function calls to get a raw widget redrawn when I change the plotting
data in my raw widget drawing function.
The raw widget drawing function does seem to be immediately called
upon execution of the PtDamage function call, but the actual physical
redrawing of the widget does not take place. In order to get the raw
widget to redraw (on the screen), I must send an event to the widget
(e.g. crossing the widget with the mouse pointer). The moment the
mouse pointer enters the raw widget’s parent window, the raw widget
redraws on the screen correctly.
I have used wd to step through the PtDamage routines and find that
they do call my raw widget draw function. My raw widget draw function
uses PgDrawILine, and PgDrawText calles to draw a page and returns
with a PT_CONTINUE value. At this point, the physical screen has not
reflected the drawing done in the draw function. Stepping further, I
find that the program counter proceeds to a loop waiting on a Receive
(waiting for a photon proxy I assume). No screen update has taken
place.
When I cross the raw widget’s parent with my mouse, a proxy is
received at the Receive and the screen is the updated via a call to
PtEventHandler.
I have been using the Photon processing loop as shown in the example
with the PhEventRead function call.
The loop is:
PhEventArm();
while(1){
pid = Receive(0,&msg,sizeof(msg));
switch(PhEventRead(pid,event,EVENT_SIZE)){
case Ph_EVENT_MSG:
PtEventHandler(event);
break;
case 0:
Process my apps messages
}
}
My code works well for all other circumstances, widget resizing,
initial drawing etc. I just can’t get a physcial screen redraw using
the PtDamage calls. What do I need to do to get this to work? I
would like to change my plotting data and have the screen updated
without having any event type interactions with the screen.
Thanks,
Greg Laird
Wow Greg, you did quite some digging
)
The solution is simple: just call PtFlush() after PtDamageWidget(), and the
widget will be redrawn right then and there.
Markus
“Greg Laird” <glaird@teleport.com> wrote in message
news:3a6ee520.3205877@inn.qnx.com…
Hello,
I have been trying to use the PtDamageExtent and PtDamageWidget
function calls to get a raw widget redrawn when I change the plotting
data in my raw widget drawing function.
The raw widget drawing function does seem to be immediately called
upon execution of the PtDamage function call, but the actual physical
redrawing of the widget does not take place. In order to get the raw
widget to redraw (on the screen), I must send an event to the widget
(e.g. crossing the widget with the mouse pointer). The moment the
mouse pointer enters the raw widget’s parent window, the raw widget
redraws on the screen correctly.
I have used wd to step through the PtDamage routines and find that
they do call my raw widget draw function. My raw widget draw function
uses PgDrawILine, and PgDrawText calles to draw a page and returns
with a PT_CONTINUE value. At this point, the physical screen has not
reflected the drawing done in the draw function. Stepping further, I
find that the program counter proceeds to a loop waiting on a Receive
(waiting for a photon proxy I assume). No screen update has taken
place.
When I cross the raw widget’s parent with my mouse, a proxy is
received at the Receive and the screen is the updated via a call to
PtEventHandler.
I have been using the Photon processing loop as shown in the example
with the PhEventRead function call.
The loop is:
PhEventArm();
while(1){
pid = Receive(0,&msg,sizeof(msg));
switch(PhEventRead(pid,event,EVENT_SIZE)){
case Ph_EVENT_MSG:
PtEventHandler(event);
break;
case 0:
Process my apps messages
}
}
My code works well for all other circumstances, widget resizing,
initial drawing etc. I just can’t get a physcial screen redraw using
the PtDamage calls. What do I need to do to get this to work? I
would like to change my plotting data and have the screen updated
without having any event type interactions with the screen.
Thanks,
Greg Laird
Thanks much Markus. I tried your suggestion and it worked just fine.
On Wed, 24 Jan 2001 11:30:32 -0500, “Markus Loffler”
<loffler@ces.clemson.edu> wrote:
Wow Greg, you did quite some digging >
> )
The solution is simple: just call PtFlush() after PtDamageWidget(), and the
widget will be redrawn right then and there.
Markus
“Greg Laird” <> glaird@teleport.com> > wrote in message
news:> 3a6ee520.3205877@inn.qnx.com> …
Hello,
I have been trying to use the PtDamageExtent and PtDamageWidget
function calls to get a raw widget redrawn when I change the plotting
data in my raw widget drawing function.
The raw widget drawing function does seem to be immediately called
upon execution of the PtDamage function call, but the actual physical
redrawing of the widget does not take place. In order to get the raw
widget to redraw (on the screen), I must send an event to the widget
(e.g. crossing the widget with the mouse pointer). The moment the
mouse pointer enters the raw widget’s parent window, the raw widget
redraws on the screen correctly.
I have used wd to step through the PtDamage routines and find that
they do call my raw widget draw function. My raw widget draw function
uses PgDrawILine, and PgDrawText calles to draw a page and returns
with a PT_CONTINUE value. At this point, the physical screen has not
reflected the drawing done in the draw function. Stepping further, I
find that the program counter proceeds to a loop waiting on a Receive
(waiting for a photon proxy I assume). No screen update has taken
place.
When I cross the raw widget’s parent with my mouse, a proxy is
received at the Receive and the screen is the updated via a call to
PtEventHandler.
I have been using the Photon processing loop as shown in the example
with the PhEventRead function call.
The loop is:
PhEventArm();
while(1){
pid = Receive(0,&msg,sizeof(msg));
switch(PhEventRead(pid,event,EVENT_SIZE)){
case Ph_EVENT_MSG:
PtEventHandler(event);
break;
case 0:
Process my apps messages
}
}
My code works well for all other circumstances, widget resizing,
initial drawing etc. I just can’t get a physcial screen redraw using
the PtDamage calls. What do I need to do to get this to work? I
would like to change my plotting data and have the screen updated
without having any event type interactions with the screen.
Thanks,
Greg Laird