Anchoring a PtRaw to a PtWindow

Hi

I want to create a window that is essentially one big PtRaw widget. I have
my PgDraw*() functions working. But what I want is that as the window gets
resized my PtRaw widget should be the exact same size as the window
(canvas). But a PtRaw doesn’t seem to have anchor flags.

How do I do this?

This is for QNX4.25 & Photon 1.14.

“Bill Caroselli (Q-TPS)” <QTPS@earthlink.net> wrote:
: Hi

: I want to create a window that is essentially one big PtRaw widget. I have
: my PgDraw*() functions working. But what I want is that as the window gets
: resized my PtRaw widget should be the exact same size as the window
: (canvas). But a PtRaw doesn’t seem to have anchor flags.

: How do I do this?

: This is for QNX4.25 & Photon 1.14.

In Photon 1.14, only the descendants of PtContainer have anchors. In
QNX Neutrino 6, all widgets have anchors – but this won’t help you. :slight_smile:

Your best bet is to create a Pt_CB_RESIZE callback for the window. In it,
determine the new size of the window (cbdata->new_size) and then set the
dimension of the raw widget to suit.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems

“Steve Reid” <stever@qnx.com> wrote in message
news:ah1mjt$l5r$1@nntp.qnx.com

“Bill Caroselli (Q-TPS)” <> QTPS@earthlink.net> > wrote:
: I want to create a window that is essentially one big PtRaw widget. I
have
: my PgDraw*() functions working. But what I want is that as the window
gets
: resized my PtRaw widget should be the exact same size as the window
: (canvas). But a PtRaw doesn’t seem to have anchor flags.

: How do I do this?

Your best bet is to create a Pt_CB_RESIZE callback for the window. In it,
determine the new size of the window (cbdata->new_size) and then set the
dimension of the raw widget to suit.

Thanks Steve. I was thinking of something like this but I was also looking

at the ARG_RAW_EXTENT_F resource and trying to see how that fit into the
scenario.

So then, in the window’s Resize_CB should I also call PtDamageWidget()?

“Bill Caroselli (Q-TPS)” <QTPS@earthlink.net> wrote:
: So then, in the window’s Resize_CB should I also call PtDamageWidget()?

You don’t need to. The library will mark the raw widget as damaged when
you set its size.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems

Bill,

I use a PtGroup widget. No extra work is necessary for the resize.

Augie

“Bill Caroselli (Q-TPS)” <QTPS@EarthLink.net> wrote in message
news:ah1iof$h6d$1@inn.qnx.com

Hi

I want to create a window that is essentially one big PtRaw widget. I
have
my PgDraw*() functions working. But what I want is that as the window
gets
resized my PtRaw widget should be the exact same size as the window
(canvas). But a PtRaw doesn’t seem to have anchor flags.

How do I do this?

This is for QNX4.25 & Photon 1.14.

Augie Henriques <augiehenriques@hotmail.com> wrote:
: Bill,

: I use a PtGroup widget. No extra work is necessary for the resize.

That sounds like a much easier solution.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems