Manipulating Widgets

Is there any way to “rotate” any PhAB widgets? For example, is it possible
to place PtTab sidewise with text alligned accordingly?

Thanks
Joe Hezina

Previously, Joe Hezina wrote in qdn.public.qnxrtp.photon:

Is there any way to “rotate” any PhAB widgets? For example, is it possible
to place PtTab sidewise with text alligned accordingly?

Somebody asked a very similar question in qdn.public.qnx4.photon,
under the heading “How to Rotate a Group”. The short answer is no.
Out of curiosity, which common widget libraries do allow you to rotate
widgets? I can’t think of any off-hand.

Cheers,
Andrew

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

In photon, any widget is enclosed in a bound box ( rectangle ). If
you have a triangle of PtPolygon, area outside of the triangle but
inside the bound box is still sensitive for this triangular
widget. This case will become worse when you want some PtPolygon
widgets.

I guess “unable to rotate a group” may be caused by Photon
architecture: The event space and region concepts are based on
rectangle.

I suspect you are correct. Hit testing on a polygon is pretty
complicated if you only want to respond to mouse clicks that are near
an edge or inside the polygon (if it is filled). Most CAD packages
and drawing packages do this, but it’s the kind of functionality that
I personally don’t normally expect from a widget set. The value you
get is slight compared to the cost in space and time to implement it.

However, I believe that photon COULD and SHOULD support some kinds
of special ROTATIONS to widgets. For example, rotate 90 degree,
etc. And This MAY not be difficult.

It is, generally, difficult. The case of text comes specifically to
mind. Joe pointed out that VB allows you to rotate tabs, with rotated
text. Since VB does not generally support rotated text, I’d say there
is an excellent chance that the tab widget is actually rendering its
text to an image, rotating the image, and then putting that image in
the tab. You could do the same thing yourself in Photon.

What does it mean to rotate a ComboBox, Slider, digital Clock, List,
ColorPanel, etc? When you actually look at the widget set, there are
very few widgets for which rotation makes any sense. These are
primarily geometric shapes, plus a few things like tabs, buttons and
labels. For the geometric shapes (excluding ellispes), you can do the
rotation yourself pretty easily. For the rest, you can render to a
bitmap and rotate it yourself.

The original Photon 1.0 had fields in the widgets for rotation and
scaling, but they were later removed. I suspect that the QSSL
developers looked at the widget set and came to this same conclusion -
big pain and code bloat for very little gain. Those few users who
need rotation can do it themselves. Personally, I think this is
sensible.

Cheers,
Andrew

In VB6, you can have, for example, vertical tabs.

Joe

“Andrew Thomas” <Andrew@cogent.ca> wrote in message
news:Voyager.010315220621.10207276D@andrewhome.cogent.ca

Previously, Joe Hezina wrote in qdn.public.qnxrtp.photon:
Is there any way to “rotate” any PhAB widgets? For example, is it
possible
to place PtTab sidewise with text alligned accordingly?

Somebody asked a very similar question in qdn.public.qnx4.photon,
under the heading “How to Rotate a Group”. The short answer is no.
Out of curiosity, which common widget libraries do allow you to rotate
widgets? I can’t think of any off-hand.

Cheers,
Andrew

Previously, Joe Hezina wrote in qdn.public.qnxrtp.photon:
Is there any way to “rotate” any PhAB widgets? For example, is it possible
to place PtTab sidewise with text alligned accordingly?

Somebody asked a very similar question in qdn.public.qnx4.photon,
under the heading “How to Rotate a Group”. The short answer is no.
Out of curiosity, which common widget libraries do allow you to rotate
widgets? I can’t think of any off-hand.

In photon, any widget is enclosed in a bound box ( rectangle ). If you have
a triangle of PtPolygon, area outside of the triangle but inside the bound box
is still sensitive for this triangular widget. This case will become worse when
you want some PtPolygon widgets.

I guess “unable to rotate a group” may be caused by Photon architecture:
The event space and region concepts are based on rectangle.

However, I believe that photon COULD and SHOULD support some kinds
of special ROTATIONS to widgets. For example, rotate 90 degree, etc. And
This MAY not be difficult.

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