From 88df8a4fb2cdf201643d8800e5c163dac717efd3 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Sat, 6 Apr 2019 12:40:36 -0700 Subject: [PATCH] Progress towards shifting off View_Summary --- 4coder_api_transition_30_31.cpp | 8 + 4coder_api_transition_30_31_helpers.cpp | 75 +++- 4coder_build_commands.cpp | 28 +- 4coder_combined_write_commands.cpp | 18 +- 4coder_default_framework.cpp | 16 +- 4coder_default_framework.h | 4 +- 4coder_default_hooks.cpp | 5 +- 4coder_function_list.cpp | 17 +- 4coder_generated/command_metadata.h | 468 ++++++++++++------------ 4coder_helper.cpp | 21 +- 4coder_jump_direct.cpp | 15 +- 4coder_jump_lister.cpp | 36 +- 4coder_jump_sticky.cpp | 68 ++-- 4coder_jump_sticky.h | 2 +- 4coder_jumping.cpp | 62 ++-- 4coder_lists.cpp | 206 ++++++----- 4coder_project_commands.cpp | 22 +- 4coder_ui_helper.cpp | 102 +++--- 4coder_ui_helper.h | 2 +- 4ed_api_implementation.cpp | 3 + 20 files changed, 643 insertions(+), 535 deletions(-) diff --git a/4coder_api_transition_30_31.cpp b/4coder_api_transition_30_31.cpp index a83eed3e..99327e1d 100644 --- a/4coder_api_transition_30_31.cpp +++ b/4coder_api_transition_30_31.cpp @@ -145,6 +145,14 @@ exec_system_command(Application_Links *app, View_Summary *view, Buffer_Identifie return(result); } +static b32 +exec_system_command(Application_Links *app, View_ID view, Buffer_Identifier buffer_id, + char *path, int32_t path_len, char *command, i32 command_len, Command_Line_Interface_Flag flags){ + View_Summary view_summary = {}; + get_view_summary(app, view, AccessAll, &view_summary); + return(exec_system_command(app, &view_summary, buffer_id, path, path_len, command, command_len, flags)); +} + static b32 clipboard_post(Application_Links *app, i32 clipboard_id, char *str, i32 len){ return(clipboard_post(app, clipboard_id, make_string(str, len))); diff --git a/4coder_api_transition_30_31_helpers.cpp b/4coder_api_transition_30_31_helpers.cpp index 8f9f64b4..3f1eb226 100644 --- a/4coder_api_transition_30_31_helpers.cpp +++ b/4coder_api_transition_30_31_helpers.cpp @@ -510,30 +510,25 @@ get_jump_buffer(Application_Links *app, Buffer_Summary *buffer, ID_Pos_Jump_Loca static void switch_to_existing_view(Application_Links *app, View_Summary *view, Buffer_Summary *buffer){ - if (buffer != 0){ - switch_to_existing_view(app, view, buffer->buffer_id); + View_ID result = switch_to_existing_view(app, view==0?0:view->view_id, buffer==0?0:buffer->buffer_id); + if (view != 0 && result != 0){ + get_view_summary(app, result, AccessAll, view); } } static void set_view_to_location(Application_Links *app, View_Summary *view, Buffer_Summary *buffer, Buffer_Seek seek){ - if (buffer != 0){ - set_view_to_location(app, view, buffer->buffer_id, seek); - } + set_view_to_location(app, view==0?0:view->view_id, buffer==0?0:buffer->buffer_id, seek); } static void -jump_to_location(Application_Links *app, View_Summary *view, Buffer_Summary *buffer, Name_Line_Column_Location location){ - if (buffer != 0){ - jump_to_location(app, view, buffer->buffer_id, location); - } +jump_to_location(Application_Links *app, View_Summary *view, Buffer_ID buffer, Name_Line_Column_Location location){ + jump_to_location(app, view==0?0:view->view_id, buffer, location); } static void -jump_to_location(Application_Links *app, View_Summary *view, Buffer_Summary *buffer, ID_Pos_Jump_Location location){ - if (buffer != 0){ - jump_to_location(app, view, buffer->buffer_id, location); - } +jump_to_location(Application_Links *app, View_Summary *view, Buffer_ID buffer, ID_Pos_Jump_Location location){ + jump_to_location(app, view==0?0:view->view_id, buffer, location); } static Buffer_Summary @@ -587,9 +582,19 @@ get_build_directory(Application_Links *app, Buffer_Summary *buffer, String *dir_ return(get_build_directory(app, buffer==0?0:buffer->buffer_id, dir_out)); } +static i32 +standard_build_search(Application_Links *app, View_Summary *view, String *dir, String *command, b32 perform_backup, b32 use_path_in_command, String filename, String command_name){ + return(standard_build_search(app, view==0?0:view->view_id, dir, command, perform_backup, use_path_in_command, filename, command_name)); +} + +static i32 +execute_standard_build_search(Application_Links *app, View_Summary *view, String *dir, String *command, i32 perform_backup){ + return(execute_standard_build_search(app, view==0?0:view->view_id, dir, command, perform_backup)); +} + static void -execute_standard_build(Application_Links *app, View_Summary *view, Buffer_Summary *active_buffer){ - execute_standard_build(app, view, active_buffer==0?0:active_buffer->buffer_id); +execute_standard_build(Application_Links *app, View_Summary *view, Buffer_ID active_buffer){ + execute_standard_build(app, view==0?0:view->view_id, active_buffer); } static b32 @@ -597,6 +602,46 @@ post_buffer_range_to_clipboard(Application_Links *app, Partition *scratch, i32 c return(post_buffer_range_to_clipboard(app, scratch, clipboard_index, buffer==0?0:buffer->buffer_id, first, one_past_last)); } +static void +view_set_vertical_focus(Application_Links *app, View_Summary *view, i32 y_top, i32 y_bot){ + view_set_vertical_focus(app, view==0?0:view->view_id, y_top, y_bot); +} + +static b32 +advance_cursor_in_jump_view(Application_Links *app, Partition *part, View_Summary *view, i32 skip_repeats, i32 skip_sub_error, i32 direction, Name_Line_Column_Location *location_out){ + return(advance_cursor_in_jump_view(app, part, view==0?0:view->view_id, skip_repeats, skip_sub_error, direction, location_out)); +} + +static Parsed_Jump +seek_next_jump_in_view(Application_Links *app, Partition *part, View_Summary *view, i32 skip_sub_errors, i32 direction, i32 *line_out){ + return(seek_next_jump_in_view(app, part, view==0?0:view->view_id, skip_sub_errors, direction, line_out)); +} + +static void +goto_next_filtered_jump(Application_Links *app, Marker_List *list, View_Summary *jump_view, i32 list_index, i32 direction, b32 skip_repeats, b32 skip_sub_errors){ + goto_next_filtered_jump(app, list, jump_view==0?0:jump_view->view_id, list_index, direction, skip_repeats, skip_sub_errors); +} + +static void +goto_jump_in_order(Application_Links *app, Marker_List *list, View_Summary *jump_view, ID_Pos_Jump_Location location){ + goto_jump_in_order(app, list, jump_view==0?0:jump_view->view_id, location); +} + +static void +open_jump_lister(Application_Links *app, Partition *scratch, Heap *heap, View_Summary *ui_view, Buffer_ID list_buffer_id, Jump_Lister_Activation_Rule activation_rule, View_Summary *optional_target_view){ + open_jump_lister(app, scratch, heap, ui_view==0?0:ui_view->view_id, list_buffer_id, activation_rule, optional_target_view==0?0:optional_target_view->view_id); +} + +static void +activate_project_command(Application_Links *app, Partition *scratch, Heap *heap, View_Summary *view, Lister_State *state, String text_field, void *user_data, b32 activated_by_mouse){ + activate_project_command(app, scratch, heap, view==0?0:view->view_id, state, text_field, user_data, activated_by_mouse); +} + +static void +activate_snippet(Application_Links *app, Partition *scratch, Heap *heap, View_Summary *view, struct Lister_State *state, String text_field, void *user_data, b32 activated_by_mouse){ + activate_snippet(app, scratch, heap, view==0?0:view->view_id, state, text_field, user_data, activated_by_mouse); +} + #endif // BOTTOM diff --git a/4coder_build_commands.cpp b/4coder_build_commands.cpp index dd8832d8..c9306282 100644 --- a/4coder_build_commands.cpp +++ b/4coder_build_commands.cpp @@ -41,7 +41,7 @@ get_build_directory(Application_Links *app, Buffer_ID buffer, String *dir_out){ // TODO(allen): Better names for the "standard build search" family. static i32 -standard_build_search(Application_Links *app, View_Summary *view, String *dir, String *command, b32 perform_backup, b32 use_path_in_command, String filename, String command_name){ +standard_build_search(Application_Links *app, View_ID view, String *dir, String *command, b32 perform_backup, b32 use_path_in_command, String filename, String command_name){ i32 result = false; for(;;){ @@ -98,7 +98,7 @@ standard_build_search(Application_Links *app, View_Summary *view, String *dir, S // NOTE(allen): Build search rule for windows. static i32 -execute_standard_build_search(Application_Links *app, View_Summary *view, String *dir, String *command, i32 perform_backup){ +execute_standard_build_search(Application_Links *app, View_ID view, String *dir, String *command, i32 perform_backup){ i32 result = standard_build_search(app, view, dir, command, perform_backup, true, make_lit_string("build.bat"), make_lit_string("build")); return(result); } @@ -107,7 +107,7 @@ execute_standard_build_search(Application_Links *app, View_Summary *view, String // NOTE(allen): Build search rule for linux and mac. static i32 -execute_standard_build_search(Application_Links *app, View_Summary *view, String *dir, String *command, b32 perform_backup){ +execute_standard_build_search(Application_Links *app, View_ID view, String *dir, String *command, b32 perform_backup){ char dir_space[512]; String dir_copy = make_fixed_width_string(dir_space); copy(&dir_copy, *dir); @@ -125,7 +125,7 @@ execute_standard_build_search(Application_Links *app, View_Summary *view, String // NOTE(allen): This searches first using the active file's directory, // then if no build script is found, it searches from 4coders hot directory. static void -execute_standard_build(Application_Links *app, View_Summary *view, Buffer_ID active_buffer){ +execute_standard_build(Application_Links *app, View_ID view, Buffer_ID active_buffer){ char dir_space[512]; String dir = make_fixed_width_string(dir_space); char command_str_space[512]; @@ -149,23 +149,23 @@ CUSTOM_DOC("Looks for a build.bat, build.sh, or makefile in the current and pare View_Summary view = get_active_view(app, AccessAll); Buffer_ID buffer = 0; view_get_buffer(app, view.view_id, AccessAll, &buffer); - execute_standard_build(app, &view, buffer); + execute_standard_build(app, view.view_id, buffer); memset(&prev_location, 0, sizeof(prev_location)); lock_jump_buffer(make_lit_string("*compilation*")); } #define GET_COMP_BUFFER(app,id) get_buffer_by_name(app, make_lit_string("*compilation*"), AccessAll, (id)) -static View_Summary +static View_ID get_or_open_build_panel(Application_Links *app){ - View_Summary view = {}; + View_ID view = 0; Buffer_ID buffer = 0; GET_COMP_BUFFER(app, &buffer); if (buffer != 0){ view = get_first_view_with_buffer(app, buffer); } - if (!view.exists){ - view = open_build_footer_panel(app); + if (view != 0){ + open_build_footer_panel(app, &view); } return(view); } @@ -184,9 +184,9 @@ CUSTOM_DOC("Looks for a build.bat, build.sh, or makefile in the current and pare Buffer_ID buffer = 0; view_get_buffer(app, view.view_id, AccessAll, &buffer); - View_Summary build_view = get_or_open_build_panel(app); + View_ID build_view = get_or_open_build_panel(app); - execute_standard_build(app, &build_view, buffer); + execute_standard_build(app, build_view, buffer); set_fancy_compilation_buffer_font(app); memset(&prev_location, 0, sizeof(prev_location)); @@ -202,9 +202,9 @@ CUSTOM_DOC("If the special build panel is open, closes it.") CUSTOM_COMMAND_SIG(change_to_build_panel) CUSTOM_DOC("If the special build panel is open, makes the build panel the active panel.") { - View_Summary view = get_or_open_build_panel(app); - if (view.exists){ - set_active_view(app, &view); + View_ID view = get_or_open_build_panel(app); + if (view != 0){ + view_set_active(app, view); } } diff --git a/4coder_combined_write_commands.cpp b/4coder_combined_write_commands.cpp index bc7534f2..56d63e72 100644 --- a/4coder_combined_write_commands.cpp +++ b/4coder_combined_write_commands.cpp @@ -207,17 +207,16 @@ static Snippet default_snippets[] = { }; static void -activate_snippet(Application_Links *app, Partition *scratch, Heap *heap, - View_Summary *view, struct Lister_State *state, - String text_field, void *user_data, b32 activated_by_mouse){ +activate_snippet(Application_Links *app, Partition *scratch, Heap *heap, View_ID view, struct Lister_State *state, String text_field, void *user_data, b32 activated_by_mouse){ i32 index = (i32)PtrAsInt(user_data); Snippet_Array snippets = *(Snippet_Array*)state->lister.data.user_data; if (0 <= index && index < snippets.count){ Snippet snippet = snippets.snippets[index]; lister_default(app, scratch, heap, view, state, ListerActivation_Finished); Buffer_ID buffer = 0; - view_get_buffer(app, view->view_id, AccessOpen, &buffer); - i32 pos = view->cursor.pos; + view_get_buffer(app, view, AccessOpen, &buffer); + i32 pos = 0; + view_get_cursor_pos(app, view, &pos); buffer_replace_range(app, buffer, make_range(pos), make_string_slowly(snippet.text)); view_set_cursor(app, view, seek_pos(pos + snippet.cursor_offset), true); view_set_mark(app, view, seek_pos(pos + snippet.mark_offset)); @@ -232,8 +231,9 @@ static void snippet_lister__parameterized(Application_Links *app, Snippet_Array snippet_array){ Partition *arena = &global_part; - View_Summary view = get_active_view(app, AccessAll); - view_end_ui_mode(app, &view); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + view_end_ui_mode(app, view); Temp_Memory temp = begin_temp_memory(arena); i32 option_count = snippet_array.count; Lister_Option *options = push_array(arena, Lister_Option, option_count); @@ -242,9 +242,7 @@ snippet_lister__parameterized(Application_Links *app, Snippet_Array snippet_arra options[i].status = make_string_slowly(snippet_array.snippets[i].text); options[i].user_data = IntAsPtr(i); } - begin_integrated_lister__basic_list(app, "Snippet:", activate_snippet, - &snippet_array, sizeof(snippet_array), - options, option_count, 0, &view); + begin_integrated_lister__basic_list(app, "Snippet:", activate_snippet, &snippet_array, sizeof(snippet_array), options, option_count, 0, view); end_temp_memory(temp); } diff --git a/4coder_default_framework.cpp b/4coder_default_framework.cpp index 4230d236..c8b3c05d 100644 --- a/4coder_default_framework.cpp +++ b/4coder_default_framework.cpp @@ -31,9 +31,9 @@ lock_jump_buffer(Application_Links *app, Buffer_ID buffer_id){ end_temp_memory(temp); } -static View_Summary +static View_ID get_view_for_locked_jump_buffer(Application_Links *app){ - View_Summary view = {}; + View_ID view = 0; if (locked_buffer.size > 0){ Buffer_ID buffer = 0; get_buffer_by_name(app, locked_buffer, AccessAll, &buffer); @@ -283,17 +283,17 @@ create_or_switch_to_buffer_by_name(Application_Links *app, char *name, i32 name_ if (search_buffer != 0){ buffer_set_setting(app, search_buffer, BufferSetting_ReadOnly, true); - View_Summary target_view = default_target_view; + View_ID target_view = default_target_view.view_id; - View_Summary view_with_buffer_already_open = get_first_view_with_buffer(app, search_buffer); - if (view_with_buffer_already_open.exists){ + View_ID view_with_buffer_already_open = get_first_view_with_buffer(app, search_buffer); + if (view_with_buffer_already_open != 0){ target_view = view_with_buffer_already_open; - view_end_ui_mode(app, &target_view); + view_end_ui_mode(app, target_view); } else{ - view_set_buffer(app, &target_view, search_buffer, 0); + view_set_buffer(app, target_view, search_buffer, 0); } - set_active_view(app, &target_view); + view_set_active(app, target_view); i32 buffer_size = 0; buffer_get_size(app, search_buffer, &buffer_size); diff --git a/4coder_default_framework.h b/4coder_default_framework.h index 0e7baac2..7b87b277 100644 --- a/4coder_default_framework.h +++ b/4coder_default_framework.h @@ -67,10 +67,10 @@ struct Named_Mapping{ //////////////////////////////// static void -do_gui_sure_to_kill(Application_Links *app, Buffer_ID buffer, View_Summary *view); +do_gui_sure_to_kill(Application_Links *app, Buffer_ID buffer, View_ID view); static void -do_gui_sure_to_close_4coder(Application_Links *app, View_Summary *view); +do_gui_sure_to_close_4coder(Application_Links *app, View_ID view); #endif diff --git a/4coder_default_hooks.cpp b/4coder_default_hooks.cpp index bdc6e8a6..047bb3da 100644 --- a/4coder_default_hooks.cpp +++ b/4coder_default_hooks.cpp @@ -925,8 +925,9 @@ HOOK_SIG(default_exit){ } } if (has_unsaved_changes){ - View_Summary view = get_active_view(app, AccessAll); - do_gui_sure_to_close_4coder(app, &view); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + do_gui_sure_to_close_4coder(app, view); result = 0; } } diff --git a/4coder_function_list.cpp b/4coder_function_list.cpp index 753de711..6808080d 100644 --- a/4coder_function_list.cpp +++ b/4coder_function_list.cpp @@ -331,13 +331,14 @@ CUSTOM_DOC("Creates a jump list of lines of the current buffer that appear to de CUSTOM_COMMAND_SIG(list_all_functions_current_buffer_lister) CUSTOM_DOC("Creates a lister of locations that look like function definitions and declarations in the buffer.") { - View_Summary view = get_active_view(app, AccessProtected); + View_ID view = 0; + get_active_view(app, AccessProtected, &view); Buffer_ID buffer = 0; - view_get_buffer(app, view.view_id, AccessProtected, &buffer); + view_get_buffer(app, view, AccessProtected, &buffer); if (buffer_exists(app, buffer)){ list_all_functions(app, &global_part, buffer); - view = get_active_view(app, AccessAll); - open_jump_lister(app, &global_part, &global_heap, &view, buffer, JumpListerActivation_OpenInUIView, 0); + get_active_view(app, AccessAll, &view); + open_jump_lister(app, &global_part, &global_heap, view, buffer, JumpListerActivation_OpenInUIView, 0); } } @@ -351,9 +352,11 @@ CUSTOM_COMMAND_SIG(list_all_functions_all_buffers_lister) CUSTOM_DOC("Creates a lister of locations that look like function definitions and declarations all buffers.") { list_all_functions(app, &global_part, 0); - View_Summary view = get_active_view(app, AccessAll); - open_jump_lister(app, &global_part, &global_heap, - &view, view.buffer_id, JumpListerActivation_OpenInUIView, 0); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + Buffer_ID buffer = 0; + view_get_buffer(app, view, AccessAll, &buffer); + open_jump_lister(app, &global_part, &global_heap, view, buffer, JumpListerActivation_OpenInUIView, 0); } // BOTTOM diff --git a/4coder_generated/command_metadata.h b/4coder_generated/command_metadata.h index e1c853fd..a24b7c3f 100644 --- a/4coder_generated/command_metadata.h +++ b/4coder_generated/command_metadata.h @@ -255,240 +255,240 @@ int32_t source_name_len; int32_t line_number; }; static Command_Metadata fcoder_metacmd_table[234] = { -{ PROC_LINKS(allow_mouse, 0), "allow_mouse", 11, "Shows the mouse and causes all mouse input to be processed normally.", 68, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 336 }, -{ PROC_LINKS(auto_tab_line_at_cursor, 0), "auto_tab_line_at_cursor", 23, "Auto-indents the line on which the cursor sits.", 47, "c:\\4ed\\code\\4coder_auto_indent.cpp", 34, 623 }, -{ PROC_LINKS(auto_tab_range, 0), "auto_tab_range", 14, "Auto-indents the range between the cursor and the mark.", 55, "c:\\4ed\\code\\4coder_auto_indent.cpp", 34, 633 }, -{ PROC_LINKS(auto_tab_whole_file, 0), "auto_tab_whole_file", 19, "Audo-indents the entire current buffer.", 39, "c:\\4ed\\code\\4coder_auto_indent.cpp", 34, 612 }, -{ PROC_LINKS(backspace_char, 0), "backspace_char", 14, "Deletes the character to the left of the cursor.", 48, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 104 }, -{ PROC_LINKS(backspace_word, 0), "backspace_word", 14, "Delete characters between the cursor position and the first alphanumeric boundary to the left.", 94, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1215 }, -{ PROC_LINKS(basic_change_active_panel, 0), "basic_change_active_panel", 25, "Change the currently active panel, moving to the panel with the next highest view_id. Will not skipe the build panel if it is open.", 132, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 516 }, -{ PROC_LINKS(build_in_build_panel, 0), "build_in_build_panel", 20, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.", 230, "c:\\4ed\\code\\4coder_build_commands.cpp", 37, 180 }, -{ PROC_LINKS(build_search, 0), "build_search", 12, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*.", 153, "c:\\4ed\\code\\4coder_build_commands.cpp", 37, 146 }, -{ PROC_LINKS(center_view, 0), "center_view", 11, "Centers the view vertically on the line on which the cursor sits.", 65, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 156 }, -{ PROC_LINKS(change_active_panel, 0), "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 236 }, -{ PROC_LINKS(change_active_panel_backwards, 0), "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 246 }, -{ PROC_LINKS(change_to_build_panel, 0), "change_to_build_panel", 21, "If the special build panel is open, makes the build panel the active panel.", 75, "c:\\4ed\\code\\4coder_build_commands.cpp", 37, 202 }, -{ PROC_LINKS(clean_all_lines, 0), "clean_all_lines", 15, "Removes trailing whitespace from all lines in the current buffer.", 65, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 447 }, -{ PROC_LINKS(click_set_cursor, 0), "click_set_cursor", 16, "Sets the cursor position to the mouse position.", 47, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 215 }, -{ PROC_LINKS(click_set_cursor_and_mark, 0), "click_set_cursor_and_mark", 25, "Sets the cursor position and mark to the mouse position.", 56, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 201 }, -{ PROC_LINKS(click_set_cursor_if_lbutton, 0), "click_set_cursor_if_lbutton", 27, "If the mouse left button is pressed, sets the cursor position to the mouse position.", 84, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 229 }, -{ PROC_LINKS(click_set_mark, 0), "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 245 }, -{ PROC_LINKS(close_all_code, 0), "close_all_code", 14, "Closes any buffer with a filename ending with an extension configured to be recognized as a code file type.", 107, "c:\\4ed\\code\\4coder_project_commands.cpp", 39, 1062 }, -{ PROC_LINKS(close_build_panel, 0), "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "c:\\4ed\\code\\4coder_build_commands.cpp", 37, 196 }, -{ PROC_LINKS(close_panel, 0), "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 524 }, -{ PROC_LINKS(command_lister, 0), "command_lister", 14, "Opens an interactive list of all registered commands.", 53, "c:\\4ed\\code\\4coder_lists.cpp", 28, 1021 }, -{ PROC_LINKS(comment_line, 0), "comment_line", 12, "Insert '//' at the beginning of the line after leading whitespace.", 66, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 135 }, -{ PROC_LINKS(comment_line_toggle, 0), "comment_line_toggle", 19, "Turns uncommented lines into commented lines and vice versa for comments starting with '//'.", 92, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 161 }, -{ PROC_LINKS(copy, 0), "copy", 4, "Copy the text in the range from the cursor to the mark onto the clipboard.", 74, "c:\\4ed\\code\\4coder_clipboard.cpp", 32, 26 }, -{ PROC_LINKS(cursor_mark_swap, 0), "cursor_mark_swap", 16, "Swaps the position of the cursor and the mark.", 46, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 134 }, -{ PROC_LINKS(cut, 0), "cut", 3, "Cut the text in the range from the cursor to the mark onto the clipboard.", 73, "c:\\4ed\\code\\4coder_clipboard.cpp", 32, 36 }, -{ PROC_LINKS(decrease_face_size, 0), "decrease_face_size", 18, "Decrease the size of the face used by the current buffer.", 57, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 621 }, -{ PROC_LINKS(decrease_line_wrap, 0), "decrease_line_wrap", 18, "Decrases the current buffer's width for line wrapping.", 54, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 597 }, -{ PROC_LINKS(delete_char, 0), "delete_char", 11, "Deletes the character to the right of the cursor.", 49, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 84 }, -{ PROC_LINKS(delete_current_scope, 0), "delete_current_scope", 20, "Deletes the braces surrounding the currently selected scope. Leaves the contents within the scope.", 99, "c:\\4ed\\code\\4coder_scope_commands.cpp", 37, 481 }, -{ PROC_LINKS(delete_file_query, 0), "delete_file_query", 17, "Deletes the file of the current buffer if 4coder has the appropriate access rights. Will ask the user for confirmation first.", 125, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1197 }, -{ PROC_LINKS(delete_line, 0), "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1451 }, -{ PROC_LINKS(delete_range, 0), "delete_range", 12, "Deletes the text in the range between the cursor and the mark.", 62, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 144 }, -{ PROC_LINKS(delete_word, 0), "delete_word", 11, "Delete characters between the cursor position and the first alphanumeric boundary to the right.", 95, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1221 }, -{ PROC_LINKS(duplicate_line, 0), "duplicate_line", 14, "Create a copy of the line on which the cursor sits.", 51, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1428 }, -{ PROC_LINKS(eol_dosify, 0), "eol_dosify", 10, "Puts the buffer in DOS line ending mode.", 40, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 675 }, -{ PROC_LINKS(eol_nixify, 0), "eol_nixify", 10, "Puts the buffer in NIX line ending mode.", 40, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 684 }, -{ PROC_LINKS(execute_any_cli, 0), "execute_any_cli", 15, "Queries for an output buffer name and system command, runs the system command as a CLI and prints the output to the specified buffer.", 133, "c:\\4ed\\code\\4coder_system_command.cpp", 37, 23 }, -{ PROC_LINKS(execute_previous_cli, 0), "execute_previous_cli", 20, "If the command execute_any_cli has already been used, this will execute a CLI reusing the most recent buffer name and command.", 126, "c:\\4ed\\code\\4coder_system_command.cpp", 37, 7 }, -{ PROC_LINKS(exit_4coder, 0), "exit_4coder", 11, "Attempts to close 4coder.", 25, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 693 }, -{ PROC_LINKS(goto_beginning_of_file, 0), "goto_beginning_of_file", 22, "Sets the cursor to the beginning of the file.", 45, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1131 }, -{ PROC_LINKS(goto_end_of_file, 0), "goto_end_of_file", 16, "Sets the cursor to the end of the file.", 39, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1139 }, -{ PROC_LINKS(goto_first_jump_direct, 0), "goto_first_jump_direct", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "c:\\4ed\\code\\4coder_jump_direct.cpp", 34, 82 }, -{ PROC_LINKS(goto_first_jump_same_panel_sticky, 0), "goto_first_jump_same_panel_sticky", 33, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer and views the buffer in the panel where the jump list was.", 153, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 548 }, -{ PROC_LINKS(goto_first_jump_sticky, 0), "goto_first_jump_sticky", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 530 }, -{ PROC_LINKS(goto_jump_at_cursor_direct, 0), "goto_jump_at_cursor_direct", 26, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "c:\\4ed\\code\\4coder_jump_direct.cpp", 34, 8 }, -{ PROC_LINKS(goto_jump_at_cursor_same_panel_direct, 0), "goto_jump_at_cursor_same_panel_direct", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list..", 168, "c:\\4ed\\code\\4coder_jump_direct.cpp", 34, 28 }, -{ PROC_LINKS(goto_jump_at_cursor_same_panel_sticky, 0), "goto_jump_at_cursor_same_panel_sticky", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list.", 167, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 374 }, -{ PROC_LINKS(goto_jump_at_cursor_sticky, 0), "goto_jump_at_cursor_sticky", 26, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 346 }, -{ PROC_LINKS(goto_line, 0), "goto_line", 9, "Queries the user for a number, and jumps the cursor to the corresponding line.", 78, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 701 }, -{ PROC_LINKS(goto_next_jump_direct, 0), "goto_next_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "c:\\4ed\\code\\4coder_jump_direct.cpp", 34, 46 }, -{ PROC_LINKS(goto_next_jump_no_skips_direct, 0), "goto_next_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "c:\\4ed\\code\\4coder_jump_direct.cpp", 34, 64 }, -{ PROC_LINKS(goto_next_jump_no_skips_sticky, 0), "goto_next_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 499 }, -{ PROC_LINKS(goto_next_jump_sticky, 0), "goto_next_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 469 }, -{ PROC_LINKS(goto_prev_jump_direct, 0), "goto_prev_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "c:\\4ed\\code\\4coder_jump_direct.cpp", 34, 55 }, -{ PROC_LINKS(goto_prev_jump_no_skips_direct, 0), "goto_prev_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "c:\\4ed\\code\\4coder_jump_direct.cpp", 34, 73 }, -{ PROC_LINKS(goto_prev_jump_no_skips_sticky, 0), "goto_prev_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 515 }, -{ PROC_LINKS(goto_prev_jump_sticky, 0), "goto_prev_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 485 }, -{ PROC_LINKS(hide_filebar, 0), "hide_filebar", 12, "Sets the current view to hide it's filebar.", 43, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 554 }, -{ PROC_LINKS(hide_scrollbar, 0), "hide_scrollbar", 14, "Sets the current view to hide it's scrollbar.", 45, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 540 }, -{ PROC_LINKS(if0_off, 0), "if0_off", 7, "Surround the range between the cursor and mark with an '#if 0' and an '#endif'", 78, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 79 }, -{ PROC_LINKS(increase_face_size, 0), "increase_face_size", 18, "Increase the size of the face used by the current buffer.", 57, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 608 }, -{ PROC_LINKS(increase_line_wrap, 0), "increase_line_wrap", 18, "Increases the current buffer's width for line wrapping.", 55, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 586 }, -{ PROC_LINKS(interactive_kill_buffer, 0), "interactive_kill_buffer", 23, "Interactively kill an open buffer.", 34, "c:\\4ed\\code\\4coder_lists.cpp", 28, 796 }, -{ PROC_LINKS(interactive_new, 0), "interactive_new", 15, "Interactively creates a new file.", 33, "c:\\4ed\\code\\4coder_lists.cpp", 28, 907 }, -{ PROC_LINKS(interactive_open, 0), "interactive_open", 16, "Interactively opens a file.", 27, "c:\\4ed\\code\\4coder_lists.cpp", 28, 939 }, -{ PROC_LINKS(interactive_open_or_new, 0), "interactive_open_or_new", 23, "Interactively open a file out of the file system.", 49, "c:\\4ed\\code\\4coder_lists.cpp", 28, 869 }, -{ PROC_LINKS(interactive_switch_buffer, 0), "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "c:\\4ed\\code\\4coder_lists.cpp", 28, 777 }, -{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1635 }, -{ PROC_LINKS(kill_rect, 0), "kill_rect", 9, "Delete characters in a rectangular region. Range testing is done by unwrapped-xy coordinates.", 93, "c:\\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, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 172 }, -{ 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, "c:\\4ed\\code\\4coder_function_list.cpp", 36, 344 }, -{ 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, "c:\\4ed\\code\\4coder_function_list.cpp", 36, 350 }, -{ PROC_LINKS(list_all_functions_current_buffer, 0), "list_all_functions_current_buffer", 33, "Creates a jump list of lines of the current buffer that appear to define or declare functions.", 94, "c:\\4ed\\code\\4coder_function_list.cpp", 36, 320 }, -{ PROC_LINKS(list_all_functions_current_buffer_lister, 0), "list_all_functions_current_buffer_lister", 40, "Creates a lister of locations that look like function definitions and declarations in the buffer.", 97, "c:\\4ed\\code\\4coder_function_list.cpp", 36, 331 }, -{ PROC_LINKS(list_all_locations, 0), "list_all_locations", 18, "Queries the user for a string and lists all exact case-sensitive matches found in all open buffers.", 99, "c:\\4ed\\code\\4coder_search.cpp", 29, 801 }, -{ PROC_LINKS(list_all_locations_case_insensitive, 0), "list_all_locations_case_insensitive", 35, "Queries the user for a string and lists all exact case-insensitive matches found in all open buffers.", 101, "c:\\4ed\\code\\4coder_search.cpp", 29, 815 }, -{ PROC_LINKS(list_all_locations_of_identifier, 0), "list_all_locations_of_identifier", 32, "Reads a token or word under the cursor and lists all exact case-sensitive mathces in all open buffers.", 102, "c:\\4ed\\code\\4coder_search.cpp", 29, 829 }, -{ PROC_LINKS(list_all_locations_of_identifier_case_insensitive, 0), "list_all_locations_of_identifier_case_insensitive", 49, "Reads a token or word under the cursor and lists all exact case-insensitive mathces in all open buffers.", 104, "c:\\4ed\\code\\4coder_search.cpp", 29, 836 }, -{ PROC_LINKS(list_all_locations_of_selection, 0), "list_all_locations_of_selection", 31, "Reads the string in the selected range and lists all exact case-sensitive mathces in all open buffers.", 102, "c:\\4ed\\code\\4coder_search.cpp", 29, 843 }, -{ PROC_LINKS(list_all_locations_of_selection_case_insensitive, 0), "list_all_locations_of_selection_case_insensitive", 48, "Reads the string in the selected range and lists all exact case-insensitive mathces in all open buffers.", 104, "c:\\4ed\\code\\4coder_search.cpp", 29, 850 }, -{ PROC_LINKS(list_all_locations_of_type_definition, 0), "list_all_locations_of_type_definition", 37, "Queries user for string, lists all locations of strings that appear to define a type whose name matches the input string.", 121, "c:\\4ed\\code\\4coder_search.cpp", 29, 857 }, -{ PROC_LINKS(list_all_locations_of_type_definition_of_identifier, 0), "list_all_locations_of_type_definition_of_identifier", 51, "Reads a token or word under the cursor and lists all locations of strings that appear to define a type whose name matches it.", 125, "c:\\4ed\\code\\4coder_search.cpp", 29, 868 }, -{ PROC_LINKS(list_all_substring_locations, 0), "list_all_substring_locations", 28, "Queries the user for a string and lists all case-sensitive substring matches found in all open buffers.", 103, "c:\\4ed\\code\\4coder_search.cpp", 29, 808 }, -{ PROC_LINKS(list_all_substring_locations_case_insensitive, 0), "list_all_substring_locations_case_insensitive", 45, "Queries the user for a string and lists all case-insensitive substring matches found in all open buffers.", 105, "c:\\4ed\\code\\4coder_search.cpp", 29, 822 }, -{ PROC_LINKS(lister__activate, 0), "lister__activate", 16, "A lister mode command that activates the list's action on the highlighted item.", 79, "c:\\4ed\\code\\4coder_lists.cpp", 28, 15 }, -{ PROC_LINKS(lister__backspace_text_field, 0), "lister__backspace_text_field", 28, "A lister mode command that dispatches to the lister's backspace text field handler.", 83, "c:\\4ed\\code\\4coder_lists.cpp", 28, 41 }, -{ PROC_LINKS(lister__backspace_text_field__default, 0), "lister__backspace_text_field__default", 37, "A lister mode command that backspaces one character from the text field.", 72, "c:\\4ed\\code\\4coder_lists.cpp", 28, 145 }, -{ PROC_LINKS(lister__backspace_text_field__file_path, 0), "lister__backspace_text_field__file_path", 39, "A lister mode command that backspaces one character from the text field of a file system list.", 94, "c:\\4ed\\code\\4coder_lists.cpp", 28, 217 }, -{ PROC_LINKS(lister__mouse_press, 0), "lister__mouse_press", 19, "A lister mode command that beings a click interaction with a list item under the mouse.", 87, "c:\\4ed\\code\\4coder_lists.cpp", 28, 86 }, -{ PROC_LINKS(lister__mouse_release, 0), "lister__mouse_release", 21, "A lister mode command that ends a click interaction with a list item under the mouse, possibly activating it.", 109, "c:\\4ed\\code\\4coder_lists.cpp", 28, 98 }, -{ PROC_LINKS(lister__move_down, 0), "lister__move_down", 17, "A lister mode command that dispatches to the lister's navigate down handler.", 76, "c:\\4ed\\code\\4coder_lists.cpp", 28, 61 }, -{ PROC_LINKS(lister__move_down__default, 0), "lister__move_down__default", 26, "A lister mode command that moves the highlighted item one down in the list.", 75, "c:\\4ed\\code\\4coder_lists.cpp", 28, 176 }, -{ PROC_LINKS(lister__move_up, 0), "lister__move_up", 15, "A lister mode command that dispatches to the lister's navigate up handler.", 74, "c:\\4ed\\code\\4coder_lists.cpp", 28, 51 }, -{ PROC_LINKS(lister__move_up__default, 0), "lister__move_up__default", 24, "A lister mode command that moves the highlighted item one up in the list.", 73, "c:\\4ed\\code\\4coder_lists.cpp", 28, 160 }, -{ PROC_LINKS(lister__quit, 0), "lister__quit", 12, "A lister mode command that quits the list without executing any actions.", 72, "c:\\4ed\\code\\4coder_lists.cpp", 28, 8 }, -{ PROC_LINKS(lister__repaint, 0), "lister__repaint", 15, "A lister mode command that updates the lists UI data.", 53, "c:\\4ed\\code\\4coder_lists.cpp", 28, 114 }, -{ PROC_LINKS(lister__wheel_scroll, 0), "lister__wheel_scroll", 20, "A lister mode command that scrolls the list in response to the mouse wheel.", 75, "c:\\4ed\\code\\4coder_lists.cpp", 28, 71 }, -{ PROC_LINKS(lister__write_character, 0), "lister__write_character", 23, "A lister mode command that dispatches to the lister's write character handler.", 78, "c:\\4ed\\code\\4coder_lists.cpp", 28, 31 }, -{ PROC_LINKS(lister__write_character__default, 0), "lister__write_character__default", 32, "A lister mode command that inserts a new character to the text field.", 69, "c:\\4ed\\code\\4coder_lists.cpp", 28, 125 }, -{ PROC_LINKS(lister__write_character__file_path, 0), "lister__write_character__file_path", 34, "A lister mode command that inserts a character into the text field of a file system list.", 89, "c:\\4ed\\code\\4coder_lists.cpp", 28, 192 }, -{ 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, "c:\\4ed\\code\\4coder_lists.cpp", 28, 256 }, -{ 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, "c:\\4ed\\code\\4coder_project_commands.cpp", 39, 1085 }, -{ 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, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1319 }, -{ PROC_LINKS(miblo_decrement_basic, 0), "miblo_decrement_basic", 21, "Decrement an integer under the cursor by one.", 45, "c:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 113 }, -{ 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, "c:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 391 }, -{ 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, "c:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 403 }, -{ PROC_LINKS(miblo_increment_basic, 0), "miblo_increment_basic", 21, "Increment an integer under the cursor by one.", 45, "c:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 97 }, -{ 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, "c:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 385 }, -{ 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, "c:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 397 }, -{ PROC_LINKS(mouse_wheel_change_face_size, 0), "mouse_wheel_change_face_size", 28, "Reads the state of the mouse wheel and uses it to either increase or decrease the face size.", 92, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 634 }, -{ PROC_LINKS(mouse_wheel_scroll, 0), "mouse_wheel_scroll", 18, "Reads the scroll wheel value from the mouse state and scrolls accordingly.", 74, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 259 }, -{ PROC_LINKS(move_down, 0), "move_down", 9, "Moves the cursor down one line.", 31, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 325 }, -{ PROC_LINKS(move_down_10, 0), "move_down_10", 12, "Moves the cursor down ten lines.", 32, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 337 }, -{ PROC_LINKS(move_down_textual, 0), "move_down_textual", 17, "Moves down to the next line of actual text, regardless of line wrapping.", 72, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 343 }, -{ PROC_LINKS(move_left, 0), "move_left", 9, "Moves the cursor one character to the left.", 43, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 374 }, -{ PROC_LINKS(move_line_down, 0), "move_line_down", 14, "Swaps the line under the cursor with the line below it, and moves the cursor down with it.", 90, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1411 }, -{ PROC_LINKS(move_line_up, 0), "move_line_up", 12, "Swaps the line under the cursor with the line above it, and moves the cursor up with it.", 88, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1352 }, -{ PROC_LINKS(move_right, 0), "move_right", 10, "Moves the cursor one character to the right.", 44, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 384 }, -{ PROC_LINKS(move_up, 0), "move_up", 7, "Moves the cursor up one line.", 29, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 319 }, -{ PROC_LINKS(move_up_10, 0), "move_up_10", 10, "Moves the cursor up ten lines.", 30, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 331 }, -{ 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, "c:\\4ed\\code\\4coder_experiments.cpp", 34, 118 }, -{ 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, "c:\\4ed\\code\\4coder_jump_direct.cpp", 34, 99 }, -{ 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, "c:\\4ed\\code\\4coder_jump_direct.cpp", 34, 113 }, -{ 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, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 585 }, -{ PROC_LINKS(newline_or_goto_position_sticky, 0), "newline_or_goto_position_sticky", 31, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "c:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 571 }, -{ PROC_LINKS(open_all_code, 0), "open_all_code", 13, "Open all code in the current directory. File types are determined by extensions. An extension is considered code based on the extensions specified in 4coder.config.", 164, "c:\\4ed\\code\\4coder_project_commands.cpp", 39, 1069 }, -{ PROC_LINKS(open_all_code_recursive, 0), "open_all_code_recursive", 23, "Works as open_all_code but also runs in all subdirectories.", 59, "c:\\4ed\\code\\4coder_project_commands.cpp", 39, 1076 }, -{ PROC_LINKS(open_file_in_quotes, 0), "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1535 }, -{ PROC_LINKS(open_in_other, 0), "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1939 }, -{ PROC_LINKS(open_long_braces, 0), "open_long_braces", 16, "At the cursor, insert a '{' and '}' separated by a blank line.", 62, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 55 }, -{ PROC_LINKS(open_long_braces_break, 0), "open_long_braces_break", 22, "At the cursor, insert a '{' and '}break;' separated by a blank line.", 68, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 71 }, -{ PROC_LINKS(open_long_braces_semicolon, 0), "open_long_braces_semicolon", 26, "At the cursor, insert a '{' and '};' separated by a blank line.", 63, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 63 }, -{ PROC_LINKS(open_matching_file_cpp, 0), "open_matching_file_cpp", 22, "If the current file is a *.cpp or *.h, attempts to open the corresponding *.h or *.cpp file in the other view.", 110, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1578 }, -{ PROC_LINKS(open_panel_hsplit, 0), "open_panel_hsplit", 17, "Create a new panel by horizontally splitting the active panel.", 62, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 265 }, -{ PROC_LINKS(open_panel_vsplit, 0), "open_panel_vsplit", 17, "Create a new panel by vertically splitting the active panel.", 60, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 256 }, -{ PROC_LINKS(page_down, 0), "page_down", 9, "Scrolls the view down one view height and moves the cursor down one view height.", 80, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 363 }, -{ PROC_LINKS(page_up, 0), "page_up", 7, "Scrolls the view up one view height and moves the cursor up one view height.", 76, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 354 }, -{ PROC_LINKS(paste, 0), "paste", 5, "At the cursor, insert the text at the top of the clipboard.", 59, "c:\\4ed\\code\\4coder_clipboard.cpp", 32, 48 }, -{ PROC_LINKS(paste_and_indent, 0), "paste_and_indent", 16, "Paste from the top of clipboard and run auto-indent on the newly pasted text.", 77, "c:\\4ed\\code\\4coder_clipboard.cpp", 32, 138 }, -{ PROC_LINKS(paste_next, 0), "paste_next", 10, "If the previous command was paste or paste_next, replaces the paste range with the next text down on the clipboard, otherwise operates as the paste command.", 156, "c:\\4ed\\code\\4coder_clipboard.cpp", 32, 88 }, -{ PROC_LINKS(paste_next_and_indent, 0), "paste_next_and_indent", 21, "Paste the next item on the clipboard and run auto-indent on the newly pasted text.", 82, "c:\\4ed\\code\\4coder_clipboard.cpp", 32, 145 }, -{ PROC_LINKS(place_in_scope, 0), "place_in_scope", 14, "Wraps the code contained in the range between cursor and mark with a new curly brace scope.", 91, "c:\\4ed\\code\\4coder_scope_commands.cpp", 37, 475 }, -{ PROC_LINKS(project_command_lister, 0), "project_command_lister", 22, "Open a lister of all commands in the currently loaded project.", 62, "c:\\4ed\\code\\4coder_project_commands.cpp", 39, 1529 }, -{ PROC_LINKS(project_fkey_command, 0), "project_fkey_command", 20, "Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.", 175, "c:\\4ed\\code\\4coder_project_commands.cpp", 39, 1092 }, -{ PROC_LINKS(project_go_to_root_directory, 0), "project_go_to_root_directory", 28, "Changes 4coder's hot directory to the root directory of the currently loaded project. With no loaded project nothing hapepns.", 125, "c:\\4ed\\code\\4coder_project_commands.cpp", 39, 1115 }, -{ PROC_LINKS(query_replace, 0), "query_replace", 13, "Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.", 120, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1085 }, -{ PROC_LINKS(query_replace_identifier, 0), "query_replace_identifier", 24, "Queries the user for a string, and incrementally replace every occurence of the word or token found at the cursor with the specified string.", 140, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1104 }, -{ PROC_LINKS(query_replace_selection, 0), "query_replace_selection", 23, "Queries the user for a string, and incrementally replace every occurence of the string found in the selected range with the specified string.", 141, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1121 }, -{ PROC_LINKS(redo, 0), "redo", 4, "Advances forward through the undo history in the buffer containing the most recent regular edit.", 96, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1829 }, -{ PROC_LINKS(redo_this_buffer, 0), "redo_this_buffer", 16, "Advances forwards through the undo history of the current buffer.", 65, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1734 }, -{ PROC_LINKS(remap_interactive, 0), "remap_interactive", 17, "Switch to a named key binding map.", 34, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 386 }, -{ 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, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1269 }, -{ 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, "c:\\4ed\\code\\4coder_experiments.cpp", 34, 387 }, -{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1655 }, -{ 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, "c:\\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, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 959 }, -{ PROC_LINKS(reverse_search, 0), "reverse_search", 14, "Begins an incremental search up through the current buffer for a user specified string.", 87, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 930 }, -{ 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, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 948 }, -{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1642 }, -{ PROC_LINKS(save_all_dirty_buffers, 0), "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1171 }, -{ PROC_LINKS(save_to_query, 0), "save_to_query", 13, "Queries the user for a file name and saves the contents of the current buffer, altering the buffer's name too.", 110, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1224 }, -{ PROC_LINKS(scope_absorb_down, 0), "scope_absorb_down", 17, "If a scope is currently selected, and a statement or block statement is present below the current scope, the statement is moved into the scope.", 143, "c:\\4ed\\code\\4coder_scope_commands.cpp", 37, 716 }, -{ PROC_LINKS(search, 0), "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 923 }, -{ PROC_LINKS(search_identifier, 0), "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 937 }, -{ PROC_LINKS(seek_alphanumeric_left, 0), "seek_alphanumeric_left", 22, "Seek left for boundary between alphanumeric characters and non-alphanumeric characters.", 87, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1195 }, -{ PROC_LINKS(seek_alphanumeric_or_camel_left, 0), "seek_alphanumeric_or_camel_left", 31, "Seek left for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 106, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1207 }, -{ PROC_LINKS(seek_alphanumeric_or_camel_right, 0), "seek_alphanumeric_or_camel_right", 32, "Seek right for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 107, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1201 }, -{ PROC_LINKS(seek_alphanumeric_right, 0), "seek_alphanumeric_right", 23, "Seek right for boundary between alphanumeric characters and non-alphanumeric characters.", 88, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1189 }, -{ PROC_LINKS(seek_beginning_of_line, 0), "seek_beginning_of_line", 22, "Seeks the cursor to the beginning of the visual line.", 53, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1083 }, -{ PROC_LINKS(seek_beginning_of_textual_line, 0), "seek_beginning_of_textual_line", 30, "Seeks the cursor to the beginning of the line across all text.", 62, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1061 }, -{ PROC_LINKS(seek_end_of_line, 0), "seek_end_of_line", 16, "Seeks the cursor to the end of the visual line.", 47, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1095 }, -{ PROC_LINKS(seek_end_of_textual_line, 0), "seek_end_of_textual_line", 24, "Seeks the cursor to the end of the line across all text.", 56, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1072 }, -{ PROC_LINKS(seek_token_left, 0), "seek_token_left", 15, "Seek left for the next beginning of a token.", 44, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1171 }, -{ PROC_LINKS(seek_token_right, 0), "seek_token_right", 16, "Seek right for the next end of a token.", 39, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1165 }, -{ PROC_LINKS(seek_white_or_token_left, 0), "seek_white_or_token_left", 24, "Seek left for the next end of a token or boundary between whitespace and non-whitespace.", 88, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1183 }, -{ PROC_LINKS(seek_white_or_token_right, 0), "seek_white_or_token_right", 25, "Seek right for the next end of a token or boundary between whitespace and non-whitespace.", 89, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1177 }, -{ PROC_LINKS(seek_whitespace_down, 0), "seek_whitespace_down", 20, "Seeks the cursor down to the next blank line.", 45, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1050 }, -{ PROC_LINKS(seek_whitespace_down_end_line, 0), "seek_whitespace_down_end_line", 29, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1119 }, -{ PROC_LINKS(seek_whitespace_left, 0), "seek_whitespace_left", 20, "Seek left for the next boundary between whitespace and non-whitespace.", 70, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1159 }, -{ PROC_LINKS(seek_whitespace_right, 0), "seek_whitespace_right", 21, "Seek right for the next boundary between whitespace and non-whitespace.", 71, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1153 }, -{ PROC_LINKS(seek_whitespace_up, 0), "seek_whitespace_up", 18, "Seeks the cursor up to the next blank line.", 43, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1039 }, -{ PROC_LINKS(seek_whitespace_up_end_line, 0), "seek_whitespace_up_end_line", 27, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1107 }, -{ PROC_LINKS(select_all, 0), "select_all", 10, "Puts the cursor at the top of the file, and the mark at the bottom of the file.", 79, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 394 }, -{ PROC_LINKS(select_next_scope_absolute, 0), "select_next_scope_absolute", 26, "Finds the first scope started by '{' after the cursor and puts the cursor and mark on the '{' and '}'.", 102, "c:\\4ed\\code\\4coder_scope_commands.cpp", 37, 357 }, -{ PROC_LINKS(select_prev_scope_absolute, 0), "select_prev_scope_absolute", 26, "Finds the first scope started by '{' before the cursor and puts the cursor and mark on the '{' and '}'.", 103, "c:\\4ed\\code\\4coder_scope_commands.cpp", 37, 376 }, -{ PROC_LINKS(select_surrounding_scope, 0), "select_surrounding_scope", 24, "Finds the scope enclosed by '{' '}' surrounding the cursor and puts the cursor and mark on the '{' and '}'.", 107, "c:\\4ed\\code\\4coder_scope_commands.cpp", 37, 342 }, -{ PROC_LINKS(set_bindings_choose, 0), "set_bindings_choose", 19, "Remap keybindings using the 'choose' mapping rule.", 50, "c:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 47 }, -{ PROC_LINKS(set_bindings_default, 0), "set_bindings_default", 20, "Remap keybindings using the 'default' mapping rule.", 51, "c:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 61 }, -{ PROC_LINKS(set_bindings_mac_default, 0), "set_bindings_mac_default", 24, "Remap keybindings using the 'mac-default' mapping rule.", 55, "c:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 75 }, -{ PROC_LINKS(set_mark, 0), "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 126 }, -{ PROC_LINKS(set_mode_to_notepad_like, 0), "set_mode_to_notepad_like", 24, "Sets the edit mode to Notepad like.", 35, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 354 }, -{ PROC_LINKS(set_mode_to_original, 0), "set_mode_to_original", 20, "Sets the edit mode to 4coder original.", 38, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 348 }, -{ PROC_LINKS(setup_build_bat, 0), "setup_build_bat", 15, "Queries the user for several configuration options and initializes a new build batch script.", 92, "c:\\4ed\\code\\4coder_project_commands.cpp", 39, 1500 }, -{ PROC_LINKS(setup_build_bat_and_sh, 0), "setup_build_bat_and_sh", 22, "Queries the user for several configuration options and initializes a new build batch script.", 92, "c:\\4ed\\code\\4coder_project_commands.cpp", 39, 1512 }, -{ PROC_LINKS(setup_build_sh, 0), "setup_build_sh", 14, "Queries the user for several configuration options and initializes a new build shell script.", 92, "c:\\4ed\\code\\4coder_project_commands.cpp", 39, 1506 }, -{ PROC_LINKS(setup_new_project, 0), "setup_new_project", 17, "Queries the user for several configuration options and initializes a new 4coder project with build scripts for every OS.", 120, "c:\\4ed\\code\\4coder_project_commands.cpp", 39, 1493 }, -{ PROC_LINKS(show_filebar, 0), "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 547 }, -{ PROC_LINKS(show_scrollbar, 0), "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 533 }, -{ PROC_LINKS(snipe_token_or_word, 0), "snipe_token_or_word", 19, "Delete a single, whole token on or to the left of the cursor and post it to the clipboard.", 90, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1227 }, -{ PROC_LINKS(snipe_token_or_word_right, 0), "snipe_token_or_word_right", 25, "Delete a single, whole token on or to the right of the cursor and post it to the clipboard.", 91, "c:\\4ed\\code\\4coder_seek.cpp", 27, 1233 }, -{ PROC_LINKS(snippet_lister, 0), "snippet_lister", 14, "Opens a snippet lister for inserting whole pre-written snippets of text.", 72, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 251 }, -{ PROC_LINKS(suppress_mouse, 0), "suppress_mouse", 14, "Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.", 83, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 330 }, -{ PROC_LINKS(swap_buffers_between_panels, 0), "swap_buffers_between_panels", 27, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1602 }, -{ PROC_LINKS(to_lowercase, 0), "to_lowercase", 12, "Converts all ascii text in the range between the cursor and the mark to lowercase.", 82, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 428 }, -{ PROC_LINKS(to_uppercase, 0), "to_uppercase", 12, "Converts all ascii text in the range between the cursor and the mark to uppercase.", 82, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 409 }, -{ PROC_LINKS(toggle_filebar, 0), "toggle_filebar", 14, "Toggles the visibility status of the current view's filebar.", 60, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 561 }, -{ PROC_LINKS(toggle_fps_meter, 0), "toggle_fps_meter", 16, "Toggles the visibility of the FPS performance meter", 51, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 580 }, -{ PROC_LINKS(toggle_fullscreen, 0), "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 378 }, -{ PROC_LINKS(toggle_highlight_enclosing_scopes, 0), "toggle_highlight_enclosing_scopes", 33, "In code files scopes surrounding the cursor are highlighted with distinguishing colors.", 87, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 366 }, -{ PROC_LINKS(toggle_highlight_line_at_cursor, 0), "toggle_highlight_line_at_cursor", 31, "Toggles the line highlight at the cursor.", 41, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 360 }, -{ PROC_LINKS(toggle_line_numbers, 0), "toggle_line_numbers", 19, "Toggles the left margin line numbers.", 37, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 669 }, -{ PROC_LINKS(toggle_line_wrap, 0), "toggle_line_wrap", 16, "Toggles the current buffer's line wrapping status.", 50, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 570 }, -{ PROC_LINKS(toggle_mouse, 0), "toggle_mouse", 12, "Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.", 71, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 342 }, -{ PROC_LINKS(toggle_paren_matching_helper, 0), "toggle_paren_matching_helper", 28, "In code files matching parentheses pairs are colored with distinguishing colors.", 80, "c:\\4ed\\code\\4coder_default_framework.cpp", 40, 372 }, -{ PROC_LINKS(toggle_show_whitespace, 0), "toggle_show_whitespace", 22, "Toggles the current buffer's whitespace visibility status.", 58, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 662 }, -{ PROC_LINKS(toggle_virtual_whitespace, 0), "toggle_virtual_whitespace", 25, "Toggles the current buffer's virtual whitespace status.", 55, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 651 }, -{ PROC_LINKS(uncomment_line, 0), "uncomment_line", 14, "If present, delete '//' at the beginning of the line after leading whitespace.", 78, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 148 }, -{ PROC_LINKS(undo, 0), "undo", 4, "Advances backward through the undo history in the buffer containing the most recent regular edit.", 97, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1750 }, -{ PROC_LINKS(undo_this_buffer, 0), "undo_this_buffer", 16, "Advances backwards through the undo history of the current buffer.", 66, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1719 }, -{ PROC_LINKS(view_buffer_other_panel, 0), "view_buffer_other_panel", 23, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 1592 }, -{ PROC_LINKS(view_jump_list_with_lister, 0), "view_jump_list_with_lister", 26, "When executed on a buffer with jumps, creates a persistent lister for all the jumps", 83, "c:\\4ed\\code\\4coder_jump_lister.cpp", 34, 106 }, -{ PROC_LINKS(word_complete, 0), "word_complete", 13, "Iteratively tries completing the word to the left of the cursor with other words in open buffers that have the same prefix string.", 130, "c:\\4ed\\code\\4coder_search.cpp", 29, 889 }, -{ 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, "c:\\4ed\\code\\4coder_auto_indent.cpp", 34, 644 }, -{ PROC_LINKS(write_block, 0), "write_block", 11, "At the cursor, insert a block comment.", 38, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 103 }, -{ PROC_LINKS(write_character, 0), "write_character", 15, "Inserts whatever character was used to trigger this command.", 60, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 68 }, -{ 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, "c:\\4ed\\code\\4coder_experiments.cpp", 34, 704 }, -{ 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, "c:\\4ed\\code\\4coder_experiments.cpp", 34, 698 }, -{ 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, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 91 }, -{ 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, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 97 }, -{ 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, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 85 }, -{ PROC_LINKS(write_underscore, 0), "write_underscore", 16, "Inserts an underscore.", 22, "c:\\4ed\\code\\4coder_base_commands.cpp", 36, 77 }, -{ PROC_LINKS(write_zero_struct, 0), "write_zero_struct", 17, "At the cursor, insert a ' = {};'.", 33, "c:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 109 }, +{ 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, 336 }, +{ 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, 623 }, +{ 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, 633 }, +{ PROC_LINKS(auto_tab_whole_file, 0), "auto_tab_whole_file", 19, "Audo-indents the entire current buffer.", 39, "w:\\4ed\\code\\4coder_auto_indent.cpp", 34, 612 }, +{ PROC_LINKS(backspace_char, 0), "backspace_char", 14, "Deletes the character to the left of the cursor.", 48, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 104 }, +{ PROC_LINKS(backspace_word, 0), "backspace_word", 14, "Delete characters between the cursor position and the first alphanumeric boundary to the left.", 94, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1215 }, +{ PROC_LINKS(basic_change_active_panel, 0), "basic_change_active_panel", 25, "Change the currently active panel, moving to the panel with the next highest view_id. Will not skipe the build panel if it is open.", 132, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 516 }, +{ PROC_LINKS(build_in_build_panel, 0), "build_in_build_panel", 20, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.", 230, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 180 }, +{ PROC_LINKS(build_search, 0), "build_search", 12, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*.", 153, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 146 }, +{ PROC_LINKS(center_view, 0), "center_view", 11, "Centers the view vertically on the line on which the cursor sits.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 156 }, +{ PROC_LINKS(change_active_panel, 0), "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 236 }, +{ PROC_LINKS(change_active_panel_backwards, 0), "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 246 }, +{ PROC_LINKS(change_to_build_panel, 0), "change_to_build_panel", 21, "If the special build panel is open, makes the build panel the active panel.", 75, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 202 }, +{ PROC_LINKS(clean_all_lines, 0), "clean_all_lines", 15, "Removes trailing whitespace from all lines in the current buffer.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 447 }, +{ PROC_LINKS(click_set_cursor, 0), "click_set_cursor", 16, "Sets the cursor position to the mouse position.", 47, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 215 }, +{ PROC_LINKS(click_set_cursor_and_mark, 0), "click_set_cursor_and_mark", 25, "Sets the cursor position and mark to the mouse position.", 56, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 201 }, +{ PROC_LINKS(click_set_cursor_if_lbutton, 0), "click_set_cursor_if_lbutton", 27, "If the mouse left button is pressed, sets the cursor position to the mouse position.", 84, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 229 }, +{ PROC_LINKS(click_set_mark, 0), "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 245 }, +{ PROC_LINKS(close_all_code, 0), "close_all_code", 14, "Closes any buffer with a filename ending with an extension configured to be recognized as a code file type.", 107, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1062 }, +{ PROC_LINKS(close_build_panel, 0), "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 196 }, +{ PROC_LINKS(close_panel, 0), "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 524 }, +{ PROC_LINKS(command_lister, 0), "command_lister", 14, "Opens an interactive list of all registered commands.", 53, "w:\\4ed\\code\\4coder_lists.cpp", 28, 1037 }, +{ PROC_LINKS(comment_line, 0), "comment_line", 12, "Insert '//' at the beginning of the line after leading whitespace.", 66, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 135 }, +{ PROC_LINKS(comment_line_toggle, 0), "comment_line_toggle", 19, "Turns uncommented lines into commented lines and vice versa for comments starting with '//'.", 92, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 161 }, +{ PROC_LINKS(copy, 0), "copy", 4, "Copy the text in the range from the cursor to the mark onto the clipboard.", 74, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 26 }, +{ PROC_LINKS(cursor_mark_swap, 0), "cursor_mark_swap", 16, "Swaps the position of the cursor and the mark.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 134 }, +{ PROC_LINKS(cut, 0), "cut", 3, "Cut the text in the range from the cursor to the mark onto the clipboard.", 73, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 36 }, +{ PROC_LINKS(decrease_face_size, 0), "decrease_face_size", 18, "Decrease the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 621 }, +{ PROC_LINKS(decrease_line_wrap, 0), "decrease_line_wrap", 18, "Decrases the current buffer's width for line wrapping.", 54, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 597 }, +{ PROC_LINKS(delete_char, 0), "delete_char", 11, "Deletes the character to the right of the cursor.", 49, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 84 }, +{ PROC_LINKS(delete_current_scope, 0), "delete_current_scope", 20, "Deletes the braces surrounding the currently selected scope. Leaves the contents within the scope.", 99, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 481 }, +{ PROC_LINKS(delete_file_query, 0), "delete_file_query", 17, "Deletes the file of the current buffer if 4coder has the appropriate access rights. Will ask the user for confirmation first.", 125, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1197 }, +{ PROC_LINKS(delete_line, 0), "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1451 }, +{ PROC_LINKS(delete_range, 0), "delete_range", 12, "Deletes the text in the range between the cursor and the mark.", 62, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 144 }, +{ PROC_LINKS(delete_word, 0), "delete_word", 11, "Delete characters between the cursor position and the first alphanumeric boundary to the right.", 95, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1221 }, +{ PROC_LINKS(duplicate_line, 0), "duplicate_line", 14, "Create a copy of the line on which the cursor sits.", 51, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1428 }, +{ PROC_LINKS(eol_dosify, 0), "eol_dosify", 10, "Puts the buffer in DOS line ending mode.", 40, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 675 }, +{ PROC_LINKS(eol_nixify, 0), "eol_nixify", 10, "Puts the buffer in NIX line ending mode.", 40, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 684 }, +{ PROC_LINKS(execute_any_cli, 0), "execute_any_cli", 15, "Queries for an output buffer name and system command, runs the system command as a CLI and prints the output to the specified buffer.", 133, "w:\\4ed\\code\\4coder_system_command.cpp", 37, 23 }, +{ PROC_LINKS(execute_previous_cli, 0), "execute_previous_cli", 20, "If the command execute_any_cli has already been used, this will execute a CLI reusing the most recent buffer name and command.", 126, "w:\\4ed\\code\\4coder_system_command.cpp", 37, 7 }, +{ PROC_LINKS(exit_4coder, 0), "exit_4coder", 11, "Attempts to close 4coder.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 693 }, +{ PROC_LINKS(goto_beginning_of_file, 0), "goto_beginning_of_file", 22, "Sets the cursor to the beginning of the file.", 45, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1131 }, +{ PROC_LINKS(goto_end_of_file, 0), "goto_end_of_file", 16, "Sets the cursor to the end of the file.", 39, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1139 }, +{ PROC_LINKS(goto_first_jump_direct, 0), "goto_first_jump_direct", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 83 }, +{ PROC_LINKS(goto_first_jump_same_panel_sticky, 0), "goto_first_jump_same_panel_sticky", 33, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer and views the buffer in the panel where the jump list was.", 153, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 562 }, +{ PROC_LINKS(goto_first_jump_sticky, 0), "goto_first_jump_sticky", 22, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 544 }, +{ PROC_LINKS(goto_jump_at_cursor_direct, 0), "goto_jump_at_cursor_direct", 26, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 8 }, +{ PROC_LINKS(goto_jump_at_cursor_same_panel_direct, 0), "goto_jump_at_cursor_same_panel_direct", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list..", 168, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 29 }, +{ PROC_LINKS(goto_jump_at_cursor_same_panel_sticky, 0), "goto_jump_at_cursor_same_panel_sticky", 37, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list.", 167, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 374 }, +{ PROC_LINKS(goto_jump_at_cursor_sticky, 0), "goto_jump_at_cursor_sticky", 26, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 346 }, +{ PROC_LINKS(goto_line, 0), "goto_line", 9, "Queries the user for a number, and jumps the cursor to the corresponding line.", 78, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 701 }, +{ PROC_LINKS(goto_next_jump_direct, 0), "goto_next_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 47 }, +{ PROC_LINKS(goto_next_jump_no_skips_direct, 0), "goto_next_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 65 }, +{ PROC_LINKS(goto_next_jump_no_skips_sticky, 0), "goto_next_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 509 }, +{ PROC_LINKS(goto_next_jump_sticky, 0), "goto_next_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 475 }, +{ PROC_LINKS(goto_prev_jump_direct, 0), "goto_prev_jump_direct", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 56 }, +{ PROC_LINKS(goto_prev_jump_no_skips_direct, 0), "goto_prev_jump_no_skips_direct", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "w:\\4ed\\code\\4coder_jump_direct.cpp", 34, 74 }, +{ PROC_LINKS(goto_prev_jump_no_skips_sticky, 0), "goto_prev_jump_no_skips_sticky", 30, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 529 }, +{ PROC_LINKS(goto_prev_jump_sticky, 0), "goto_prev_jump_sticky", 21, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 495 }, +{ PROC_LINKS(hide_filebar, 0), "hide_filebar", 12, "Sets the current view to hide it's filebar.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 554 }, +{ PROC_LINKS(hide_scrollbar, 0), "hide_scrollbar", 14, "Sets the current view to hide it's scrollbar.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 540 }, +{ PROC_LINKS(if0_off, 0), "if0_off", 7, "Surround the range between the cursor and mark with an '#if 0' and an '#endif'", 78, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 79 }, +{ PROC_LINKS(increase_face_size, 0), "increase_face_size", 18, "Increase the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 608 }, +{ PROC_LINKS(increase_line_wrap, 0), "increase_line_wrap", 18, "Increases the current buffer's width for line wrapping.", 55, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 586 }, +{ PROC_LINKS(interactive_kill_buffer, 0), "interactive_kill_buffer", 23, "Interactively kill an open buffer.", 34, "w:\\4ed\\code\\4coder_lists.cpp", 28, 806 }, +{ PROC_LINKS(interactive_new, 0), "interactive_new", 15, "Interactively creates a new file.", 33, "w:\\4ed\\code\\4coder_lists.cpp", 28, 919 }, +{ PROC_LINKS(interactive_open, 0), "interactive_open", 16, "Interactively opens a file.", 27, "w:\\4ed\\code\\4coder_lists.cpp", 28, 952 }, +{ 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, 880 }, +{ PROC_LINKS(interactive_switch_buffer, 0), "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "w:\\4ed\\code\\4coder_lists.cpp", 28, 786 }, +{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1635 }, +{ 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, 172 }, +{ 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, 345 }, +{ 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, 351 }, +{ PROC_LINKS(list_all_functions_current_buffer, 0), "list_all_functions_current_buffer", 33, "Creates a jump list of lines of the current buffer that appear to define or declare functions.", 94, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 320 }, +{ PROC_LINKS(list_all_functions_current_buffer_lister, 0), "list_all_functions_current_buffer_lister", 40, "Creates a lister of locations that look like function definitions and declarations in the buffer.", 97, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 331 }, +{ PROC_LINKS(list_all_locations, 0), "list_all_locations", 18, "Queries the user for a string and lists all exact case-sensitive matches found in all open buffers.", 99, "w:\\4ed\\code\\4coder_search.cpp", 29, 801 }, +{ PROC_LINKS(list_all_locations_case_insensitive, 0), "list_all_locations_case_insensitive", 35, "Queries the user for a string and lists all exact case-insensitive matches found in all open buffers.", 101, "w:\\4ed\\code\\4coder_search.cpp", 29, 815 }, +{ PROC_LINKS(list_all_locations_of_identifier, 0), "list_all_locations_of_identifier", 32, "Reads a token or word under the cursor and lists all exact case-sensitive mathces in all open buffers.", 102, "w:\\4ed\\code\\4coder_search.cpp", 29, 829 }, +{ PROC_LINKS(list_all_locations_of_identifier_case_insensitive, 0), "list_all_locations_of_identifier_case_insensitive", 49, "Reads a token or word under the cursor and lists all exact case-insensitive mathces in all open buffers.", 104, "w:\\4ed\\code\\4coder_search.cpp", 29, 836 }, +{ PROC_LINKS(list_all_locations_of_selection, 0), "list_all_locations_of_selection", 31, "Reads the string in the selected range and lists all exact case-sensitive mathces in all open buffers.", 102, "w:\\4ed\\code\\4coder_search.cpp", 29, 843 }, +{ PROC_LINKS(list_all_locations_of_selection_case_insensitive, 0), "list_all_locations_of_selection_case_insensitive", 48, "Reads the string in the selected range and lists all exact case-insensitive mathces in all open buffers.", 104, "w:\\4ed\\code\\4coder_search.cpp", 29, 850 }, +{ PROC_LINKS(list_all_locations_of_type_definition, 0), "list_all_locations_of_type_definition", 37, "Queries user for string, lists all locations of strings that appear to define a type whose name matches the input string.", 121, "w:\\4ed\\code\\4coder_search.cpp", 29, 857 }, +{ PROC_LINKS(list_all_locations_of_type_definition_of_identifier, 0), "list_all_locations_of_type_definition_of_identifier", 51, "Reads a token or word under the cursor and lists all locations of strings that appear to define a type whose name matches it.", 125, "w:\\4ed\\code\\4coder_search.cpp", 29, 868 }, +{ PROC_LINKS(list_all_substring_locations, 0), "list_all_substring_locations", 28, "Queries the user for a string and lists all case-sensitive substring matches found in all open buffers.", 103, "w:\\4ed\\code\\4coder_search.cpp", 29, 808 }, +{ PROC_LINKS(list_all_substring_locations_case_insensitive, 0), "list_all_substring_locations_case_insensitive", 45, "Queries the user for a string and lists all case-insensitive substring matches found in all open buffers.", 105, "w:\\4ed\\code\\4coder_search.cpp", 29, 822 }, +{ PROC_LINKS(lister__activate, 0), "lister__activate", 16, "A lister mode command that activates the list's action on the highlighted item.", 79, "w:\\4ed\\code\\4coder_lists.cpp", 28, 15 }, +{ PROC_LINKS(lister__backspace_text_field, 0), "lister__backspace_text_field", 28, "A lister mode command that dispatches to the lister's backspace text field handler.", 83, "w:\\4ed\\code\\4coder_lists.cpp", 28, 42 }, +{ PROC_LINKS(lister__backspace_text_field__default, 0), "lister__backspace_text_field__default", 37, "A lister mode command that backspaces one character from the text field.", 72, "w:\\4ed\\code\\4coder_lists.cpp", 28, 151 }, +{ PROC_LINKS(lister__backspace_text_field__file_path, 0), "lister__backspace_text_field__file_path", 39, "A lister mode command that backspaces one character from the text field of a file system list.", 94, "w:\\4ed\\code\\4coder_lists.cpp", 28, 227 }, +{ PROC_LINKS(lister__mouse_press, 0), "lister__mouse_press", 19, "A lister mode command that beings a click interaction with a list item under the mouse.", 87, "w:\\4ed\\code\\4coder_lists.cpp", 28, 89 }, +{ PROC_LINKS(lister__mouse_release, 0), "lister__mouse_release", 21, "A lister mode command that ends a click interaction with a list item under the mouse, possibly activating it.", 109, "w:\\4ed\\code\\4coder_lists.cpp", 28, 101 }, +{ PROC_LINKS(lister__move_down, 0), "lister__move_down", 17, "A lister mode command that dispatches to the lister's navigate down handler.", 76, "w:\\4ed\\code\\4coder_lists.cpp", 28, 62 }, +{ PROC_LINKS(lister__move_down__default, 0), "lister__move_down__default", 26, "A lister mode command that moves the highlighted item one down in the list.", 75, "w:\\4ed\\code\\4coder_lists.cpp", 28, 184 }, +{ PROC_LINKS(lister__move_up, 0), "lister__move_up", 15, "A lister mode command that dispatches to the lister's navigate up handler.", 74, "w:\\4ed\\code\\4coder_lists.cpp", 28, 52 }, +{ PROC_LINKS(lister__move_up__default, 0), "lister__move_up__default", 24, "A lister mode command that moves the highlighted item one up in the list.", 73, "w:\\4ed\\code\\4coder_lists.cpp", 28, 167 }, +{ PROC_LINKS(lister__quit, 0), "lister__quit", 12, "A lister mode command that quits the list without executing any actions.", 72, "w:\\4ed\\code\\4coder_lists.cpp", 28, 8 }, +{ PROC_LINKS(lister__repaint, 0), "lister__repaint", 15, "A lister mode command that updates the lists UI data.", 53, "w:\\4ed\\code\\4coder_lists.cpp", 28, 118 }, +{ PROC_LINKS(lister__wheel_scroll, 0), "lister__wheel_scroll", 20, "A lister mode command that scrolls the list in response to the mouse wheel.", 75, "w:\\4ed\\code\\4coder_lists.cpp", 28, 72 }, +{ PROC_LINKS(lister__write_character, 0), "lister__write_character", 23, "A lister mode command that dispatches to the lister's write character handler.", 78, "w:\\4ed\\code\\4coder_lists.cpp", 28, 32 }, +{ PROC_LINKS(lister__write_character__default, 0), "lister__write_character__default", 32, "A lister mode command that inserts a new character to the text field.", 69, "w:\\4ed\\code\\4coder_lists.cpp", 28, 130 }, +{ PROC_LINKS(lister__write_character__file_path, 0), "lister__write_character__file_path", 34, "A lister mode command that inserts a character into the text field of a file system list.", 89, "w:\\4ed\\code\\4coder_lists.cpp", 28, 201 }, +{ 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, 267 }, +{ 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, 1085 }, +{ 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, 1319 }, +{ 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, 113 }, +{ 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, 391 }, +{ 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, 403 }, +{ 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, 97 }, +{ 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, 385 }, +{ 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, 397 }, +{ PROC_LINKS(mouse_wheel_change_face_size, 0), "mouse_wheel_change_face_size", 28, "Reads the state of the mouse wheel and uses it to either increase or decrease the face size.", 92, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 634 }, +{ 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, 259 }, +{ PROC_LINKS(move_down, 0), "move_down", 9, "Moves the cursor down one line.", 31, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 325 }, +{ 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, 337 }, +{ PROC_LINKS(move_down_textual, 0), "move_down_textual", 17, "Moves down to the next line of actual text, regardless of line wrapping.", 72, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 343 }, +{ PROC_LINKS(move_left, 0), "move_left", 9, "Moves the cursor one character to the left.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 374 }, +{ PROC_LINKS(move_line_down, 0), "move_line_down", 14, "Swaps the line under the cursor with the line below it, and moves the cursor down with it.", 90, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1411 }, +{ PROC_LINKS(move_line_up, 0), "move_line_up", 12, "Swaps the line under the cursor with the line above it, and moves the cursor up with it.", 88, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1352 }, +{ 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, 384 }, +{ PROC_LINKS(move_up, 0), "move_up", 7, "Moves the cursor up one line.", 29, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 319 }, +{ 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, 331 }, +{ 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, 118 }, +{ 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, 100 }, +{ 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, 114 }, +{ 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, 599 }, +{ PROC_LINKS(newline_or_goto_position_sticky, 0), "newline_or_goto_position_sticky", 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_sticky.cpp", 34, 585 }, +{ PROC_LINKS(open_all_code, 0), "open_all_code", 13, "Open all code in the current directory. File types are determined by extensions. An extension is considered code based on the extensions specified in 4coder.config.", 164, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1069 }, +{ PROC_LINKS(open_all_code_recursive, 0), "open_all_code_recursive", 23, "Works as open_all_code but also runs in all subdirectories.", 59, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1076 }, +{ PROC_LINKS(open_file_in_quotes, 0), "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1535 }, +{ PROC_LINKS(open_in_other, 0), "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1939 }, +{ PROC_LINKS(open_long_braces, 0), "open_long_braces", 16, "At the cursor, insert a '{' and '}' separated by a blank line.", 62, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 55 }, +{ PROC_LINKS(open_long_braces_break, 0), "open_long_braces_break", 22, "At the cursor, insert a '{' and '}break;' separated by a blank line.", 68, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 71 }, +{ PROC_LINKS(open_long_braces_semicolon, 0), "open_long_braces_semicolon", 26, "At the cursor, insert a '{' and '};' separated by a blank line.", 63, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 63 }, +{ PROC_LINKS(open_matching_file_cpp, 0), "open_matching_file_cpp", 22, "If the current file is a *.cpp or *.h, attempts to open the corresponding *.h or *.cpp file in the other view.", 110, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1578 }, +{ PROC_LINKS(open_panel_hsplit, 0), "open_panel_hsplit", 17, "Create a new panel by horizontally splitting the active panel.", 62, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 265 }, +{ PROC_LINKS(open_panel_vsplit, 0), "open_panel_vsplit", 17, "Create a new panel by vertically splitting the active panel.", 60, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 256 }, +{ PROC_LINKS(page_down, 0), "page_down", 9, "Scrolls the view down one view height and moves the cursor down one view height.", 80, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 363 }, +{ PROC_LINKS(page_up, 0), "page_up", 7, "Scrolls the view up one view height and moves the cursor up one view height.", 76, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 354 }, +{ PROC_LINKS(paste, 0), "paste", 5, "At the cursor, insert the text at the top of the clipboard.", 59, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 48 }, +{ PROC_LINKS(paste_and_indent, 0), "paste_and_indent", 16, "Paste from the top of clipboard and run auto-indent on the newly pasted text.", 77, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 138 }, +{ PROC_LINKS(paste_next, 0), "paste_next", 10, "If the previous command was paste or paste_next, replaces the paste range with the next text down on the clipboard, otherwise operates as the paste command.", 156, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 88 }, +{ PROC_LINKS(paste_next_and_indent, 0), "paste_next_and_indent", 21, "Paste the next item on the clipboard and run auto-indent on the newly pasted text.", 82, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 145 }, +{ PROC_LINKS(place_in_scope, 0), "place_in_scope", 14, "Wraps the code contained in the range between cursor and mark with a new curly brace scope.", 91, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 475 }, +{ PROC_LINKS(project_command_lister, 0), "project_command_lister", 22, "Open a lister of all commands in the currently loaded project.", 62, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1527 }, +{ PROC_LINKS(project_fkey_command, 0), "project_fkey_command", 20, "Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.", 175, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1092 }, +{ PROC_LINKS(project_go_to_root_directory, 0), "project_go_to_root_directory", 28, "Changes 4coder's hot directory to the root directory of the currently loaded project. With no loaded project nothing hapepns.", 125, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1115 }, +{ PROC_LINKS(query_replace, 0), "query_replace", 13, "Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.", 120, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1085 }, +{ PROC_LINKS(query_replace_identifier, 0), "query_replace_identifier", 24, "Queries the user for a string, and incrementally replace every occurence of the word or token found at the cursor with the specified string.", 140, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1104 }, +{ PROC_LINKS(query_replace_selection, 0), "query_replace_selection", 23, "Queries the user for a string, and incrementally replace every occurence of the string found in the selected range with the specified string.", 141, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1121 }, +{ PROC_LINKS(redo, 0), "redo", 4, "Advances forward through the undo history in the buffer containing the most recent regular edit.", 96, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1829 }, +{ PROC_LINKS(redo_this_buffer, 0), "redo_this_buffer", 16, "Advances forwards through the undo history of the current buffer.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1734 }, +{ PROC_LINKS(remap_interactive, 0), "remap_interactive", 17, "Switch to a named key binding map.", 34, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 386 }, +{ 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, 1269 }, +{ 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, 387 }, +{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1655 }, +{ 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, 959 }, +{ 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, 930 }, +{ 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, 948 }, +{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1642 }, +{ PROC_LINKS(save_all_dirty_buffers, 0), "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1171 }, +{ PROC_LINKS(save_to_query, 0), "save_to_query", 13, "Queries the user for a file name and saves the contents of the current buffer, altering the buffer's name too.", 110, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1224 }, +{ PROC_LINKS(scope_absorb_down, 0), "scope_absorb_down", 17, "If a scope is currently selected, and a statement or block statement is present below the current scope, the statement is moved into the scope.", 143, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 716 }, +{ PROC_LINKS(search, 0), "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 923 }, +{ PROC_LINKS(search_identifier, 0), "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 937 }, +{ PROC_LINKS(seek_alphanumeric_left, 0), "seek_alphanumeric_left", 22, "Seek left for boundary between alphanumeric characters and non-alphanumeric characters.", 87, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1195 }, +{ PROC_LINKS(seek_alphanumeric_or_camel_left, 0), "seek_alphanumeric_or_camel_left", 31, "Seek left for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 106, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1207 }, +{ PROC_LINKS(seek_alphanumeric_or_camel_right, 0), "seek_alphanumeric_or_camel_right", 32, "Seek right for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 107, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1201 }, +{ PROC_LINKS(seek_alphanumeric_right, 0), "seek_alphanumeric_right", 23, "Seek right for boundary between alphanumeric characters and non-alphanumeric characters.", 88, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1189 }, +{ PROC_LINKS(seek_beginning_of_line, 0), "seek_beginning_of_line", 22, "Seeks the cursor to the beginning of the visual line.", 53, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1083 }, +{ PROC_LINKS(seek_beginning_of_textual_line, 0), "seek_beginning_of_textual_line", 30, "Seeks the cursor to the beginning of the line across all text.", 62, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1061 }, +{ PROC_LINKS(seek_end_of_line, 0), "seek_end_of_line", 16, "Seeks the cursor to the end of the visual line.", 47, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1095 }, +{ PROC_LINKS(seek_end_of_textual_line, 0), "seek_end_of_textual_line", 24, "Seeks the cursor to the end of the line across all text.", 56, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1072 }, +{ PROC_LINKS(seek_token_left, 0), "seek_token_left", 15, "Seek left for the next beginning of a token.", 44, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1171 }, +{ PROC_LINKS(seek_token_right, 0), "seek_token_right", 16, "Seek right for the next end of a token.", 39, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1165 }, +{ PROC_LINKS(seek_white_or_token_left, 0), "seek_white_or_token_left", 24, "Seek left for the next end of a token or boundary between whitespace and non-whitespace.", 88, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1183 }, +{ PROC_LINKS(seek_white_or_token_right, 0), "seek_white_or_token_right", 25, "Seek right for the next end of a token or boundary between whitespace and non-whitespace.", 89, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1177 }, +{ PROC_LINKS(seek_whitespace_down, 0), "seek_whitespace_down", 20, "Seeks the cursor down to the next blank line.", 45, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1050 }, +{ PROC_LINKS(seek_whitespace_down_end_line, 0), "seek_whitespace_down_end_line", 29, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1119 }, +{ PROC_LINKS(seek_whitespace_left, 0), "seek_whitespace_left", 20, "Seek left for the next boundary between whitespace and non-whitespace.", 70, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1159 }, +{ PROC_LINKS(seek_whitespace_right, 0), "seek_whitespace_right", 21, "Seek right for the next boundary between whitespace and non-whitespace.", 71, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1153 }, +{ PROC_LINKS(seek_whitespace_up, 0), "seek_whitespace_up", 18, "Seeks the cursor up to the next blank line.", 43, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1039 }, +{ PROC_LINKS(seek_whitespace_up_end_line, 0), "seek_whitespace_up_end_line", 27, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1107 }, +{ PROC_LINKS(select_all, 0), "select_all", 10, "Puts the cursor at the top of the file, and the mark at the bottom of the file.", 79, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 394 }, +{ PROC_LINKS(select_next_scope_absolute, 0), "select_next_scope_absolute", 26, "Finds the first scope started by '{' after the cursor and puts the cursor and mark on the '{' and '}'.", 102, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 357 }, +{ PROC_LINKS(select_prev_scope_absolute, 0), "select_prev_scope_absolute", 26, "Finds the first scope started by '{' before the cursor and puts the cursor and mark on the '{' and '}'.", 103, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 376 }, +{ PROC_LINKS(select_surrounding_scope, 0), "select_surrounding_scope", 24, "Finds the scope enclosed by '{' '}' surrounding the cursor and puts the cursor and mark on the '{' and '}'.", 107, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 342 }, +{ PROC_LINKS(set_bindings_choose, 0), "set_bindings_choose", 19, "Remap keybindings using the 'choose' mapping rule.", 50, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 47 }, +{ PROC_LINKS(set_bindings_default, 0), "set_bindings_default", 20, "Remap keybindings using the 'default' mapping rule.", 51, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 61 }, +{ PROC_LINKS(set_bindings_mac_default, 0), "set_bindings_mac_default", 24, "Remap keybindings using the 'mac-default' mapping rule.", 55, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 75 }, +{ PROC_LINKS(set_mark, 0), "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 126 }, +{ PROC_LINKS(set_mode_to_notepad_like, 0), "set_mode_to_notepad_like", 24, "Sets the edit mode to Notepad like.", 35, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 354 }, +{ PROC_LINKS(set_mode_to_original, 0), "set_mode_to_original", 20, "Sets the edit mode to 4coder original.", 38, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 348 }, +{ PROC_LINKS(setup_build_bat, 0), "setup_build_bat", 15, "Queries the user for several configuration options and initializes a new build batch script.", 92, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1500 }, +{ PROC_LINKS(setup_build_bat_and_sh, 0), "setup_build_bat_and_sh", 22, "Queries the user for several configuration options and initializes a new build batch script.", 92, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1512 }, +{ PROC_LINKS(setup_build_sh, 0), "setup_build_sh", 14, "Queries the user for several configuration options and initializes a new build shell script.", 92, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1506 }, +{ PROC_LINKS(setup_new_project, 0), "setup_new_project", 17, "Queries the user for several configuration options and initializes a new 4coder project with build scripts for every OS.", 120, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1493 }, +{ PROC_LINKS(show_filebar, 0), "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 547 }, +{ PROC_LINKS(show_scrollbar, 0), "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 533 }, +{ PROC_LINKS(snipe_token_or_word, 0), "snipe_token_or_word", 19, "Delete a single, whole token on or to the left of the cursor and post it to the clipboard.", 90, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1227 }, +{ PROC_LINKS(snipe_token_or_word_right, 0), "snipe_token_or_word_right", 25, "Delete a single, whole token on or to the right of the cursor and post it to the clipboard.", 91, "w:\\4ed\\code\\4coder_seek.cpp", 27, 1233 }, +{ PROC_LINKS(snippet_lister, 0), "snippet_lister", 14, "Opens a snippet lister for inserting whole pre-written snippets of text.", 72, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 249 }, +{ PROC_LINKS(suppress_mouse, 0), "suppress_mouse", 14, "Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.", 83, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 330 }, +{ PROC_LINKS(swap_buffers_between_panels, 0), "swap_buffers_between_panels", 27, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1602 }, +{ PROC_LINKS(to_lowercase, 0), "to_lowercase", 12, "Converts all ascii text in the range between the cursor and the mark to lowercase.", 82, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 428 }, +{ PROC_LINKS(to_uppercase, 0), "to_uppercase", 12, "Converts all ascii text in the range between the cursor and the mark to uppercase.", 82, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 409 }, +{ PROC_LINKS(toggle_filebar, 0), "toggle_filebar", 14, "Toggles the visibility status of the current view's filebar.", 60, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 561 }, +{ PROC_LINKS(toggle_fps_meter, 0), "toggle_fps_meter", 16, "Toggles the visibility of the FPS performance meter", 51, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 580 }, +{ PROC_LINKS(toggle_fullscreen, 0), "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 378 }, +{ PROC_LINKS(toggle_highlight_enclosing_scopes, 0), "toggle_highlight_enclosing_scopes", 33, "In code files scopes surrounding the cursor are highlighted with distinguishing colors.", 87, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 366 }, +{ PROC_LINKS(toggle_highlight_line_at_cursor, 0), "toggle_highlight_line_at_cursor", 31, "Toggles the line highlight at the cursor.", 41, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 360 }, +{ PROC_LINKS(toggle_line_numbers, 0), "toggle_line_numbers", 19, "Toggles the left margin line numbers.", 37, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 669 }, +{ PROC_LINKS(toggle_line_wrap, 0), "toggle_line_wrap", 16, "Toggles the current buffer's line wrapping status.", 50, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 570 }, +{ PROC_LINKS(toggle_mouse, 0), "toggle_mouse", 12, "Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.", 71, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 342 }, +{ PROC_LINKS(toggle_paren_matching_helper, 0), "toggle_paren_matching_helper", 28, "In code files matching parentheses pairs are colored with distinguishing colors.", 80, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 372 }, +{ PROC_LINKS(toggle_show_whitespace, 0), "toggle_show_whitespace", 22, "Toggles the current buffer's whitespace visibility status.", 58, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 662 }, +{ PROC_LINKS(toggle_virtual_whitespace, 0), "toggle_virtual_whitespace", 25, "Toggles the current buffer's virtual whitespace status.", 55, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 651 }, +{ PROC_LINKS(uncomment_line, 0), "uncomment_line", 14, "If present, delete '//' at the beginning of the line after leading whitespace.", 78, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 148 }, +{ PROC_LINKS(undo, 0), "undo", 4, "Advances backward through the undo history in the buffer containing the most recent regular edit.", 97, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1750 }, +{ PROC_LINKS(undo_this_buffer, 0), "undo_this_buffer", 16, "Advances backwards through the undo history of the current buffer.", 66, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1719 }, +{ PROC_LINKS(view_buffer_other_panel, 0), "view_buffer_other_panel", 23, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1592 }, +{ PROC_LINKS(view_jump_list_with_lister, 0), "view_jump_list_with_lister", 26, "When executed on a buffer with jumps, creates a persistent lister for all the jumps", 83, "w:\\4ed\\code\\4coder_jump_lister.cpp", 34, 104 }, +{ PROC_LINKS(word_complete, 0), "word_complete", 13, "Iteratively tries completing the word to the left of the cursor with other words in open buffers that have the same prefix string.", 130, "w:\\4ed\\code\\4coder_search.cpp", 29, 889 }, +{ 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, 644 }, +{ 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, 103 }, +{ 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, 68 }, +{ 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, 704 }, +{ 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, 698 }, +{ 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, 91 }, +{ 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, 97 }, +{ 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, 85 }, +{ PROC_LINKS(write_underscore, 0), "write_underscore", 16, "Inserts an underscore.", 22, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 77 }, +{ PROC_LINKS(write_zero_struct, 0), "write_zero_struct", 17, "At the cursor, insert a ' = {};'.", 33, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 109 }, }; static int32_t fcoder_metacmd_ID_allow_mouse = 0; static int32_t fcoder_metacmd_ID_auto_tab_line_at_cursor = 1; diff --git a/4coder_helper.cpp b/4coder_helper.cpp index a203ca61..b2f0acba 100644 --- a/4coder_helper.cpp +++ b/4coder_helper.cpp @@ -576,15 +576,17 @@ get_line_x_rect(View_Summary *view){ return(rect); } -static View_Summary -get_first_view_with_buffer(Application_Links *app, i32 buffer_id){ - View_Summary result = {}; - View_Summary test = {}; +static View_ID +get_first_view_with_buffer(Application_Links *app, Buffer_ID buffer_id){ + View_ID result = {}; + View_ID test = {}; if (buffer_id != 0){ - for (test = get_view_first(app, AccessAll); - test.exists; - get_view_next(app, &test, AccessAll)){ - if (test.buffer_id == buffer_id){ + for (get_view_next(app, 0, AccessAll, &test); + test != 0; + get_view_next(app, test, AccessAll, &test)){ + Buffer_ID test_buffer = 0; + view_get_buffer(app, test, AccessAll, &test_buffer); + if (test_buffer == buffer_id){ result = test; break; } @@ -714,8 +716,7 @@ kill_buffer(Application_Links *app, Buffer_Identifier identifier, View_ID gui_vi Buffer_Kill_Result result = kill_buffer(app, identifier, flags); if (result == BufferKillResult_Dirty){ Buffer_ID buffer = buffer_identifier_to_id(app, identifier); - View_Summary view = get_view(app, gui_view_id, AccessAll); - do_gui_sure_to_kill(app, buffer, &view); + do_gui_sure_to_kill(app, buffer, gui_view_id); } return(result); } diff --git a/4coder_jump_direct.cpp b/4coder_jump_direct.cpp index 8ab4327f..c4463607 100644 --- a/4coder_jump_direct.cpp +++ b/4coder_jump_direct.cpp @@ -14,11 +14,12 @@ CUSTOM_DOC("If the cursor is found to be on a jump location, parses the jump loc Parsed_Jump jump = parse_jump_from_buffer_line(app, &global_part, view.buffer_id, view.cursor.line, false); if (jump.success){ change_active_panel(app); - View_Summary target_view = get_active_view(app, AccessAll); + View_ID target_view = 0; + get_active_view(app, AccessAll, &target_view); Buffer_ID buffer = {}; if (get_jump_buffer(app, &buffer, &jump.location)){ - switch_to_existing_view(app, &target_view, buffer); - jump_to_location(app, &target_view, buffer, jump.location); + switch_to_existing_view(app, target_view, buffer); + jump_to_location(app, target_view, buffer, jump.location); } } @@ -36,7 +37,7 @@ CUSTOM_DOC("If the cursor is found to be on a jump location, parses the jump loc View_Summary target_view = view; Buffer_ID buffer = {}; if (get_jump_buffer(app, &buffer, &jump.location)){ - jump_to_location(app, &target_view, buffer, jump.location); + jump_to_location(app, target_view.view_id, buffer, jump.location); } } @@ -83,9 +84,9 @@ CUSTOM_COMMAND_SIG(goto_first_jump_direct) CUSTOM_DOC("If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.") { Temp_Memory temp = begin_temp_memory(&global_part); - View_Summary view = get_view_for_locked_jump_buffer(app); - if (view.exists){ - view_set_cursor(app, &view, seek_pos(0), true); + View_ID view = get_view_for_locked_jump_buffer(app); + if (view != 0){ + view_set_cursor(app, view, seek_pos(0), true); memset(&prev_location, 0, sizeof(prev_location)); seek_jump(app, &global_part, false, true, 1); } diff --git a/4coder_jump_lister.cpp b/4coder_jump_lister.cpp index 25a724b6..267c5f2a 100644 --- a/4coder_jump_lister.cpp +++ b/4coder_jump_lister.cpp @@ -6,44 +6,44 @@ static void activate_jump(Application_Links *app, Partition *scratch, Heap *heap, - View_Summary *view, struct Lister_State *state, + View_ID view, struct Lister_State *state, String text_field, void *user_data, b32 activated_by_mouse){ Lister_Activation_Code result_code = ListerActivation_Finished; i32 list_index = (i32)PtrAsInt(user_data); Jump_Lister_Parameters *params = (Jump_Lister_Parameters*)state->lister.data.user_data; Marker_List *list = get_marker_list_for_buffer(params->list_buffer_id); if (list != 0){ - View_Summary target_view = {}; + View_ID target_view = {}; switch (params->activation_rule){ case JumpListerActivation_OpenInUIView: { - target_view = *view; + target_view = view; result_code = ListerActivation_Finished; }break; case JumpListerActivation_OpenInTargetViewKeepUI: { - target_view = get_view(app, params->target_view_id, AccessAll); + target_view = params->target_view_id;; result_code = ListerActivation_Continue; }break; case JumpListerActivation_OpenInTargetViewCloseUI: { - target_view = get_view(app, params->target_view_id, AccessAll); + target_view = params->target_view_id; result_code = ListerActivation_Finished; }break; case JumpListerActivation_OpenInNextViewKeepUI: { - target_view = *view; - get_next_view_looped_primary_panels(app, &target_view, AccessAll); + target_view = view; + target_view = get_next_view_looped_primary_panels(app, target_view, AccessAll); result_code = ListerActivation_Continue; }break; case JumpListerActivation_OpenInNextViewCloseUI: { - target_view = *view; - get_next_view_looped_primary_panels(app, &target_view, AccessAll); + target_view = view; + target_view = get_next_view_looped_primary_panels(app, target_view, AccessAll); result_code = ListerActivation_Finished; }break; } @@ -52,8 +52,8 @@ activate_jump(Application_Links *app, Partition *scratch, Heap *heap, if (get_jump_from_list(app, list, list_index, &location)){ Buffer_ID buffer = {}; if (get_jump_buffer(app, &buffer, &location)){ - set_active_view(app, &target_view); - jump_to_location(app, &target_view, buffer, location); + view_set_active(app, target_view); + jump_to_location(app, target_view, buffer, location); } } @@ -62,9 +62,7 @@ activate_jump(Application_Links *app, Partition *scratch, Heap *heap, } static void -open_jump_lister(Application_Links *app, Partition *scratch, Heap *heap, - View_Summary *ui_view, Buffer_ID list_buffer_id, - Jump_Lister_Activation_Rule activation_rule, View_Summary *optional_target_view){ +open_jump_lister(Application_Links *app, Partition *scratch, Heap *heap, View_ID ui_view, Buffer_ID list_buffer_id, Jump_Lister_Activation_Rule activation_rule, View_ID optional_target_view){ Marker_List *list = get_or_make_list_for_buffer(app, scratch, heap, list_buffer_id); if (list != 0){ @@ -91,7 +89,7 @@ open_jump_lister(Application_Links *app, Partition *scratch, Heap *heap, jump_lister_params.list_buffer_id = list_buffer_id; jump_lister_params.activation_rule = activation_rule; if (optional_target_view != 0){ - jump_lister_params.target_view_id = optional_target_view->view_id; + jump_lister_params.target_view_id = optional_target_view; } begin_integrated_lister__basic_list(app, "Jump:", activate_jump, @@ -106,9 +104,11 @@ open_jump_lister(Application_Links *app, Partition *scratch, Heap *heap, CUSTOM_COMMAND_SIG(view_jump_list_with_lister) CUSTOM_DOC("When executed on a buffer with jumps, creates a persistent lister for all the jumps") { - View_Summary view = get_active_view(app, AccessAll); - open_jump_lister(app, &global_part, &global_heap, - &view, view.buffer_id, JumpListerActivation_OpenInNextViewKeepUI, 0); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + Buffer_ID buffer = 0; + view_get_buffer(app, view, AccessAll, &buffer); + open_jump_lister(app, &global_part, &global_heap, view, buffer, JumpListerActivation_OpenInNextViewKeepUI, 0); } // BOTTOM diff --git a/4coder_jump_sticky.cpp b/4coder_jump_sticky.cpp index e0a98473..1c965005 100644 --- a/4coder_jump_sticky.cpp +++ b/4coder_jump_sticky.cpp @@ -362,8 +362,8 @@ CUSTOM_DOC("If the cursor is found to be on a jump location, parses the jump loc if (get_jump_buffer(app, &buffer, &location)){ change_active_panel(app); View_Summary target_view = get_active_view(app, AccessAll); - switch_to_existing_view(app, &target_view, buffer); - jump_to_location(app, &target_view, buffer, location); + switch_to_existing_view(app, target_view.view_id, buffer); + jump_to_location(app, target_view.view_id, buffer, location); } } } @@ -387,8 +387,7 @@ CUSTOM_DOC("If the cursor is found to be on a jump location, parses the jump loc if (get_jump_from_list(app, list, list_index, &location)){ Buffer_ID buffer = {}; if (get_jump_buffer(app, &buffer, &location)){ - View_Summary target_view = view; - jump_to_location(app, &target_view, buffer, location); + jump_to_location(app, view.view_id, buffer, location); } } } @@ -397,16 +396,16 @@ CUSTOM_DOC("If the cursor is found to be on a jump location, parses the jump loc } static void -goto_jump_in_order(Application_Links *app, Marker_List *list, View_Summary *jump_view, ID_Pos_Jump_Location location){ +goto_jump_in_order(Application_Links *app, Marker_List *list, View_ID jump_view, ID_Pos_Jump_Location location){ Buffer_ID buffer = {}; if (get_jump_buffer(app, &buffer, &location)){ View_Summary target_view = get_active_view(app, AccessAll); - if (target_view.view_id == jump_view->view_id){ + if (target_view.view_id == jump_view){ change_active_panel(app); target_view = get_active_view(app, AccessAll); } - switch_to_existing_view(app, &target_view, buffer); - jump_to_location(app, &target_view, buffer, location); + switch_to_existing_view(app, target_view.view_id, buffer); + jump_to_location(app, target_view.view_id, buffer, location); prev_location.buffer_id = location.buffer_id; prev_location.line = location.pos; prev_location.column = 0; @@ -427,7 +426,7 @@ jump_is_repeat(ID_Line_Column_Jump_Location prev, ID_Pos_Jump_Location location) } static void -goto_next_filtered_jump(Application_Links *app, Marker_List *list, View_Summary *jump_view, i32 list_index, i32 direction, b32 skip_repeats, b32 skip_sub_errors){ +goto_next_filtered_jump(Application_Links *app, Marker_List *list, View_ID jump_view, i32 list_index, i32 direction, b32 skip_repeats, b32 skip_sub_errors){ Assert(direction == 1 || direction == -1); if (list != 0){ @@ -459,9 +458,16 @@ static Locked_Jump_State get_locked_jump_state(Application_Links *app, Partition *part, Heap *heap){ Locked_Jump_State result = {}; result.view = get_view_for_locked_jump_buffer(app); - if (result.view.exists){ - result.list = get_or_make_list_for_buffer(app, part, heap, result.view.buffer_id); - result.list_index = get_index_nearest_from_list(app, part, result.list, result.view.cursor.line); + if (result.view != 0){ + Buffer_ID buffer = 0; + view_get_buffer(app, result.view, AccessAll, &buffer); + result.list = get_or_make_list_for_buffer(app, part, heap, buffer); + + i32 cursor_position = 0; + view_get_cursor_pos(app, result.view, &cursor_position); + Full_Cursor cursor = {}; + view_compute_cursor(app, result.view, seek_pos(cursor_position), &cursor); + result.list_index = get_index_nearest_from_list(app, part, result.list, cursor.line); } return(result); } @@ -473,12 +479,16 @@ CUSTOM_DOC("If a buffer containing jump locations has been locked in, goes to th Partition *part = &global_part; Locked_Jump_State jump_state = get_locked_jump_state(app, part, heap); - if (jump_state.view.exists){ + if (jump_state.view != 0){ + i32 cursor_position = 0; + view_get_cursor_pos(app, jump_state.view, &cursor_position); + Full_Cursor cursor = {}; + view_compute_cursor(app, jump_state.view, seek_pos(cursor_position), &cursor); i32 line = get_line_from_list(app, jump_state.list, jump_state.list_index); - if (line <= jump_state.view.cursor.line){ + if (line <= cursor.line){ ++jump_state.list_index; } - goto_next_filtered_jump(app, jump_state.list, &jump_state.view, jump_state.list_index, 1, true, true); + goto_next_filtered_jump(app, jump_state.list, jump_state.view, jump_state.list_index, 1, true, true); } } @@ -488,11 +498,11 @@ CUSTOM_DOC("If a buffer containing jump locations has been locked in, goes to th Partition *part = &global_part; Locked_Jump_State jump_state = get_locked_jump_state(app, part, heap); - if (jump_state.view.exists){ + if (jump_state.view != 0){ if (jump_state.list_index > 0){ --jump_state.list_index; } - goto_next_filtered_jump(app, jump_state.list, &jump_state.view, jump_state.list_index, -1, true, true); + goto_next_filtered_jump(app, jump_state.list, jump_state.view, jump_state.list_index, -1, true, true); } } @@ -503,12 +513,16 @@ CUSTOM_DOC("If a buffer containing jump locations has been locked in, goes to th Partition *part = &global_part; Locked_Jump_State jump_state = get_locked_jump_state(app, part, heap); - if (jump_state.view.exists){ + if (jump_state.view != 0){ + i32 cursor_position = 0; + view_get_cursor_pos(app, jump_state.view, &cursor_position); + Full_Cursor cursor = {}; + view_compute_cursor(app, jump_state.view, seek_pos(cursor_position), &cursor); i32 line = get_line_from_list(app, jump_state.list, jump_state.list_index); - if (line <= jump_state.view.cursor.line){ + if (line <= cursor.line){ ++jump_state.list_index; } - goto_next_filtered_jump(app, jump_state.list, &jump_state.view, jump_state.list_index, 1, true, false); + goto_next_filtered_jump(app, jump_state.list, jump_state.view, jump_state.list_index, 1, true, false); } } @@ -519,11 +533,11 @@ CUSTOM_DOC("If a buffer containing jump locations has been locked in, goes to th Partition *part = &global_part; Locked_Jump_State jump_state = get_locked_jump_state(app, part, heap); - if (jump_state.view.exists){ + if (jump_state.view != 0){ if (jump_state.list_index > 0){ --jump_state.list_index; } - goto_next_filtered_jump(app, jump_state.list, &jump_state.view, jump_state.list_index, -1, true, false); + goto_next_filtered_jump(app, jump_state.list, jump_state.view, jump_state.list_index, -1, true, false); } } @@ -534,13 +548,13 @@ CUSTOM_DOC("If a buffer containing jump locations has been locked in, goes to th Partition *part = &global_part; Locked_Jump_State jump_state = get_locked_jump_state(app, part, heap); - if (jump_state.view.exists){ + if (jump_state.view != 0){ i32 list_index = 0; ID_Pos_Jump_Location location = {}; if (get_jump_from_list(app, jump_state.list, list_index, &location)){ - goto_jump_in_order(app, jump_state.list, &jump_state.view, location); + goto_jump_in_order(app, jump_state.list, jump_state.view, location); i32 updated_line = get_line_from_list(app, jump_state.list, list_index); - view_set_cursor(app, &jump_state.view, seek_line_char(updated_line, 1), true); + view_set_cursor(app, jump_state.view, seek_line_char(updated_line, 1), true); } } } @@ -552,13 +566,13 @@ CUSTOM_DOC("If a buffer containing jump locations has been locked in, goes to th Partition *part = &global_part; Locked_Jump_State jump_state = get_locked_jump_state(app, part, heap); - if (jump_state.view.exists){ + if (jump_state.view != 0){ i32 list_index = 0; ID_Pos_Jump_Location location = {}; if (get_jump_from_list(app, jump_state.list, list_index, &location)){ Buffer_ID buffer = {}; if (get_jump_buffer(app, &buffer, &location)){ - jump_to_location(app, &jump_state.view, buffer, location); + jump_to_location(app, jump_state.view, buffer, location); } } } diff --git a/4coder_jump_sticky.h b/4coder_jump_sticky.h index a741ff49..12754a12 100644 --- a/4coder_jump_sticky.h +++ b/4coder_jump_sticky.h @@ -54,7 +54,7 @@ struct Marker_List_Node{ }; struct Locked_Jump_State{ - View_Summary view; + View_ID view; Marker_List *list; i32 list_index; }; diff --git a/4coder_jumping.cpp b/4coder_jumping.cpp index 975356ef..4fb650c4 100644 --- a/4coder_jumping.cpp +++ b/4coder_jumping.cpp @@ -225,27 +225,32 @@ get_jump_buffer(Application_Links *app, Buffer_ID *buffer, ID_Pos_Jump_Location return(get_jump_buffer(app, buffer, location, AccessAll)); } -static void -switch_to_existing_view(Application_Links *app, View_Summary *view, Buffer_ID buffer){ - if (!view->exists || view->buffer_id != buffer){ - View_Summary existing_view = get_first_view_with_buffer(app, buffer); - if (existing_view.exists){ - *view = existing_view; +static View_ID +switch_to_existing_view(Application_Links *app, View_ID view, Buffer_ID buffer){ + Buffer_ID current_buffer = 0; + view_get_buffer(app, view, AccessAll, ¤t_buffer); + if (view != 0 || current_buffer != buffer){ + View_ID existing_view = get_first_view_with_buffer(app, buffer); + if (existing_view != 0){ + view = existing_view; } } + return(view); } static void -set_view_to_location(Application_Links *app, View_Summary *view, Buffer_ID buffer, Buffer_Seek seek){ - if (view->buffer_id != buffer){ +set_view_to_location(Application_Links *app, View_ID view, Buffer_ID buffer, Buffer_Seek seek){ + Buffer_ID current_buffer = 0; + view_get_buffer(app, view, AccessAll, ¤t_buffer); + if (current_buffer != buffer){ view_set_buffer(app, view, buffer, 0); } view_set_cursor(app, view, seek, true); } static void -jump_to_location(Application_Links *app, View_Summary *view, Buffer_ID buffer, Name_Line_Column_Location location){ - set_active_view(app, view); +jump_to_location(Application_Links *app, View_ID view, Buffer_ID buffer, Name_Line_Column_Location location){ + view_set_active(app, view); set_view_to_location(app, view, buffer, seek_line_char(location.line, location.column)); if (auto_center_after_jumps){ center_view(app); @@ -253,8 +258,8 @@ jump_to_location(Application_Links *app, View_Summary *view, Buffer_ID buffer, N } static void -jump_to_location(Application_Links *app, View_Summary *view, Buffer_ID buffer, ID_Pos_Jump_Location location){ - set_active_view(app, view); +jump_to_location(Application_Links *app, View_ID view, Buffer_ID buffer, ID_Pos_Jump_Location location){ + view_set_active(app, view); set_view_to_location(app, view, buffer, seek_pos(location.pos)); if (auto_center_after_jumps){ center_view(app); @@ -306,10 +311,15 @@ convert_name_based_to_id_based(Application_Links *app, Name_Line_Column_Location } static Parsed_Jump -seek_next_jump_in_view(Application_Links *app, Partition *part, View_Summary *view, i32 skip_sub_errors, i32 direction, i32 *line_out){ - Parsed_Jump jump = {}; - i32 line = view->cursor.line; - jump = seek_next_jump_in_buffer(app, part, view->buffer_id, line + direction, skip_sub_errors, direction, &line); +seek_next_jump_in_view(Application_Links *app, Partition *part, View_ID view, i32 skip_sub_errors, i32 direction, i32 *line_out){ + i32 cursor_position = 0; + view_get_cursor_pos(app, view, &cursor_position); + Full_Cursor cursor = {}; + view_compute_cursor(app, view, seek_pos(cursor_position), &cursor); + i32 line = cursor.line; + Buffer_ID buffer = 0; + view_get_buffer(app, view, AccessAll, &buffer); + Parsed_Jump jump = seek_next_jump_in_buffer(app, part, buffer, line + direction, skip_sub_errors, direction, &line); if (jump.success){ *line_out = line; } @@ -326,7 +336,7 @@ skip_this_jump(ID_Line_Column_Jump_Location prev, ID_Line_Column_Jump_Location j } static b32 -advance_cursor_in_jump_view(Application_Links *app, Partition *part, View_Summary *view, i32 skip_repeats, i32 skip_sub_error, i32 direction, Name_Line_Column_Location *location_out){ +advance_cursor_in_jump_view(Application_Links *app, Partition *part, View_ID view, i32 skip_repeats, i32 skip_sub_error, i32 direction, Name_Line_Column_Location *location_out){ b32 result = true; Name_Line_Column_Location location = {}; @@ -363,20 +373,20 @@ static b32 seek_jump(Application_Links *app, Partition *part, b32 skip_repeats, b32 skip_sub_errors, i32 direction){ b32 result = false; - View_Summary view = get_view_for_locked_jump_buffer(app); - if (view.exists){ + View_ID view = get_view_for_locked_jump_buffer(app); + if (view != 0){ Name_Line_Column_Location location = {}; - if (advance_cursor_in_jump_view(app, &global_part, &view, skip_repeats, skip_sub_errors, direction, &location)){ - + if (advance_cursor_in_jump_view(app, &global_part, view, skip_repeats, skip_sub_errors, direction, &location)){ Buffer_ID buffer = {}; if (get_jump_buffer(app, &buffer, &location)){ - View_Summary target_view = get_active_view(app, AccessAll); - if (target_view.view_id == view.view_id){ + View_ID target_view = 0; + get_active_view(app, AccessAll, &target_view); + if (target_view == view){ change_active_panel(app); - target_view = get_active_view(app, AccessAll); + get_active_view(app, AccessAll, &target_view); } - switch_to_existing_view(app, &target_view, buffer); - jump_to_location(app, &target_view, buffer, location); + switch_to_existing_view(app, target_view, buffer); + jump_to_location(app, target_view, buffer, location); result = true; } } diff --git a/4coder_lists.cpp b/4coder_lists.cpp index 4dac5887..6690defe 100644 --- a/4coder_lists.cpp +++ b/4coder_lists.cpp @@ -17,14 +17,15 @@ CUSTOM_DOC("A lister mode command that activates the list's action on the highli { Partition *scratch = &global_part; Heap *heap = &global_heap; - View_Summary view = get_active_view(app, AccessAll); - Lister_State *state = view_get_lister_state(view.view_id); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + Lister_State *state = view_get_lister_state(view); if (state->initialized){ void *user_data = 0; if (0 <= state->raw_item_index && state->raw_item_index < state->lister.data.options.count){ user_data = lister_get_user_data(&state->lister.data, state->raw_item_index); } - lister_call_activate_handler(app, scratch, heap, &view, state, user_data, false); + lister_call_activate_handler(app, scratch, heap, view, state, user_data, false); } } @@ -72,14 +73,16 @@ CUSTOM_COMMAND_SIG(lister__wheel_scroll) CUSTOM_DOC("A lister mode command that scrolls the list in response to the mouse wheel.") { Partition *scratch = &global_part; - View_Summary view = get_active_view(app, AccessAll); - GUI_Scroll_Vars scroll = view.scroll_vars; + View_ID view = 0; + get_active_view(app, AccessAll, &view); + GUI_Scroll_Vars scroll = {}; + view_get_scroll_vars(app, view, &scroll); Mouse_State mouse = get_mouse_state(app); scroll.target_y += mouse.wheel; - view_set_scroll(app, &view, scroll); - Lister_State *state = view_get_lister_state(view.view_id); + view_set_scroll(app, view, scroll); + Lister_State *state = view_get_lister_state(view); if (state->initialized){ - lister_update_ui(app, scratch, &view, state); + lister_update_ui(app, scratch, view, state); } } @@ -100,12 +103,13 @@ CUSTOM_DOC("A lister mode command that ends a click interaction with a list item { Partition *scratch = &global_part; Heap *heap = &global_heap; - View_Summary view = get_active_view(app, AccessAll); - Lister_State *state = view_get_lister_state(view.view_id); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + Lister_State *state = view_get_lister_state(view); if (state->initialized && state->hot_user_data != 0){ - UI_Item clicked = lister_get_clicked_item(app, view.view_id, scratch); + UI_Item clicked = lister_get_clicked_item(app, view, scratch); if (state->hot_user_data == clicked.user_data){ - lister_call_activate_handler(app, scratch, heap, &view, state, clicked.user_data, true); + lister_call_activate_handler(app, scratch, heap, view, state, clicked.user_data, true); } } state->hot_user_data = 0; @@ -115,10 +119,11 @@ CUSTOM_COMMAND_SIG(lister__repaint) CUSTOM_DOC("A lister mode command that updates the lists UI data.") { Partition *scratch = &global_part; - View_Summary view = get_active_view(app, AccessAll); - Lister_State *state = view_get_lister_state(view.view_id); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + Lister_State *state = view_get_lister_state(view); if (state->initialized){ - lister_update_ui(app, scratch, &view, state); + lister_update_ui(app, scratch, view, state); } } @@ -126,8 +131,9 @@ CUSTOM_COMMAND_SIG(lister__write_character__default) CUSTOM_DOC("A lister mode command that inserts a new character to the text field.") { Partition *scratch = &global_part; - View_Summary view = get_active_view(app, AccessAll); - Lister_State *state = view_get_lister_state(view.view_id); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + Lister_State *state = view_get_lister_state(view); if (state->initialized){ User_Input in = get_command_input(app); u8 character[4]; @@ -136,8 +142,8 @@ CUSTOM_DOC("A lister mode command that inserts a new character to the text field append(&state->lister.data.text_field, make_string(character, length)); append(&state->lister.data.key_string, make_string(character, length)); state->item_index = 0; - view_zero_scroll(app, &view); - lister_update_ui(app, scratch, &view, state); + view_zero_scroll(app, view); + lister_update_ui(app, scratch, view, state); } } } @@ -146,14 +152,15 @@ CUSTOM_COMMAND_SIG(lister__backspace_text_field__default) CUSTOM_DOC("A lister mode command that backspaces one character from the text field.") { Partition *scratch = &global_part; - View_Summary view = get_active_view(app, AccessAll); - Lister_State *state = view_get_lister_state(view.view_id); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + Lister_State *state = view_get_lister_state(view); if (state->initialized){ backspace_utf8(&state->lister.data.text_field); backspace_utf8(&state->lister.data.key_string); state->item_index = 0; - view_zero_scroll(app, &view); - lister_update_ui(app, scratch, &view, state); + view_zero_scroll(app, view); + lister_update_ui(app, scratch, view, state); } } @@ -161,15 +168,16 @@ CUSTOM_COMMAND_SIG(lister__move_up__default) CUSTOM_DOC("A lister mode command that moves the highlighted item one up in the list.") { Partition *scratch = &global_part; - View_Summary view = get_active_view(app, AccessAll); - Lister_State *state = view_get_lister_state(view.view_id); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + Lister_State *state = view_get_lister_state(view); if (state->initialized){ state->item_index = state->item_index - 1; if (state->item_index < 0){ state->item_index = state->item_count_after_filter - 1; } state->set_view_vertical_focus_to_item = true; - lister_update_ui(app, scratch, &view, state); + lister_update_ui(app, scratch, view, state); } } @@ -177,15 +185,16 @@ CUSTOM_COMMAND_SIG(lister__move_down__default) CUSTOM_DOC("A lister mode command that moves the highlighted item one down in the list.") { Partition *scratch = &global_part; - View_Summary view = get_active_view(app, AccessAll); - Lister_State *state = view_get_lister_state(view.view_id); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + Lister_State *state = view_get_lister_state(view); if (state->initialized){ state->item_index = state->item_index + 1; if (state->item_index > state->item_count_after_filter - 1){ state->item_index = 0; } state->set_view_vertical_focus_to_item = true; - lister_update_ui(app, scratch, &view, state); + lister_update_ui(app, scratch, view, state); } } @@ -193,8 +202,9 @@ CUSTOM_COMMAND_SIG(lister__write_character__file_path) CUSTOM_DOC("A lister mode command that inserts a character into the text field of a file system list.") { Partition *scratch = &global_part; - View_Summary view = get_active_view(app, AccessAll); - Lister_State *state = view_get_lister_state(view.view_id); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + Lister_State *state = view_get_lister_state(view); if (state->initialized){ User_Input in = get_command_input(app); u8 character[4]; @@ -208,8 +218,8 @@ CUSTOM_DOC("A lister mode command that inserts a character into the text field o lister_call_refresh_handler(app, &state->lister); } state->item_index = 0; - view_zero_scroll(app, &view); - lister_update_ui(app, scratch, &view, state); + view_zero_scroll(app, view); + lister_update_ui(app, scratch, view, state); } } } @@ -218,8 +228,9 @@ CUSTOM_COMMAND_SIG(lister__backspace_text_field__file_path) CUSTOM_DOC("A lister mode command that backspaces one character from the text field of a file system list.") { Partition *scratch = &global_part; - View_Summary view = get_active_view(app, AccessAll); - Lister_State *state = view_get_lister_state(view.view_id); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + Lister_State *state = view_get_lister_state(view); if (state->initialized){ if (state->lister.data.text_field.size > 0){ char last_char = state->lister.data.text_field.str[state->lister.data.text_field.size - 1]; @@ -247,8 +258,8 @@ CUSTOM_DOC("A lister mode command that backspaces one character from the text fi } state->item_index = 0; - view_zero_scroll(app, &view); - lister_update_ui(app, scratch, &view, state); + view_zero_scroll(app, view); + lister_update_ui(app, scratch, view, state); } } } @@ -258,8 +269,9 @@ CUSTOM_DOC("A lister mode command that handles input for the fixed sure to kill { Partition *scratch = &global_part; Heap *heap = &global_heap; - View_Summary view = get_active_view(app, AccessAll); - Lister_State *state = view_get_lister_state(view.view_id); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + Lister_State *state = view_get_lister_state(view); if (state->initialized){ User_Input in = get_command_input(app); u8 character[4]; @@ -278,7 +290,7 @@ CUSTOM_DOC("A lister mode command that handles input for the fixed sure to kill } } if (did_shortcut_key){ - lister_call_activate_handler(app, scratch, heap, &view, state, user_data, false); + lister_call_activate_handler(app, scratch, heap, view, state, user_data, false); } } } @@ -310,13 +322,13 @@ static void begin_integrated_lister__with_refresh_handler(Application_Links *app, char *query_string, Lister_Handlers handlers, void *user_data, i32 user_data_size, - View_Summary *view){ + View_ID view){ if (handlers.refresh != 0){ Partition *scratch = &global_part; Heap *heap = &global_heap; view_begin_ui_mode(app, view); view_set_setting(app, view, ViewSetting_UICommandMap, default_lister_ui_map); - Lister_State *state = view_get_lister_state(view->view_id); + Lister_State *state = view_get_lister_state(view); init_lister_state(app, state, heap); lister_first_init(app, &state->lister, user_data, user_data_size); lister_set_query_string(&state->lister.data, query_string); @@ -330,7 +342,7 @@ begin_integrated_lister__with_refresh_handler(Application_Links *app, char *quer append(&str, "ERROR: No refresh handler specified for lister (query_string = \""); append(&str, query_string); append(&str, "\")\n"); - print_message(app, str.str, str.size); + print_message(app, str); } } @@ -349,12 +361,12 @@ begin_integrated_lister__basic_list(Application_Links *app, char *query_string, void *user_data, i32 user_data_size, Lister_Option *options, i32 option_count, i32 estimated_string_space_size, - View_Summary *view){ + View_ID view){ Partition *scratch = &global_part; Heap *heap = &global_heap; view_begin_ui_mode(app, view); view_set_setting(app, view, ViewSetting_UICommandMap, default_lister_ui_map); - Lister_State *state = view_get_lister_state(view->view_id); + Lister_State *state = view_get_lister_state(view); init_lister_state(app, state, heap); lister_first_init(app, &state->lister, user_data, user_data_size); for (i32 i = 0; i < option_count; i += 1){ @@ -372,12 +384,12 @@ begin_integrated_lister__with_fixed_options(Application_Links *app, char *query_ void *user_data, i32 user_data_size, Lister_Fixed_Option *options, i32 option_count, i32 estimated_string_space_size, - View_Summary *view){ + View_ID view){ Partition *scratch = &global_part; Heap *heap = &global_heap; view_begin_ui_mode(app, view); view_set_setting(app, view, ViewSetting_UICommandMap, default_lister_ui_map); - Lister_State *state = view_get_lister_state(view->view_id); + Lister_State *state = view_get_lister_state(view); init_lister_state(app, state, heap); lister_first_init(app, &state->lister, user_data, user_data_size); for (i32 i = 0; i < option_count; i += 1){ @@ -402,7 +414,7 @@ begin_integrated_lister__with_fixed_options(Application_Links *app, char *query_ void *user_data, i32 user_data_size, Lister_Fixed_Option *options, i32 option_count, i32 estimated_string_space_size, - View_Summary *view){ + View_ID view){ Lister_Handlers handlers = lister_get_fixed_list_handlers(); handlers.activate = activate; begin_integrated_lister__with_fixed_options(app, query_string, @@ -418,12 +430,12 @@ begin_integrated_lister__theme_list(Application_Links *app, char *query_string, void *user_data, i32 user_data_size, Lister_UI_Option *options, i32 option_count, i32 estimated_string_space_size, - View_Summary *view){ + View_ID view){ Partition *scratch = &global_part; Heap *heap = &global_heap; view_begin_ui_mode(app, view); view_set_setting(app, view, ViewSetting_UICommandMap, default_lister_ui_map); - Lister_State *state = view_get_lister_state(view->view_id); + Lister_State *state = view_get_lister_state(view); init_lister_state(app, state, heap); lister_first_init(app, &state->lister, user_data, user_data_size); state->lister.data.theme_list = true; @@ -445,7 +457,7 @@ begin_integrated_lister__theme_list(Application_Links *app, char *query_string, void *user_data, i32 user_data_size, Lister_UI_Option *options, i32 option_count, i32 estimated_string_space_size, - View_Summary *view){ + View_ID view){ Lister_Handlers handlers = lister_get_default_handlers(); handlers.activate = activate; begin_integrated_lister__theme_list(app, query_string, @@ -639,7 +651,7 @@ generate_hot_directory_file_list(Application_Links *app, Lister *lister){ static void begin_integrated_lister__buffer_list(Application_Links *app, char *query_string, Lister_Activation_Function_Type *activate_procedure, - void *user_data, i32 user_data_size, View_Summary *target_view){ + void *user_data, i32 user_data_size, View_ID target_view){ Lister_Handlers handlers = lister_get_default_handlers(); handlers.activate = activate_procedure; handlers.refresh = generate_all_buffers_list; @@ -648,7 +660,7 @@ begin_integrated_lister__buffer_list(Application_Links *app, char *query_string, static void begin_integrated_lister__file_system_list(Application_Links *app, char *query_string, Lister_Activation_Function_Type *activate_procedure, - void *user_data, i32 user_data_size, View_Summary *target_view){ + void *user_data, i32 user_data_size, View_ID target_view){ Lister_Handlers handlers = lister_get_default_handlers(); handlers.activate = activate_procedure; handlers.refresh = generate_hot_directory_file_list; @@ -667,7 +679,7 @@ enum{ }; static void -activate_confirm_kill(Application_Links *app, Partition *scratch, Heap *heap, View_Summary *view, Lister_State *state, +activate_confirm_kill(Application_Links *app, Partition *scratch, Heap *heap, View_ID view, Lister_State *state, String text_field, void *user_data, b32 clicked){ i32 behavior = (i32)PtrAsInt(user_data); Buffer_ID buffer_id = *(Buffer_ID*)(state->lister.data.user_data); @@ -705,7 +717,7 @@ activate_confirm_kill(Application_Links *app, Partition *scratch, Heap *heap, Vi } static void -do_gui_sure_to_kill(Application_Links *app, Buffer_ID buffer, View_Summary *view){ +do_gui_sure_to_kill(Application_Links *app, Buffer_ID buffer, View_ID view){ Lister_Fixed_Option options[] = { {"(N)o" , "", "Nn", IntAsPtr(SureToKill_No) }, {"(Y)es" , "", "Yy", IntAsPtr(SureToKill_Yes) }, @@ -713,15 +725,14 @@ do_gui_sure_to_kill(Application_Links *app, Buffer_ID buffer, View_Summary *view }; i32 option_count = sizeof(options)/sizeof(options[0]); begin_integrated_lister__with_fixed_options(app, "There are unsaved changes, close anyway?", - activate_confirm_kill, - &buffer, sizeof(buffer), + activate_confirm_kill, &buffer, sizeof(buffer), options, option_count, default_string_size_estimation, view); } static void activate_confirm_close_4coder(Application_Links *app, Partition *scratch, Heap *heap, - View_Summary *view, Lister_State *state, + View_ID view, Lister_State *state, String text_field, void *user_data, b32 clicked){ i32 behavior = (i32)PtrAsInt(user_data); switch (behavior){ @@ -741,23 +752,21 @@ activate_confirm_close_4coder(Application_Links *app, Partition *scratch, Heap * send_exit_signal(app); }break; } + lister_default(app, scratch, heap, view, state, ListerActivation_Finished); } static void -do_gui_sure_to_close_4coder(Application_Links *app, View_Summary *view){ +do_gui_sure_to_close_4coder(Application_Links *app, View_ID view){ Lister_Fixed_Option options[] = { {"(N)o" , "", "Nn", (void*)SureToKill_No }, {"(Y)es" , "", "Yy", (void*)SureToKill_Yes }, {"(S)ave All and Close", "", "Ss", (void*)SureToKill_Save}, }; i32 option_count = sizeof(options)/sizeof(options[0]); - begin_integrated_lister__with_fixed_options(app, - "There are one or more buffers with unsave changes, close anyway?", - activate_confirm_close_4coder, - 0, 0, - options, option_count, - default_string_size_estimation, + begin_integrated_lister__with_fixed_options(app, "There are one or more buffers with unsave changes, close anyway?", + activate_confirm_close_4coder, 0, 0, + options, option_count, default_string_size_estimation, view); } @@ -765,7 +774,7 @@ do_gui_sure_to_close_4coder(Application_Links *app, View_Summary *view){ static void activate_switch_buffer(Application_Links *app, Partition *scratch, Heap *heap, - View_Summary *view, Lister_State *state, + View_ID view, Lister_State *state, String text_field, void *user_data, b32 activated_by_mouse){ if (user_data != 0){ Buffer_ID buffer_id = (Buffer_ID)(PtrAsInt(user_data)); @@ -777,32 +786,34 @@ activate_switch_buffer(Application_Links *app, Partition *scratch, Heap *heap, CUSTOM_COMMAND_SIG(interactive_switch_buffer) CUSTOM_DOC("Interactively switch to an open buffer.") { - View_Summary view = get_active_view(app, AccessAll); - view_end_ui_mode(app, &view); - begin_integrated_lister__buffer_list(app, "Switch:", activate_switch_buffer, 0, 0, &view); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + view_end_ui_mode(app, view); + begin_integrated_lister__buffer_list(app, "Switch:", activate_switch_buffer, 0, 0, view); } static void activate_kill_buffer(Application_Links *app, Partition *scratch, Heap *heap, - View_Summary *view, struct Lister_State *state, + View_ID view, struct Lister_State *state, String text_field, void *user_data, b32 activated_by_mouse){ lister_default(app, scratch, heap, view, state, ListerActivation_Finished); if (user_data != 0){ Buffer_ID buffer_id = (Buffer_ID)(PtrAsInt(user_data)); - kill_buffer(app, buffer_identifier(buffer_id), view->view_id, 0); + kill_buffer(app, buffer_identifier(buffer_id), view, 0); } } CUSTOM_COMMAND_SIG(interactive_kill_buffer) CUSTOM_DOC("Interactively kill an open buffer.") { - View_Summary view = get_active_view(app, AccessAll); - view_end_ui_mode(app, &view); - begin_integrated_lister__buffer_list(app, "Kill:", activate_kill_buffer, 0, 0, &view); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + view_end_ui_mode(app, view); + begin_integrated_lister__buffer_list(app, "Kill:", activate_kill_buffer, 0, 0, view); } static Lister_Activation_Code -activate_open_or_new__generic(Application_Links *app, Partition *scratch, View_Summary *view, +activate_open_or_new__generic(Application_Links *app, Partition *scratch, View_ID view, String path, String file_name, b32 is_folder, Buffer_Create_Flag flags){ Lister_Activation_Code result = 0; @@ -841,7 +852,7 @@ activate_open_or_new__generic(Application_Links *app, Partition *scratch, View_S static void activate_open_or_new(Application_Links *app, Partition *scratch, Heap *heap, - View_Summary *view, struct Lister_State *state, + View_ID view, struct Lister_State *state, String text_field, void *user_data, b32 clicked){ Lister_Activation_Code result = 0; String file_name = {}; @@ -869,14 +880,15 @@ activate_open_or_new(Application_Links *app, Partition *scratch, Heap *heap, CUSTOM_COMMAND_SIG(interactive_open_or_new) CUSTOM_DOC("Interactively open a file out of the file system.") { - View_Summary view = get_active_view(app, AccessAll); - view_end_ui_mode(app, &view); - begin_integrated_lister__file_system_list(app, "Open:", activate_open_or_new, 0, 0, &view); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + view_end_ui_mode(app, view); + begin_integrated_lister__file_system_list(app, "Open:", activate_open_or_new, 0, 0, view); } static void activate_new(Application_Links *app, Partition *scratch, Heap *heap, - View_Summary *view, struct Lister_State *state, + View_ID view, struct Lister_State *state, String text_field, void *user_data, b32 clicked){ Lister_Activation_Code result = 0; String file_name = front_of_directory(text_field); @@ -907,14 +919,15 @@ activate_new(Application_Links *app, Partition *scratch, Heap *heap, CUSTOM_COMMAND_SIG(interactive_new) CUSTOM_DOC("Interactively creates a new file.") { - View_Summary view = get_active_view(app, AccessAll); - view_end_ui_mode(app, &view); - begin_integrated_lister__file_system_list(app, "New:", activate_new, 0, 0, &view); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + view_end_ui_mode(app, view); + begin_integrated_lister__file_system_list(app, "New:", activate_new, 0, 0, view); } static void activate_open(Application_Links *app, Partition *scratch, Heap *heap, - View_Summary *view, struct Lister_State *state, + View_ID view, struct Lister_State *state, String text_field, void *user_data, b32 clicked){ Lister_Activation_Code result = 0; String file_name = {}; @@ -939,15 +952,16 @@ activate_open(Application_Links *app, Partition *scratch, Heap *heap, CUSTOM_COMMAND_SIG(interactive_open) CUSTOM_DOC("Interactively opens a file.") { - View_Summary view = get_active_view(app, AccessAll); - view_end_ui_mode(app, &view); - begin_integrated_lister__file_system_list(app, "Open:", activate_open, 0, 0, &view); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + view_end_ui_mode(app, view); + begin_integrated_lister__file_system_list(app, "Open:", activate_open, 0, 0, view); } #if 0 static void activate_select_theme(Application_Links *app, Partition *scratch, Heap *heap, - View_Summary *view, struct Lister_State *state, + View_ID view, struct Lister_State *state, String text_field, void *user_data, b32 clicked){ change_theme_by_index(app, (i32)PtrAsInt(user_data)); lister_default(app, scratch, heap, view, state, ListerActivation_Finished); @@ -959,8 +973,9 @@ CUSTOM_DOC("Opens the 4coder theme selector list.") Partition *scratch = &global_part; Temp_Memory temp = begin_temp_memory(scratch); - View_Summary view = get_active_view(app, AccessAll); - view_end_ui_mode(app, &view); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + view_end_ui_mode(app, view); i32 theme_count = get_theme_count(app); Lister_UI_Option *options = push_array(scratch, Lister_UI_Option, theme_count); for (i32 i = 0; i < theme_count; i += 1){ @@ -974,7 +989,7 @@ CUSTOM_DOC("Opens the 4coder theme selector list.") activate_select_theme, 0, 0, options, theme_count, default_string_size_estimation, - &view); + view); end_temp_memory(temp); } @@ -984,7 +999,7 @@ CUSTOM_DOC("Opens the 4coder theme selector list.") static void activate_command(Application_Links *app, Partition *scratch, Heap *heap, - View_Summary *view, Lister_State *state, + View_ID view, Lister_State *state, String text_field, void *user_data, b32 activated_by_mouse){ lister_default(app, scratch, heap, view, state, ListerActivation_Finished); if (user_data != 0){ @@ -1000,8 +1015,9 @@ launch_custom_command_lister(Application_Links *app, i32 *command_ids, i32 comma } Partition *arena = &global_part; - View_Summary view = get_active_view(app, AccessAll); - view_end_ui_mode(app, &view); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + view_end_ui_mode(app, view); Temp_Memory temp = begin_temp_memory(arena); Lister_Option *options = push_array(arena, Lister_Option, command_id_count); for (i32 i = 0; i < command_id_count; i += 1){ @@ -1014,7 +1030,7 @@ launch_custom_command_lister(Application_Links *app, i32 *command_ids, i32 comma options[i].status = make_string_slowly(fcoder_metacmd_table[j].description); options[i].user_data = (void*)fcoder_metacmd_table[j].proc; } - begin_integrated_lister__basic_list(app, "Command:", activate_command, 0, 0, options, command_id_count, 0, &view); + begin_integrated_lister__basic_list(app, "Command:", activate_command, 0, 0, options, command_id_count, 0, view); end_temp_memory(temp); } diff --git a/4coder_project_commands.cpp b/4coder_project_commands.cpp index 4ae7d390..94328ad7 100644 --- a/4coder_project_commands.cpp +++ b/4coder_project_commands.cpp @@ -973,8 +973,8 @@ exec_project_command(Application_Links *app, Project_Command *command){ save_all_dirty_buffers(app); } - View_Summary view = {}; - View_Summary *view_ptr = 0; + View_ID view = 0; + View_ID view_ptr = 0; Buffer_Identifier buffer_id = {}; u32 flags = CLI_OverlapWithConflict|CLI_SendEndSignal; if (cursor_at_end){ @@ -992,9 +992,9 @@ exec_project_command(Application_Links *app, Project_Command *command){ } } else{ - view = get_active_view(app, AccessAll); + get_active_view(app, AccessAll, &view); } - view_ptr = &view; + view_ptr = view; memset(&prev_location, 0, sizeof(prev_location)); lock_jump_buffer(command->out.str, command->out.size); @@ -1518,9 +1518,7 @@ CUSTOM_DOC("Queries the user for several configuration options and initializes a /////////////////////////////// static void -activate_project_command(Application_Links *app, Partition *scratch, Heap *heap, - View_Summary *view, Lister_State *state, - String text_field, void *user_data, b32 activated_by_mouse){ +activate_project_command(Application_Links *app, Partition *scratch, Heap *heap, View_ID view, Lister_State *state, String text_field, void *user_data, b32 activated_by_mouse){ i32 command_index = (i32)PtrAsInt(user_data); exec_project_command_by_index(app, command_index); lister_default(app, scratch, heap, view, state, ListerActivation_Finished); @@ -1535,8 +1533,9 @@ CUSTOM_DOC("Open a lister of all commands in the currently loaded project.") Partition *arena = &global_part; - View_Summary view = get_active_view(app, AccessAll); - view_end_ui_mode(app, &view); + View_ID view = 0; + get_active_view(app, AccessAll, &view); + view_end_ui_mode(app, view); Temp_Memory temp = begin_temp_memory(arena); i32 option_count = current_project.command_array.count; Lister_Option *options = push_array(arena, Lister_Option, option_count); @@ -1545,10 +1544,7 @@ CUSTOM_DOC("Open a lister of all commands in the currently loaded project.") options[i].status = string_push_copy(arena, current_project.command_array.commands[i].cmd); options[i].user_data = IntAsPtr(i); } - begin_integrated_lister__basic_list(app, "Command:", activate_project_command, 0, 0, - options, option_count, - 0, - &view); + begin_integrated_lister__basic_list(app, "Command:", activate_project_command, 0, 0, options, option_count, 0, view); end_temp_memory(temp); } diff --git a/4coder_ui_helper.cpp b/4coder_ui_helper.cpp index bccef838..3670d179 100644 --- a/4coder_ui_helper.cpp +++ b/4coder_ui_helper.cpp @@ -168,20 +168,29 @@ ui_control_get_mouse_hit(UI_Data *data, i32 mx_scrolled, i32 my_scrolled, i32 mx //////////////////////////////// static void -view_zero_scroll(Application_Links *app, View_Summary *view){ +view_zero_scroll(Application_Links *app, View_ID view){ GUI_Scroll_Vars zero_scroll = {}; view_set_scroll(app, view, zero_scroll); } static void -view_set_vertical_focus(Application_Links *app, View_Summary *view, i32 y_top, i32 y_bot){ +view_set_vertical_focus(Application_Links *app, View_ID view, i32 y_top, i32 y_bot){ Rect_i32 buffer_region = {}; - view_get_buffer_region(app, view->view_id, &buffer_region); - GUI_Scroll_Vars scroll = view->scroll_vars; + view_get_buffer_region(app, view, &buffer_region); + GUI_Scroll_Vars scroll = {}; + view_get_scroll_vars(app, view, &scroll); i32 view_y_top = scroll.target_y; i32 view_y_dim = rect_height(buffer_region); i32 view_y_bot = view_y_top + view_y_dim; - i32 line_dim = (i32)view->line_height; + + Buffer_ID buffer = 0; + view_get_buffer(app, view, AccessAll, &buffer); + Face_ID face_id = 0; + get_face_id(app, buffer, &face_id); + Face_Metrics metrics = {}; + get_face_metrics(app, face_id, &metrics); + + i32 line_dim = (i32)metrics.line_height; i32 hot_y_top = view_y_top + line_dim*3; i32 hot_y_bot = view_y_bot - line_dim*3; if (hot_y_bot - hot_y_top < line_dim*6){ @@ -322,19 +331,14 @@ lister_get_clicked_item(Application_Links *app, View_ID view_id, Partition *scra return(result); } -static i32 -lister_get_line_height(View_Summary *view){ - return((i32)view->line_height); +static f32 +lister_get_text_field_height(f32 line_height){ + return(line_height); } -static i32 -lister_get_text_field_height(View_Summary *view){ - return((i32)view->line_height); -} - -static i32 -lister_get_block_height(i32 line_height, b32 is_theme_list){ - i32 block_height = 0; +static f32 +lister_get_block_height(f32 line_height, b32 is_theme_list){ + f32 block_height = 0; if (is_theme_list){ block_height = line_height*3 + 6; } @@ -345,23 +349,34 @@ lister_get_block_height(i32 line_height, b32 is_theme_list){ } static void -lister_update_ui(Application_Links *app, Partition *scratch, View_Summary *view, Lister_State *state){ +lister_update_ui(Application_Links *app, Partition *scratch, View_ID view, Lister_State *state){ b32 is_theme_list = state->lister.data.theme_list; - i32 x0 = 0; - i32 x1 = (i32)(rect_width(view->view_region)); - i32 line_height = lister_get_line_height(view); - i32 block_height = lister_get_block_height(line_height, is_theme_list); - i32 text_field_height = lister_get_text_field_height(view); + Rect_f32 screen_rect = {}; + view_get_screen_rect(app, view, &screen_rect); + + Face_ID face_id = 0; + get_face_id(app, 0, &face_id); + Face_Metrics metrics = {}; + get_face_metrics(app, face_id, &metrics); + + GUI_Scroll_Vars scroll_vars = {}; + view_get_scroll_vars(app, view, &scroll_vars); + + f32 x0 = 0; + f32 x1 = (rect_width(screen_rect)); + f32 line_height = metrics.line_height; + f32 block_height = lister_get_block_height(line_height, is_theme_list); + f32 text_field_height = lister_get_text_field_height(metrics.line_height); Temp_Memory full_temp = begin_temp_memory(scratch); + // TODO(allen): switch to float Rect_i32 buffer_region = {}; - view_get_buffer_region(app, view->view_id, &buffer_region); - Vec2_i32 view_m = get_mouse_position_in_view_space(app, buffer_region.p0, V2i32(view->scroll_vars.scroll_p)); + view_get_buffer_region(app, view, &buffer_region); + Vec2_i32 view_m = get_mouse_position_in_view_space(app, buffer_region.p0, V2i32(scroll_vars.scroll_p)); - refresh_view(app, view); - i32 y_pos = text_field_height; + f32 y_pos = text_field_height; state->raw_item_index = -1; @@ -406,7 +421,7 @@ lister_update_ui(Application_Links *app, Partition *scratch, View_Summary *view, UI_Data *ui_data = 0; Arena *ui_arena = 0; - if (view_get_ui_data(app, view->view_id, ViewGetUIFlag_ClearData, &ui_data, &ui_arena)){ + if (view_get_ui_data(app, view, ViewGetUIFlag_ClearData, &ui_data, &ui_arena)){ memset(ui_data, 0, sizeof(*ui_data)); UI_Item *highlighted_item = 0; @@ -418,12 +433,13 @@ lister_update_ui(Application_Links *app, Partition *scratch, View_Summary *view, for (i32 node_index = 0; node_index < node_ptr_array.count; node_index += 1){ Lister_Node *node = node_ptr_array.node_ptrs[node_index]; + // TODO(allen): switch to float i32_Rect item_rect = {}; - item_rect.x0 = x0; - item_rect.y0 = y_pos; - item_rect.x1 = x1; - item_rect.y1 = y_pos + block_height; - y_pos = item_rect.y1; + item_rect.x0 = (i32)x0; + item_rect.y0 = (i32)y_pos; + item_rect.x1 = (i32)x1; + item_rect.y1 = (i32)y_pos + (i32)block_height; + y_pos = (f32)item_rect.y1; UI_Item item = {}; item.activation_level = UIActivation_None; @@ -500,12 +516,13 @@ lister_update_ui(Application_Links *app, Partition *scratch, View_Summary *view, } { + // TODO(allen): switch to float i32_Rect item_rect = {}; - item_rect.x0 = x0; + item_rect.x0 = (i32)x0; item_rect.y0 = 0; - item_rect.x1 = x1; - item_rect.y1 = item_rect.y0 + text_field_height; - y_pos = item_rect.y1; + item_rect.x1 = (i32)x1; + item_rect.y1 = item_rect.y0 + (i32)text_field_height; + y_pos = (f32)item_rect.y1; UI_Item item = {}; item.activation_level = UIActivation_Active; @@ -530,7 +547,7 @@ lister_update_ui(Application_Links *app, Partition *scratch, View_Summary *view, // TODO(allen): what to do with control now? //UI_Control control = ui_list_to_ui_control(scratch, &list); - view_set_quit_ui_handler(app, view->view_id, lister_quit_function); + view_set_quit_ui_handler(app, view, lister_quit_function); } end_temp_memory(full_temp); @@ -649,9 +666,7 @@ lister_call_refresh_handler(Application_Links *app, Lister *lister){ } static void -lister_default(Application_Links *app, Partition *scratch, Heap *heap, - View_Summary *view, Lister_State *state, - Lister_Activation_Code code){ +lister_default(Application_Links *app, Partition *scratch, Heap *heap, View_ID view, Lister_State *state, Lister_Activation_Code code){ switch (code){ case ListerActivation_Finished: { @@ -676,13 +691,10 @@ lister_default(Application_Links *app, Partition *scratch, Heap *heap, } static void -lister_call_activate_handler(Application_Links *app, Partition *scratch, Heap *heap, - View_Summary *view, Lister_State *state, - void *user_data, b32 activated_by_mouse){ +lister_call_activate_handler(Application_Links *app, Partition *scratch, Heap *heap, View_ID view, Lister_State *state, void *user_data, b32 activated_by_mouse){ Lister_Data *lister = &state->lister.data; if (lister->handlers.activate != 0){ - lister->handlers.activate(app, scratch, heap, view, state, - lister->text_field, user_data, activated_by_mouse); + lister->handlers.activate(app, scratch, heap, view, state, lister->text_field, user_data, activated_by_mouse); } else{ lister_default(app, scratch, heap, view, state, ListerActivation_Finished); diff --git a/4coder_ui_helper.h b/4coder_ui_helper.h index 89a9c440..2058b6e8 100644 --- a/4coder_ui_helper.h +++ b/4coder_ui_helper.h @@ -61,7 +61,7 @@ enum{ }; typedef void Lister_Activation_Function_Type(Application_Links *app, Partition *scratch, Heap *heap, - View_Summary *view, struct Lister_State *state, + View_ID view, struct Lister_State *state, String text_field, void *user_data, b32 activated_by_mouse); typedef void Lister_Regenerate_List_Function_Type(Application_Links *app, struct Lister *lister); diff --git a/4ed_api_implementation.cpp b/4ed_api_implementation.cpp index 9d4f56c4..4fb0fd2b 100644 --- a/4ed_api_implementation.cpp +++ b/4ed_api_implementation.cpp @@ -282,6 +282,9 @@ DOC_SEE(get_buffer_first) *buffer_id_out = file->id.id; result = true; } + else{ + *buffer_id_out = 0; + } return(result); }