[Swingosc-devel] JSCMenuNode - opinion wanted
Brought to you by:
sciss
From: Sciss <co...@sc...> - 2008-08-04 13:48:48
|
hi, in the current (experimental) SVN version of SwingOSC, i have injected my application framework that includes a window and menu bar manager. this has many pros but maybe some downsides so i'm happy to receive feedback on this decision. in particular: - JSCWindow now is not directly associated with a javax.swing.JFrame but de.sciss.common.AppWindow which is a wrapper around the JFrame functionality - with the advantage of being switchable to JInternalFrames: JSCWindow.internalFrames = true; g.reboot; JSCWindow.viewPalette; this will create one master application frame inside which all JSCWindows are placed as "internal frames", something familiar for Windows users (and maybe Linux) i think. While this is still buggy, eventually also the window type can be set to "floating palettes". The downside is that some custom code relying on JSCWindow being represented by a JFrame might brake, but i guess that is a rare assumption. - the default menu factory of the application framework will set up a menu bar with the close item (cmd+w) in the file menu and a list of all open windows in the window menu. the minimize item (cmd+m) is also in the window menu, and a helper item "collect windows" to ensure all windows are in the visible part of the screen. - the possible downside of this is that on Windows and Linux when internal frames are _not_ used, each JSCWindow will have a tiny menu bar attached to its title bar. Don't know if that is too ugly or uncomfortable? If so, one could think about removing the default menu bar again unless user menus are created, while keeping the cmd+w and cmd+m shortcuts (as was before). - the file JSCMenu.sc has been added for user menus. it contains the abstract superclass JSCMenuNode plus its descendants JSCMenuGroup, JSCMenuItem, JSCMenuCheckItem, JSCMenuSeparator. The help file JSCMenuNode.html explains how to use them. Currently, the menus are application wide, so if internal frames are _not_ used, the menus replicate over all JSCWindows. don't know if this is too ugly? (OS X users are lucky because the menu bar is by default placed at the screen title bar). there are still some issues, e.g. in internal-frames mode, borderless windows have some problems i think. ciao, -sciss- |