How to force a back-layered widget to redraw itself.

Hi,

Assume that we have two layers: A widget “A” overlaps a widget “B”,
how can we force to redraw the widget “B”, The widget “A” is a
transparent widget.

Do we need to send an event Ph_EV_EXPOSE to the widget “B”?

Regards


WeiBing Tong

Aquila Mining Systems Ltd.
1450 City Councillors, Suite 330
Montreal, QC
Canada H3A 2E6
Tel: (514) 874-9917 ext 239
Fax: (514) 874-4005
Email: wbtong@aquilamsl.com

Previously, WeiBing Tong wrote in qdn.public.qnx4.photon:

Hi,

Assume that we have two layers: A widget “A” overlaps a widget “B”,
how can we force to redraw the widget “B”, The widget “A” is a
transparent widget.

Do we need to send an event Ph_EV_EXPOSE to the widget “B”?

It has been my experience that when you have two widgets that overlap,
the widget library will redraw both widgets when the lower widget is
changed. This occurs whether the closer widget is transparent or
not. The redraw is done using the “painters” algorithm, that is
the further widget is painted first, ensuring that the final image
will look correct. The only way to stop this behavior is to
un-realize the further widget.

If you are not seeing this behavior already, there maybe something
else going on.

I’ve heard that Photon 2.0/RTP is or may become a little smarter about
these things.


Mitchell Schoenbrun --------- maschoen@pobox.com

Mitchell Schoenbrun wrote:

Previously, WeiBing Tong wrote in qdn.public.qnx4.photon:
Hi,

Assume that we have two layers: A widget “A” overlaps a widget “B”,
how can we force to redraw the widget “B”, The widget “A” is a
transparent widget.

Do we need to send an event Ph_EV_EXPOSE to the widget “B”?

It has been my experience that when you have two widgets that overlap,
the widget library will redraw both widgets when the lower widget is
changed. This occurs whether the closer widget is transparent or
not. The redraw is done using the “painters” algorithm, that is
the further widget is painted first, ensuring that the final image
will look correct. The only way to stop this behavior is to
un-realize the further widget.

If you are not seeing this behavior already, there maybe something
else going on.

I’ve heard that Photon 2.0/RTP is or may become a little smarter about
these things.

Mitchell Schoenbrun --------- > maschoen@pobox.com

My problem is that we found that the further widget does not update at all
although
we change its content by PtSetResource().

Do you want to see a very simple demo?

Regards


WeiBing Tong

Aquila Mining Systems Ltd.
1450 City Councillors, Suite 330
Montreal, QC
Canada H3A 2E6
Tel: (514) 874-9917 ext 239
Fax: (514) 874-4005
Email: wbtong@aquilamsl.com

Previously, WeiBing Tong wrote in qdn.public.qnx4.photon:

My problem is that we found that the further widget does not update at all
although
we change its content by PtSetResource().

Do you want to see a very simple demo?

Sure. Now one last question. Are these widgets part of the same
window? I recall that things behind a tranparent window do not
automatically get updated. There was talk of 2.0 fixing this.
If this is the case, you would probably have to PtDamadge() the
front window.




Regards


WeiBing Tong

Aquila Mining Systems Ltd.
1450 City Councillors, Suite 330
Montreal, QC
Canada H3A 2E6
Tel: (514) 874-9917 ext 239
Fax: (514) 874-4005
Email: > wbtong@aquilamsl.com

\


Mitchell Schoenbrun --------- maschoen@pobox.com

Mitchell Schoenbrun wrote:

Previously, WeiBing Tong wrote in qdn.public.qnx4.photon:

My problem is that we found that the further widget does not update at all
although
we change its content by PtSetResource().

Do you want to see a very simple demo?

Sure. Now one last question. Are these widgets part of the same
window? I recall that things behind a tranparent window do not
automatically get updated. There was talk of 2.0 fixing this.
If this is the case, you would probably have to PtDamadge() the
front window.

All widgets belong to one window. It “MAY” a bug
of the photon graphic render engine ( not sure ).

Here is a very simple demo. Under /demo/src/default

type demo demo.gif

When you press “move” button, then the widgets at back
begin to update.

Thanks a lot.

Best regards


WeiBing Tong

Aquila Mining Systems Ltd.
1450 City Councillors, Suite 330
Montreal, QC
Canada H3A 2E6
Tel: (514) 874-9917 ext 239
Fax: (514) 874-4005
Email: wbtong@aquilamsl.com

