prez/examples/menu.prez
Kelvin Sherlock 0efd3724ef menu example
2020-08-02 13:40:58 -04:00

25 lines
659 B
Plaintext

rMenuBar(
rMenu("@",
rMenuItem("About My App…", export="kAboutMenuItem"),
rMenuItem("Preferences…", ",", export="kPreferencesMenuItem")
),
rMenu(" File ",
rMenuItem("New ", "Nn", export="kNewMenuItem"),
rMenuItem("Open…", "Oo", export="kOpenMenuItem"),
rMenuItem("Save", "Ss", disabled=True, export="kSaveMenuItem"),
DividerMenuItem(),
rMenuItem("Close", "Ww", id=0xff, export="kCloseMenuItem"),
export = "kFileMenu"
),
rMenu(" Edit ",
UndoMenuItem(), # shortcut for doing it manually,
DividerMenuItem(),
CutMenuItem(),
CopyMenuItem(),
PasteMenuItem(),
ClearMenuItem(),
export = "kEditMenu"
),
export = "kMenuBar"
)