Eliminated style generation

master
Allen Webster 2018-11-27 09:56:42 -08:00
parent 180304dbe3
commit 3bad062613
11 changed files with 369 additions and 732 deletions

View File

@ -413,14 +413,14 @@ IsDoc(String extension)
CUSTOM_COMMAND_SIG(casey_open_in_other)
{
exec_command(app, change_active_panel);
exec_command(app, cmdid_interactive_open_or_new);
exec_command(app, interactive_open_or_new);
}
CUSTOM_COMMAND_SIG(casey_clean_and_save)
{
exec_command(app, clean_all_lines);
exec_command(app, eol_nixify);
exec_command(app, cmdid_save);
exec_command(app, save);
}
CUSTOM_COMMAND_SIG(casey_newline_and_indent)
@ -444,13 +444,13 @@ CUSTOM_COMMAND_SIG(casey_newline_and_indent)
CUSTOM_COMMAND_SIG(casey_open_file_other_window)
{
exec_command(app, change_active_panel);
exec_command(app, cmdid_interactive_open_or_new);
exec_command(app, interactive_open_or_new);
}
CUSTOM_COMMAND_SIG(casey_switch_buffer_other_window)
{
exec_command(app, change_active_panel);
exec_command(app, cmdid_interactive_switch_buffer);
exec_command(app, interactive_switch_buffer);
}
internal void
@ -1192,36 +1192,6 @@ CUSTOM_COMMAND_SIG(casey_force_codelegal_characters)
}
}
CUSTOM_COMMAND_SIG(casey_execute_arbitrary_command)
{
Query_Bar bar;
char space[1024], more_space[1024];
bar.prompt = make_lit_string("Command: ");
bar.string = make_fixed_width_string(space);
if (!query_user_string(app, &bar)) return;
end_query_bar(app, &bar, 0);
if(match(bar.string, make_lit_string("codelegal")))
{
exec_command(app, casey_force_codelegal_characters);
}
else if(match(bar.string, make_lit_string("open menu")))
{
// exec_command(app, cmdid_open_menu);
}
else
{
bar.prompt = make_fixed_width_string(more_space);
append(&bar.prompt, make_lit_string("Unrecognized: "));
append(&bar.prompt, bar.string);
bar.string.size = 0;
start_query_bar(app, &bar, 0);
get_user_input(app, EventOnAnyKey | EventOnButton, 0);
}
}
static void
casey_list_all_functions(Application_Links *app, Partition *part, Buffer_Summary *buffer, Buffer_Summary *decls_buffer){
@ -1510,31 +1480,24 @@ CUSTOM_COMMAND_SIG(casey_list_all_functions_globally){
internal void
UpdateModalIndicator(Application_Links *app)
{
int unsigned Background = (GlobalBrightMode ? 0xFFFFFF : 0x161616);
int unsigned Default = (GlobalBrightMode ? 0x000000 : 0xA08563);
int unsigned Constant = 0x6B8E23;
int unsigned Background = (GlobalBrightMode ? 0xFFFFFFFF : 0xFF161616);
int unsigned Default = (GlobalBrightMode ? 0xFF000000 : 0xFFA08563);
int unsigned Constant = 0xFF6B8E23;
Theme_Color normal_colors[] =
{
{Stag_Cursor, 0x40FF40},
{Stag_At_Cursor, 0x161616},
{Stag_Mark, 0x808080},
//{Stag_Margin, 0x262626},
//{Stag_Margin_Hover, 0x333333},
//{Stag_Margin_Active, 0x404040},
{Stag_Bar, 0xCACACA}
{Stag_Cursor, 0xFF40FF40},
{Stag_At_Cursor, 0xFF161616},
{Stag_Mark, 0xFF808080},
{Stag_Bar, 0xFFCACACA}
};
Theme_Color edit_colors[] =
{
{Stag_Cursor, 0xFF0000},
{Stag_At_Cursor, 0x00FFFF},
{Stag_Mark, 0xFF6F1A},
//{Stag_Margin, 0x33170B},
//{Stag_Margin_Hover, 0x49200F},
//{Stag_Margin_Active, 0x934420},
{Stag_Bar, 0xCACACA}
// {Stag_Bar, 0x934420}
{Stag_Cursor, 0xFFFF0000},
{Stag_At_Cursor, 0xFF00FFFF},
{Stag_Mark, 0xFFFF6F1A},
{Stag_Bar, 0xFFCACACA}
};
if (GlobalEditMode)
@ -1548,17 +1511,17 @@ UpdateModalIndicator(Application_Links *app)
Theme_Color common_colors[] =
{
{Stag_Comment, 0x7D7D7D},
{Stag_Keyword, 0xCD950C},
{Stag_Preproc, 0xDAB98F},
{Stag_Comment, 0xFF7D7D7D},
{Stag_Keyword, 0xFFCD950C},
{Stag_Preproc, 0xFFDAB98F},
{Stag_Include, Constant},
{Stag_Back, Background},
{Stag_Margin, Background},
{Stag_Margin_Hover, Background},
{Stag_Margin_Active, Background},
{Stag_List_Item,Background},
{Stag_List_Item_Hover, 0x934420},
{Stag_List_Item_Active, 0x934420},
{Stag_List_Item_Hover, 0xFF934420},
{Stag_List_Item_Active, 0xFF934420},
{Stag_Default, Default},
{Stag_Str_Constant, Constant},
@ -1619,7 +1582,7 @@ DEFINE_MODAL_KEY(modal_semicolon, seek_white_or_token_right);
DEFINE_BIMODAL_KEY(modal_open_bracket, casey_begin_keyboard_macro_recording, write_and_auto_tab);
DEFINE_BIMODAL_KEY(modal_close_bracket, casey_end_keyboard_macro_recording, write_and_auto_tab);
DEFINE_MODAL_KEY(modal_a, write_character); // TODO(casey): Arbitrary command + casey_quick_calc
DEFINE_MODAL_KEY(modal_b, cmdid_interactive_switch_buffer);
DEFINE_MODAL_KEY(modal_b, interactive_switch_buffer);
DEFINE_MODAL_KEY(modal_c, casey_find_corresponding_file);
DEFINE_MODAL_KEY(modal_d, casey_kill_to_end_of_line);
DEFINE_MODAL_KEY(modal_e, write_character);
@ -1642,8 +1605,8 @@ DEFINE_MODAL_KEY(modal_u, cmdid_undo);
DEFINE_MODAL_KEY(modal_v, casey_switch_buffer_other_window);
DEFINE_MODAL_KEY(modal_w, cut);
DEFINE_MODAL_KEY(modal_x, casey_find_corresponding_file_other_window);
DEFINE_MODAL_KEY(modal_y, cmdid_redo);
DEFINE_MODAL_KEY(modal_z, cmdid_interactive_open_or_new);
DEFINE_MODAL_KEY(modal_y, redo);
DEFINE_MODAL_KEY(modal_z, interactive_open_or_new);
DEFINE_MODAL_KEY(modal_1, casey_build_search); // TODO(casey): Shouldn't need to bind a key for this?
DEFINE_MODAL_KEY(modal_2, write_character); // TODO(casey): Available
@ -1654,9 +1617,9 @@ DEFINE_MODAL_KEY(modal_6, auto_tab_range); // TODO(casey): Available
DEFINE_MODAL_KEY(modal_7, write_character); // TODO(casey): Available
DEFINE_MODAL_KEY(modal_8, seek_whitespace_up); // TODO(casey): Available
DEFINE_MODAL_KEY(modal_9, write_character); // TODO(casey): Available
DEFINE_MODAL_KEY(modal_0, cmdid_kill_buffer);
DEFINE_MODAL_KEY(modal_0, kill_buffer);
DEFINE_MODAL_KEY(modal_minus, write_character); // TODO(casey): Available
DEFINE_MODAL_KEY(modal_equals, casey_execute_arbitrary_command);
DEFINE_MODAL_KEY(modal_equals, command_lister); // TODO(allen): Available
DEFINE_BIMODAL_KEY(modal_backspace, casey_delete_token_left, backspace_char);
DEFINE_BIMODAL_KEY(modal_up, move_up, move_up);
@ -1838,17 +1801,18 @@ extern "C" GET_BINDING_DATA(get_bindings)
set_start_hook(context, casey_start);
set_command_caller(context, default_command_caller);
set_render_caller(context, default_render_caller);
set_open_file_hook(context, casey_file_settings);
set_scroll_rule(context, casey_smooth_scroll_rule);
set_end_file_hook(context, end_file_close_jump_list);
begin_map(context, mapid_global);
{
bind(context, 'z', MDFR_NONE, cmdid_interactive_open_or_new);
bind(context, 'z', MDFR_NONE, interactive_open_or_new);
bind(context, 'x', MDFR_NONE, casey_open_in_other);
bind(context, 't', MDFR_NONE, casey_load_todo);
bind(context, '/', MDFR_NONE, change_active_panel);
bind(context, 'b', MDFR_NONE, cmdid_interactive_switch_buffer);
bind(context, 'b', MDFR_NONE, interactive_switch_buffer);
bind(context, key_page_up, MDFR_NONE, search);
bind(context, key_page_down, MDFR_NONE, reverse_search);
bind(context, 'm', MDFR_NONE, casey_save_and_make_without_asking);
@ -1964,6 +1928,23 @@ extern "C" GET_BINDING_DATA(get_bindings)
end_map(context);
begin_map(context, default_lister_ui_map);
bind_vanilla_keys(context, lister__write_character);
bind(context, key_esc, MDFR_NONE, lister__quit);
bind(context, '\n', MDFR_NONE, lister__activate);
bind(context, '\t', MDFR_NONE, lister__activate);
bind(context, key_back, MDFR_NONE, lister__backspace_text_field);
bind(context, key_up, MDFR_NONE, lister__move_up);
bind(context, key_page_up, MDFR_NONE, lister__move_up);
bind(context, key_down, MDFR_NONE, lister__move_down);
bind(context, key_page_down, MDFR_NONE, lister__move_down);
bind(context, key_mouse_wheel, MDFR_NONE, lister__wheel_scroll);
bind(context, key_mouse_left, MDFR_NONE, lister__mouse_press);
bind(context, key_mouse_left_release, MDFR_NONE, lister__mouse_release);
bind(context, key_mouse_move, MDFR_NONE, lister__repaint);
bind(context, key_animate, MDFR_NONE, lister__repaint);
end_map(context);
end_bind_helper(context);
return context->write_total;
}

View File

@ -276,8 +276,10 @@ RENDER_CALLER_SIG(default_render_caller){
colors[0].tag = Stag_Cursor;
colors[1].tag = Stag_Mark;
get_theme_colors(app, colors, 2);
uint32_t cursor_color = colors[0].color;
uint32_t mark_color = colors[1].color;
int_color cursor_color = SymbolicColorFromPalette(Stag_Cursor);
int_color mark_color = SymbolicColorFromPalette(Stag_Mark);
int_color text_color = is_active_view?
SymbolicColorFromPalette(Stag_At_Cursor):SymbolicColorFromPalette(Stag_Default);
Marker_Visual_Take_Rule take_rule = {};
take_rule.first_index = 0;
@ -288,7 +290,7 @@ RENDER_CALLER_SIG(default_render_caller){
Marker_Visual visual = create_marker_visual(app, cursor_and_mark);
Marker_Visual_Type type = is_active_view?VisualType_CharacterBlocks:VisualType_CharacterWireFrames;
marker_visual_set_effect(app, visual,
type, cursor_color, SymbolicColorFromPalette(Stag_At_Cursor), 0);
type, cursor_color, text_color, 0);
marker_visual_set_take_rule(app, visual, take_rule);
marker_visual_set_priority(app, visual, VisualPriority_Highest);
@ -306,8 +308,8 @@ RENDER_CALLER_SIG(default_render_caller){
colors[0].tag = Stag_Cursor;
colors[1].tag = Stag_Highlight;
get_theme_colors(app, colors, 2);
uint32_t cursor_color = colors[0].color;
uint32_t highlight_color = colors[1].color;
int_color cursor_color = SymbolicColorFromPalette(Stag_Cursor);
int_color highlight_color = SymbolicColorFromPalette(Stag_Highlight);
Marker_Visual_Take_Rule take_rule = {};
take_rule.first_index = 0;

View File

@ -2,7 +2,7 @@
#define command_id(c) (fcoder_metacmd_ID_##c)
#define command_metadata(c) (&fcoder_metacmd_table[command_id(c)])
#define command_metadata_by_id(id) (&fcoder_metacmd_table[id])
#define command_one_past_last_id 228
#define command_one_past_last_id 216
#if defined(CUSTOM_COMMAND_SIG)
#define PROC_LINKS(x,y) x
#else
@ -77,7 +77,6 @@ CUSTOM_COMMAND_SIG(interactive_open);
CUSTOM_COMMAND_SIG(interactive_open_or_new);
CUSTOM_COMMAND_SIG(interactive_switch_buffer);
CUSTOM_COMMAND_SIG(kill_buffer);
CUSTOM_COMMAND_SIG(kill_rect);
CUSTOM_COMMAND_SIG(left_adjust_view);
CUSTOM_COMMAND_SIG(list_all_functions_all_buffers);
CUSTOM_COMMAND_SIG(list_all_functions_all_buffers_lister);
@ -112,12 +111,6 @@ CUSTOM_COMMAND_SIG(lister__write_character__file_path);
CUSTOM_COMMAND_SIG(lister__write_character__fixed_list);
CUSTOM_COMMAND_SIG(load_project);
CUSTOM_COMMAND_SIG(make_directory_query);
CUSTOM_COMMAND_SIG(miblo_decrement_basic);
CUSTOM_COMMAND_SIG(miblo_decrement_time_stamp);
CUSTOM_COMMAND_SIG(miblo_decrement_time_stamp_minute);
CUSTOM_COMMAND_SIG(miblo_increment_basic);
CUSTOM_COMMAND_SIG(miblo_increment_time_stamp);
CUSTOM_COMMAND_SIG(miblo_increment_time_stamp_minute);
CUSTOM_COMMAND_SIG(mouse_wheel_scroll);
CUSTOM_COMMAND_SIG(move_down);
CUSTOM_COMMAND_SIG(move_down_10);
@ -128,7 +121,6 @@ CUSTOM_COMMAND_SIG(move_line_up);
CUSTOM_COMMAND_SIG(move_right);
CUSTOM_COMMAND_SIG(move_up);
CUSTOM_COMMAND_SIG(move_up_10);
CUSTOM_COMMAND_SIG(multi_line_edit);
CUSTOM_COMMAND_SIG(newline_or_goto_position_direct);
CUSTOM_COMMAND_SIG(newline_or_goto_position_same_panel_direct);
CUSTOM_COMMAND_SIG(newline_or_goto_position_same_panel_sticky);
@ -161,9 +153,7 @@ CUSTOM_COMMAND_SIG(redo);
CUSTOM_COMMAND_SIG(reload_themes);
CUSTOM_COMMAND_SIG(remap_interactive);
CUSTOM_COMMAND_SIG(rename_file_query);
CUSTOM_COMMAND_SIG(rename_parameter);
CUSTOM_COMMAND_SIG(reopen);
CUSTOM_COMMAND_SIG(replace_all_occurrences);
CUSTOM_COMMAND_SIG(replace_in_range);
CUSTOM_COMMAND_SIG(reverse_search);
CUSTOM_COMMAND_SIG(reverse_search_identifier);
@ -230,8 +220,6 @@ CUSTOM_COMMAND_SIG(word_complete);
CUSTOM_COMMAND_SIG(write_and_auto_tab);
CUSTOM_COMMAND_SIG(write_block);
CUSTOM_COMMAND_SIG(write_character);
CUSTOM_COMMAND_SIG(write_explicit_enum_flags);
CUSTOM_COMMAND_SIG(write_explicit_enum_values);
CUSTOM_COMMAND_SIG(write_hack);
CUSTOM_COMMAND_SIG(write_note);
CUSTOM_COMMAND_SIG(write_todo);
@ -248,7 +236,7 @@ char *source_name;
int32_t source_name_len;
int32_t line_number;
};
static Command_Metadata fcoder_metacmd_table[228] = {
static Command_Metadata fcoder_metacmd_table[216] = {
{ PROC_LINKS(allow_mouse, 0), "allow_mouse", 11, "Shows the mouse and causes all mouse input to be processed normally.", 68, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 240 },
{ PROC_LINKS(auto_tab_line_at_cursor, 0), "auto_tab_line_at_cursor", 23, "Auto-indents the line on which the cursor sits.", 47, "w:\\4ed\\code\\4coder_auto_indent.cpp", 34, 722 },
{ PROC_LINKS(auto_tab_range, 0), "auto_tab_range", 14, "Auto-indents the range between the cursor and the mark.", 55, "w:\\4ed\\code\\4coder_auto_indent.cpp", 34, 733 },
@ -317,7 +305,6 @@ static Command_Metadata fcoder_metacmd_table[228] = {
{ PROC_LINKS(interactive_open_or_new, 0), "interactive_open_or_new", 23, "Interactively open a file out of the file system.", 49, "w:\\4ed\\code\\4coder_lists.cpp", 28, 822 },
{ PROC_LINKS(interactive_switch_buffer, 0), "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "w:\\4ed\\code\\4coder_lists.cpp", 28, 732 },
{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1538 },
{ PROC_LINKS(kill_rect, 0), "kill_rect", 9, "Delete characters in a rectangular region. Range testing is done by unwrapped-xy coordinates.", 93, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 26 },
{ PROC_LINKS(left_adjust_view, 0), "left_adjust_view", 16, "Sets the left size of the view near the x position of the cursor.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 133 },
{ PROC_LINKS(list_all_functions_all_buffers, 0), "list_all_functions_all_buffers", 30, "Creates a jump list of lines from all buffers that appear to define or declare functions.", 89, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 355 },
{ PROC_LINKS(list_all_functions_all_buffers_lister, 0), "list_all_functions_all_buffers_lister", 37, "Creates a lister of locations that look like function definitions and declarations all buffers.", 95, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 361 },
@ -352,12 +339,6 @@ static Command_Metadata fcoder_metacmd_table[228] = {
{ PROC_LINKS(lister__write_character__fixed_list, 0), "lister__write_character__fixed_list", 35, "A lister mode command that handles input for the fixed sure to kill list.", 73, "w:\\4ed\\code\\4coder_lists.cpp", 28, 253 },
{ PROC_LINKS(load_project, 0), "load_project", 12, "Looks for a project.4coder file in the current directory and tries to load it. Looks in parent directories until a project file is found or there are no more parents.", 167, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1083 },
{ PROC_LINKS(make_directory_query, 0), "make_directory_query", 20, "Queries the user for a name and creates a new directory with the given name.", 76, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1226 },
{ PROC_LINKS(miblo_decrement_basic, 0), "miblo_decrement_basic", 21, "Decrement an integer under the cursor by one.", 45, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 110 },
{ PROC_LINKS(miblo_decrement_time_stamp, 0), "miblo_decrement_time_stamp", 26, "Decrement a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 383 },
{ PROC_LINKS(miblo_decrement_time_stamp_minute, 0), "miblo_decrement_time_stamp_minute", 33, "Decrement a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 395 },
{ PROC_LINKS(miblo_increment_basic, 0), "miblo_increment_basic", 21, "Increment an integer under the cursor by one.", 45, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 94 },
{ PROC_LINKS(miblo_increment_time_stamp, 0), "miblo_increment_time_stamp", 26, "Increment a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 377 },
{ PROC_LINKS(miblo_increment_time_stamp_minute, 0), "miblo_increment_time_stamp_minute", 33, "Increment a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 389 },
{ PROC_LINKS(mouse_wheel_scroll, 0), "mouse_wheel_scroll", 18, "Reads the scroll wheel value from the mouse state and scrolls accordingly.", 74, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 226 },
{ PROC_LINKS(move_down, 0), "move_down", 9, "Moves the cursor down one line.", 31, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 290 },
{ PROC_LINKS(move_down_10, 0), "move_down_10", 12, "Moves the cursor down ten lines.", 32, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 302 },
@ -368,7 +349,6 @@ static Command_Metadata fcoder_metacmd_table[228] = {
{ PROC_LINKS(move_right, 0), "move_right", 10, "Moves the cursor one character to the right.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 349 },
{ PROC_LINKS(move_up, 0), "move_up", 7, "Moves the cursor up one line.", 29, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 284 },
{ PROC_LINKS(move_up_10, 0), "move_up_10", 10, "Moves the cursor up ten lines.", 30, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 296 },
{ PROC_LINKS(multi_line_edit, 0), "multi_line_edit", 15, "Begin multi-line mode. In multi-line mode characters are inserted at every line between the mark and cursor. All characters are inserted at the same character offset into the line. This mode uses line_char coordinates.", 221, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 117 },
{ PROC_LINKS(newline_or_goto_position_direct, 0), "newline_or_goto_position_direct", 31, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 101 },
{ PROC_LINKS(newline_or_goto_position_same_panel_direct, 0), "newline_or_goto_position_same_panel_direct", 42, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 116 },
{ PROC_LINKS(newline_or_goto_position_same_panel_sticky, 0), "newline_or_goto_position_same_panel_sticky", 42, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 588 },
@ -401,9 +381,7 @@ static Command_Metadata fcoder_metacmd_table[228] = {
{ PROC_LINKS(reload_themes, 0), "reload_themes", 13, "Loads all the theme files in the theme folder, replacing duplicates with the new theme data.", 92, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1577 },
{ PROC_LINKS(remap_interactive, 0), "remap_interactive", 17, "Switch to a named key binding map.", 34, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 290 },
{ PROC_LINKS(rename_file_query, 0), "rename_file_query", 17, "Queries the user for a new name and renames the file of the current buffer, altering the buffer's name too.", 107, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1184 },
{ PROC_LINKS(rename_parameter, 0), "rename_parameter", 16, "If the cursor is found to be on the name of a function parameter in the signature of a function definition, all occurences within the scope of the function will be replaced with a new provided string.", 200, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 383 },
{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1553 },
{ PROC_LINKS(replace_all_occurrences, 0), "replace_all_occurrences", 23, "Queries the user for two strings, and replaces all occurrences of the first string with the second string in all open buffers.", 126, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 778 },
{ PROC_LINKS(replace_in_range, 0), "replace_in_range", 16, "Queries the user for two strings, and replaces all occurences of the first string in the range between the cursor and the mark with the second string.", 150, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 883 },
{ PROC_LINKS(reverse_search, 0), "reverse_search", 14, "Begins an incremental search up through the current buffer for a user specified string.", 87, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 854 },
{ PROC_LINKS(reverse_search_identifier, 0), "reverse_search_identifier", 25, "Begins an incremental search up through the current buffer for the word or token under the cursor.", 98, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 872 },
@ -470,8 +448,6 @@ static Command_Metadata fcoder_metacmd_table[228] = {
{ PROC_LINKS(write_and_auto_tab, 0), "write_and_auto_tab", 18, "Inserts a character and auto-indents the line on which the cursor sits.", 71, "w:\\4ed\\code\\4coder_auto_indent.cpp", 34, 745 },
{ PROC_LINKS(write_block, 0), "write_block", 11, "At the cursor, insert a block comment.", 38, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 105 },
{ PROC_LINKS(write_character, 0), "write_character", 15, "Inserts whatever character was used to trigger this command.", 60, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 35 },
{ PROC_LINKS(write_explicit_enum_flags, 0), "write_explicit_enum_flags", 25, "If the cursor is found to be on the '{' of an enum definition, the values of the enum will be filled in to give each a unique power of 2 value, starting from 1. Existing values are overwritten.", 194, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 705 },
{ PROC_LINKS(write_explicit_enum_values, 0), "write_explicit_enum_values", 26, "If the cursor is found to be on the '{' of an enum definition, the values of the enum will be filled in sequentially starting from zero. Existing values are overwritten.", 170, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 699 },
{ PROC_LINKS(write_hack, 0), "write_hack", 10, "At the cursor, insert a '// HACK' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 93 },
{ PROC_LINKS(write_note, 0), "write_note", 10, "At the cursor, insert a '// NOTE' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 99 },
{ PROC_LINKS(write_todo, 0), "write_todo", 10, "At the cursor, insert a '// TODO' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 87 },
@ -546,164 +522,152 @@ static int32_t fcoder_metacmd_ID_interactive_open = 64;
static int32_t fcoder_metacmd_ID_interactive_open_or_new = 65;
static int32_t fcoder_metacmd_ID_interactive_switch_buffer = 66;
static int32_t fcoder_metacmd_ID_kill_buffer = 67;
static int32_t fcoder_metacmd_ID_kill_rect = 68;
static int32_t fcoder_metacmd_ID_left_adjust_view = 69;
static int32_t fcoder_metacmd_ID_list_all_functions_all_buffers = 70;
static int32_t fcoder_metacmd_ID_list_all_functions_all_buffers_lister = 71;
static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer = 72;
static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer_lister = 73;
static int32_t fcoder_metacmd_ID_list_all_locations = 74;
static int32_t fcoder_metacmd_ID_list_all_locations_case_insensitive = 75;
static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier = 76;
static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier_case_insensitive = 77;
static int32_t fcoder_metacmd_ID_list_all_locations_of_selection = 78;
static int32_t fcoder_metacmd_ID_list_all_locations_of_selection_case_insensitive = 79;
static int32_t fcoder_metacmd_ID_list_all_locations_of_type_definition = 80;
static int32_t fcoder_metacmd_ID_list_all_locations_of_type_definition_of_identifier = 81;
static int32_t fcoder_metacmd_ID_list_all_substring_locations = 82;
static int32_t fcoder_metacmd_ID_list_all_substring_locations_case_insensitive = 83;
static int32_t fcoder_metacmd_ID_lister__activate = 84;
static int32_t fcoder_metacmd_ID_lister__backspace_text_field = 85;
static int32_t fcoder_metacmd_ID_lister__backspace_text_field__default = 86;
static int32_t fcoder_metacmd_ID_lister__backspace_text_field__file_path = 87;
static int32_t fcoder_metacmd_ID_lister__mouse_press = 88;
static int32_t fcoder_metacmd_ID_lister__mouse_release = 89;
static int32_t fcoder_metacmd_ID_lister__move_down = 90;
static int32_t fcoder_metacmd_ID_lister__move_down__default = 91;
static int32_t fcoder_metacmd_ID_lister__move_up = 92;
static int32_t fcoder_metacmd_ID_lister__move_up__default = 93;
static int32_t fcoder_metacmd_ID_lister__quit = 94;
static int32_t fcoder_metacmd_ID_lister__repaint = 95;
static int32_t fcoder_metacmd_ID_lister__wheel_scroll = 96;
static int32_t fcoder_metacmd_ID_lister__write_character = 97;
static int32_t fcoder_metacmd_ID_lister__write_character__default = 98;
static int32_t fcoder_metacmd_ID_lister__write_character__file_path = 99;
static int32_t fcoder_metacmd_ID_lister__write_character__fixed_list = 100;
static int32_t fcoder_metacmd_ID_load_project = 101;
static int32_t fcoder_metacmd_ID_make_directory_query = 102;
static int32_t fcoder_metacmd_ID_miblo_decrement_basic = 103;
static int32_t fcoder_metacmd_ID_miblo_decrement_time_stamp = 104;
static int32_t fcoder_metacmd_ID_miblo_decrement_time_stamp_minute = 105;
static int32_t fcoder_metacmd_ID_miblo_increment_basic = 106;
static int32_t fcoder_metacmd_ID_miblo_increment_time_stamp = 107;
static int32_t fcoder_metacmd_ID_miblo_increment_time_stamp_minute = 108;
static int32_t fcoder_metacmd_ID_mouse_wheel_scroll = 109;
static int32_t fcoder_metacmd_ID_move_down = 110;
static int32_t fcoder_metacmd_ID_move_down_10 = 111;
static int32_t fcoder_metacmd_ID_move_down_textual = 112;
static int32_t fcoder_metacmd_ID_move_left = 113;
static int32_t fcoder_metacmd_ID_move_line_down = 114;
static int32_t fcoder_metacmd_ID_move_line_up = 115;
static int32_t fcoder_metacmd_ID_move_right = 116;
static int32_t fcoder_metacmd_ID_move_up = 117;
static int32_t fcoder_metacmd_ID_move_up_10 = 118;
static int32_t fcoder_metacmd_ID_multi_line_edit = 119;
static int32_t fcoder_metacmd_ID_newline_or_goto_position_direct = 120;
static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_direct = 121;
static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_sticky = 122;
static int32_t fcoder_metacmd_ID_newline_or_goto_position_sticky = 123;
static int32_t fcoder_metacmd_ID_open_all_code = 124;
static int32_t fcoder_metacmd_ID_open_all_code_recursive = 125;
static int32_t fcoder_metacmd_ID_open_color_tweaker = 126;
static int32_t fcoder_metacmd_ID_open_file_in_quotes = 127;
static int32_t fcoder_metacmd_ID_open_in_other = 128;
static int32_t fcoder_metacmd_ID_open_long_braces = 129;
static int32_t fcoder_metacmd_ID_open_long_braces_break = 130;
static int32_t fcoder_metacmd_ID_open_long_braces_semicolon = 131;
static int32_t fcoder_metacmd_ID_open_matching_file_cpp = 132;
static int32_t fcoder_metacmd_ID_open_panel_hsplit = 133;
static int32_t fcoder_metacmd_ID_open_panel_vsplit = 134;
static int32_t fcoder_metacmd_ID_page_down = 135;
static int32_t fcoder_metacmd_ID_page_up = 136;
static int32_t fcoder_metacmd_ID_paste = 137;
static int32_t fcoder_metacmd_ID_paste_and_indent = 138;
static int32_t fcoder_metacmd_ID_paste_next = 139;
static int32_t fcoder_metacmd_ID_paste_next_and_indent = 140;
static int32_t fcoder_metacmd_ID_place_in_scope = 141;
static int32_t fcoder_metacmd_ID_project_command_lister = 142;
static int32_t fcoder_metacmd_ID_project_fkey_command = 143;
static int32_t fcoder_metacmd_ID_project_go_to_root_directory = 144;
static int32_t fcoder_metacmd_ID_query_replace = 145;
static int32_t fcoder_metacmd_ID_query_replace_identifier = 146;
static int32_t fcoder_metacmd_ID_query_replace_selection = 147;
static int32_t fcoder_metacmd_ID_redo = 148;
static int32_t fcoder_metacmd_ID_reload_themes = 149;
static int32_t fcoder_metacmd_ID_remap_interactive = 150;
static int32_t fcoder_metacmd_ID_rename_file_query = 151;
static int32_t fcoder_metacmd_ID_rename_parameter = 152;
static int32_t fcoder_metacmd_ID_reopen = 153;
static int32_t fcoder_metacmd_ID_replace_all_occurrences = 154;
static int32_t fcoder_metacmd_ID_replace_in_range = 155;
static int32_t fcoder_metacmd_ID_reverse_search = 156;
static int32_t fcoder_metacmd_ID_reverse_search_identifier = 157;
static int32_t fcoder_metacmd_ID_save = 158;
static int32_t fcoder_metacmd_ID_save_all_dirty_buffers = 159;
static int32_t fcoder_metacmd_ID_save_to_query = 160;
static int32_t fcoder_metacmd_ID_scope_absorb_down = 161;
static int32_t fcoder_metacmd_ID_search = 162;
static int32_t fcoder_metacmd_ID_search_identifier = 163;
static int32_t fcoder_metacmd_ID_seek_alphanumeric_left = 164;
static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_left = 165;
static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_right = 166;
static int32_t fcoder_metacmd_ID_seek_alphanumeric_right = 167;
static int32_t fcoder_metacmd_ID_seek_beginning_of_line = 168;
static int32_t fcoder_metacmd_ID_seek_beginning_of_textual_line = 169;
static int32_t fcoder_metacmd_ID_seek_end_of_line = 170;
static int32_t fcoder_metacmd_ID_seek_end_of_textual_line = 171;
static int32_t fcoder_metacmd_ID_seek_token_left = 172;
static int32_t fcoder_metacmd_ID_seek_token_right = 173;
static int32_t fcoder_metacmd_ID_seek_white_or_token_left = 174;
static int32_t fcoder_metacmd_ID_seek_white_or_token_right = 175;
static int32_t fcoder_metacmd_ID_seek_whitespace_down = 176;
static int32_t fcoder_metacmd_ID_seek_whitespace_down_end_line = 177;
static int32_t fcoder_metacmd_ID_seek_whitespace_left = 178;
static int32_t fcoder_metacmd_ID_seek_whitespace_right = 179;
static int32_t fcoder_metacmd_ID_seek_whitespace_up = 180;
static int32_t fcoder_metacmd_ID_seek_whitespace_up_end_line = 181;
static int32_t fcoder_metacmd_ID_select_all = 182;
static int32_t fcoder_metacmd_ID_select_next_scope_absolute = 183;
static int32_t fcoder_metacmd_ID_select_prev_scope_absolute = 184;
static int32_t fcoder_metacmd_ID_select_surrounding_scope = 185;
static int32_t fcoder_metacmd_ID_set_bindings_choose = 186;
static int32_t fcoder_metacmd_ID_set_bindings_default = 187;
static int32_t fcoder_metacmd_ID_set_bindings_mac_default = 188;
static int32_t fcoder_metacmd_ID_set_mark = 189;
static int32_t fcoder_metacmd_ID_set_mode_to_notepad_like = 190;
static int32_t fcoder_metacmd_ID_set_mode_to_original = 191;
static int32_t fcoder_metacmd_ID_setup_build_bat = 192;
static int32_t fcoder_metacmd_ID_setup_build_bat_and_sh = 193;
static int32_t fcoder_metacmd_ID_setup_build_sh = 194;
static int32_t fcoder_metacmd_ID_setup_new_project = 195;
static int32_t fcoder_metacmd_ID_show_filebar = 196;
static int32_t fcoder_metacmd_ID_show_scrollbar = 197;
static int32_t fcoder_metacmd_ID_snipe_token_or_word = 198;
static int32_t fcoder_metacmd_ID_snipe_token_or_word_right = 199;
static int32_t fcoder_metacmd_ID_snippet_lister = 200;
static int32_t fcoder_metacmd_ID_suppress_mouse = 201;
static int32_t fcoder_metacmd_ID_swap_buffers_between_panels = 202;
static int32_t fcoder_metacmd_ID_to_lowercase = 203;
static int32_t fcoder_metacmd_ID_to_uppercase = 204;
static int32_t fcoder_metacmd_ID_toggle_filebar = 205;
static int32_t fcoder_metacmd_ID_toggle_fullscreen = 206;
static int32_t fcoder_metacmd_ID_toggle_highlight_enclosing_scopes = 207;
static int32_t fcoder_metacmd_ID_toggle_highlight_line_at_cursor = 208;
static int32_t fcoder_metacmd_ID_toggle_line_wrap = 209;
static int32_t fcoder_metacmd_ID_toggle_mouse = 210;
static int32_t fcoder_metacmd_ID_toggle_paren_matching_helper = 211;
static int32_t fcoder_metacmd_ID_toggle_show_whitespace = 212;
static int32_t fcoder_metacmd_ID_toggle_virtual_whitespace = 213;
static int32_t fcoder_metacmd_ID_undo = 214;
static int32_t fcoder_metacmd_ID_view_buffer_other_panel = 215;
static int32_t fcoder_metacmd_ID_view_jump_list_with_lister = 216;
static int32_t fcoder_metacmd_ID_word_complete = 217;
static int32_t fcoder_metacmd_ID_write_and_auto_tab = 218;
static int32_t fcoder_metacmd_ID_write_block = 219;
static int32_t fcoder_metacmd_ID_write_character = 220;
static int32_t fcoder_metacmd_ID_write_explicit_enum_flags = 221;
static int32_t fcoder_metacmd_ID_write_explicit_enum_values = 222;
static int32_t fcoder_metacmd_ID_write_hack = 223;
static int32_t fcoder_metacmd_ID_write_note = 224;
static int32_t fcoder_metacmd_ID_write_todo = 225;
static int32_t fcoder_metacmd_ID_write_underscore = 226;
static int32_t fcoder_metacmd_ID_write_zero_struct = 227;
static int32_t fcoder_metacmd_ID_left_adjust_view = 68;
static int32_t fcoder_metacmd_ID_list_all_functions_all_buffers = 69;
static int32_t fcoder_metacmd_ID_list_all_functions_all_buffers_lister = 70;
static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer = 71;
static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer_lister = 72;
static int32_t fcoder_metacmd_ID_list_all_locations = 73;
static int32_t fcoder_metacmd_ID_list_all_locations_case_insensitive = 74;
static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier = 75;
static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier_case_insensitive = 76;
static int32_t fcoder_metacmd_ID_list_all_locations_of_selection = 77;
static int32_t fcoder_metacmd_ID_list_all_locations_of_selection_case_insensitive = 78;
static int32_t fcoder_metacmd_ID_list_all_locations_of_type_definition = 79;
static int32_t fcoder_metacmd_ID_list_all_locations_of_type_definition_of_identifier = 80;
static int32_t fcoder_metacmd_ID_list_all_substring_locations = 81;
static int32_t fcoder_metacmd_ID_list_all_substring_locations_case_insensitive = 82;
static int32_t fcoder_metacmd_ID_lister__activate = 83;
static int32_t fcoder_metacmd_ID_lister__backspace_text_field = 84;
static int32_t fcoder_metacmd_ID_lister__backspace_text_field__default = 85;
static int32_t fcoder_metacmd_ID_lister__backspace_text_field__file_path = 86;
static int32_t fcoder_metacmd_ID_lister__mouse_press = 87;
static int32_t fcoder_metacmd_ID_lister__mouse_release = 88;
static int32_t fcoder_metacmd_ID_lister__move_down = 89;
static int32_t fcoder_metacmd_ID_lister__move_down__default = 90;
static int32_t fcoder_metacmd_ID_lister__move_up = 91;
static int32_t fcoder_metacmd_ID_lister__move_up__default = 92;
static int32_t fcoder_metacmd_ID_lister__quit = 93;
static int32_t fcoder_metacmd_ID_lister__repaint = 94;
static int32_t fcoder_metacmd_ID_lister__wheel_scroll = 95;
static int32_t fcoder_metacmd_ID_lister__write_character = 96;
static int32_t fcoder_metacmd_ID_lister__write_character__default = 97;
static int32_t fcoder_metacmd_ID_lister__write_character__file_path = 98;
static int32_t fcoder_metacmd_ID_lister__write_character__fixed_list = 99;
static int32_t fcoder_metacmd_ID_load_project = 100;
static int32_t fcoder_metacmd_ID_make_directory_query = 101;
static int32_t fcoder_metacmd_ID_mouse_wheel_scroll = 102;
static int32_t fcoder_metacmd_ID_move_down = 103;
static int32_t fcoder_metacmd_ID_move_down_10 = 104;
static int32_t fcoder_metacmd_ID_move_down_textual = 105;
static int32_t fcoder_metacmd_ID_move_left = 106;
static int32_t fcoder_metacmd_ID_move_line_down = 107;
static int32_t fcoder_metacmd_ID_move_line_up = 108;
static int32_t fcoder_metacmd_ID_move_right = 109;
static int32_t fcoder_metacmd_ID_move_up = 110;
static int32_t fcoder_metacmd_ID_move_up_10 = 111;
static int32_t fcoder_metacmd_ID_newline_or_goto_position_direct = 112;
static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_direct = 113;
static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel_sticky = 114;
static int32_t fcoder_metacmd_ID_newline_or_goto_position_sticky = 115;
static int32_t fcoder_metacmd_ID_open_all_code = 116;
static int32_t fcoder_metacmd_ID_open_all_code_recursive = 117;
static int32_t fcoder_metacmd_ID_open_color_tweaker = 118;
static int32_t fcoder_metacmd_ID_open_file_in_quotes = 119;
static int32_t fcoder_metacmd_ID_open_in_other = 120;
static int32_t fcoder_metacmd_ID_open_long_braces = 121;
static int32_t fcoder_metacmd_ID_open_long_braces_break = 122;
static int32_t fcoder_metacmd_ID_open_long_braces_semicolon = 123;
static int32_t fcoder_metacmd_ID_open_matching_file_cpp = 124;
static int32_t fcoder_metacmd_ID_open_panel_hsplit = 125;
static int32_t fcoder_metacmd_ID_open_panel_vsplit = 126;
static int32_t fcoder_metacmd_ID_page_down = 127;
static int32_t fcoder_metacmd_ID_page_up = 128;
static int32_t fcoder_metacmd_ID_paste = 129;
static int32_t fcoder_metacmd_ID_paste_and_indent = 130;
static int32_t fcoder_metacmd_ID_paste_next = 131;
static int32_t fcoder_metacmd_ID_paste_next_and_indent = 132;
static int32_t fcoder_metacmd_ID_place_in_scope = 133;
static int32_t fcoder_metacmd_ID_project_command_lister = 134;
static int32_t fcoder_metacmd_ID_project_fkey_command = 135;
static int32_t fcoder_metacmd_ID_project_go_to_root_directory = 136;
static int32_t fcoder_metacmd_ID_query_replace = 137;
static int32_t fcoder_metacmd_ID_query_replace_identifier = 138;
static int32_t fcoder_metacmd_ID_query_replace_selection = 139;
static int32_t fcoder_metacmd_ID_redo = 140;
static int32_t fcoder_metacmd_ID_reload_themes = 141;
static int32_t fcoder_metacmd_ID_remap_interactive = 142;
static int32_t fcoder_metacmd_ID_rename_file_query = 143;
static int32_t fcoder_metacmd_ID_reopen = 144;
static int32_t fcoder_metacmd_ID_replace_in_range = 145;
static int32_t fcoder_metacmd_ID_reverse_search = 146;
static int32_t fcoder_metacmd_ID_reverse_search_identifier = 147;
static int32_t fcoder_metacmd_ID_save = 148;
static int32_t fcoder_metacmd_ID_save_all_dirty_buffers = 149;
static int32_t fcoder_metacmd_ID_save_to_query = 150;
static int32_t fcoder_metacmd_ID_scope_absorb_down = 151;
static int32_t fcoder_metacmd_ID_search = 152;
static int32_t fcoder_metacmd_ID_search_identifier = 153;
static int32_t fcoder_metacmd_ID_seek_alphanumeric_left = 154;
static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_left = 155;
static int32_t fcoder_metacmd_ID_seek_alphanumeric_or_camel_right = 156;
static int32_t fcoder_metacmd_ID_seek_alphanumeric_right = 157;
static int32_t fcoder_metacmd_ID_seek_beginning_of_line = 158;
static int32_t fcoder_metacmd_ID_seek_beginning_of_textual_line = 159;
static int32_t fcoder_metacmd_ID_seek_end_of_line = 160;
static int32_t fcoder_metacmd_ID_seek_end_of_textual_line = 161;
static int32_t fcoder_metacmd_ID_seek_token_left = 162;
static int32_t fcoder_metacmd_ID_seek_token_right = 163;
static int32_t fcoder_metacmd_ID_seek_white_or_token_left = 164;
static int32_t fcoder_metacmd_ID_seek_white_or_token_right = 165;
static int32_t fcoder_metacmd_ID_seek_whitespace_down = 166;
static int32_t fcoder_metacmd_ID_seek_whitespace_down_end_line = 167;
static int32_t fcoder_metacmd_ID_seek_whitespace_left = 168;
static int32_t fcoder_metacmd_ID_seek_whitespace_right = 169;
static int32_t fcoder_metacmd_ID_seek_whitespace_up = 170;
static int32_t fcoder_metacmd_ID_seek_whitespace_up_end_line = 171;
static int32_t fcoder_metacmd_ID_select_all = 172;
static int32_t fcoder_metacmd_ID_select_next_scope_absolute = 173;
static int32_t fcoder_metacmd_ID_select_prev_scope_absolute = 174;
static int32_t fcoder_metacmd_ID_select_surrounding_scope = 175;
static int32_t fcoder_metacmd_ID_set_bindings_choose = 176;
static int32_t fcoder_metacmd_ID_set_bindings_default = 177;
static int32_t fcoder_metacmd_ID_set_bindings_mac_default = 178;
static int32_t fcoder_metacmd_ID_set_mark = 179;
static int32_t fcoder_metacmd_ID_set_mode_to_notepad_like = 180;
static int32_t fcoder_metacmd_ID_set_mode_to_original = 181;
static int32_t fcoder_metacmd_ID_setup_build_bat = 182;
static int32_t fcoder_metacmd_ID_setup_build_bat_and_sh = 183;
static int32_t fcoder_metacmd_ID_setup_build_sh = 184;
static int32_t fcoder_metacmd_ID_setup_new_project = 185;
static int32_t fcoder_metacmd_ID_show_filebar = 186;
static int32_t fcoder_metacmd_ID_show_scrollbar = 187;
static int32_t fcoder_metacmd_ID_snipe_token_or_word = 188;
static int32_t fcoder_metacmd_ID_snipe_token_or_word_right = 189;
static int32_t fcoder_metacmd_ID_snippet_lister = 190;
static int32_t fcoder_metacmd_ID_suppress_mouse = 191;
static int32_t fcoder_metacmd_ID_swap_buffers_between_panels = 192;
static int32_t fcoder_metacmd_ID_to_lowercase = 193;
static int32_t fcoder_metacmd_ID_to_uppercase = 194;
static int32_t fcoder_metacmd_ID_toggle_filebar = 195;
static int32_t fcoder_metacmd_ID_toggle_fullscreen = 196;
static int32_t fcoder_metacmd_ID_toggle_highlight_enclosing_scopes = 197;
static int32_t fcoder_metacmd_ID_toggle_highlight_line_at_cursor = 198;
static int32_t fcoder_metacmd_ID_toggle_line_wrap = 199;
static int32_t fcoder_metacmd_ID_toggle_mouse = 200;
static int32_t fcoder_metacmd_ID_toggle_paren_matching_helper = 201;
static int32_t fcoder_metacmd_ID_toggle_show_whitespace = 202;
static int32_t fcoder_metacmd_ID_toggle_virtual_whitespace = 203;
static int32_t fcoder_metacmd_ID_undo = 204;
static int32_t fcoder_metacmd_ID_view_buffer_other_panel = 205;
static int32_t fcoder_metacmd_ID_view_jump_list_with_lister = 206;
static int32_t fcoder_metacmd_ID_word_complete = 207;
static int32_t fcoder_metacmd_ID_write_and_auto_tab = 208;
static int32_t fcoder_metacmd_ID_write_block = 209;
static int32_t fcoder_metacmd_ID_write_character = 210;
static int32_t fcoder_metacmd_ID_write_hack = 211;
static int32_t fcoder_metacmd_ID_write_note = 212;
static int32_t fcoder_metacmd_ID_write_todo = 213;
static int32_t fcoder_metacmd_ID_write_underscore = 214;
static int32_t fcoder_metacmd_ID_write_zero_struct = 215;
#endif

View File

@ -1,92 +1,92 @@
enum Style_Tag{
Stag_Bar,
Stag_Bar_Active,
Stag_Base,
Stag_Pop1,
Stag_Pop2,
Stag_Back,
Stag_Margin,
Stag_Margin_Hover,
Stag_Margin_Active,
Stag_List_Item,
Stag_List_Item_Hover,
Stag_List_Item_Active,
Stag_Cursor,
Stag_At_Cursor,
Stag_Highlight_Cursor_Line,
Stag_Highlight,
Stag_At_Highlight,
Stag_Mark,
Stag_Default,
Stag_Comment,
Stag_Keyword,
Stag_Str_Constant,
Stag_Char_Constant,
Stag_Int_Constant,
Stag_Float_Constant,
Stag_Bool_Constant,
Stag_Preproc,
Stag_Include,
Stag_Special_Character,
Stag_Ghost_Character,
Stag_Highlight_Junk,
Stag_Highlight_White,
Stag_Paste,
Stag_Undo,
Stag_Next_Undo,
Stag_Back_Cycle_1,
Stag_Back_Cycle_2,
Stag_Back_Cycle_3,
Stag_Back_Cycle_4,
Stag_Text_Cycle_1,
Stag_Text_Cycle_2,
Stag_Text_Cycle_3,
Stag_Text_Cycle_4,
Stag_COUNT
Stag_Bar = 0,
Stag_Bar_Active = 1,
Stag_Base = 2,
Stag_Pop1 = 3,
Stag_Pop2 = 4,
Stag_Back = 5,
Stag_Margin = 6,
Stag_Margin_Hover = 7,
Stag_Margin_Active = 8,
Stag_List_Item = 9,
Stag_List_Item_Hover = 10,
Stag_List_Item_Active = 11,
Stag_Cursor = 12,
Stag_At_Cursor = 13,
Stag_Highlight_Cursor_Line = 14,
Stag_Highlight = 15,
Stag_At_Highlight = 16,
Stag_Mark = 17,
Stag_Default = 18,
Stag_Comment = 19,
Stag_Keyword = 20,
Stag_Str_Constant = 21,
Stag_Char_Constant = 22,
Stag_Int_Constant = 23,
Stag_Float_Constant = 24,
Stag_Bool_Constant = 25,
Stag_Preproc = 26,
Stag_Include = 27,
Stag_Special_Character = 28,
Stag_Ghost_Character = 29,
Stag_Highlight_Junk = 30,
Stag_Highlight_White = 31,
Stag_Paste = 32,
Stag_Undo = 33,
Stag_Next_Undo = 34,
Stag_Back_Cycle_1 = 35,
Stag_Back_Cycle_2 = 36,
Stag_Back_Cycle_3 = 37,
Stag_Back_Cycle_4 = 38,
Stag_Text_Cycle_1 = 39,
Stag_Text_Cycle_2 = 40,
Stag_Text_Cycle_3 = 41,
Stag_Text_Cycle_4 = 42,
Stag_COUNT = 43
};
static char *style_tag_names[] = {
"Bar",
"Bar_Active",
"Base",
"Pop1",
"Pop2",
"Back",
"Margin",
"Margin_Hover",
"Margin_Active",
"List_Item",
"List_Item_Hover",
"List_Item_Active",
"Cursor",
"At_Cursor",
"Highlight_Cursor_Line",
"Highlight",
"At_Highlight",
"Mark",
"Default",
"Comment",
"Keyword",
"Str_Constant",
"Char_Constant",
"Int_Constant",
"Float_Constant",
"Bool_Constant",
"Preproc",
"Include",
"Special_Character",
"Ghost_Character",
"Highlight_Junk",
"Highlight_White",
"Paste",
"Undo",
"Next_Undo",
"Back_Cycle_1",
"Back_Cycle_2",
"Back_Cycle_3",
"Back_Cycle_4",
"Text_Cycle_1",
"Text_Cycle_2",
"Text_Cycle_3",
"Text_Cycle_4",
"Bar",
"Bar_Active",
"Base",
"Pop1",
"Pop2",
"Back",
"Margin",
"Margin_Hover",
"Margin_Active",
"List_Item",
"List_Item_Hover",
"List_Item_Active",
"Cursor",
"At_Cursor",
"Highlight_Cursor_Line",
"Highlight",
"At_Highlight",
"Mark",
"Default",
"Comment",
"Keyword",
"Str_Constant",
"Char_Constant",
"Int_Constant",
"Float_Constant",
"Bool_Constant",
"Preproc",
"Include",
"Special_Character",
"Ghost_Character",
"Highlight_Junk",
"Highlight_White",
"Paste",
"Undo",
"Next_Undo",
"Back_Cycle_1",
"Back_Cycle_2",
"Back_Cycle_3",
"Back_Cycle_4",
"Text_Cycle_1",
"Text_Cycle_2",
"Text_Cycle_3",
"Text_Cycle_4",
};

99
4ed.cpp
View File

@ -559,57 +559,56 @@ setup_command_table(void){
internal void
app_hardcode_default_style(Models *models){
Style *styles = models->styles.styles;
Style *style = styles + 1;
Style_Library *styles = &models->styles;
styles->count = 2;
styles->max = ArrayCount(models->styles.styles);
/////////////////
style_set_name(style, make_lit_string("4coder"));
style->theme.colors[Stag_Back] = 0xFF0C0C0C;
style->theme.colors[Stag_Margin] = 0xFF181818;
style->theme.colors[Stag_Margin_Hover] = 0xFF252525;
style->theme.colors[Stag_Margin_Active] = 0xFF323232;
style->theme.colors[Stag_List_Item] = style->theme.colors[Stag_Margin];
style->theme.colors[Stag_List_Item_Hover] = style->theme.colors[Stag_Margin_Hover];
style->theme.colors[Stag_List_Item_Active] = style->theme.colors[Stag_Margin_Active];
style->theme.colors[Stag_Cursor] = 0xFF00EE00;
style->theme.colors[Stag_Highlight] = 0xFFDDEE00;
style->theme.colors[Stag_Mark] = 0xFF494949;
style->theme.colors[Stag_Default] = 0xFF90B080;
style->theme.colors[Stag_At_Cursor] = style->theme.colors[Stag_Back];
style->theme.colors[Stag_Highlight_Cursor_Line] = 0xFF1E1E1E;
style->theme.colors[Stag_At_Highlight] = 0xFFFF44DD;
style->theme.colors[Stag_Comment] = 0xFF2090F0;
style->theme.colors[Stag_Keyword] = 0xFFD08F20;
style->theme.colors[Stag_Str_Constant] = 0xFF50FF30;
style->theme.colors[Stag_Char_Constant] = style->theme.colors[Stag_Str_Constant];
style->theme.colors[Stag_Int_Constant] = style->theme.colors[Stag_Str_Constant];
style->theme.colors[Stag_Float_Constant] = style->theme.colors[Stag_Str_Constant];
style->theme.colors[Stag_Bool_Constant] = style->theme.colors[Stag_Str_Constant];
style->theme.colors[Stag_Include] = style->theme.colors[Stag_Str_Constant];
style->theme.colors[Stag_Preproc] = style->theme.colors[Stag_Default];
style->theme.colors[Stag_Special_Character] = 0xFFFF0000;
style->theme.colors[Stag_Ghost_Character] = color_blend(style->theme.colors[Stag_Default],
0.5f,
style->theme.colors[Stag_Back]);
style->theme.colors[Stag_Paste] = 0xFFDDEE00;
style->theme.colors[Stag_Undo] = 0xFF00DDEE;
style->theme.colors[Stag_Highlight_Junk] = 0xff3a0000;
style->theme.colors[Stag_Highlight_White] = 0xff003a3a;
style->theme.colors[Stag_Bar] = 0xFF888888;
style->theme.colors[Stag_Bar_Active] = 0xFF666666;
style->theme.colors[Stag_Base] = 0xFF000000;
style->theme.colors[Stag_Pop1] = 0xFF3C57DC;
style->theme.colors[Stag_Pop2] = 0xFFFF0000;
++style;
/////////////////
models->styles.count = (i32)(style - styles);
models->styles.max = ArrayCount(models->styles.styles);
style_copy(&models->styles.styles[0], models->styles.styles + 1);
Style *style = styles->styles;
for (i32 i = 0; i < 2; i += 1, style += 1){
style->name = make_fixed_width_string(style->name_);
copy(&style->name, make_lit_string("4coder"));
terminate_with_null(&style->name);
style->theme.colors[Stag_Back] = 0xFF0C0C0C;
style->theme.colors[Stag_Margin] = 0xFF181818;
style->theme.colors[Stag_Margin_Hover] = 0xFF252525;
style->theme.colors[Stag_Margin_Active] = 0xFF323232;
style->theme.colors[Stag_List_Item] = style->theme.colors[Stag_Margin];
style->theme.colors[Stag_List_Item_Hover] = style->theme.colors[Stag_Margin_Hover];
style->theme.colors[Stag_List_Item_Active] = style->theme.colors[Stag_Margin_Active];
style->theme.colors[Stag_Cursor] = 0xFF00EE00;
style->theme.colors[Stag_Highlight] = 0xFFDDEE00;
style->theme.colors[Stag_Mark] = 0xFF494949;
style->theme.colors[Stag_Default] = 0xFF90B080;
style->theme.colors[Stag_At_Cursor] = style->theme.colors[Stag_Back];
style->theme.colors[Stag_Highlight_Cursor_Line] = 0xFF1E1E1E;
style->theme.colors[Stag_At_Highlight] = 0xFFFF44DD;
style->theme.colors[Stag_Comment] = 0xFF2090F0;
style->theme.colors[Stag_Keyword] = 0xFFD08F20;
style->theme.colors[Stag_Str_Constant] = 0xFF50FF30;
style->theme.colors[Stag_Char_Constant] = style->theme.colors[Stag_Str_Constant];
style->theme.colors[Stag_Int_Constant] = style->theme.colors[Stag_Str_Constant];
style->theme.colors[Stag_Float_Constant] = style->theme.colors[Stag_Str_Constant];
style->theme.colors[Stag_Bool_Constant] = style->theme.colors[Stag_Str_Constant];
style->theme.colors[Stag_Include] = style->theme.colors[Stag_Str_Constant];
style->theme.colors[Stag_Preproc] = style->theme.colors[Stag_Default];
style->theme.colors[Stag_Special_Character] = 0xFFFF0000;
style->theme.colors[Stag_Ghost_Character] = color_blend(style->theme.colors[Stag_Default],
0.5f,
style->theme.colors[Stag_Back]);
style->theme.colors[Stag_Paste] = 0xFFDDEE00;
style->theme.colors[Stag_Undo] = 0xFF00DDEE;
style->theme.colors[Stag_Highlight_Junk] = 0xff3a0000;
style->theme.colors[Stag_Highlight_White] = 0xff003a3a;
style->theme.colors[Stag_Bar] = 0xFF888888;
style->theme.colors[Stag_Bar_Active] = 0xFF666666;
style->theme.colors[Stag_Base] = 0xFF000000;
style->theme.colors[Stag_Pop1] = 0xFF3C57DC;
style->theme.colors[Stag_Pop2] = 0xFFFF0000;
}
}
internal void

View File

@ -3217,12 +3217,14 @@ DOC(This call creates a new theme. If the given name is already the name of a s
}
}
if (destination_style != 0 && library->count < library->max){
if (destination_style == 0 && library->count < library->max){
destination_style = &library->styles[library->count++];
style_set_name(destination_style, make_string(name, len));
destination_style->name = make_fixed_width_string(destination_style->name_);
copy(&destination_style->name, make_string(name, len));
terminate_with_null(&destination_style->name);
}
memcpy(&style->theme, theme, sizeof(*theme));
memcpy(&destination_style->theme, theme, sizeof(*theme));
}
API_EXPORT void
@ -3240,7 +3242,8 @@ DOC(This call changes 4coder's color pallet to one of the built in themes.)
Style *s = styles->styles + 1;
for (i32 i = 1; i < count; ++i, ++s){
if (match(s->name, theme_name)){
style_copy(&styles->styles[0], s);
styles->styles[0] = *s;
styles->styles[0].name.str = styles->styles[0].name_;
break;
}
}
@ -3257,7 +3260,8 @@ DOC_RETURN(Returns non-zero on success and zero on failure. This call fails whe
Style_Library *styles = &models->styles;
i32 count = styles->count;
if (0 <= index && index < count){
style_copy(&styles->styles[0], &styles->styles[index]);
styles->styles[0] = styles->styles[index];
styles->styles[0].name.str = styles->styles[0].name_;
return(true);
}
return(false);
@ -3531,7 +3535,6 @@ DOC_SEE(get_available_font_count)
*/
{
Models *models = (Models*)app->cmd_context;
Available_Font available = {};
Font_Loadable_Description description = {};
models->system->font.get_loadable(index, &description);
@ -3539,7 +3542,6 @@ DOC_SEE(get_available_font_count)
memcpy(available.name, description.display_name, description.display_len);
available.in_local_font_folder = description.stub.in_font_folder;
}
return(available);
}
@ -3555,9 +3557,8 @@ DOC_SEE(Theme_Color)
Style *style = &models->styles.styles[0];
Theme_Color *theme_color = colors;
for (i32 i = 0; i < count; ++i, ++theme_color){
int_color *color = &style->theme.colors[theme_color->tag];
if (color != 0){
*color = theme_color->color;
if (theme_color->tag < Stag_COUNT){
style->theme.colors[theme_color->tag] = theme_color->color;
}
}
}

View File

@ -1,103 +0,0 @@
#if 0
struct Interactive_Style{
u32 bar_color;
u32 bar_active_color;
u32 base_color;
u32 pop1_color;
u32 pop2_color;
};
struct Style_Main_Data{
u32 back_color;
u32 margin_color;
u32 margin_hover_color;
u32 margin_active_color;
u32 list_item_color;
u32 list_item_hover_color;
u32 list_item_active_color;
u32 cursor_color;
u32 at_cursor_color;
u32 highlight_cursor_line_color;
u32 highlight_color;
u32 at_highlight_color;
u32 mark_color;
u32 default_color;
u32 comment_color;
u32 keyword_color;
u32 str_constant_color;
u32 char_constant_color;
u32 int_constant_color;
u32 float_constant_color;
u32 bool_constant_color;
u32 preproc_color;
u32 include_color;
u32 special_character_color;
u32 ghost_character_color;
u32 highlight_junk_color;
u32 highlight_white_color;
u32 paste_color;
u32 undo_color;
u32 next_undo_color;
u32 back_cycle_1_color;
u32 back_cycle_2_color;
u32 back_cycle_3_color;
u32 back_cycle_4_color;
u32 text_cycle_1_color;
u32 text_cycle_2_color;
u32 text_cycle_3_color;
u32 text_cycle_4_color;
Interactive_Style file_info_style;
};
inline u32*
style_index_by_tag(Style_Main_Data *s, u32 tag){
u32 *result = 0;
switch (tag){
case Stag_Bar: result = &s->file_info_style.bar_color; break;
case Stag_Bar_Active: result = &s->file_info_style.bar_active_color; break;
case Stag_Base: result = &s->file_info_style.base_color; break;
case Stag_Pop1: result = &s->file_info_style.pop1_color; break;
case Stag_Pop2: result = &s->file_info_style.pop2_color; break;
case Stag_Back: result = &s->back_color; break;
case Stag_Margin: result = &s->margin_color; break;
case Stag_Margin_Hover: result = &s->margin_hover_color; break;
case Stag_Margin_Active: result = &s->margin_active_color; break;
case Stag_List_Item: result = &s->list_item_color; break;
case Stag_List_Item_Hover: result = &s->list_item_hover_color; break;
case Stag_List_Item_Active: result = &s->list_item_active_color; break;
case Stag_Cursor: result = &s->cursor_color; break;
case Stag_At_Cursor: result = &s->at_cursor_color; break;
case Stag_Highlight_Cursor_Line: result = &s->highlight_cursor_line_color; break;
case Stag_Highlight: result = &s->highlight_color; break;
case Stag_At_Highlight: result = &s->at_highlight_color; break;
case Stag_Mark: result = &s->mark_color; break;
case Stag_Default: result = &s->default_color; break;
case Stag_Comment: result = &s->comment_color; break;
case Stag_Keyword: result = &s->keyword_color; break;
case Stag_Str_Constant: result = &s->str_constant_color; break;
case Stag_Char_Constant: result = &s->char_constant_color; break;
case Stag_Int_Constant: result = &s->int_constant_color; break;
case Stag_Float_Constant: result = &s->float_constant_color; break;
case Stag_Bool_Constant: result = &s->bool_constant_color; break;
case Stag_Preproc: result = &s->preproc_color; break;
case Stag_Include: result = &s->include_color; break;
case Stag_Special_Character: result = &s->special_character_color; break;
case Stag_Ghost_Character: result = &s->ghost_character_color; break;
case Stag_Highlight_Junk: result = &s->highlight_junk_color; break;
case Stag_Highlight_White: result = &s->highlight_white_color; break;
case Stag_Paste: result = &s->paste_color; break;
case Stag_Undo: result = &s->undo_color; break;
case Stag_Next_Undo: result = &s->next_undo_color; break;
case Stag_Back_Cycle_1: result = &s->back_cycle_1_color; break;
case Stag_Back_Cycle_2: result = &s->back_cycle_2_color; break;
case Stag_Back_Cycle_3: result = &s->back_cycle_3_color; break;
case Stag_Back_Cycle_4: result = &s->back_cycle_4_color; break;
case Stag_Text_Cycle_1: result = &s->text_cycle_1_color; break;
case Stag_Text_Cycle_2: result = &s->text_cycle_2_color; break;
case Stag_Text_Cycle_3: result = &s->text_cycle_3_color; break;
case Stag_Text_Cycle_4: result = &s->text_cycle_4_color; break;
}
return(result);
}
#endif

View File

@ -12,8 +12,6 @@
#if !defined(FRED_STYLE_H)
#define FRED_STYLE_H
#include "4ed_generated_style.h"
struct Style_Font{
Face_ID font_id;
};
@ -24,20 +22,6 @@ struct Style{
Theme theme;
};
internal void
style_copy(Style *dst, Style *src){
*dst = *src;
dst->name.str = dst->name_;
}
internal void
style_set_name(Style *style, String name){
i32 count = ArrayCount(style->name_);
style->name = make_string_cap(style->name_, 0, count - 1);
copy_ss(&style->name, name);
terminate_with_null(&style->name);
}
struct Style_Library{
Style styles[64];
i32 count;

View File

@ -513,22 +513,28 @@ get_visual_markers(Partition *arena, Dynamic_Workspace *workspace,
i32 priority = data->priority;
if ((color&SymbolicColor__StagColorFlag) && (color&0xFF000000) == 0){
u32 *c = &theme_data->colors[color&0x007FFFFF];
if (c != 0){
color = *c;
}
else{
color = 0;
u32 color_index = color&0x007FFFFF;
if (color_index < Stag_COUNT){
u32 *c = &theme_data->colors[color_index];
if (c != 0){
color = *c;
}
else{
color = 0;
}
}
}
if ((text_color&SymbolicColor__StagColorFlag) && (text_color&0xFF000000) == 0){
u32 *c = &theme_data->colors[color&0x007FFFFF];
if (c != 0){
text_color = *c;
}
else{
text_color = 0;
u32 color_index = text_color&0x007FFFFF;
if (color_index < Stag_COUNT){
u32 *c = &theme_data->colors[color_index];
if (c != 0){
text_color = *c;
}
else{
text_color = 0;
}
}
}

View File

@ -589,8 +589,8 @@ internal void
standard_build(char *cdir, u32 flags, u32 arch){
fsm_generator(cdir);
metagen(cdir);
//do_buildsuper(cdir, fm_str(custom_files[Custom_Default]), arch);
do_buildsuper(cdir, fm_str(custom_files[Custom_Experiments]), arch);
do_buildsuper(cdir, fm_str(custom_files[Custom_Default]), arch);
//do_buildsuper(cdir, fm_str(custom_files[Custom_Experiments]), arch);
//do_buildsuper(cdir, fm_str(custom_files[Custom_Casey]), arch);
//do_buildsuper(cdir, fm_str(custom_files[Custom_ChronalVim]), arch);
build_main(cdir, true, flags, arch);

View File

@ -9,7 +9,6 @@
// TOP
#define STYLE_FILE "4coder_generated/style.h"
#define API_H "4coder_generated/app_functions.h"
#define REMAPPING_FILE "4coder_generated/remapping.h"
@ -33,202 +32,6 @@
#include "4ed_meta_parser.cpp"
#include "4ed_meta_keywords.h"
//////////////////////////////////////////////////////////////////////////////////////////////////
internal void
struct_begin(String *str, char *name){
append(str, "struct ");
append(str, name);
append(str, "{\n");
}
internal void
enum_begin(String *str, char *name){
append(str, "enum ");
append(str, name);
append(str, "{\n");
}
internal void
struct_end(String *str){
append(str, "};\n\n");
}
static char* bar_style_fields[] = {
"bar",
"bar_active",
"base",
"pop1",
"pop2",
};
static char* main_style_fields[] = {
"back",
"margin",
"margin_hover",
"margin_active",
"list_item",
"list_item_hover",
"list_item_active",
"cursor",
"at_cursor",
"highlight_cursor_line",
"highlight",
"at_highlight",
"mark",
"default",
"comment",
"keyword",
"str_constant",
"char_constant",
"int_constant",
"float_constant",
"bool_constant",
"preproc",
"include",
"special_character",
"ghost_character",
"highlight_junk",
"highlight_white",
"paste",
"undo",
"next_undo",
"back_cycle_1",
"back_cycle_2",
"back_cycle_3",
"back_cycle_4",
"text_cycle_1",
"text_cycle_2",
"text_cycle_3",
"text_cycle_4",
};
internal char*
make_style_tag(char *tag){
i32 len = (i32)strlen(tag);
char *str = fm_push_array(char, len + 1);
to_camel(tag, str);
str[len] = 0;
return(str);
}
internal void
generate_style(){
Temp temp = fm_begin_temp();
char filename_4coder[] = STYLE_FILE;
char filename_4ed[] = "4ed_generated_style.h";
String out = str_alloc(10 << 20);
enum_begin(&out, "Style_Tag");
{
i32 count = ArrayCount(bar_style_fields);
for (i32 i = 0; i < count; ++i){
char *tag = make_style_tag(bar_style_fields[i]);
append(&out, "Stag_");
append(&out, tag);
append(&out, ",\n");
}
count = ArrayCount(main_style_fields);
for (i32 i = 0; i < count; ++i){
char *tag = make_style_tag(main_style_fields[i]);
append(&out, "Stag_");
append(&out, tag);
append(&out, ",\n");
}
append(&out, "Stag_COUNT\n");
}
struct_end(&out);
append(&out, "static char *style_tag_names[] = {\n");
{
i32 count = ArrayCount(bar_style_fields);
for (i32 i = 0; i < count; ++i){
char *tag = make_style_tag(bar_style_fields[i]);
append(&out, "\"");
append(&out, tag);
append(&out, "\",\n");
}
count = ArrayCount(main_style_fields);
for (i32 i = 0; i < count; ++i){
char *tag = make_style_tag(main_style_fields[i]);
append(&out, "\"");
append(&out, tag);
append(&out, "\",\n");
}
}
append(&out, "};\n");
fm_write_file(filename_4coder, out.str, out.size);
out.size = 0;
struct_begin(&out, "Interactive_Style");
{
i32 count = ArrayCount(bar_style_fields);
for (i32 i = 0; i < count; ++i){
append(&out, "u32 ");
append(&out, bar_style_fields[i]);
append(&out, "_color;\n");
}
}
struct_end(&out);
struct_begin(&out, "Style_Main_Data");
{
i32 count = ArrayCount(main_style_fields);
for (i32 i = 0; i < count; ++i){
append(&out, "u32 ");
append(&out, main_style_fields[i]);
append(&out, "_color;\n");
}
append(&out, "Interactive_Style file_info_style;\n");
}
struct_end(&out);
{
append(&out,
"inline u32*\n"
"style_index_by_tag(Style_Main_Data *s, u32 tag){\n"
"u32 *result = 0;\n"
"switch (tag){\n");
i32 count = ArrayCount(bar_style_fields);
for (i32 i = 0; i < count; ++i){
char *tag = make_style_tag(bar_style_fields[i]);
append(&out, "case Stag_");
append(&out, tag);
append(&out, ": result = &s->file_info_style.");
append(&out, bar_style_fields[i]);
append(&out, "_color; break;\n");
}
count = ArrayCount(main_style_fields);
for (i32 i = 0; i < count; ++i){
char *tag = make_style_tag(main_style_fields[i]);
append(&out, "case Stag_");
append(&out, tag);
append(&out, ": result = &s->");
append(&out, main_style_fields[i]);
append(&out, "_color; break;\n");
}
append(&out,
"}\n"
"return(result);\n"
"}\n\n");
}
fm_write_file(filename_4ed, out.str, out.size);
out.size = 0;
fm_end_temp(temp);
}
//////////////////////////////////////////////////////////////////////////////////////////////////
//
// Meta Parse Rules
//