[GUI] Proposal for MacOS MenuBar
Krasimir Angelov
ka2_mail@yahoo.com
Tue, 28 Jan 2003 07:00:47 -0800 (PST)
I propose simple scheme for portable for menus
based on two simple ideas:
1. We can define two separatate menu types.
- Common menu bar: this is a menu with
commands which are common for each toplevel window.
Usually native Windows applications has three common
sub-menus in the menu bar: the first menu is usualy
File, the second is Edit and the last is Help. If the
application supports View menu usually this is the
third menu.
- Document menu bar: each toplevel window
can have its own menu with its own commands. Under
Windows MFC based MDI applications supports different
menus for each document types but usually for all of
them exists the same File, Edit, View and Help menus.
I think that is good idea to express this fact
more natural. The Haskell GUI library can define one
common menu and the place, where the document menus
to be placed. When any window becomes active its menu
will be merged with common menu. When there aren't
active windows then the MDI frame will display just
default menu.
I hope that this can be suitable for MacOS. This
convention will encourage developers to define the
common menu and the document specific menus and then
leave OS specific layer to build application menu in
natural way.
2. We can explicitly define the document model
which are most suitable for the application (MDI, SDI
or NDI). The model must be specified at startup just
like in the ObjectIO. The meanings of models are:
- SDI - Under Windows and GTK we have multiple
top level windows and usually the application
finishes when all windows are closed. Each window has
its own menu which are part of the window. Under acOS
the difference is that the application continues
execution even if all top level windows are closed.
The menu is placed at desktop.
- MDI - Under Windows we have one toplevel
MDIFrame with many child frames and the application
finishes when its MDIFrame is closed. Under GTK we
have one toplevel window with embeded GtkNoteBook
widget. The child frames are expressed with pages in
the notebook and the application finishes when the
toplevel window is closed. Under both Windows and GTK,
the menu is placed on MDI frame and it is a
composition of the common menu and the current
document menu. Under MacOS MDI interface will have
the same behavior as SDI.
- NDI - simple interface with just one dialog
without MenuBar.
Krasimir
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com