finish string enum

This commit is contained in:
Jeeves 2024-04-05 16:19:08 -06:00
parent 3d63eb374f
commit 4d2034d0e7

View file

@ -380,8 +380,112 @@ pub const String = enum {
fixed_pause, fixed_pause,
flash_hook, flash_hook,
flash_screen, flash_screen,
form_feed,
from_status_line,
goto_window,
hangup,
init_1string,
init_2string,
init_3string,
init_file,
init_prog,
initialize_color,
initialize_pair,
insert_character,
insert_line,
insert_padding,
// TODO: rest // TODO: keys
micro_column_address,
micro_down,
micro_left,
micro_right,
micro_row_address,
micro_up,
newline,
order_of_pins,
orig_colors,
orig_pair,
pad_char,
parm_dch,
parm_delete_line,
parm_down_cursor,
parm_down_micro,
parm_ich,
parm_index,
parm_insert_line,
parm_left_cursor,
parm_left_micro,
parm_right_cursor,
parm_right_micro,
parm_rindex,
parm_up_cursor,
parm_up_micro,
pkey_key,
pkey_local,
pkey_xmit,
plab_norm,
print_screen,
prtr_non,
prtr_off,
prtr_on,
pulse,
quick_dial,
remove_clock,
repeat_char,
req_for_input,
reset_1string,
reset_2string,
reset_3string,
reset_file,
restore_cursor,
row_address,
save_cursor,
scroll_forward,
scroll_reverse,
select_char_set,
set_attributes,
set_background,
set_bottom_margin,
set_bottom_margin_parm,
set_clock,
set_color_pair,
set_foreground,
set_left_margin,
set_left_margin_parm,
set_right_margin,
set_right_margin_parm,
set_tab,
set_top_margin,
set_top_margin_parm,
set_window,
start_bit_image,
start_char_set_def,
stop_bit_image,
stop_char_set_def,
subscript_characters,
superscript_characters,
tab,
these_cause_cr,
to_status_line,
tone,
underline_char,
up_half_line,
user0,
user1,
user2,
user3,
user4,
user5,
user6,
user7,
user8,
user9,
wait_tone,
xoff_character,
xon_character,
zero_motion,
pub fn toCapName(self: String) []const u8 { pub fn toCapName(self: String) []const u8 {
return switch (self) { return switch (self) {
@ -469,6 +573,111 @@ pub const String = enum {
.fixed_pause => "pause", .fixed_pause => "pause",
.flash_hook => "hook", .flash_hook => "hook",
.flash_screen => "flash", .flash_screen => "flash",
.form_feed => "ff",
.from_status_line => "fsl",
.goto_window => "wingo",
.hangup => "hup",
.init_1string => "is1",
.init_2string => "is2",
.init_3string => "is3",
.init_file => "if",
.init_prog => "iprog",
.initialize_color => "initc",
.initialize_pair => "initp",
.insert_character => "ich1",
.insert_line => "il1",
.insert_padding => "ip",
// keys
.micro_column_address => "mhpa",
.micro_down => "mcud1",
.micro_left => "mcub1",
.micro_right => "mcuf1",
.micro_row_address => "mvpa",
.micro_up => "mcuu1",
.newline => "nel",
.order_of_pins => "porder",
.orig_colors => "oc",
.orig_pair => "op",
.pad_char => "pad",
.parm_dch => "dch",
.parm_delete_line => "dl",
.parm_down_cursor => "cud",
.parm_down_micro => "mcud",
.parm_ich => "ich",
.parm_index => "indn",
.parm_insert_line => "il",
.parm_left_cursor => "cub",
.parm_left_micro => "mcub",
.parm_right_cursor => "cuf",
.parm_right_micro => "mcuf",
.parm_rindex => "rin",
.parm_up_cursor => "cuu",
.parm_up_micro => "mcuu",
.pkey_key => "pfkey",
.pkey_local => "pfloc",
.pkey_xmit => "pfx",
.plab_norm => "pln",
.print_screen => "mc0",
.prtr_non => "mc5p",
.prtr_off => "mc4",
.prtr_on => "mc5",
.pulse => "pulse",
.quick_dial => "qdial",
.remove_clock => "rmclk",
.repeat_char => "rep",
.req_for_input => "rfi",
.reset_1string => "rs1",
.reset_2string => "rs2",
.reset_3string => "rs3",
.reset_file => "rf",
.restore_cursor => "rc",
.row_address => "vpa",
.save_cursor => "sc",
.scroll_forward => "ind",
.scroll_reverse => "ri",
.select_char_set => "scs",
.set_attributes => "sgr",
.set_background => "setb",
.set_bottom_margin => "smgb",
.set_bottom_margin_parm => "smgbp",
.set_clock => "sclk",
.set_color_pair => "scp",
.set_foreground => "setf",
.set_left_margin => "smgl",
.set_left_margin_parm => "smglp",
.set_right_margin => "smgr",
.set_right_margin_parm => "smgrp",
.set_tab => "hts",
.set_top_margin => "smgt",
.set_top_margin_parm => "smgtp",
.set_window => "wind",
.start_bit_image => "sbim",
.start_char_set_def => "scsd",
.stop_bit_image => "rbim",
.stop_char_set_def => "rcsd",
.subscript_characters => "subcs",
.superscript_characters => "supcs",
.tab => "ht",
.these_cause_cr => "docr",
.to_status_line => "tsl",
.tone => "tone",
.underline_char => "uc",
.up_half_line => "hu",
.user0 => "u0",
.user1 => "u1",
.user2 => "u2",
.user3 => "u3",
.user4 => "u4",
.user5 => "u5",
.user6 => "u6",
.user7 => "u7",
.user8 => "u8",
.user9 => "u9",
.wait_tone => "wait",
.xoff_character => "xoffc",
.xon_character => "xonc",
.zero_motion => "zerom",
// else => "", // else => "",
}; };
} }