Previously, WeiBing Tong wrote in qdn.public.qnx4.photon:

All widgets belong to one window. It “MAY” a bug
of the photon graphic render engine ( not sure ).

Here is a very simple demo. Under /demo/src/default

type demo demo.gif

When you press “move” button, then the widgets at back
begin to update.

Well your demo was a little confusing, but I think I
have it figured out. There is no “move” button, but
when I pressed one of the 4 left/right/up/down buttons on
the right, it went into action. The back panel is made up
of 5 vertical progress bars. A label is created an loaded
with a GIF and then the white parts of the GIF are made
transparent. You update the progress bars by a timer.

Ok, having said all that, what is wrong. The demo looks
like exactly what I would expect. The GIF clearly is used
as a mask so that three of the progress bars in the back are
made into triangular shapes. Two are left as rectangles. I
think the mask is a little off, but otherwise all seems
normal.

I’ve seen problems before with a grid depending on which
Video driver was used. This was a long time ago however.



Mitchell Schoenbrun --------- maschoen@pobox.com

Mitchell Schoenbrun wrote:

Previously, WeiBing Tong wrote in qdn.public.qnx4.photon:

All widgets belong to one window. It “MAY” a bug
of the photon graphic render engine ( not sure ).

Here is a very simple demo. Under /demo/src/default

type demo demo.gif

When you press “move” button, then the widgets at back
begin to update.

Well your demo was a little confusing, but I think I
have it figured out. There is no “move” button, but
when I pressed one of the 4 left/right/up/down buttons on
the right, it went into action. The back panel is made up
of 5 vertical progress bars. A label is created an loaded
with a GIF and then the white parts of the GIF are made
transparent. You update the progress bars by a timer.

Ok, having said all that, what is wrong. The demo looks
like exactly what I would expect. The GIF clearly is used
as a mask so that three of the progress bars in the back are
made into triangular shapes. Two are left as rectangles. I
think the mask is a little off, but otherwise all seems
normal.

I’ve seen problems before with a grid depending on which
Video driver was used. This was a long time ago however.

Mitchell Schoenbrun --------- > maschoen@pobox.com

Ok, I am sorry for my not clear description.

Yes, I update the progress bars by a timer.
Do you see the screen refresh if you do not press
“move” button when you run the program?

Regards


WeiBing Tong

Aquila Mining Systems Ltd.
1450 City Councillors, Suite 330
Montreal, QC
Canada H3A 2E6
Tel: (514) 874-9917 ext 239
Fax: (514) 874-4005
Email: wbtong@aquilamsl.com

Previously, WeiBing Tong wrote in qdn.public.qnx4.photon:

Do you see the screen refresh if you do not press
“move” button when you run the program?

Once again, there is NO “move” button. When I start
the program, it is static. If I press any of the four
right hand buttons, the progress bars start to move.
Before I press one of these buttons, nothing happens.

Mitchell Schoenbrun --------- maschoen@pobox.com

Hi, Mitchell,

That is what the problem is:

When changing those bars and text fields, the screen does
not update at all. WHY? and the screen only updates
when we move or resize the image-type label
widget.

Could you please explain that?

Best regards

Mitchell Schoenbrun wrote:

Previously, WeiBing Tong wrote in qdn.public.qnx4.photon:

Do you see the screen refresh if you do not press
“move” button when you run the program?

Once again, there is NO “move” button. When I start
the program, it is static. If I press any of the four
right hand buttons, the progress bars start to move.
Before I press one of these buttons, nothing happens.

Mitchell Schoenbrun --------- > maschoen@pobox.com


WeiBing Tong

Aquila Mining Systems Ltd.
1450 City Councillors, Suite 330
Montreal, QC
Canada H3A 2E6
Tel: (514) 874-9917 ext 239
Fax: (514) 874-4005
Email: wbtong@aquilamsl.com

Previously, WeiBing Tong wrote in qdn.public.qnx4.photon:

Hi, Mitchell,

That is what the problem is:

I don’t know what “that” you are talking about.

When changing those bars and text fields, the screen does
not update at all. WHY?

On my system it does update.

and the screen only updates
when we move or resize the image-type label
widget.

Could you please explain that?

It sounds like a graphics driver issue.

Mitchell Schoenbrun --------- maschoen@pobox.com