discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Impelmenting NSWindows95InterfaceStyle


From: Germán Arias
Subject: Re: Impelmenting NSWindows95InterfaceStyle
Date: Mon, 19 Jan 2009 13:12:58 -0600

El lun, 19-01-2009 a las 13:46 +0100, Fred Kiefer escribió:

> Sounds like the right condition to decide whether to add a menu. But
> what should we do in the case, when there isn't a main window? Take for
> example the GSTest application that doesn't display a window on startup.
> Should we only have the context menu of the icon window?
> 

For that reason I propose a new window. A new window without a resize
bar, because its width is determined to the menu (of course the
programmer needs by careful with his menu), and without a close button
in the title bar, because for that is the option Quit in the menu. And
in the toolbar some standard icons like: Open, Save, Info Panel, Help,
Go to app's website, ...  

In other hand, with the main menu inside an app's window. I see many
problems. First, as Fred say, if there isn't a main window, which
window?. Second, if the user change the window's width, sometimes the
option Quit will by outside the window, that is unacceptable, unless we
change the position of the option Quit inside the menu. And the hidden
options needs by accesible in a control that show a vertical menu (not
an horizontal menu). And third, the window need call [NSApp terminate:
self] when the user do a click in its close button.  

We need an flexible menu and easy change with NSNextStepInterfaceStyle,
NSMacintoshInterfaceStyle and NSWindows95InterfaceStyle. Now I propose a
new solution. As said Nikolaus, he proposed a [window setMenu:], then
why not implement this method together my idea?. This solution work on
this way:

When you set NSWindow95InterfaceStyle, GNUstep check if there is a main
window, if this exist set the menu in that window (with [window
setMenu:]). Call the method setMinSize, with a value that prevent hidden
options (the programmer need careful in this), and perform a connection
to window with (for example) AppController, with sometime like this

- (void) windowWillClose: (NSNotification *)aNotification;
{
   if( (style == NSWindows95InterfaceStyle]) && (thereIsMainWindow) )
   {
    [NSApp terminate: self] ; 
   }
}


If there isn't a main window then, GNUstep make a new window as I said
before.

And I don't see problem if the user want set his own menus in other
windows (of course not the main window).

What do you think about this new idea?






reply via email to

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