how to declare parent

bridged with qdn.public.qnx4.photon
Post Reply
sam

how to declare parent

Post by sam » Thu Nov 27, 2003 11:27 am

hi all,
I have 2 separate one window application A amd B. from application A i
start application B using spawn function. after spawning B, A and B run
simultaneoulsy.
As they are 2 separate applications, app. B window can move back of the
app. A's window.

Now is their any way using which i can declare application A's window as
parent of application B ?

can PhRegionChange or PhWindowChange be used for this purpose ?

thanks in advance

sam

Guest

Re: how to declare parent

Post by Guest » Thu Nov 27, 2003 7:07 pm

Hi Sam,

Have you looked at the PtSetWidgetParent () ? You could call this from the
setup function of Application B to say that its parent is Application A.

Let know if this helps.
Regards
Brenda

"sam" <seto@vsnl.com> wrote in message
news:bq4n2j$bat$1@tiger.openqnx.com...
hi all,
I have 2 separate one window application A amd B. from application A i
start application B using spawn function. after spawning B, A and B run
simultaneoulsy.
As they are 2 separate applications, app. B window can move back of the
app. A's window.

Now is their any way using which i can declare application A's window as
parent of application B ?

can PhRegionChange or PhWindowChange be used for this purpose ?

thanks in advance

sam

sam

Re: how to declare parent

Post by sam » Fri Nov 28, 2003 1:34 pm

hi Brenda,

thanks for reply,

PtSetWidgetParent () needs a widget address as argument. as in my case A
and B are two separate applications i wont be able to give the widget
address.

but i have the RID of the windows of A and B applications, that is why i
was wonding if PhWindowChanage or PhRegionChange functions can be used for
changing or setting the parent of the window.

please help..

thanks in advance
sameer



<gui@qnx.com> wrote in message news:bq5hnk$8ja$1@nntp.qnx.com...
Hi Sam,

Have you looked at the PtSetWidgetParent () ? You could call this from
the
setup function of Application B to say that its parent is Application A.

Let know if this helps.
Regards
Brenda

Guest

Re: how to declare parent

Post by Guest » Fri Nov 28, 2003 7:43 pm

Hi Sameer,

I have spoken with one of the developers and what your trying to do might
not be possible. Maybe if you could give me an idea of why you want WindowB
to be a child of WindowA we could suggest something. Is this just to stop
windowB from being able to go behind windowA or do you have other reasons?

Regards
Brenda

I
"sam" <seto@vsnl.com> wrote in message news:bq7gtc$lp4$1@inn.qnx.com...
hi Brenda,

thanks for reply,

PtSetWidgetParent () needs a widget address as argument. as in my case
A
and B are two separate applications i wont be able to give the widget
address.

but i have the RID of the windows of A and B applications, that is why
i
was wonding if PhWindowChanage or PhRegionChange functions can be used for
changing or setting the parent of the window.

please help..

thanks in advance
sameer



gui@qnx.com> wrote in message news:bq5hnk$8ja$1@nntp.qnx.com...
Hi Sam,

Have you looked at the PtSetWidgetParent () ? You could call this from
the
setup function of Application B to say that its parent is Application A.

Let know if this helps.
Regards
Brenda


sam

Re: how to declare parent

Post by sam » Sat Nov 29, 2003 8:14 am

Hi Brenda,

thanks for reply,
in my case App. A has bigger window and App. B has smaller window hence i
dont want App. B window to go behind the application A. but i dont want to
make the App. B window as FORCE_FRONT. as i want App. B window to behind
App. C, App. D, App. E which could be running in the system.

so App. B can not go behind of only App. A, which is normally happens when
we declare a parent and child window. child can not go behind the parent.

is their any other way for achieving hte same?

thanks in advance,

sameer


<gui@qnx.com> wrote in message news:bq885p$3df$1@nntp.qnx.com...
Hi Sameer,

I have spoken with one of the developers and what your trying to do might
not be possible. Maybe if you could give me an idea of why you want
WindowB
to be a child of WindowA we could suggest something. Is this just to stop
windowB from being able to go behind windowA or do you have other reasons?

Regards
Brenda

I
"sam" <seto@vsnl.com> wrote in message news:bq7gtc$lp4$1@inn.qnx.com...
hi Brenda,

thanks for reply,

PtSetWidgetParent () needs a widget address as argument. as in my
case
A
and B are two separate applications i wont be able to give the widget
address.

but i have the RID of the windows of A and B applications, that is
why
i
was wonding if PhWindowChanage or PhRegionChange functions can be used
for
changing or setting the parent of the window.

please help..

thanks in advance
sameer



gui@qnx.com> wrote in message news:bq5hnk$8ja$1@nntp.qnx.com...
Hi Sam,

Have you looked at the PtSetWidgetParent () ? You could call this
from
the
setup function of Application B to say that its parent is Application
A.

Let know if this helps.
Regards
Brenda




David Gibbs

Re: how to declare parent

Post by David Gibbs » Mon Dec 01, 2003 4:16 pm

sam <seto@vsnl.com> wrote:
Hi Brenda,

thanks for reply,
in my case App. A has bigger window and App. B has smaller window hence i
dont want App. B window to go behind the application A. but i dont want to
make the App. B window as FORCE_FRONT. as i want App. B window to behind
App. C, App. D, App. E which could be running in the system.

so App. B can not go behind of only App. A, which is normally happens when
we declare a parent and child window. child can not go behind the parent.

is their any other way for achieving hte same?
I'm not a Photon expert, but I think you might be able to achieve this
by getting the region id (rid) of App A's window, and of App B's window,
and then using PhRegionChange() to make App A's window's region the
parent of, or maybe, brother_behind of App B's window's region.

Application A may need to tell Application B the region id for its
window in some way.

You may have to be careful of clipping -- B's window may not be clipped
to A's. (There may be a flag that will disable this.)

-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

David Gibbs

Re: how to declare parent

Post by David Gibbs » Mon Dec 01, 2003 9:10 pm

David Gibbs <dagibbs@qnx.com> wrote:
sam <seto@vsnl.com> wrote:

I'm not a Photon expert, but I think you might be able to achieve this
by getting the region id (rid) of App A's window, and of App B's window,
and then using PhRegionChange() to make App A's window's region the
parent of, or maybe, brother_behind of App B's window's region.
I am told the above will probably cause nasty heartburn for pwm
(the window manager) and so won't work. :(

-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

sam

Re: how to declare parent

Post by sam » Fri Dec 05, 2003 6:12 am

I am told the above will probably cause nasty heartburn for pwm
(the window manager) and so won't work. :(
hi
thanks for reply.

when we start application pdm create window with necessary parent and
child region of the application. we can also create a region with a
specific region as parent or brother. we cam also change the parent of the
widget.

then why we pdm would create problem if we try to reparent the
application?

secondly i tried to use PhChangeRegion and PhChangeWindow functions. pdm
did not showed any problem but those functions also did not worked i.e. i
was not able to change the parent of the application.

can you please tell me the exact syntax of the function PhChangeRegion
or PhChangeWindow for changing the parent of the application.

thanks in advance

sameer

GUI

Re: how to declare parent

Post by GUI » Tue Dec 09, 2003 3:59 pm

Hi Sameer,

I have spoken with one of the developers furthur on this, please see below
for info I why this isn't working...

Regards
Brenda

"sam" <seto@vsnl.com> wrote in message
news:bqp7ko$l54$1@tiger.openqnx.com...
I am told the above will probably cause nasty heartburn for pwm
(the window manager) and so won't work. :(

hi
thanks for reply.

when we start application pdm create window with necessary parent and
child region of the application. we can also create a region with a
specific region as parent or brother. we cam also change the parent of the
widget.

then why we pdm would create problem if we try to reparent the
application?

secondly i tried to use PhChangeRegion and PhChangeWindow functions. pdm
did not showed any problem but those functions also did not worked i.e. i
was not able to change the parent of the application.

can you please tell me the exact syntax of the function PhChangeRegion
or PhChangeWindow for changing the parent of the application.
Since PhRegionChange() talks directly to Photon, it would just break stuff
behind pwm's back. The Photon server doesn't understand the concept of one
window being the parent *window* of another window -- as far as Photon is
concerned, the parent *region* of every window *region* is its frame region,
and all the frame regions are children of pwm's backdrop region. Reparenting
a window out of its frame into another window, or into another window's
frame, is not a good idea.

Ideally, this should be done using PhWindowChange(), because
PhWindowChange() talks to pwm. But there's no code in pwm that handles this
kind of a request. So you can't reparent a window that is already open.

thanks in advance

sameer

Post Reply

Return to “qdn.public.qnx4.photon”