[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Impelmenting NSWindows95InterfaceStyle
From: |
Richard Frith-Macdonald |
Subject: |
Re: Impelmenting NSWindows95InterfaceStyle |
Date: |
Mon, 19 Jan 2009 08:15:46 +0000 |
On 19 Jan 2009, at 06:54, hns@computer.org wrote:
On 19 Jan., 04:57, Germán Arias <ger...@xelalug.org> wrote:
Hi, after inspect the source of NSMenu.m and others files. I think
that
I can try to implement the option NSWindows95InterfaceStyle. I have
one
idea to do that, and I want know what do you think about this.
Well, I think that the most easy and elegant way to implement this is
make a new window with the horizontal menu and with a standard
toolbar.
In others words, don't put the menu in an app's window. Instead this,
make a new window (main window) to set the horizontal menu. For
example,
if an app is like this
_____
|Menu |
| |
| | ____________________________________
| | |___________________________________|
|_____| | |
| |
| |
| |
| App's window |
| |
| |
| |
| |
|___________________________________|
After set NSWindows95InterfaceStyle, the app's look will by like this
__________________________
|_Main window_____________|
| <-- Menu -- > |
|_________________________|
| <- a standard |
| toolbar --> |
|_________________________|
________________________________________
|________________________________________|
| |
| |
| |
| |
| App's window |
| |
| |
| |
| |
|________________________________________|
To my this is an elegant solution, because make an horizontal menu
and,
at the same time, conserve a distinctive look. In other hand, there
are
many apps that implements that look, familiar to many people. Of
course,
the programmer will by able to set his own toolbar in the main menu.
What do you think about this idea?
I don't use mswindows very much, but it does not appear to be the sort
of behavior you would expect from a windows application.
I would expect use of NSWindows95InterfaceStyle to produce a menu in
each windows and remove the main menu:
ie.
_____
|Menu |
| |
| | ____________________________________
| | |___________________________________|
|_____| | |
-------------------------
| |
|-----------------------|
| |
| |
| |
| |
| App's window | | Another
window |
| |
| |
| |
-------------------------
| |
| |
|___________________________________|
would become
________________________________________
|________________________________________|
| <-- Menu --> |
-----------------------
| |
|----------------------|
| | | <-- Menu --
> |
| |
| |
| App's window | | Another
window |
| |
| |
| |
------------------------
| |
| |
|________________________________________|
I had suggested before (maybe my mail got lost) to implement -
[NSWindow setMenu:] so that it simply adds a horizontal menu between
the menu title and the window's toolbar.
This would allow to add window menus to any application and interface
style. And to have different menus for each window
The only critical aspects I see are
* you can't define the menu in Interface Builder
* GORM may need an extension
* or the application must set up the menu programmatically
* the standard Application Menu still appears
I guess I should have commented.
Yes, to me it sounds like a good idea to use the field in the window
to hold the menu, and yes the menu should be displayed immediately
below the title (in the window decoration view. I guess it would be
nice to allow the application to set this window.
However, setting NSWindows95InterfaceStyle on the application's main
menu really ought to cause the menu window to be ordered out, and the
main menu to be set in any window where we haven't set another menu
programatically.
Of course, there are other questions ... presumably any NSPanel (or
subclass of NSPanel) should probably not get this behavior of having
the main menu set into it automatically.
I guess we might have some behavior like:
[window setMenu: nil] (window gets the main menu in it if
NSWindows95InterfaceStyle is in use for the main menu, otherwise no
menu)
[window setMenu: menu] (window gets some other menu set in it)
[window setMenu: [NSNull null]]) (window does not display a menu)
So subclasses of NSWindow could control their behavior by having their
init method set their menu appropriately.
- Impelmenting NSWindows95InterfaceStyle, Germán Arias, 2009/01/18
- Re: Impelmenting NSWindows95InterfaceStyle, address@hidden, 2009/01/19
- Re: Impelmenting NSWindows95InterfaceStyle,
Richard Frith-Macdonald <=
- Re: Impelmenting NSWindows95InterfaceStyle, Pete French, 2009/01/19
- Re: Impelmenting NSWindows95InterfaceStyle, Matt Rice, 2009/01/19
- Re: Impelmenting NSWindows95InterfaceStyle, Fred Kiefer, 2009/01/19
- Re: Impelmenting NSWindows95InterfaceStyle, Pete French, 2009/01/19
- Re: Impelmenting NSWindows95InterfaceStyle, Matt Rice, 2009/01/19
- Re: Impelmenting NSWindows95InterfaceStyle, Germán Arias, 2009/01/19
- Re: Impelmenting NSWindows95InterfaceStyle, Germán Arias, 2009/01/19
- Re: Impelmenting NSWindows95InterfaceStyle, Richard Frith-Macdonald, 2009/01/19
- Re: Impelmenting NSWindows95InterfaceStyle, Germán Arias, 2009/01/19
- Re: Impelmenting NSWindows95InterfaceStyle, Robert J. Slover, 2009/01/19