is there a simple means to build a floating child window (not a dialog
box or others widgets that becames a child of the windows manager) with
the constraint that it can't move outside of the parent.

thank you

10-04-2007, 09:19 AM

unix

Re: floating windows

"sosroot" <nomaafa@free.fr> wrote in message
news:1138039897.702338.19260@g49g2000cwa.googlegroups.com...[color=blue]
> is there a simple means to build a floating child window (not a dialog
> box or others widgets that becames a child of the windows manager) with
> the constraint that it can't move outside of the parent.
>
> thank you
>[/color]
Well, this is just what any normal widget's window is - it is not
re-parented by the WM, and it is constrained to be inside its parent.

What do you mean by "floating"? If that means its position can change, what
will cause it to change?
--
Fred L. Kleinschmidt
Boeing Associate Technical Fellow
Technical Architect, Software Reuse Project

10-04-2007, 09:19 AM

unix

Re: floating windows

By floating I mean a free window which can be moved by the user (drag
with the mouse) to change the position, which can be killed (poped
down) and recreated (poped up) but remain inside the main W parent.

Noredine Maafa

10-04-2007, 09:19 AM

unix

Re: floating windows

sosroot wrote:[color=blue]
> is there a simple means to build a floating child window (not a dialog
> box or others widgets that becames a child of the windows manager) with
> the constraint that it can't move outside of the parent.[/color]

Multidocument interfaces are not considered good things in the X world.
The protocol permits to create windows inside windows and to reposition
a window inside its parent but the application must define a
positioning
policy and provide the interactive mechanisms. The window manager
will not perform such role. This may be a drawback or an advantage,
depending o the point of view.

Once upon a time there was an MDI implementation for Motif (see
MDI-1.0.1-README at [url]http://ftp.x.org/contrib/widgets/motif/[/url]). It is a
historical curiosity nowadays.

--- Casantos

10-04-2007, 09:19 AM

unix

Re: floating windows

It is very curious, whene I look to the window manager like MWM or CDE,
I see a parent window with childs windows which do what i said, is it a
mistake ?

10-04-2007, 09:19 AM

unix

Re: floating windows

[email]nojunk@gate.cpmet.ufpel.tche.br[/email] wrote:[color=blue]
> sosroot wrote:
>[color=green]
>>is there a simple means to build a floating child window (not a dialog
>>box or others widgets that becames a child of the windows manager) with
>>the constraint that it can't move outside of the parent.[/color]
>
> Multidocument interfaces are not considered good things in the X world.[/color]

Why?
[color=blue]
> The protocol permits to create windows inside windows and to reposition
> a window inside its parent but the application must define a
> positioning
> policy and provide the interactive mechanisms. The window manager
> will not perform such role. This may be a drawback or an advantage,
> depending o the point of view.
>
> Once upon a time there was an MDI implementation for Motif (see
> MDI-1.0.1-README at [url]http://ftp.x.org/contrib/widgets/motif/[/url]). It is a
> historical curiosity nowadays.
>
> --- Casantos
>[/color]

10-04-2007, 09:19 AM

unix

Re: floating windows

sosroot wrote:[color=blue]
> By floating I mean a free window which can be moved by the user (drag
> with the mouse) to change the position, which can be killed (poped
> down) and recreated (poped up) but remain inside the main W parent.
>
> Noredine Maafa
>[/color]

Sure, I know what you're saying, like a tearoff menu that you could
then not drag beyond the borders of the window from which the menu was
torn, right? I'm not sure what resource to set to enable that
behavior...

10-04-2007, 09:19 AM

unix

Re: floating windows

Russell Shaw wrote:[color=blue]
> [email]nojunk@gate.cpmet.ufpel.tche.br[/email] wrote:
>[color=green]
>> sosroot wrote:
>>[color=darkred]
>>> is there a simple means to build a floating child window (not a dialog
>>> box or others widgets that becames a child of the windows manager) with
>>> the constraint that it can't move outside of the parent.[/color]
>>
>>
>> Multidocument interfaces are not considered good things in the X world.[/color]
>
>
> Why?[/color]

Mostly, anti-Microsoft prejudice.

The only rational argument I can think of (in 2 minutes...) is that it
violates the 'principle of minimum astonishment' to have an MDI
implementing a WM with a look&feel different from the platform WM. Since
it is extremely difficult to identify the platform WM, to say nothing of
emulating umpteen different ones (W2K, WXP, MWM, Gnome, KDE2, KDE3, to
name only those I actually have at hand!)
[color=blue]
>[color=green]
>> The protocol permits to create windows inside windows and to reposition
>> a window inside its parent but the application must define a
>> positioning
>> policy and provide the interactive mechanisms. The window manager
>> will not perform such role. This may be a drawback or an advantage,
>> depending o the point of view.
>>
>> Once upon a time there was an MDI implementation for Motif (see
>> MDI-1.0.1-README at [url]http://ftp.x.org/contrib/widgets/motif/[/url]). It is a
>> historical curiosity nowadays.[/color][/color]

Well it was implemented as a C++ class, completely orthogonal to
standard widget development.
[color=blue][color=green]
>>
>> --- Casantos
>>[/color][/color]

Michel Bardiaux wrote:[color=blue][color=green][color=darkred]
>>> Multidocument interfaces are not considered good things in the X world.[/color]
>> Why?[/color]
>
> Mostly, anti-Microsoft prejudice.
>
> The only rational argument I can think of (in 2 minutes...) is that it
> violates the 'principle of minimum astonishment' to have an MDI
> implementing a WM with a look&feel different from the platform WM. Since
> it is extremely difficult to identify the platform WM, to say nothing of
> emulating umpteen different ones (W2K, WXP, MWM, Gnome, KDE2, KDE3, to
> name only those I actually have at hand!)[/color]

I think the reason is different - MDI actually implements
a window manager within a single application.
MS, contrary to common accusations, exposed the API to do this,
so applications did this.
We could not do this in Motif, so we said it was bad ;-)

Seriously, if I iconize the window, I want a single
place to look for that window to pop it up, not several ones,
depending on the application.

There is one application of floating window which moves
in sync with the main window - the toolbar in DDD.
[url]http://www.gnu.org/software/ddd/registers.png[/url]
Not exactly what the original poster was asking about, but
it is something that can be done in Motif.

Another idea: I would consider tabbed browsing actually
an evolution of MDI, which works quite well.
I think the reason for this is, that you can not obscure your
tabs, so the interface is direct all the time. The most
annoying MDI feature was to have a "full screen" window, which
you had to minimize, in order to see, if you had any other windows.

And multiple desktops extend the tabbed browsing idea, treating
the whole window manager a multiple-window application. This time,
Unix/Linux took the lead over MS, so we like to think that this
is a good practice.

I'm of the anti-MDI religion myself -- the window manager is for managing
windows. When you put windows inside another window, then you are becoming
the window manager within that window, and it may or may not be consistent
with the window manager the client is using.

And I just plain hate using MDI interfaces.

But some people like them. I don't understand why, but I just accept that.

But given the choice (and all other things being equal), I will choose non-MDI
every time. And even if all things aren't equal, a non-MDI interface would
have to be pretty piss-poor before I'd choose an MDI interface over it.

-Pete Zakel
(phz@seeheader.nospam)

Osborn's Law:
Variables won't; constants aren't.

10-04-2007, 09:19 AM

unix

Re: floating windows

On 24 Jan 2006, [email]arahne@arahne.si[/email] wrote:
[color=blue]
> I think the reason is different - MDI actually implements
> a window manager within a single application.
> MS, contrary to common accusations, exposed the API to do this,
> so applications did this.[/color]

I never had a problem with MDI as a user. However, it is untrue that
MS exposed this API. For instance menus in an SDI interface used
function calls in Win3.1. The MDI interface had to send message to
the parent to allow the menus to be switched.

This was a totally different API mechanism and was not documented at
all (Ie, popMenu [or whatever it is] didn't explicitly say that it was
invalid for MDI menus). Moreover, you MDI app could function with the
menu function calls for a long time and then would one day crash.

There are other oddities between 16 bit MDI/SDI windows. This was not
malicious on MS part. They patch MDI in from Word (or something). I
believed that people forced MS hand by asking how Word was doing this.
I also believe that they included it in the kernel (or at least the
GUI DLLs). Being forced to document this may have resulted in some
quick documentation. It was probably an experimental hack, which
resulted in the schism in the API.

However, I would take issue within anyone purporting that MS had
"exposed" this API in Win 3.1. It is not an accusation, it is a fact
that MDI documentation was poor to abysmal. I was not programming in
Motif at the time...

fwiw,
Bill Pringlemeir.

--
Sex at age 90 is like trying to shoot pool with a rope. - George Burns

10-04-2007, 09:20 AM

unix

Re: floating windows

Pete nospam Zakel wrote:[color=blue]
> In article <4nmga3-hc3.ln1@main.anatron.com.au> Russell Shaw <rjshawN_o@s_pam.netspace.net.au> writes:
>[color=green]
>>nojunk@gate.cpmet.ufpel.tche.br wrote:[/color]
>[color=green][color=darkred]
>>>Multidocument interfaces are not considered good things in the X world.[/color][/color]
>[color=green]
>>Why?[/color]
>
> It's essentially a religious issue.
>
> I'm of the anti-MDI religion myself -- the window manager is for managing
> windows. When you put windows inside another window, then you are becoming
> the window manager within that window, and it may or may not be consistent
> with the window manager the client is using.
>
> And I just plain hate using MDI interfaces.
>
> But some people like them. I don't understand why, but I just accept that.
>
> But given the choice (and all other things being equal), I will choose non-MDI
> every time. And even if all things aren't equal, a non-MDI interface would
> have to be pretty piss-poor before I'd choose an MDI interface over it.[/color]

The MDI is really an application-specific WM. That is useful, because it knows
more about the apps requirements than the system WM.

How does the app tell the WM that the relative positioning of
the windows should be like this?

With MDI, these windows exist in a global app window and so are
automatically managed.

10-04-2007, 09:20 AM

unix

Re: floating windows

In article <384ja3-dh2.ln1@main.anatron.com.au> Russell Shaw <rjshawN_o@s_pam.netspace.net.au> writes:
[color=blue]
>How does the app tell the WM that the relative positioning of
>the windows should be like this?[/color]

I have no problems with windows that use multiple widgets that are tiled
in the window -- that's standard.

MDIs, however, allow you to have multiple internal windows that are
independently mobile and can overlap, hide each other, be moved out of sight,
resized, etc., as if the main window were a workspace.

That's what I hate.

Dockable panels and resizable connected internal areas (where you use a slider
that connects two widgets to resize both at once) are quite nice, however. But
that's not what an MDI is.

If I want to manage my windows within an MDI-like environment I'd rather
use a VNC server because then I can use the window manager of my choice.

-Pete Zakel
(phz@seeheader.nospam)

"Well, well, well! Well if it isn't fat stinking billy goat Billy Boy in
poison! How art thou, thou globby bottle of cheap stinking chip oil? Come
and get one in the yarbles, if ya have any yarble, ya eunuch jelly thou!"

-Alex in "Clockwork Orange"

10-04-2007, 09:20 AM

unix

Re: floating windows

Pete nospam Zakel wrote:[color=blue]
> In article <384ja3-dh2.ln1@main.anatron.com.au> Russell Shaw <rjshawN_o@s_pam.netspace.net.au> writes:
>
>[color=green]
>>How does the app tell the WM that the relative positioning of
>>the windows should be like this?[/color]
>
>
> I have no problems with windows that use multiple widgets that are tiled
> in the window -- that's standard.
>
> MDIs, however, allow you to have multiple internal windows that are
> independently mobile and can overlap, hide each other, be moved out of sight,
> resized, etc., as if the main window were a workspace.
>
> That's what I hate.[/color]

I recognize that, and would not *think* of imposing MDI on anyone. But I
resent being forced to SDI myself (eg MS-Word-2003 imposes SDI, or if an
MDI option exists I could not find it - and I hate MS for that!)
[color=blue]
>
> Dockable panels and resizable connected internal areas (where you use a slider
> that connects two widgets to resize both at once) are quite nice, however. But
> that's not what an MDI is.[/color]

*I* hate docking. I even hate the 'optimized' placement done by some WMs
like KDE.

The use of tabbed-books has been suggested, but I dont like that either,
because I consider tabs very useful inside a document itself, and using
tabs-within-tabs would be hopelessly confusing.
[color=blue]
>
> If I want to manage my windows within an MDI-like environment I'd rather
> use a VNC server because then I can use the window manager of my choice.
>[/color]

Using Firefox tabs is MDI in the sense that, well, you have Multiple
Documents instead being force to have one per window. And yet it's not
MDI, because it's not the brain-dead "it's just like your desktop but
inside our window".

So which is it?

I agree with Russell that MDI is simply application-defined window
management, that can be done for good or evil. The evil, as I see, is
not making it application-specifc enough to the point that it's
basically a useless a duplicate of the window manager.

As I see, MS is responsible for promulgating the latter terrible style
(anyone remember Program Manager?) , but mostly for making "wizards" so
that a stub application is created in this style. Then when creating an
app, a developer is asked "do you want to support single or multiple
documents?" and they invariably answer multiple because More is Better!

Many people think of MDI as "when you have movable, resizable windows
with titlebars and are iconfiable and is supiciously like my desktop"
and thus all MDI, even good MDI, is trash.

10-04-2007, 09:20 AM

unix

Re: floating windows

ST wrote:[color=blue]
> It depends on what you call MDI.
>
> Using Firefox tabs is MDI in the sense that, well, you have Multiple
> Documents instead being force to have one per window. And yet it's not
> MDI, because it's not the brain-dead "it's just like your desktop but
> inside our window".
>
> So which is it?
>
> I agree with Russell that MDI is simply application-defined window
> management, that can be done for good or evil. The evil, as I see, is
> not making it application-specifc enough to the point that it's
> basically a useless a duplicate of the window manager.
>
> As I see, MS is responsible for promulgating the latter terrible style
> (anyone remember Program Manager?) , but mostly for making "wizards" so
> that a stub application is created in this style. Then when creating an
> app, a developer is asked "do you want to support single or multiple
> documents?" and they invariably answer multiple because More is Better!
>
> Many people think of MDI as "when you have movable, resizable windows
> with titlebars and are iconfiable and is supiciously like my desktop"
> and thus all MDI, even good MDI, is trash.[/color]

I disagree strongly. *You* hate it, you're entitled to that, and you're
even entitled not to have MDI forced on you. *I* am comfortable with it,
and IMNSHO am entitled to that, and also entitled not to have SDI forced
on me.

Michel Bardiaux wrote:
[color=blue]
> I disagree strongly. *You* hate it, you're entitled to that, and you're
> even entitled not to have MDI forced on you. *I* am comfortable with it,
> and IMNSHO am entitled to that, and also entitled not to have SDI forced
> on me.[/color]

Where did I say I hate MDI?

I never said anything about forcing a particular style. In one app I
maintain ([url]http://www.nedit.org[/url]), I was a strong proponent for letting
the users choose between and MDI vs SDI style.

My point is the window-manager-in-a-window MDI style is poor, and there
are much better ways of doing MDI. I don't consider Mozilla's tabs as
"windows in window" since you can't arbitrarily overlap or iconize in them.

10-04-2007, 09:20 AM

unix

Re: floating windows

ST wrote:[color=blue]
> Michel Bardiaux wrote:
>[color=green]
>> I disagree strongly. *You* hate it, you're entitled to that, and
>> you're even entitled not to have MDI forced on you. *I* am
>> comfortable with it, and IMNSHO am entitled to that, and also
>> entitled not to have SDI forced on me.[/color]
>
>
> Where did I say I hate MDI?[/color]

Quoting your own message (the one to which I replied), with my own
emphasis added:
[color=blue]
> It depends on what you call MDI.
>
> Using Firefox tabs is MDI in the sense that, well, you have Multiple
> Documents instead being force to have one per window. And yet it's
> not MDI, because it's not the brain-dead "it's just like your desktop[/color]
^^^^^^^^^^[color=blue]
> but inside our window".
>
> So which is it?
>
> I agree with Russell that MDI is simply application-defined window
> management, that can be done for good or evil. The evil, as I see,[/color]
^^^^[color=blue]
> is not making it application-specifc enough to the point that it's
> basically a useless a duplicate of the window manager.[/color]
^^^^^^^[color=blue]
>
> As I see, MS is responsible for promulgating the latter terrible[/color]
^^^^^^^^[color=blue]
> style (anyone remember Program Manager?) , but mostly for making
> "wizards" so that a stub application is created in this style. Then
> when creating an app, a developer is asked "do you want to support
> single or multiple documents?" and they invariably answer multiple
> because More is Better!
>
> Many people think of MDI as "when you have movable, resizable windows
> with titlebars and are iconfiable and is supiciously like my desktop"
> and thus all MDI, even good MDI, is trash.[/color]
^^^^^

Lots of negatively loaded words! What will it be if you really hate
something?
[color=blue]
>
> I never said anything about forcing a particular style. In one app I
> maintain ([url]http://www.nedit.org[/url]), I was a strong proponent for
> letting the users choose between and MDI vs SDI style.[/color]

Well, if you give me a choice between tabbed-MDI and SDI, but
steadfastly (not to say stuboornly) refuse to use WM-like MDI for any
reason other than its inavailability in your toolkit, I consider you
force a style on me.
[color=blue]
>
> My point is the window-manager-in-a-window MDI style is poor, and[/color]
^^^^[color=blue]
> there are much better ways of doing MDI. I don't consider Mozilla's
> tabs as "windows in window" since you can't arbitrarily overlap or
> iconize in them.[/color]

Right. I'm saying *I* dislike the generic nested-window style of MDI,
not MDI in general.
[color=blue]
> Well, if you give me a choice between tabbed-MDI and SDI, but
> steadfastly (not to say stuboornly) refuse to use WM-like MDI for any
> reason other than its inavailability in your toolkit, I consider you
> force a style on me.[/color]

Perhaps so, but we're using Motif here.

For Windows apps, I don't think I've ever seen an app support multiple
MDI styles (nested windows vs. tabs, as an example).

10-04-2007, 09:20 AM

unix

Re: floating windows

ST wrote:[color=blue]
> Right. I'm saying *I* dislike the generic nested-window style of MDI,
> not MDI in general.
>[color=green]
>> Well, if you give me a choice between tabbed-MDI and SDI, but
>> steadfastly (not to say stuboornly) refuse to use WM-like MDI for any
>> reason other than its inavailability in your toolkit, I consider you
>> force a style on me.[/color]
>
>
> Perhaps so, but we're using Motif here.[/color]