menus: Place ListMenu
as a keyboard-accesisble menu
Remove the `DataMenu`. Replace `PrintMenu` with `ListMenu` as keyboard-accessible menu (we can tuck the rarely used `PrintMenu` under `I/O`) Add list product, sum, etc to `ListMenu` Modify `ProgramMenu` to add special program entry characters. Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
Before Width: | Height: | Size: 353 KiB After Width: | Height: | Size: 353 KiB |
Before Width: | Height: | Size: 296 KiB After Width: | Height: | Size: 295 KiB |
Before Width: | Height: | Size: 296 KiB After Width: | Height: | Size: 295 KiB |
Before Width: | Height: | Size: 353 KiB After Width: | Height: | Size: 353 KiB |
BIN
doc/keyboard.png
Before Width: | Height: | Size: 207 KiB After Width: | Height: | Size: 206 KiB |
Before Width: | Height: | Size: 207 KiB After Width: | Height: | Size: 206 KiB |
Before Width: | Height: | Size: 207 KiB After Width: | Height: | Size: 206 KiB |
46
src/menu.cc
|
@ -785,13 +785,20 @@ MENU(ProgramMenu,
|
|||
// ----------------------------------------------------------------------------
|
||||
// Programming menu
|
||||
// ----------------------------------------------------------------------------
|
||||
"«»", ID_SelfInsert,
|
||||
"{}", ID_SelfInsert,
|
||||
"[]", ID_SelfInsert,
|
||||
"→ «»", ID_SelfInsert,
|
||||
"→ ''", ID_SelfInsert,
|
||||
"Eval", ID_Eval,
|
||||
|
||||
"Tests", ID_TestsMenu,
|
||||
"Compare", ID_CompareMenu,
|
||||
"Loops", ID_LoopsMenu,
|
||||
"Bases", ID_BasesMenu,
|
||||
"Stack", ID_StackMenu,
|
||||
"Debug", ID_DebugMenu,
|
||||
|
||||
"Debug", ID_DebugMenu,
|
||||
"Objects", ID_ObjectMenu,
|
||||
"Lists", ID_ListMenu,
|
||||
"Flags", ID_FlagsMenu,
|
||||
|
@ -915,47 +922,30 @@ MENU(ListMenu,
|
|||
"Size", ID_Size,
|
||||
"Head", ID_Head,
|
||||
"Tail", ID_Tail,
|
||||
"Get", ID_Get,
|
||||
|
||||
"Sort", ID_Sort,
|
||||
"QSort", ID_QuickSort,
|
||||
"Reverse", ID_ReverseList,
|
||||
"GetI", ID_GetI,
|
||||
"PutI", ID_PutI,
|
||||
"Put", ID_Put,
|
||||
|
||||
"RSort", ID_ReverseSort,
|
||||
"RQSort", ID_ReverseQuickSort,
|
||||
"Objects", ID_ObjectMenu,
|
||||
"Matrix", ID_MatrixMenu,
|
||||
"Vector", ID_VectorMenu,
|
||||
"Data", ID_DataMenu);
|
||||
"∑List", ID_ListSum,
|
||||
"∏List", ID_ListProduct,
|
||||
"∆List", ID_ListDifferences,
|
||||
|
||||
|
||||
MENU(DataMenu,
|
||||
// ----------------------------------------------------------------------------
|
||||
// Operations on data
|
||||
// ----------------------------------------------------------------------------
|
||||
"→List", ID_ToList,
|
||||
"Obj→", ID_Explode,
|
||||
"Sort", ID_Sort,
|
||||
"RSort", ID_ReverseSort,
|
||||
"Map", ID_Map,
|
||||
"Reduce", ID_Reduce,
|
||||
"Filter", ID_Filter,
|
||||
|
||||
"∑", ID_Sum,
|
||||
"∏", ID_Product,
|
||||
"∆", ID_Unimplemented,
|
||||
"Get", ID_Get,
|
||||
"Put", ID_Put,
|
||||
"GetI", ID_GetI,
|
||||
"PutI", ID_PutI,
|
||||
"Reverse", ID_ReverseList,
|
||||
|
||||
"Obj→", ID_Explode,
|
||||
"Find", ID_Unimplemented,
|
||||
"QSort", ID_QuickSort,
|
||||
"RSort", ID_ReverseSort,
|
||||
"RQSort", ID_ReverseQuickSort,
|
||||
"Objects", ID_ObjectMenu,
|
||||
"Lists", ID_ListMenu);
|
||||
"Matrix", ID_MatrixMenu,
|
||||
"Vector", ID_VectorMenu);
|
||||
|
||||
|
||||
MENU(ObjectMenu,
|
||||
|
@ -981,7 +971,7 @@ MENU(ObjectMenu,
|
|||
"DTag", ID_dtag,
|
||||
"Matrix", ID_MatrixMenu,
|
||||
"List", ID_ListMenu,
|
||||
"Data", ID_DataMenu);
|
||||
"Vector", ID_VectorMenu);
|
||||
|
||||
|
||||
MENU(UnitsConversionsMenu,
|
||||
|
|
|
@ -4129,7 +4129,7 @@ static const byte defaultShiftedCommand[2*user_interface::NUM_KEYS] =
|
|||
OP2BYTES(KEY_1, 0),
|
||||
OP2BYTES(KEY_2, 0),
|
||||
OP2BYTES(KEY_3, menu::ID_ProgramMenu),
|
||||
OP2BYTES(KEY_SUB, menu::ID_PrintingMenu),
|
||||
OP2BYTES(KEY_SUB, menu::ID_ListMenu),
|
||||
OP2BYTES(KEY_EXIT, command::ID_Off),
|
||||
OP2BYTES(KEY_0, command::ID_SystemSetup),
|
||||
OP2BYTES(KEY_DOT, command::ID_Show),
|
||||
|
|