Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

MenuItem

rc.MenuItem
pub const MenuItem = enum

File

Code

pub const MenuItem = enum {
    menuitem,
    popup,

    pub const map = std.StaticStringMapWithEql(
        MenuItem,
        std.static_string_map.eqlAsciiIgnoreCase,
    ).initComptime(.{
        .{ "MENUITEM", .menuitem },
        .{ "POPUP", .popup },
    });

    pub fn isSeparator(bytes: []const u8) bool {
        return std.ascii.eqlIgnoreCase(bytes, "SEPARATOR");
    }

    pub const Option = enum {
        checked,
        grayed,
        help,
        inactive,
        menubarbreak,
        menubreak,

        pub const map = std.StaticStringMapWithEql(
            Option,
            std.static_string_map.eqlAsciiIgnoreCase,
        ).initComptime(.{
            .{ "CHECKED", .checked },
            .{ "GRAYED", .grayed },
            .{ "HELP", .help },
            .{ "INACTIVE", .inactive },
            .{ "MENUBARBREAK", .menubarbreak },
            .{ "MENUBREAK", .menubreak },
        });
    };
}