[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]


Hi again!

I have designed (using NCURSES) an editor with a easy menu-driven interface
(I want to emulate EDIT from MSDOS)

I have designed my Menus as follows

1. I have 5 windows (tiled) out of which one is for the menubarWindow (as
the top line) and the other is the editWindow. The editWindow takes care of
the editing business and the menubarWindow holds the labels for the Menus
(like file, edit, ...)

2. To display the menus (say the File Menu) I do the following -
    - Save the background of the editWindow.
    - Draw the box for the menu (all in the editWindow)
    - Fill the box (with New, Open, Save...)
    - Provide selection with the arrow keys (using reverse video)
    - If the user selects a menu-item, I restore the background (which
erases the menus)
    - An ID is returned based on the MenuSelection (editWindow is restored,
to original contents)

My questions are

a) Is this a reasonable way of implementing a menu-driver?
b) Should I use the MENU library instead?

Sorry for the longish mail

Aditya R Rao