On 14 May 2010, at 13:37, Lakshmi wrote:

> I don't know wat exactly is meant by MDI..

http://en.wikipedia.org/wiki/Multiple_document_interface


> I'm creating these windows between the begin() and end() of my main  
> window, so they become child windows. I tried your method for  
> changing the widget hierarchy, but the dragging problem still  
> exits,changing the widget hierarchy doesn't solve the problem...

I'm surprised by that.
Can you post a minimal, compileable, example that shows what you are  
doing, that others might be able to compile and test on their  
systems, please?

> Alternately I tried making them subwindows, ie , after show() of  
> the main window, I created these subwindows and set them as non- 
> modal..

I don't think that's what subwindow means - a window is any window  
who's parent is the desktop, a subwindow is a window who's parent is  
another window.
Indeed, in this case I'd say what you were doing before, creating the  
child windows inside the begin/end of the first window, those *are*  
subwindows.

Creating more windows after showing the first window, those are  
probably going to be regular windows in their own right, their parent  
will be the desktop.

Also, I suspect that you have not understood what the "non-modal"  
state means for a window.

There are 3 window states; "normal", "modal" and "non-modal", not  
only 2, so "non-modal" IS NOT the opposite of "modal".

It is confusing... the naming we use was chosen for compatibility  
with the MS style, but it is not at all obvious what it means!

A "normal" window takes inputs when it has the focus, and will change  
position in the window stack as the focus changes.

A "modal" window is *always* on the top of the stack, and *always*  
takes the input, so the other windows in the app do not get the focus  
whilst the "modal" window is shown. There should only ever be one  
"modal" window shown at a time, or things get confusing...

A "non-modal" window *always* stays on top of the stack, but it only  
takes the input when it has the focus. They tend to be used for  
floating toolbars, that sort of thing.
You can have multiple "non-modal" windows, but if you do, the order  
in which they stack amongst themselves can get confusing too...

Perhaps this is what is causing your problem? The subwindows should  
probably NOT be set "non-modal" but should simply be left in the  
"normal" state.


> But then, when I resize the main window, making it smaller,these  
> subwindows don't get hidden, instead they stick out of the main  
> window..

Indeed, they are windows in their own right, so that will happen.
Why is that a Bad Thing? This style of interface (the so-called SDI  
style) is generally considered better these days, so far as I can  
make out, anyway!

> Is there any way I can hide them whenever the main window's edges  
> cross the subwindow's xy position? I want these subwindows to be  
> embedded within the main window, ie they show not be visible  
> outside the main window's border..

OK - that sounds like you are describing MDI there...

> One more question...I'm creating another modal window as a  
> subwindow, when I click on it, the control goes to its handle  
> function, but here the condition "fl_actual_window != this" is  
> true, so the events don't get processed..the fl_actual window  
> contains the address of the parent..how can this be possible, I'm  
> not able to figure out..

I have no idea what you are asking here, sorry. Show us an example?


If you are dead-set on using an MDI implementation, there are several  
worked examples in the links pages, so you could have a look at them  
and see if anything there will help you.






_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to