gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about levels


From: Richard Frith-Macdonald
Subject: Re: Question about levels
Date: Sun, 13 Oct 2002 13:38:17 +0100

On Sunday, October 13, 2002, at 12:01  pm, Chad Hardin wrote:

Ok, now I have a question about levels:

Right now I have it in my head as:

App Level:
*Windows can be raised and lowered. (intra-app app window cycling)
yep ... but this is also inter-app

*Windows can be specified as top-level, bottom-level etc. (like the Menu, or
a floating toolbar like thingy)

Not exactly.

*Windows can be hidden, shown.

Yep.

*Windows can be pushed to the bottom and top. (only to the bottom of the
apps own windows)

No ... all apps.

System Level:
*All the windows of an app can be raised or lowered. (switching between
apps) (this may not be used much in GNUstep)

No ... not at all.

*All the windows of an app can be made hidden, etc

Yes ... but there is no operation to do it ... it's handled on a window by window basis.

*Windows can be specified that they are top-level, etc in relation to ALL
windows of ALL apps (like a Dock)

Well, window levels work more or less like that ... though they have absolute numeric values.


Is this correct?  I'm starting to think it is not right.

Partly.

For example, when
a user clicks on a window of another app, they don't expect all of that apps
windows to be raised, just that one window.

That's really the apps business ... if you click on a new app the process goes
roughly like this -
1. The currently active app is told to become inactive ... it orders 'out' its menu
and perhaps panels etc.
2. The new app is told to become active ... it orders 'in' its menu and panels etc
making each one front.
then it orders the window that was clicked upon to the front.

There are an arbitrary number of window levels (best represented as a signed integer) and an app can put any of its windows in any level (though there are several standard levels defined in NSWindow.h, and other levels are only very rarely used).

Any window in one level appears behind any window in a higher level, irrespective of
the app that owns it.

The ordering of windows within a level is probably best represented by using a linked list of all windows within a level. The first window in the list is 'front' and appears on top of the second window in the list, which appears on top of the third and so on. Ordering a window 'front' does not change its level, but brings it to the start of the list. You can also order a window to the end of the list, or order a window to be
either immediately before or immediately after another window.

A window can be ordered 'out' ... which means it is removed from the linked list of displayed windows (but retains its window level) and is no longer displayed on screen.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]