// Creates all the menus and stores them in a global
// Instead of making them on each iteration
Creates all the menus and stores them in a global
Instead of making them on each iteration
Creates all the menus and stores them in a global Instead of making them on each iteration
pub fn create_menus() {
    g_set_menus(vec![
        [
            menu_item("a", "dd", false, true, true),
            menu_item("e", "dit", false, true, false),
            menu_item("f", "ind", false, true, false),
            menu_item("m", "ove", false, true, false),
            menu_item("d", "elete", false, false, false),
            menu_item("Arrows", "Change Pages", true, true, true),
            menu_item("Backspace", "Edit Last", true, false, false),
            menu_item("H", "Show All", true, true, true),
            menu_item("?", "About", true, true, false),
            menu_item("Q", "Exit", true, true, false),
            menu_item("Space", ">", true, false, false),
        ]
        .concat(),
        [
            menu_item("+/-", "Change Page Size", true, true, true),
            menu_item("G", "Goto", true, false, false),
            menu_item("R", "Reset File", true, true, true),
            menu_item("P", "Change Security", true, false, false),
            menu_item("$", "Change Colors", true, true, true),
            menu_item("U", "Undo Last Edit", true, false, false),
        ]
        .concat(),
        [
            menu_item("^", "Change Row Spacing", true, true, true),
            menu_item("S", "Swap", true, false, false),
            menu_item("O", "Open Encrypted File", true, true, true),
            menu_item("T", "Stats", true, false, false),
            menu_item("N", "Add From Source File", true, true, true),
            menu_item("X", "Destroy", true, false, false),
        ]
        .concat(),
    ]);
}
pub fn create_menus ( ) { g_set_menus ( vec ! [ [ menu_item ( " " " " false true true ) menu_item ( " " " " false true false ) menu_item ( " " " " false true false ) menu_item ( " " " " false true false ) menu_item ( " " " " false false false ) menu_item ( " " " " true true true ) menu_item ( " " " " true false false ) menu_item ( " " " " true true true ) menu_item ( " " " " true true false ) menu_item ( " " " " true true false ) menu_item ( " " " " true false false ) ] concat ( ) [ menu_item ( " " " " true true true ) menu_item ( " " " " true false false ) menu_item ( " " " " true true true ) menu_item ( " " " " true false false ) menu_item ( " " " " true true true ) menu_item ( " " " " true false false ) ] concat ( ) [ menu_item ( " " " " true true true ) menu_item ( " " " " true false false ) menu_item ( " " " " true true true ) menu_item ( " " " " true false false ) menu_item ( " " " " true true true ) menu_item ( " " " " true false false ) ] concat ( ) ] ) ; }
Creates all the menus and stores them in a global
Instead of making them on each iteration
Creates all the menus and stores them in a global Instead of making them on each iteration