[interfacekit] Re: Help understanding some BeOS concepts.

> Hello!
> 
>     As you all already know, I have *very* little experience using 
> the Be API. So I am going to
> ask you some questions. Please be kind and provide me as much 
> information as possible. Thanks.
> 
>     2 problems I have:
> 
> 1) BWindow flags:
>  B_AVOID_FRONT - Prevents the window from becoming the frontmost 
> window.
>  B_AVOID_FOCUS - Prevents the window from being the target of 
> keyboard events.
> 
>     While the first I can understand, what the hell does the 
> second???
>     What *real* use have those 2 flags?
> 
>     The first "states" that the window should be the last to become 
> front-most( for me = focus =
> active). OK, I'll make all other windows(also the ones behind it) the 
> active ones, until there
> is no window that doesn't have B_AVOID_FRONT. Then I'll pass the 
> active state to it.
>     Is this OK?
Sounds ok to me.

>     The second flag... says that it doesn't have a problem being the 
> next one to receive active
> state(of course after another window gets closed)??? If so, from the 
> explanation BeBook gives,
> when it has the active state(focus/front-most), it will not receive 
> keyboard events??? If that
> happens, who gets the keyboard events? What about mouse events, those 
> can be received by it?
> 
>     I know the "front-most" isn't equal to "focus". But focus=active, 
> I think.
>     That can be observed when the main window has some floating ones 
> above her.
>     But, then again isn't BWindow's only way to determine if it is 
> the active(focus) window:
> BWindow::IsFront()? Or... am I missing something?
> 
>     PLEASE explain in how many words you can, what those 2 flags do!
I can remember using B_AVOID_FOCUS combined with B_ACCEPT_FIRST_CLICK 
to make nice-looking and useful floating tool windows for BePhotoMagic 
way back when I was working on it. The main difference that it makes is 
that (1) the decorator automatically displays it using the active 
window tab colors and (2) clicking on the tab to minimize it or move it 
doesn't steal the focus from another window. Below is a link to an old 
screenshot from my website which should give you an idea of what I'm 
talking about.

http://darkwyrm.beemulated.net/images/ssdev.jpg


--DW

Other related posts: