f



Re: Re: Re:

>From: David Elliott <elliott@stcnet.com>
>To: "Yue Huang" <yue31@hotmail.com>
>Subject: Re: Re: Re:
>Date: Tue, 9 Dec 2003 23:29:13 -0500
>
>On Dec 9, 2003, at 10:41 PM, Yue Huang wrote:
>
>>
>>----- Original Message -----
>>From: "David Elliott" <elliott@stcnet.com>
>>Newsgroups: comp.soft-sys.wxwindows
>>Sent: Tuesday, December 09, 2003 12:44 AM
>>Subject: Re:
>>
>>
>>>You'll notice the code in that wxMac method sets the
>>>kFloatingWindowClass Mac style flag so long as a titlebar is going to
>>>be created somehow.  This is a limitation of the Mac APIs.  If you
>>>don't have a titlebar then you cannot have a real floating window and
>>>so it becomes a normal window.  Real floating windows have quite
>>>different activation behavior from normal windows (they activate on
>>>switch to program and deactivate on switch away).  I suspect what's
>>>happening is that your toolbar is getting an activate event when it's
>>>clicked which is causing the document window to be deactivated and for
>>>some reason the wxMac code isn't reactivating it properly.
>>>
>>I have tried wxFRAME_TOOL_WINDOW and wxTINY_CAPTION_VERT to set
>>kFloatingWindowClass. Now the toolbar gets proper activation when the
>>program starts. However, it is completely deactivated after I switch
>>applications and cannot be used any more. Another shortcoming is that 
>>users
>>may move floating toolbar anywhere.
>>
>>It seems to be a better idea to make the toolbar as a normal window if I 
>>can
>>figure out how to reactive it after being clicked.
>>
>Hmm.. I guess I'll have to take a look at this again.  It was such a pain 
>to get it working in the first place which I did for wx 2.4.  I finally 
>committed it to wxHEAD because people were complaining about the wxMac MDI 
>and coming up with some strange solutions which didn't really address the 
>problem and so I implemented mine which I believe to be theoretically 
>correct but having a few implementation problems.
>

Yes. The floating toolbar behaves correctly within an application. I took a 
look on the source code and found out why the toolbar remains inactive after 
swicthing applications. Both activation and desactivation procedures are 
bypassed for a floating window in MacHandleActivateEvent. It would be a 
problem for switching applications since the floating window cannot receive 
activation event, and consequently never be reactivated. I override 
MacHandleActivateEvent to allow activation event go to the floating window, 
and switching applications is not a problem any more.

With floating toobar, is there a way or an option to prevent users from 
moving it anywhere, or place it back under menubar?

Yue

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca


---------------------------------------------------------------------
Please read http://www.wxwindows.org/mlhowto.htm before posting.

To unsubscribe, e-mail: wx-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wx-users-help@lists.wxwindows.org

0
yue31
12/11/2003 2:58:30 PM
comp.soft-sys.wxwindows 21076 articles. 0 followers. Post Follow

1 Replies
2820 Views

Similar Articles

[PageSpeed] 40

Note: please only reply to wx-users (or in your case, the newsgroup 
which is a gateway) and not to both me and the list.  It's confusing 
having two messages for every one you send. Thanks.

On Dec 11, 2003, at 9:57 AM, yue huang wrote:

>> From: David Elliott <elliott@stcnet.com>
>> To: "Yue Huang" <yue31@hotmail.com>
>> Subject: Re: Re: Re:
>> Date: Tue, 9 Dec 2003 23:29:13 -0500
>>
>> Hmm.. I guess I'll have to take a look at this again.  It was such a 
>> pain to get it working in the first place which I did for wx 2.4.  I 
>> finally committed it to wxHEAD because people were complaining about 
>> the wxMac MDI and coming up with some strange solutions which didn't 
>> really address the problem and so I implemented mine which I believe 
>> to be theoretically correct but having a few implementation problems.
>>
>
> Yes. The floating toolbar behaves correctly within an application. I 
> took a look on the source code and found out why the toolbar remains 
> inactive after swicthing applications. Both activation and 
> desactivation procedures are bypassed for a floating window in 
> MacHandleActivateEvent. It would be a problem for switching 
> applications since the floating window cannot receive activation 
> event, and consequently never be reactivated. I override 
> MacHandleActivateEvent to allow activation event go to the floating 
> window, and switching applications is not a problem any more.
>
> With floating toobar, is there a way or an option to prevent users 
> from moving it anywhere, or place it back under menubar?

Well, you can always catch the event that indicates the user moved the 
toolbar and simply put it back.  However, sometimes the user might have 
a legitimate desire to move the toolbar so there's no really good 
reason to disallow it.

-Dave


---------------------------------------------------------------------
Please read http://www.wxwindows.org/mlhowto.htm before posting.

To unsubscribe, e-mail: wx-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wx-users-help@lists.wxwindows.org

0
elliott
12/11/2003 3:11:37 PM
Reply: