diff --git a/4ed.cpp b/4ed.cpp index c0db72c4..a4efdd4f 100644 --- a/4ed.cpp +++ b/4ed.cpp @@ -252,7 +252,7 @@ App_Init_Sig(app_init){ working_set_init(models, &models->working_set); Mutex_Lock file_order_lock(models->working_set.mutex); - // NOTE(allen): + // NOTE(allen): global_history_init(&models->global_history); text_layout_init(tctx, &models->text_layouts); diff --git a/custom/generated/command_metadata.h b/custom/generated/command_metadata.h index 19059348..e7633a86 100644 --- a/custom/generated/command_metadata.h +++ b/custom/generated/command_metadata.h @@ -260,244 +260,244 @@ i32 source_name_len; i32 line_number; }; static Command_Metadata fcoder_metacmd_table[238] = { -{ PROC_LINKS(allow_mouse, 0), false, "allow_mouse", 11, "Shows the mouse and causes all mouse input to be processed normally.", 68, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 409 }, -{ PROC_LINKS(auto_indent_line_at_cursor, 0), false, "auto_indent_line_at_cursor", 26, "Auto-indents the line on which the cursor sits.", 47, "W:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 413 }, -{ PROC_LINKS(auto_indent_range, 0), false, "auto_indent_range", 17, "Auto-indents the range between the cursor and the mark.", 55, "W:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 423 }, -{ PROC_LINKS(auto_indent_whole_file, 0), false, "auto_indent_whole_file", 22, "Audo-indents the entire current buffer.", 39, "W:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 404 }, -{ PROC_LINKS(backspace_alpha_numeric_boundary, 0), false, "backspace_alpha_numeric_boundary", 32, "Delete characters between the cursor position and the first alphanumeric boundary to the left.", 94, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 165 }, -{ PROC_LINKS(backspace_char, 0), false, "backspace_char", 14, "Deletes the character to the left of the cursor.", 48, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 96 }, -{ PROC_LINKS(basic_change_active_panel, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 658 }, -{ PROC_LINKS(begin_clipboard_collection_mode, 0), true, "begin_clipboard_collection_mode", 31, "Allows the user to copy multiple strings from other applications before switching to 4coder and pasting them all.", 113, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 68 }, -{ PROC_LINKS(build_in_build_panel, 0), false, "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\\custom\\4coder_build_commands.cpp", 44, 159 }, -{ PROC_LINKS(build_search, 0), false, "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\\custom\\4coder_build_commands.cpp", 44, 122 }, -{ PROC_LINKS(center_view, 0), false, "center_view", 11, "Centers the view vertically on the line on which the cursor sits.", 65, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 208 }, -{ PROC_LINKS(change_active_panel, 0), false, "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 284 }, -{ PROC_LINKS(change_active_panel_backwards, 0), false, "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 290 }, -{ PROC_LINKS(change_to_build_panel, 0), false, "change_to_build_panel", 21, "If the special build panel is open, makes the build panel the active panel.", 75, "W:\\4ed\\code\\custom\\4coder_build_commands.cpp", 44, 180 }, -{ PROC_LINKS(clean_all_lines, 0), false, "clean_all_lines", 15, "Removes trailing whitespace from all lines in the current buffer.", 65, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 647 }, -{ PROC_LINKS(clear_all_themes, 0), false, "clear_all_themes", 16, "Clear the theme list", 20, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 480 }, -{ PROC_LINKS(clear_clipboard, 0), false, "clear_clipboard", 15, "Clears the history of the clipboard", 35, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 216 }, -{ PROC_LINKS(click_set_cursor, 0), false, "click_set_cursor", 16, "Sets the cursor position to the mouse position.", 47, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 244 }, -{ PROC_LINKS(click_set_cursor_and_mark, 0), false, "click_set_cursor_and_mark", 25, "Sets the cursor position and mark to the mouse position.", 56, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 234 }, -{ PROC_LINKS(click_set_cursor_if_lbutton, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 254 }, -{ PROC_LINKS(click_set_mark, 0), false, "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 266 }, -{ PROC_LINKS(clipboard_record_clip, 0), false, "clipboard_record_clip", 21, "In response to a new clipboard contents events, saves the new clip onto the clipboard history", 93, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 7 }, -{ PROC_LINKS(close_all_code, 0), false, "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\\custom\\4coder_project_commands.cpp", 46, 843 }, -{ PROC_LINKS(close_build_panel, 0), false, "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "W:\\4ed\\code\\custom\\4coder_build_commands.cpp", 44, 174 }, -{ PROC_LINKS(close_panel, 0), false, "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 666 }, -{ PROC_LINKS(command_documentation, 0), true, "command_documentation", 21, "Prompts the user to select a command then loads a doc buffer for that item", 74, "W:\\4ed\\code\\custom\\4coder_docs.cpp", 34, 190 }, -{ PROC_LINKS(command_lister, 0), true, "command_lister", 14, "Opens an interactive list of all registered commands.", 53, "W:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 761 }, -{ PROC_LINKS(comment_line, 0), false, "comment_line", 12, "Insert '//' at the beginning of the line after leading whitespace.", 66, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 125 }, -{ PROC_LINKS(comment_line_toggle, 0), false, "comment_line_toggle", 19, "Turns uncommented lines into commented lines and vice versa for comments starting with '//'.", 92, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 149 }, -{ PROC_LINKS(copy, 0), false, "copy", 4, "Copy the text in the range from the cursor to the mark onto the clipboard.", 74, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 107 }, -{ PROC_LINKS(cursor_mark_swap, 0), false, "cursor_mark_swap", 16, "Swaps the position of the cursor and the mark.", 46, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 135 }, -{ PROC_LINKS(custom_api_documentation, 0), true, "custom_api_documentation", 24, "Prompts the user to select a Custom API item then loads a doc buffer for that item", 82, "W:\\4ed\\code\\custom\\4coder_docs.cpp", 34, 175 }, -{ PROC_LINKS(cut, 0), false, "cut", 3, "Cut the text in the range from the cursor to the mark onto the clipboard.", 73, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 116 }, -{ PROC_LINKS(decrease_face_size, 0), false, "decrease_face_size", 18, "Decrease the size of the face used by the current buffer.", 57, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 749 }, -{ PROC_LINKS(default_file_externally_modified, 0), false, "default_file_externally_modified", 32, "Notes the external modification of attached files by printing a message.", 72, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1891 }, -{ PROC_LINKS(default_startup, 0), false, "default_startup", 15, "Default command for responding to a startup event", 49, "W:\\4ed\\code\\custom\\4coder_default_hooks.cpp", 43, 7 }, -{ PROC_LINKS(default_try_exit, 0), false, "default_try_exit", 16, "Default command for responding to a try-exit event", 50, "W:\\4ed\\code\\custom\\4coder_default_hooks.cpp", 43, 23 }, -{ PROC_LINKS(default_view_input_handler, 0), false, "default_view_input_handler", 26, "Input consumption loop for default view behavior", 48, "W:\\4ed\\code\\custom\\4coder_default_hooks.cpp", 43, 51 }, -{ PROC_LINKS(delete_alpha_numeric_boundary, 0), false, "delete_alpha_numeric_boundary", 29, "Delete characters between the cursor position and the first alphanumeric boundary to the right.", 95, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 173 }, -{ PROC_LINKS(delete_char, 0), false, "delete_char", 11, "Deletes the character to the right of the cursor.", 49, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 79 }, -{ PROC_LINKS(delete_current_scope, 0), false, "delete_current_scope", 20, "Deletes the braces surrounding the currently selected scope. Leaves the contents within the scope.", 99, "W:\\4ed\\code\\custom\\4coder_scope_commands.cpp", 44, 112 }, -{ PROC_LINKS(delete_file_query, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1317 }, -{ PROC_LINKS(delete_line, 0), false, "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1489 }, -{ PROC_LINKS(delete_range, 0), false, "delete_range", 12, "Deletes the text in the range between the cursor and the mark.", 62, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 145 }, -{ PROC_LINKS(duplicate_line, 0), false, "duplicate_line", 14, "Create a copy of the line on which the cursor sits.", 51, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1475 }, -{ PROC_LINKS(execute_any_cli, 0), false, "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\\custom\\4coder_cli_command.cpp", 41, 22 }, -{ PROC_LINKS(execute_previous_cli, 0), false, "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\\custom\\4coder_cli_command.cpp", 41, 7 }, -{ PROC_LINKS(exit_4coder, 0), false, "exit_4coder", 11, "Attempts to close 4coder.", 25, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 836 }, -{ PROC_LINKS(goto_beginning_of_file, 0), false, "goto_beginning_of_file", 22, "Sets the cursor to the beginning of the file.", 45, "W:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2201 }, -{ PROC_LINKS(goto_end_of_file, 0), false, "goto_end_of_file", 16, "Sets the cursor to the end of the file.", 39, "W:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2209 }, -{ PROC_LINKS(goto_first_jump, 0), false, "goto_first_jump", 15, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "W:\\4ed\\code\\custom\\4coder_jump_sticky.cpp", 41, 525 }, -{ PROC_LINKS(goto_first_jump_same_panel_sticky, 0), false, "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\\custom\\4coder_jump_sticky.cpp", 41, 542 }, -{ PROC_LINKS(goto_jump_at_cursor, 0), false, "goto_jump_at_cursor", 19, "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\\custom\\4coder_jump_sticky.cpp", 41, 348 }, -{ PROC_LINKS(goto_jump_at_cursor_same_panel, 0), false, "goto_jump_at_cursor_same_panel", 30, "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\\custom\\4coder_jump_sticky.cpp", 41, 375 }, -{ PROC_LINKS(goto_line, 0), false, "goto_line", 9, "Queries the user for a number, and jumps the cursor to the corresponding line.", 78, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 844 }, -{ PROC_LINKS(goto_next_jump, 0), false, "goto_next_jump", 14, "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\\custom\\4coder_jump_sticky.cpp", 41, 464 }, -{ PROC_LINKS(goto_next_jump_no_skips, 0), false, "goto_next_jump_no_skips", 23, "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\\custom\\4coder_jump_sticky.cpp", 41, 494 }, -{ PROC_LINKS(goto_prev_jump, 0), false, "goto_prev_jump", 14, "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\\custom\\4coder_jump_sticky.cpp", 41, 481 }, -{ PROC_LINKS(goto_prev_jump_no_skips, 0), false, "goto_prev_jump_no_skips", 23, "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\\custom\\4coder_jump_sticky.cpp", 41, 511 }, -{ PROC_LINKS(hide_filebar, 0), false, "hide_filebar", 12, "Sets the current view to hide it's filebar.", 43, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 696 }, -{ PROC_LINKS(hide_scrollbar, 0), false, "hide_scrollbar", 14, "Sets the current view to hide it's scrollbar.", 45, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 682 }, -{ PROC_LINKS(hms_demo_tutorial, 0), false, "hms_demo_tutorial", 17, "Tutorial for built in 4coder bindings and features.", 51, "W:\\4ed\\code\\custom\\4coder_tutorial.cpp", 38, 869 }, -{ PROC_LINKS(if0_off, 0), false, "if0_off", 7, "Surround the range between the cursor and mark with an '#if 0' and an '#endif'", 78, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 70 }, -{ PROC_LINKS(if_read_only_goto_position, 0), false, "if_read_only_goto_position", 26, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "W:\\4ed\\code\\custom\\4coder_jump_sticky.cpp", 41, 564 }, -{ PROC_LINKS(if_read_only_goto_position_same_panel, 0), false, "if_read_only_goto_position_same_panel", 37, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "W:\\4ed\\code\\custom\\4coder_jump_sticky.cpp", 41, 581 }, -{ PROC_LINKS(increase_face_size, 0), false, "increase_face_size", 18, "Increase the size of the face used by the current buffer.", 57, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 738 }, -{ PROC_LINKS(interactive_kill_buffer, 0), true, "interactive_kill_buffer", 23, "Interactively kill an open buffer.", 34, "W:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 520 }, -{ PROC_LINKS(interactive_new, 0), true, "interactive_new", 15, "Interactively creates a new file.", 33, "W:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 661 }, -{ PROC_LINKS(interactive_open, 0), true, "interactive_open", 16, "Interactively opens a file.", 27, "W:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 715 }, -{ PROC_LINKS(interactive_open_or_new, 0), true, "interactive_open_or_new", 23, "Interactively open a file out of the file system.", 49, "W:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 612 }, -{ PROC_LINKS(interactive_switch_buffer, 0), true, "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "W:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 510 }, -{ PROC_LINKS(jump_to_definition, 0), true, "jump_to_definition", 18, "List all definitions in the code index and jump to one chosen by the user.", 74, "W:\\4ed\\code\\custom\\4coder_code_index_listers.cpp", 48, 12 }, -{ PROC_LINKS(keyboard_macro_finish_recording, 0), false, "keyboard_macro_finish_recording", 31, "Stop macro recording, do nothing if macro recording is not already started", 74, "W:\\4ed\\code\\custom\\4coder_keyboard_macro.cpp", 44, 54 }, -{ PROC_LINKS(keyboard_macro_replay, 0), false, "keyboard_macro_replay", 21, "Replay the most recently recorded keyboard macro", 48, "W:\\4ed\\code\\custom\\4coder_keyboard_macro.cpp", 44, 77 }, -{ PROC_LINKS(keyboard_macro_start_recording, 0), false, "keyboard_macro_start_recording", 30, "Start macro recording, do nothing if macro recording is already started", 71, "W:\\4ed\\code\\custom\\4coder_keyboard_macro.cpp", 44, 41 }, -{ PROC_LINKS(kill_buffer, 0), false, "kill_buffer", 11, "Kills the current buffer.", 25, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1635 }, -{ PROC_LINKS(kill_tutorial, 0), false, "kill_tutorial", 13, "If there is an active tutorial, kill it.", 40, "W:\\4ed\\code\\custom\\4coder_tutorial.cpp", 38, 9 }, -{ PROC_LINKS(left_adjust_view, 0), false, "left_adjust_view", 16, "Sets the left size of the view near the x position of the cursor.", 65, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 222 }, -{ PROC_LINKS(list_all_functions_all_buffers, 0), false, "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\\custom\\4coder_function_list.cpp", 43, 295 }, -{ PROC_LINKS(list_all_functions_all_buffers_lister, 0), true, "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\\custom\\4coder_function_list.cpp", 43, 301 }, -{ PROC_LINKS(list_all_functions_current_buffer, 0), false, "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\\custom\\4coder_function_list.cpp", 43, 267 }, -{ PROC_LINKS(list_all_functions_current_buffer_lister, 0), true, "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\\custom\\4coder_function_list.cpp", 43, 277 }, -{ PROC_LINKS(list_all_locations, 0), false, "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\\custom\\4coder_search.cpp", 36, 165 }, -{ PROC_LINKS(list_all_locations_case_insensitive, 0), false, "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\\custom\\4coder_search.cpp", 36, 177 }, -{ PROC_LINKS(list_all_locations_of_identifier, 0), false, "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\\custom\\4coder_search.cpp", 36, 189 }, -{ PROC_LINKS(list_all_locations_of_identifier_case_insensitive, 0), false, "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\\custom\\4coder_search.cpp", 36, 195 }, -{ PROC_LINKS(list_all_locations_of_selection, 0), false, "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\\custom\\4coder_search.cpp", 36, 201 }, -{ PROC_LINKS(list_all_locations_of_selection_case_insensitive, 0), false, "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\\custom\\4coder_search.cpp", 36, 207 }, -{ PROC_LINKS(list_all_locations_of_type_definition, 0), false, "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\\custom\\4coder_search.cpp", 36, 213 }, -{ PROC_LINKS(list_all_locations_of_type_definition_of_identifier, 0), false, "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\\custom\\4coder_search.cpp", 36, 221 }, -{ PROC_LINKS(list_all_substring_locations, 0), false, "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\\custom\\4coder_search.cpp", 36, 171 }, -{ PROC_LINKS(list_all_substring_locations_case_insensitive, 0), false, "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\\custom\\4coder_search.cpp", 36, 183 }, -{ PROC_LINKS(load_project, 0), false, "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\\custom\\4coder_project_commands.cpp", 46, 863 }, -{ PROC_LINKS(load_theme_current_buffer, 0), false, "load_theme_current_buffer", 25, "Parse the current buffer as a theme file and add the theme to the theme list. If the buffer has a .4coder postfix in it's name, it is removed when the name is saved.", 165, "W:\\4ed\\code\\custom\\4coder_config.cpp", 36, 1627 }, -{ PROC_LINKS(load_themes_default_folder, 0), false, "load_themes_default_folder", 26, "Loads all the theme files in the default theme folder.", 54, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 457 }, -{ PROC_LINKS(load_themes_hot_directory, 0), false, "load_themes_hot_directory", 25, "Loads all the theme files in the current hot directory.", 55, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 469 }, -{ PROC_LINKS(make_directory_query, 0), false, "make_directory_query", 20, "Queries the user for a name and creates a new directory with the given name.", 76, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1429 }, -{ PROC_LINKS(miblo_decrement_basic, 0), false, "miblo_decrement_basic", 21, "Decrement an integer under the cursor by one.", 45, "W:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 44 }, -{ PROC_LINKS(miblo_decrement_time_stamp, 0), false, "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\\custom\\4coder_miblo_numbers.cpp", 43, 237 }, -{ PROC_LINKS(miblo_decrement_time_stamp_minute, 0), false, "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\\custom\\4coder_miblo_numbers.cpp", 43, 249 }, -{ PROC_LINKS(miblo_increment_basic, 0), false, "miblo_increment_basic", 21, "Increment an integer under the cursor by one.", 45, "W:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 29 }, -{ PROC_LINKS(miblo_increment_time_stamp, 0), false, "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\\custom\\4coder_miblo_numbers.cpp", 43, 231 }, -{ PROC_LINKS(miblo_increment_time_stamp_minute, 0), false, "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\\custom\\4coder_miblo_numbers.cpp", 43, 243 }, -{ PROC_LINKS(mouse_wheel_change_face_size, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 791 }, -{ PROC_LINKS(mouse_wheel_scroll, 0), false, "mouse_wheel_scroll", 18, "Reads the scroll wheel value from the mouse state and scrolls accordingly.", 74, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 276 }, -{ PROC_LINKS(move_down, 0), false, "move_down", 9, "Moves the cursor down one line.", 31, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 347 }, -{ PROC_LINKS(move_down_10, 0), false, "move_down_10", 12, "Moves the cursor down ten lines.", 32, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 359 }, -{ PROC_LINKS(move_down_textual, 0), false, "move_down_textual", 17, "Moves down to the next line of actual text, regardless of line wrapping.", 72, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 365 }, -{ PROC_LINKS(move_down_to_blank_line, 0), false, "move_down_to_blank_line", 23, "Seeks the cursor down to the next blank line.", 45, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 418 }, -{ PROC_LINKS(move_down_to_blank_line_end, 0), false, "move_down_to_blank_line_end", 27, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 442 }, -{ PROC_LINKS(move_down_to_blank_line_skip_whitespace, 0), false, "move_down_to_blank_line_skip_whitespace", 39, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 430 }, -{ PROC_LINKS(move_left, 0), false, "move_left", 9, "Moves the cursor one character to the left.", 43, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 448 }, -{ PROC_LINKS(move_left_alpha_numeric_boundary, 0), false, "move_left_alpha_numeric_boundary", 32, "Seek left for boundary between alphanumeric characters and non-alphanumeric characters.", 87, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 525 }, -{ PROC_LINKS(move_left_alpha_numeric_or_camel_boundary, 0), false, "move_left_alpha_numeric_or_camel_boundary", 41, "Seek left for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 106, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 539 }, -{ PROC_LINKS(move_left_token_boundary, 0), false, "move_left_token_boundary", 24, "Seek left for the next beginning of a token.", 44, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 497 }, -{ PROC_LINKS(move_left_whitespace_boundary, 0), false, "move_left_whitespace_boundary", 29, "Seek left for the next boundary between whitespace and non-whitespace.", 70, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 482 }, -{ PROC_LINKS(move_left_whitespace_or_token_boundary, 0), false, "move_left_whitespace_or_token_boundary", 38, "Seek left for the next end of a token or boundary between whitespace and non-whitespace.", 88, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 511 }, -{ PROC_LINKS(move_line_down, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1469 }, -{ PROC_LINKS(move_line_up, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1463 }, -{ PROC_LINKS(move_right, 0), false, "move_right", 10, "Moves the cursor one character to the right.", 44, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 456 }, -{ PROC_LINKS(move_right_alpha_numeric_boundary, 0), false, "move_right_alpha_numeric_boundary", 33, "Seek right for boundary between alphanumeric characters and non-alphanumeric characters.", 88, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 518 }, -{ PROC_LINKS(move_right_alpha_numeric_or_camel_boundary, 0), false, "move_right_alpha_numeric_or_camel_boundary", 42, "Seek right for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 107, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 532 }, -{ PROC_LINKS(move_right_token_boundary, 0), false, "move_right_token_boundary", 25, "Seek right for the next end of a token.", 39, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 490 }, -{ PROC_LINKS(move_right_whitespace_boundary, 0), false, "move_right_whitespace_boundary", 30, "Seek right for the next boundary between whitespace and non-whitespace.", 71, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 474 }, -{ PROC_LINKS(move_right_whitespace_or_token_boundary, 0), false, "move_right_whitespace_or_token_boundary", 39, "Seek right for the next end of a token or boundary between whitespace and non-whitespace.", 89, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 504 }, -{ PROC_LINKS(move_up, 0), false, "move_up", 7, "Moves the cursor up one line.", 29, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 341 }, -{ PROC_LINKS(move_up_10, 0), false, "move_up_10", 10, "Moves the cursor up ten lines.", 30, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 353 }, -{ PROC_LINKS(move_up_to_blank_line, 0), false, "move_up_to_blank_line", 21, "Seeks the cursor up to the next blank line.", 43, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 412 }, -{ PROC_LINKS(move_up_to_blank_line_end, 0), false, "move_up_to_blank_line_end", 25, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 436 }, -{ PROC_LINKS(move_up_to_blank_line_skip_whitespace, 0), false, "move_up_to_blank_line_skip_whitespace", 37, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 424 }, -{ PROC_LINKS(multi_paste_interactive, 0), false, "multi_paste_interactive", 23, "Paste multiple lines from the clipboard history, controlled with arrow keys", 75, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 364 }, -{ PROC_LINKS(multi_paste_interactive_quick, 0), false, "multi_paste_interactive_quick", 29, "Paste multiple lines from the clipboard history, controlled by inputing the number of lines to paste", 100, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 373 }, -{ PROC_LINKS(open_all_code, 0), false, "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\\custom\\4coder_project_commands.cpp", 46, 849 }, -{ PROC_LINKS(open_all_code_recursive, 0), false, "open_all_code_recursive", 23, "Works as open_all_code but also runs in all subdirectories.", 59, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 855 }, -{ PROC_LINKS(open_file_in_quotes, 0), false, "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1554 }, -{ PROC_LINKS(open_in_other, 0), false, "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1885 }, -{ PROC_LINKS(open_long_braces, 0), false, "open_long_braces", 16, "At the cursor, insert a '{' and '}' separated by a blank line.", 62, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 46 }, -{ PROC_LINKS(open_long_braces_break, 0), false, "open_long_braces_break", 22, "At the cursor, insert a '{' and '}break;' separated by a blank line.", 68, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 62 }, -{ PROC_LINKS(open_long_braces_semicolon, 0), false, "open_long_braces_semicolon", 26, "At the cursor, insert a '{' and '};' separated by a blank line.", 63, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 54 }, -{ PROC_LINKS(open_matching_file_cpp, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1586 }, -{ PROC_LINKS(open_panel_hsplit, 0), false, "open_panel_hsplit", 17, "Create a new panel by horizontally splitting the active panel.", 62, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 310 }, -{ PROC_LINKS(open_panel_vsplit, 0), false, "open_panel_vsplit", 17, "Create a new panel by vertically splitting the active panel.", 60, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 300 }, -{ PROC_LINKS(page_down, 0), false, "page_down", 9, "Scrolls the view down one view height and moves the cursor down one view height.", 80, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 383 }, -{ PROC_LINKS(page_up, 0), false, "page_up", 7, "Scrolls the view up one view height and moves the cursor up one view height.", 76, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 375 }, -{ PROC_LINKS(paste, 0), false, "paste", 5, "At the cursor, insert the text at the top of the clipboard.", 59, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 127 }, -{ PROC_LINKS(paste_and_indent, 0), false, "paste_and_indent", 16, "Paste from the top of clipboard and run auto-indent on the newly pasted text.", 77, "W:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 202 }, -{ PROC_LINKS(paste_next, 0), false, "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\\custom\\4coder_clipboard.cpp", 39, 161 }, -{ PROC_LINKS(paste_next_and_indent, 0), false, "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\\custom\\4coder_clipboard.cpp", 39, 209 }, -{ PROC_LINKS(place_in_scope, 0), false, "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\\custom\\4coder_scope_commands.cpp", 44, 106 }, -{ PROC_LINKS(profile_clear, 0), false, "profile_clear", 13, "Clear all profiling information from 4coder's self profiler.", 60, "W:\\4ed\\code\\custom\\4coder_profile.cpp", 37, 226 }, -{ PROC_LINKS(profile_disable, 0), false, "profile_disable", 15, "Prevent 4coder's self profiler from gathering new profiling information.", 72, "W:\\4ed\\code\\custom\\4coder_profile.cpp", 37, 219 }, -{ PROC_LINKS(profile_enable, 0), false, "profile_enable", 14, "Allow 4coder's self profiler to gather new profiling information.", 65, "W:\\4ed\\code\\custom\\4coder_profile.cpp", 37, 212 }, -{ PROC_LINKS(profile_inspect, 0), true, "profile_inspect", 15, "Inspect all currently collected profiling information in 4coder's self profiler.", 80, "W:\\4ed\\code\\custom\\4coder_profile_inspect.cpp", 45, 886 }, -{ PROC_LINKS(project_command_lister, 0), false, "project_command_lister", 22, "Open a lister of all commands in the currently loaded project.", 62, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 1290 }, -{ PROC_LINKS(project_fkey_command, 0), false, "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\\custom\\4coder_project_commands.cpp", 46, 871 }, -{ PROC_LINKS(project_go_to_root_directory, 0), false, "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\\custom\\4coder_project_commands.cpp", 46, 897 }, -{ PROC_LINKS(query_replace, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1245 }, -{ PROC_LINKS(query_replace_identifier, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1266 }, -{ PROC_LINKS(query_replace_selection, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1282 }, -{ PROC_LINKS(redo, 0), false, "redo", 4, "Advances forwards through the undo history of the current buffer.", 65, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1724 }, -{ PROC_LINKS(redo_all_buffers, 0), false, "redo_all_buffers", 16, "Advances forward through the undo history in the buffer containing the most recent regular edit.", 96, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1809 }, -{ PROC_LINKS(rename_file_query, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1394 }, -{ PROC_LINKS(reopen, 0), false, "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1653 }, -{ PROC_LINKS(replace_in_all_buffers, 0), false, "replace_in_all_buffers", 22, "Queries the user for a needle and string. Replaces all occurences of needle with string in all editable buffers.", 112, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1155 }, -{ PROC_LINKS(replace_in_buffer, 0), false, "replace_in_buffer", 17, "Queries the user for a needle and string. Replaces all occurences of needle with string in the active buffer.", 109, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1146 }, -{ PROC_LINKS(replace_in_range, 0), false, "replace_in_range", 16, "Queries the user for a needle and string. Replaces all occurences of needle with string in the range between cursor and the mark in the active buffer.", 150, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1137 }, -{ PROC_LINKS(reverse_search, 0), false, "reverse_search", 14, "Begins an incremental search up through the current buffer for a user specified string.", 87, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1078 }, -{ PROC_LINKS(reverse_search_identifier, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1090 }, -{ PROC_LINKS(save, 0), false, "save", 4, "Saves the current buffer.", 25, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1643 }, -{ PROC_LINKS(save_all_dirty_buffers, 0), false, "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 382 }, -{ PROC_LINKS(save_to_query, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1361 }, -{ PROC_LINKS(search, 0), false, "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1072 }, -{ PROC_LINKS(search_identifier, 0), false, "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1084 }, -{ PROC_LINKS(seek_beginning_of_line, 0), false, "seek_beginning_of_line", 22, "Seeks the cursor to the beginning of the visual line.", 53, "W:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2189 }, -{ PROC_LINKS(seek_beginning_of_textual_line, 0), false, "seek_beginning_of_textual_line", 30, "Seeks the cursor to the beginning of the line across all text.", 62, "W:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2177 }, -{ PROC_LINKS(seek_end_of_line, 0), false, "seek_end_of_line", 16, "Seeks the cursor to the end of the visual line.", 47, "W:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2195 }, -{ PROC_LINKS(seek_end_of_textual_line, 0), false, "seek_end_of_textual_line", 24, "Seeks the cursor to the end of the line across all text.", 56, "W:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2183 }, -{ PROC_LINKS(select_all, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 548 }, -{ PROC_LINKS(select_next_scope_absolute, 0), false, "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\\custom\\4coder_scope_commands.cpp", 44, 57 }, -{ PROC_LINKS(select_next_scope_after_current, 0), false, "select_next_scope_after_current", 31, "If a scope is selected, find first scope that starts after the selected scope. Otherwise find the first scope that starts after the cursor.", 139, "W:\\4ed\\code\\custom\\4coder_scope_commands.cpp", 44, 66 }, -{ PROC_LINKS(select_prev_scope_absolute, 0), false, "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\\custom\\4coder_scope_commands.cpp", 44, 82 }, -{ PROC_LINKS(select_prev_top_most_scope, 0), false, "select_prev_top_most_scope", 26, "Finds the first scope that starts before the cursor, then finds the top most scope that contains that scope.", 108, "W:\\4ed\\code\\custom\\4coder_scope_commands.cpp", 44, 99 }, -{ PROC_LINKS(select_surrounding_scope, 0), false, "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\\custom\\4coder_scope_commands.cpp", 44, 27 }, -{ PROC_LINKS(select_surrounding_scope_maximal, 0), false, "select_surrounding_scope_maximal", 32, "Selects the top-most scope that surrounds the cursor.", 53, "W:\\4ed\\code\\custom\\4coder_scope_commands.cpp", 44, 39 }, -{ PROC_LINKS(set_eol_mode_from_contents, 0), false, "set_eol_mode_from_contents", 26, "Sets the buffer's line ending mode to match the contents of the buffer.", 71, "W:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 125 }, -{ PROC_LINKS(set_eol_mode_to_binary, 0), false, "set_eol_mode_to_binary", 22, "Puts the buffer in bin line ending mode.", 40, "W:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 112 }, -{ PROC_LINKS(set_eol_mode_to_crlf, 0), false, "set_eol_mode_to_crlf", 20, "Puts the buffer in crlf line ending mode.", 41, "W:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 86 }, -{ PROC_LINKS(set_eol_mode_to_lf, 0), false, "set_eol_mode_to_lf", 18, "Puts the buffer in lf line ending mode.", 39, "W:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 99 }, -{ PROC_LINKS(set_face_size, 0), false, "set_face_size", 13, "Set face size of the face used by the current buffer.", 53, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 718 }, -{ PROC_LINKS(set_face_size_this_buffer, 0), false, "set_face_size_this_buffer", 25, "Set face size of the face used by the current buffer; if any other buffers are using the same face a new face is created so that only this buffer is effected", 157, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 760 }, -{ PROC_LINKS(set_mark, 0), false, "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 126 }, -{ PROC_LINKS(set_mode_to_notepad_like, 0), false, "set_mode_to_notepad_like", 24, "Sets the edit mode to Notepad like.", 35, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 427 }, -{ PROC_LINKS(set_mode_to_original, 0), false, "set_mode_to_original", 20, "Sets the edit mode to 4coder original.", 38, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 421 }, -{ PROC_LINKS(setup_build_bat, 0), false, "setup_build_bat", 15, "Queries the user for several configuration options and initializes a new build batch script.", 92, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 1238 }, -{ PROC_LINKS(setup_build_bat_and_sh, 0), false, "setup_build_bat_and_sh", 22, "Queries the user for several configuration options and initializes a new build batch script.", 92, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 1250 }, -{ PROC_LINKS(setup_build_sh, 0), false, "setup_build_sh", 14, "Queries the user for several configuration options and initializes a new build shell script.", 92, "W:\\4ed\\code\\custom\\4coder_project_commands.cpp", 46, 1244 }, -{ PROC_LINKS(setup_new_project, 0), false, "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\\custom\\4coder_project_commands.cpp", 46, 1231 }, -{ PROC_LINKS(show_filebar, 0), false, "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 689 }, -{ PROC_LINKS(show_scrollbar, 0), false, "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 675 }, -{ PROC_LINKS(show_the_log_graph, 0), true, "show_the_log_graph", 18, "Parses *log* and displays the 'log graph' UI", 44, "W:\\4ed\\code\\custom\\4coder_log_parser.cpp", 40, 994 }, -{ PROC_LINKS(snipe_backward_whitespace_or_token_boundary, 0), false, "snipe_backward_whitespace_or_token_boundary", 43, "Delete a single, whole token on or to the left of the cursor and post it to the clipboard.", 90, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 190 }, -{ PROC_LINKS(snipe_forward_whitespace_or_token_boundary, 0), false, "snipe_forward_whitespace_or_token_boundary", 42, "Delete a single, whole token on or to the right of the cursor and post it to the clipboard.", 91, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 198 }, -{ PROC_LINKS(snippet_lister, 0), true, "snippet_lister", 14, "Opens a snippet lister for inserting whole pre-written snippets of text.", 72, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 237 }, -{ PROC_LINKS(suppress_mouse, 0), false, "suppress_mouse", 14, "Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.", 83, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 403 }, -{ PROC_LINKS(swap_panels, 0), false, "swap_panels", 11, "Swaps the active panel with it's sibling.", 41, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1611 }, -{ PROC_LINKS(test_double_backspace, 0), false, "test_double_backspace", 21, "Made for testing purposes (I should have deleted this if you are reading it let me know)", 88, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 115 }, -{ PROC_LINKS(theme_lister, 0), true, "theme_lister", 12, "Opens an interactive list of all registered themes.", 51, "W:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 785 }, -{ PROC_LINKS(to_lowercase, 0), false, "to_lowercase", 12, "Converts all ascii text in the range between the cursor and the mark to lowercase.", 82, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 574 }, -{ PROC_LINKS(to_uppercase, 0), false, "to_uppercase", 12, "Converts all ascii text in the range between the cursor and the mark to uppercase.", 82, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 561 }, -{ PROC_LINKS(toggle_filebar, 0), false, "toggle_filebar", 14, "Toggles the visibility status of the current view's filebar.", 60, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 703 }, -{ PROC_LINKS(toggle_fps_meter, 0), false, "toggle_fps_meter", 16, "Toggles the visibility of the FPS performance meter", 51, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 712 }, -{ PROC_LINKS(toggle_fullscreen, 0), false, "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 451 }, -{ PROC_LINKS(toggle_highlight_enclosing_scopes, 0), false, "toggle_highlight_enclosing_scopes", 33, "In code files scopes surrounding the cursor are highlighted with distinguishing colors.", 87, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 439 }, -{ PROC_LINKS(toggle_highlight_line_at_cursor, 0), false, "toggle_highlight_line_at_cursor", 31, "Toggles the line highlight at the cursor.", 41, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 433 }, -{ PROC_LINKS(toggle_line_numbers, 0), false, "toggle_line_numbers", 19, "Toggles the left margin line numbers.", 37, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 817 }, -{ PROC_LINKS(toggle_line_wrap, 0), false, "toggle_line_wrap", 16, "Toggles the line wrap setting on this buffer.", 45, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 823 }, -{ PROC_LINKS(toggle_mouse, 0), false, "toggle_mouse", 12, "Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.", 71, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 415 }, -{ PROC_LINKS(toggle_paren_matching_helper, 0), false, "toggle_paren_matching_helper", 28, "In code files matching parentheses pairs are colored with distinguishing colors.", 80, "W:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 445 }, -{ PROC_LINKS(toggle_show_whitespace, 0), false, "toggle_show_whitespace", 22, "Toggles the current buffer's whitespace visibility status.", 58, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 808 }, -{ PROC_LINKS(toggle_virtual_whitespace, 0), false, "toggle_virtual_whitespace", 25, "Toggles virtual whitespace for all files.", 41, "W:\\4ed\\code\\custom\\4coder_code_index.cpp", 40, 1176 }, -{ PROC_LINKS(tutorial_maximize, 0), false, "tutorial_maximize", 17, "Expand the tutorial window", 26, "W:\\4ed\\code\\custom\\4coder_tutorial.cpp", 38, 20 }, -{ PROC_LINKS(tutorial_minimize, 0), false, "tutorial_minimize", 17, "Shrink the tutorial window", 26, "W:\\4ed\\code\\custom\\4coder_tutorial.cpp", 38, 34 }, -{ PROC_LINKS(uncomment_line, 0), false, "uncomment_line", 14, "If present, delete '//' at the beginning of the line after leading whitespace.", 78, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 137 }, -{ PROC_LINKS(undo, 0), false, "undo", 4, "Advances backwards through the undo history of the current buffer.", 66, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1711 }, -{ PROC_LINKS(undo_all_buffers, 0), false, "undo_all_buffers", 16, "Advances backward through the undo history in the buffer containing the most recent regular edit.", 97, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1738 }, -{ PROC_LINKS(view_buffer_other_panel, 0), false, "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\\custom\\4coder_base_commands.cpp", 43, 1599 }, -{ PROC_LINKS(view_jump_list_with_lister, 0), false, "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\\custom\\4coder_jump_lister.cpp", 41, 59 }, -{ PROC_LINKS(word_complete, 0), false, "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\\custom\\4coder_search.cpp", 36, 395 }, -{ PROC_LINKS(word_complete_drop_down, 0), false, "word_complete_drop_down", 23, "Word complete with drop down menu.", 34, "W:\\4ed\\code\\custom\\4coder_search.cpp", 36, 642 }, -{ PROC_LINKS(write_block, 0), false, "write_block", 11, "At the cursor, insert a block comment.", 38, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 94 }, -{ PROC_LINKS(write_hack, 0), false, "write_hack", 10, "At the cursor, insert a '// HACK' comment, includes user name if it was specified in config.4coder.", 99, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 82 }, -{ PROC_LINKS(write_note, 0), false, "write_note", 10, "At the cursor, insert a '// NOTE' comment, includes user name if it was specified in config.4coder.", 99, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 88 }, -{ PROC_LINKS(write_space, 0), false, "write_space", 11, "Inserts a space.", 16, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 67 }, -{ PROC_LINKS(write_text_and_auto_indent, 0), false, "write_text_and_auto_indent", 26, "Inserts text and auto-indents the line on which the cursor sits if any of the text contains 'layout punctuation' such as ;:{}()[]# and new lines.", 145, "W:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 433 }, -{ PROC_LINKS(write_text_input, 0), false, "write_text_input", 16, "Inserts whatever text was used to trigger this command.", 55, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 59 }, -{ PROC_LINKS(write_todo, 0), false, "write_todo", 10, "At the cursor, insert a '// TODO' comment, includes user name if it was specified in config.4coder.", 99, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 76 }, -{ PROC_LINKS(write_underscore, 0), false, "write_underscore", 16, "Inserts an underscore.", 22, "W:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 73 }, -{ PROC_LINKS(write_zero_struct, 0), false, "write_zero_struct", 17, "At the cursor, insert a ' = {};'.", 33, "W:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 100 }, +{ PROC_LINKS(allow_mouse, 0), false, "allow_mouse", 11, "Shows the mouse and causes all mouse input to be processed normally.", 68, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 409 }, +{ PROC_LINKS(auto_indent_line_at_cursor, 0), false, "auto_indent_line_at_cursor", 26, "Auto-indents the line on which the cursor sits.", 47, "/Users/allenwebster/4ed/code/custom/4coder_auto_indent.cpp", 58, 413 }, +{ PROC_LINKS(auto_indent_range, 0), false, "auto_indent_range", 17, "Auto-indents the range between the cursor and the mark.", 55, "/Users/allenwebster/4ed/code/custom/4coder_auto_indent.cpp", 58, 423 }, +{ PROC_LINKS(auto_indent_whole_file, 0), false, "auto_indent_whole_file", 22, "Audo-indents the entire current buffer.", 39, "/Users/allenwebster/4ed/code/custom/4coder_auto_indent.cpp", 58, 404 }, +{ PROC_LINKS(backspace_alpha_numeric_boundary, 0), false, "backspace_alpha_numeric_boundary", 32, "Delete characters between the cursor position and the first alphanumeric boundary to the left.", 94, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 165 }, +{ PROC_LINKS(backspace_char, 0), false, "backspace_char", 14, "Deletes the character to the left of the cursor.", 48, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 96 }, +{ PROC_LINKS(basic_change_active_panel, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 658 }, +{ PROC_LINKS(begin_clipboard_collection_mode, 0), true, "begin_clipboard_collection_mode", 31, "Allows the user to copy multiple strings from other applications before switching to 4coder and pasting them all.", 113, "/Users/allenwebster/4ed/code/custom/4coder_clipboard.cpp", 56, 68 }, +{ PROC_LINKS(build_in_build_panel, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_build_commands.cpp", 61, 159 }, +{ PROC_LINKS(build_search, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_build_commands.cpp", 61, 122 }, +{ PROC_LINKS(center_view, 0), false, "center_view", 11, "Centers the view vertically on the line on which the cursor sits.", 65, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 208 }, +{ PROC_LINKS(change_active_panel, 0), false, "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 284 }, +{ PROC_LINKS(change_active_panel_backwards, 0), false, "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 290 }, +{ PROC_LINKS(change_to_build_panel, 0), false, "change_to_build_panel", 21, "If the special build panel is open, makes the build panel the active panel.", 75, "/Users/allenwebster/4ed/code/custom/4coder_build_commands.cpp", 61, 180 }, +{ PROC_LINKS(clean_all_lines, 0), false, "clean_all_lines", 15, "Removes trailing whitespace from all lines in the current buffer.", 65, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 647 }, +{ PROC_LINKS(clear_all_themes, 0), false, "clear_all_themes", 16, "Clear the theme list", 20, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 480 }, +{ PROC_LINKS(clear_clipboard, 0), false, "clear_clipboard", 15, "Clears the history of the clipboard", 35, "/Users/allenwebster/4ed/code/custom/4coder_clipboard.cpp", 56, 216 }, +{ PROC_LINKS(click_set_cursor, 0), false, "click_set_cursor", 16, "Sets the cursor position to the mouse position.", 47, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 244 }, +{ PROC_LINKS(click_set_cursor_and_mark, 0), false, "click_set_cursor_and_mark", 25, "Sets the cursor position and mark to the mouse position.", 56, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 234 }, +{ PROC_LINKS(click_set_cursor_if_lbutton, 0), false, "click_set_cursor_if_lbutton", 27, "If the mouse left button is pressed, sets the cursor position to the mouse position.", 84, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 254 }, +{ PROC_LINKS(click_set_mark, 0), false, "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 266 }, +{ PROC_LINKS(clipboard_record_clip, 0), false, "clipboard_record_clip", 21, "In response to a new clipboard contents events, saves the new clip onto the clipboard history", 93, "/Users/allenwebster/4ed/code/custom/4coder_clipboard.cpp", 56, 7 }, +{ PROC_LINKS(close_all_code, 0), false, "close_all_code", 14, "Closes any buffer with a filename ending with an extension configured to be recognized as a code file type.", 107, "/Users/allenwebster/4ed/code/custom/4coder_project_commands.cpp", 63, 843 }, +{ PROC_LINKS(close_build_panel, 0), false, "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "/Users/allenwebster/4ed/code/custom/4coder_build_commands.cpp", 61, 174 }, +{ PROC_LINKS(close_panel, 0), false, "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 666 }, +{ PROC_LINKS(command_documentation, 0), true, "command_documentation", 21, "Prompts the user to select a command then loads a doc buffer for that item", 74, "/Users/allenwebster/4ed/code/custom/4coder_docs.cpp", 51, 190 }, +{ PROC_LINKS(command_lister, 0), true, "command_lister", 14, "Opens an interactive list of all registered commands.", 53, "/Users/allenwebster/4ed/code/custom/4coder_lists.cpp", 52, 761 }, +{ PROC_LINKS(comment_line, 0), false, "comment_line", 12, "Insert '//' at the beginning of the line after leading whitespace.", 66, "/Users/allenwebster/4ed/code/custom/4coder_combined_write_commands.cpp", 70, 125 }, +{ PROC_LINKS(comment_line_toggle, 0), false, "comment_line_toggle", 19, "Turns uncommented lines into commented lines and vice versa for comments starting with '//'.", 92, "/Users/allenwebster/4ed/code/custom/4coder_combined_write_commands.cpp", 70, 149 }, +{ PROC_LINKS(copy, 0), false, "copy", 4, "Copy the text in the range from the cursor to the mark onto the clipboard.", 74, "/Users/allenwebster/4ed/code/custom/4coder_clipboard.cpp", 56, 107 }, +{ PROC_LINKS(cursor_mark_swap, 0), false, "cursor_mark_swap", 16, "Swaps the position of the cursor and the mark.", 46, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 135 }, +{ PROC_LINKS(custom_api_documentation, 0), true, "custom_api_documentation", 24, "Prompts the user to select a Custom API item then loads a doc buffer for that item", 82, "/Users/allenwebster/4ed/code/custom/4coder_docs.cpp", 51, 175 }, +{ PROC_LINKS(cut, 0), false, "cut", 3, "Cut the text in the range from the cursor to the mark onto the clipboard.", 73, "/Users/allenwebster/4ed/code/custom/4coder_clipboard.cpp", 56, 116 }, +{ PROC_LINKS(decrease_face_size, 0), false, "decrease_face_size", 18, "Decrease the size of the face used by the current buffer.", 57, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 749 }, +{ PROC_LINKS(default_file_externally_modified, 0), false, "default_file_externally_modified", 32, "Notes the external modification of attached files by printing a message.", 72, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1891 }, +{ PROC_LINKS(default_startup, 0), false, "default_startup", 15, "Default command for responding to a startup event", 49, "/Users/allenwebster/4ed/code/custom/4coder_default_hooks.cpp", 60, 7 }, +{ PROC_LINKS(default_try_exit, 0), false, "default_try_exit", 16, "Default command for responding to a try-exit event", 50, "/Users/allenwebster/4ed/code/custom/4coder_default_hooks.cpp", 60, 23 }, +{ PROC_LINKS(default_view_input_handler, 0), false, "default_view_input_handler", 26, "Input consumption loop for default view behavior", 48, "/Users/allenwebster/4ed/code/custom/4coder_default_hooks.cpp", 60, 51 }, +{ PROC_LINKS(delete_alpha_numeric_boundary, 0), false, "delete_alpha_numeric_boundary", 29, "Delete characters between the cursor position and the first alphanumeric boundary to the right.", 95, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 173 }, +{ PROC_LINKS(delete_char, 0), false, "delete_char", 11, "Deletes the character to the right of the cursor.", 49, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 79 }, +{ PROC_LINKS(delete_current_scope, 0), false, "delete_current_scope", 20, "Deletes the braces surrounding the currently selected scope. Leaves the contents within the scope.", 99, "/Users/allenwebster/4ed/code/custom/4coder_scope_commands.cpp", 61, 112 }, +{ PROC_LINKS(delete_file_query, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1317 }, +{ PROC_LINKS(delete_line, 0), false, "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1489 }, +{ PROC_LINKS(delete_range, 0), false, "delete_range", 12, "Deletes the text in the range between the cursor and the mark.", 62, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 145 }, +{ PROC_LINKS(duplicate_line, 0), false, "duplicate_line", 14, "Create a copy of the line on which the cursor sits.", 51, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1475 }, +{ PROC_LINKS(execute_any_cli, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_cli_command.cpp", 58, 22 }, +{ PROC_LINKS(execute_previous_cli, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_cli_command.cpp", 58, 7 }, +{ PROC_LINKS(exit_4coder, 0), false, "exit_4coder", 11, "Attempts to close 4coder.", 25, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 836 }, +{ PROC_LINKS(goto_beginning_of_file, 0), false, "goto_beginning_of_file", 22, "Sets the cursor to the beginning of the file.", 45, "/Users/allenwebster/4ed/code/custom/4coder_helper.cpp", 53, 2201 }, +{ PROC_LINKS(goto_end_of_file, 0), false, "goto_end_of_file", 16, "Sets the cursor to the end of the file.", 39, "/Users/allenwebster/4ed/code/custom/4coder_helper.cpp", 53, 2209 }, +{ PROC_LINKS(goto_first_jump, 0), false, "goto_first_jump", 15, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "/Users/allenwebster/4ed/code/custom/4coder_jump_sticky.cpp", 58, 525 }, +{ PROC_LINKS(goto_first_jump_same_panel_sticky, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_jump_sticky.cpp", 58, 542 }, +{ PROC_LINKS(goto_jump_at_cursor, 0), false, "goto_jump_at_cursor", 19, "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, "/Users/allenwebster/4ed/code/custom/4coder_jump_sticky.cpp", 58, 348 }, +{ PROC_LINKS(goto_jump_at_cursor_same_panel, 0), false, "goto_jump_at_cursor_same_panel", 30, "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, "/Users/allenwebster/4ed/code/custom/4coder_jump_sticky.cpp", 58, 375 }, +{ PROC_LINKS(goto_line, 0), false, "goto_line", 9, "Queries the user for a number, and jumps the cursor to the corresponding line.", 78, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 844 }, +{ PROC_LINKS(goto_next_jump, 0), false, "goto_next_jump", 14, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "/Users/allenwebster/4ed/code/custom/4coder_jump_sticky.cpp", 58, 464 }, +{ PROC_LINKS(goto_next_jump_no_skips, 0), false, "goto_next_jump_no_skips", 23, "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, "/Users/allenwebster/4ed/code/custom/4coder_jump_sticky.cpp", 58, 494 }, +{ PROC_LINKS(goto_prev_jump, 0), false, "goto_prev_jump", 14, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "/Users/allenwebster/4ed/code/custom/4coder_jump_sticky.cpp", 58, 481 }, +{ PROC_LINKS(goto_prev_jump_no_skips, 0), false, "goto_prev_jump_no_skips", 23, "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, "/Users/allenwebster/4ed/code/custom/4coder_jump_sticky.cpp", 58, 511 }, +{ PROC_LINKS(hide_filebar, 0), false, "hide_filebar", 12, "Sets the current view to hide it's filebar.", 43, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 696 }, +{ PROC_LINKS(hide_scrollbar, 0), false, "hide_scrollbar", 14, "Sets the current view to hide it's scrollbar.", 45, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 682 }, +{ PROC_LINKS(hms_demo_tutorial, 0), false, "hms_demo_tutorial", 17, "Tutorial for built in 4coder bindings and features.", 51, "/Users/allenwebster/4ed/code/custom/4coder_tutorial.cpp", 55, 869 }, +{ PROC_LINKS(if0_off, 0), false, "if0_off", 7, "Surround the range between the cursor and mark with an '#if 0' and an '#endif'", 78, "/Users/allenwebster/4ed/code/custom/4coder_combined_write_commands.cpp", 70, 70 }, +{ PROC_LINKS(if_read_only_goto_position, 0), false, "if_read_only_goto_position", 26, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "/Users/allenwebster/4ed/code/custom/4coder_jump_sticky.cpp", 58, 564 }, +{ PROC_LINKS(if_read_only_goto_position_same_panel, 0), false, "if_read_only_goto_position_same_panel", 37, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "/Users/allenwebster/4ed/code/custom/4coder_jump_sticky.cpp", 58, 581 }, +{ PROC_LINKS(increase_face_size, 0), false, "increase_face_size", 18, "Increase the size of the face used by the current buffer.", 57, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 738 }, +{ PROC_LINKS(interactive_kill_buffer, 0), true, "interactive_kill_buffer", 23, "Interactively kill an open buffer.", 34, "/Users/allenwebster/4ed/code/custom/4coder_lists.cpp", 52, 520 }, +{ PROC_LINKS(interactive_new, 0), true, "interactive_new", 15, "Interactively creates a new file.", 33, "/Users/allenwebster/4ed/code/custom/4coder_lists.cpp", 52, 661 }, +{ PROC_LINKS(interactive_open, 0), true, "interactive_open", 16, "Interactively opens a file.", 27, "/Users/allenwebster/4ed/code/custom/4coder_lists.cpp", 52, 715 }, +{ PROC_LINKS(interactive_open_or_new, 0), true, "interactive_open_or_new", 23, "Interactively open a file out of the file system.", 49, "/Users/allenwebster/4ed/code/custom/4coder_lists.cpp", 52, 612 }, +{ PROC_LINKS(interactive_switch_buffer, 0), true, "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "/Users/allenwebster/4ed/code/custom/4coder_lists.cpp", 52, 510 }, +{ PROC_LINKS(jump_to_definition, 0), true, "jump_to_definition", 18, "List all definitions in the code index and jump to one chosen by the user.", 74, "/Users/allenwebster/4ed/code/custom/4coder_code_index_listers.cpp", 65, 12 }, +{ PROC_LINKS(keyboard_macro_finish_recording, 0), false, "keyboard_macro_finish_recording", 31, "Stop macro recording, do nothing if macro recording is not already started", 74, "/Users/allenwebster/4ed/code/custom/4coder_keyboard_macro.cpp", 61, 54 }, +{ PROC_LINKS(keyboard_macro_replay, 0), false, "keyboard_macro_replay", 21, "Replay the most recently recorded keyboard macro", 48, "/Users/allenwebster/4ed/code/custom/4coder_keyboard_macro.cpp", 61, 77 }, +{ PROC_LINKS(keyboard_macro_start_recording, 0), false, "keyboard_macro_start_recording", 30, "Start macro recording, do nothing if macro recording is already started", 71, "/Users/allenwebster/4ed/code/custom/4coder_keyboard_macro.cpp", 61, 41 }, +{ PROC_LINKS(kill_buffer, 0), false, "kill_buffer", 11, "Kills the current buffer.", 25, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1635 }, +{ PROC_LINKS(kill_tutorial, 0), false, "kill_tutorial", 13, "If there is an active tutorial, kill it.", 40, "/Users/allenwebster/4ed/code/custom/4coder_tutorial.cpp", 55, 9 }, +{ PROC_LINKS(left_adjust_view, 0), false, "left_adjust_view", 16, "Sets the left size of the view near the x position of the cursor.", 65, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 222 }, +{ PROC_LINKS(list_all_functions_all_buffers, 0), false, "list_all_functions_all_buffers", 30, "Creates a jump list of lines from all buffers that appear to define or declare functions.", 89, "/Users/allenwebster/4ed/code/custom/4coder_function_list.cpp", 60, 295 }, +{ PROC_LINKS(list_all_functions_all_buffers_lister, 0), true, "list_all_functions_all_buffers_lister", 37, "Creates a lister of locations that look like function definitions and declarations all buffers.", 95, "/Users/allenwebster/4ed/code/custom/4coder_function_list.cpp", 60, 301 }, +{ PROC_LINKS(list_all_functions_current_buffer, 0), false, "list_all_functions_current_buffer", 33, "Creates a jump list of lines of the current buffer that appear to define or declare functions.", 94, "/Users/allenwebster/4ed/code/custom/4coder_function_list.cpp", 60, 267 }, +{ PROC_LINKS(list_all_functions_current_buffer_lister, 0), true, "list_all_functions_current_buffer_lister", 40, "Creates a lister of locations that look like function definitions and declarations in the buffer.", 97, "/Users/allenwebster/4ed/code/custom/4coder_function_list.cpp", 60, 277 }, +{ PROC_LINKS(list_all_locations, 0), false, "list_all_locations", 18, "Queries the user for a string and lists all exact case-sensitive matches found in all open buffers.", 99, "/Users/allenwebster/4ed/code/custom/4coder_search.cpp", 53, 165 }, +{ PROC_LINKS(list_all_locations_case_insensitive, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_search.cpp", 53, 177 }, +{ PROC_LINKS(list_all_locations_of_identifier, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_search.cpp", 53, 189 }, +{ PROC_LINKS(list_all_locations_of_identifier_case_insensitive, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_search.cpp", 53, 195 }, +{ PROC_LINKS(list_all_locations_of_selection, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_search.cpp", 53, 201 }, +{ PROC_LINKS(list_all_locations_of_selection_case_insensitive, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_search.cpp", 53, 207 }, +{ PROC_LINKS(list_all_locations_of_type_definition, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_search.cpp", 53, 213 }, +{ PROC_LINKS(list_all_locations_of_type_definition_of_identifier, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_search.cpp", 53, 221 }, +{ PROC_LINKS(list_all_substring_locations, 0), false, "list_all_substring_locations", 28, "Queries the user for a string and lists all case-sensitive substring matches found in all open buffers.", 103, "/Users/allenwebster/4ed/code/custom/4coder_search.cpp", 53, 171 }, +{ PROC_LINKS(list_all_substring_locations_case_insensitive, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_search.cpp", 53, 183 }, +{ PROC_LINKS(load_project, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_project_commands.cpp", 63, 863 }, +{ PROC_LINKS(load_theme_current_buffer, 0), false, "load_theme_current_buffer", 25, "Parse the current buffer as a theme file and add the theme to the theme list. If the buffer has a .4coder postfix in it's name, it is removed when the name is saved.", 165, "/Users/allenwebster/4ed/code/custom/4coder_config.cpp", 53, 1627 }, +{ PROC_LINKS(load_themes_default_folder, 0), false, "load_themes_default_folder", 26, "Loads all the theme files in the default theme folder.", 54, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 457 }, +{ PROC_LINKS(load_themes_hot_directory, 0), false, "load_themes_hot_directory", 25, "Loads all the theme files in the current hot directory.", 55, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 469 }, +{ PROC_LINKS(make_directory_query, 0), false, "make_directory_query", 20, "Queries the user for a name and creates a new directory with the given name.", 76, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1429 }, +{ PROC_LINKS(miblo_decrement_basic, 0), false, "miblo_decrement_basic", 21, "Decrement an integer under the cursor by one.", 45, "/Users/allenwebster/4ed/code/custom/4coder_miblo_numbers.cpp", 60, 44 }, +{ PROC_LINKS(miblo_decrement_time_stamp, 0), false, "miblo_decrement_time_stamp", 26, "Decrement a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "/Users/allenwebster/4ed/code/custom/4coder_miblo_numbers.cpp", 60, 237 }, +{ PROC_LINKS(miblo_decrement_time_stamp_minute, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_miblo_numbers.cpp", 60, 249 }, +{ PROC_LINKS(miblo_increment_basic, 0), false, "miblo_increment_basic", 21, "Increment an integer under the cursor by one.", 45, "/Users/allenwebster/4ed/code/custom/4coder_miblo_numbers.cpp", 60, 29 }, +{ PROC_LINKS(miblo_increment_time_stamp, 0), false, "miblo_increment_time_stamp", 26, "Increment a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "/Users/allenwebster/4ed/code/custom/4coder_miblo_numbers.cpp", 60, 231 }, +{ PROC_LINKS(miblo_increment_time_stamp_minute, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_miblo_numbers.cpp", 60, 243 }, +{ PROC_LINKS(mouse_wheel_change_face_size, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 791 }, +{ PROC_LINKS(mouse_wheel_scroll, 0), false, "mouse_wheel_scroll", 18, "Reads the scroll wheel value from the mouse state and scrolls accordingly.", 74, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 276 }, +{ PROC_LINKS(move_down, 0), false, "move_down", 9, "Moves the cursor down one line.", 31, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 347 }, +{ PROC_LINKS(move_down_10, 0), false, "move_down_10", 12, "Moves the cursor down ten lines.", 32, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 359 }, +{ PROC_LINKS(move_down_textual, 0), false, "move_down_textual", 17, "Moves down to the next line of actual text, regardless of line wrapping.", 72, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 365 }, +{ PROC_LINKS(move_down_to_blank_line, 0), false, "move_down_to_blank_line", 23, "Seeks the cursor down to the next blank line.", 45, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 418 }, +{ PROC_LINKS(move_down_to_blank_line_end, 0), false, "move_down_to_blank_line_end", 27, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 442 }, +{ PROC_LINKS(move_down_to_blank_line_skip_whitespace, 0), false, "move_down_to_blank_line_skip_whitespace", 39, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 430 }, +{ PROC_LINKS(move_left, 0), false, "move_left", 9, "Moves the cursor one character to the left.", 43, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 448 }, +{ PROC_LINKS(move_left_alpha_numeric_boundary, 0), false, "move_left_alpha_numeric_boundary", 32, "Seek left for boundary between alphanumeric characters and non-alphanumeric characters.", 87, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 525 }, +{ PROC_LINKS(move_left_alpha_numeric_or_camel_boundary, 0), false, "move_left_alpha_numeric_or_camel_boundary", 41, "Seek left for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 106, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 539 }, +{ PROC_LINKS(move_left_token_boundary, 0), false, "move_left_token_boundary", 24, "Seek left for the next beginning of a token.", 44, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 497 }, +{ PROC_LINKS(move_left_whitespace_boundary, 0), false, "move_left_whitespace_boundary", 29, "Seek left for the next boundary between whitespace and non-whitespace.", 70, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 482 }, +{ PROC_LINKS(move_left_whitespace_or_token_boundary, 0), false, "move_left_whitespace_or_token_boundary", 38, "Seek left for the next end of a token or boundary between whitespace and non-whitespace.", 88, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 511 }, +{ PROC_LINKS(move_line_down, 0), false, "move_line_down", 14, "Swaps the line under the cursor with the line below it, and moves the cursor down with it.", 90, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1469 }, +{ PROC_LINKS(move_line_up, 0), false, "move_line_up", 12, "Swaps the line under the cursor with the line above it, and moves the cursor up with it.", 88, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1463 }, +{ PROC_LINKS(move_right, 0), false, "move_right", 10, "Moves the cursor one character to the right.", 44, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 456 }, +{ PROC_LINKS(move_right_alpha_numeric_boundary, 0), false, "move_right_alpha_numeric_boundary", 33, "Seek right for boundary between alphanumeric characters and non-alphanumeric characters.", 88, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 518 }, +{ PROC_LINKS(move_right_alpha_numeric_or_camel_boundary, 0), false, "move_right_alpha_numeric_or_camel_boundary", 42, "Seek right for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 107, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 532 }, +{ PROC_LINKS(move_right_token_boundary, 0), false, "move_right_token_boundary", 25, "Seek right for the next end of a token.", 39, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 490 }, +{ PROC_LINKS(move_right_whitespace_boundary, 0), false, "move_right_whitespace_boundary", 30, "Seek right for the next boundary between whitespace and non-whitespace.", 71, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 474 }, +{ PROC_LINKS(move_right_whitespace_or_token_boundary, 0), false, "move_right_whitespace_or_token_boundary", 39, "Seek right for the next end of a token or boundary between whitespace and non-whitespace.", 89, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 504 }, +{ PROC_LINKS(move_up, 0), false, "move_up", 7, "Moves the cursor up one line.", 29, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 341 }, +{ PROC_LINKS(move_up_10, 0), false, "move_up_10", 10, "Moves the cursor up ten lines.", 30, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 353 }, +{ PROC_LINKS(move_up_to_blank_line, 0), false, "move_up_to_blank_line", 21, "Seeks the cursor up to the next blank line.", 43, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 412 }, +{ PROC_LINKS(move_up_to_blank_line_end, 0), false, "move_up_to_blank_line_end", 25, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 436 }, +{ PROC_LINKS(move_up_to_blank_line_skip_whitespace, 0), false, "move_up_to_blank_line_skip_whitespace", 37, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 424 }, +{ PROC_LINKS(multi_paste_interactive, 0), false, "multi_paste_interactive", 23, "Paste multiple lines from the clipboard history, controlled with arrow keys", 75, "/Users/allenwebster/4ed/code/custom/4coder_clipboard.cpp", 56, 364 }, +{ PROC_LINKS(multi_paste_interactive_quick, 0), false, "multi_paste_interactive_quick", 29, "Paste multiple lines from the clipboard history, controlled by inputing the number of lines to paste", 100, "/Users/allenwebster/4ed/code/custom/4coder_clipboard.cpp", 56, 373 }, +{ PROC_LINKS(open_all_code, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_project_commands.cpp", 63, 849 }, +{ PROC_LINKS(open_all_code_recursive, 0), false, "open_all_code_recursive", 23, "Works as open_all_code but also runs in all subdirectories.", 59, "/Users/allenwebster/4ed/code/custom/4coder_project_commands.cpp", 63, 855 }, +{ PROC_LINKS(open_file_in_quotes, 0), false, "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1554 }, +{ PROC_LINKS(open_in_other, 0), false, "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1885 }, +{ PROC_LINKS(open_long_braces, 0), false, "open_long_braces", 16, "At the cursor, insert a '{' and '}' separated by a blank line.", 62, "/Users/allenwebster/4ed/code/custom/4coder_combined_write_commands.cpp", 70, 46 }, +{ PROC_LINKS(open_long_braces_break, 0), false, "open_long_braces_break", 22, "At the cursor, insert a '{' and '}break;' separated by a blank line.", 68, "/Users/allenwebster/4ed/code/custom/4coder_combined_write_commands.cpp", 70, 62 }, +{ PROC_LINKS(open_long_braces_semicolon, 0), false, "open_long_braces_semicolon", 26, "At the cursor, insert a '{' and '};' separated by a blank line.", 63, "/Users/allenwebster/4ed/code/custom/4coder_combined_write_commands.cpp", 70, 54 }, +{ PROC_LINKS(open_matching_file_cpp, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1586 }, +{ PROC_LINKS(open_panel_hsplit, 0), false, "open_panel_hsplit", 17, "Create a new panel by horizontally splitting the active panel.", 62, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 310 }, +{ PROC_LINKS(open_panel_vsplit, 0), false, "open_panel_vsplit", 17, "Create a new panel by vertically splitting the active panel.", 60, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 300 }, +{ PROC_LINKS(page_down, 0), false, "page_down", 9, "Scrolls the view down one view height and moves the cursor down one view height.", 80, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 383 }, +{ PROC_LINKS(page_up, 0), false, "page_up", 7, "Scrolls the view up one view height and moves the cursor up one view height.", 76, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 375 }, +{ PROC_LINKS(paste, 0), false, "paste", 5, "At the cursor, insert the text at the top of the clipboard.", 59, "/Users/allenwebster/4ed/code/custom/4coder_clipboard.cpp", 56, 127 }, +{ PROC_LINKS(paste_and_indent, 0), false, "paste_and_indent", 16, "Paste from the top of clipboard and run auto-indent on the newly pasted text.", 77, "/Users/allenwebster/4ed/code/custom/4coder_clipboard.cpp", 56, 202 }, +{ PROC_LINKS(paste_next, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_clipboard.cpp", 56, 161 }, +{ PROC_LINKS(paste_next_and_indent, 0), false, "paste_next_and_indent", 21, "Paste the next item on the clipboard and run auto-indent on the newly pasted text.", 82, "/Users/allenwebster/4ed/code/custom/4coder_clipboard.cpp", 56, 209 }, +{ PROC_LINKS(place_in_scope, 0), false, "place_in_scope", 14, "Wraps the code contained in the range between cursor and mark with a new curly brace scope.", 91, "/Users/allenwebster/4ed/code/custom/4coder_scope_commands.cpp", 61, 106 }, +{ PROC_LINKS(profile_clear, 0), false, "profile_clear", 13, "Clear all profiling information from 4coder's self profiler.", 60, "/Users/allenwebster/4ed/code/custom/4coder_profile.cpp", 54, 226 }, +{ PROC_LINKS(profile_disable, 0), false, "profile_disable", 15, "Prevent 4coder's self profiler from gathering new profiling information.", 72, "/Users/allenwebster/4ed/code/custom/4coder_profile.cpp", 54, 219 }, +{ PROC_LINKS(profile_enable, 0), false, "profile_enable", 14, "Allow 4coder's self profiler to gather new profiling information.", 65, "/Users/allenwebster/4ed/code/custom/4coder_profile.cpp", 54, 212 }, +{ PROC_LINKS(profile_inspect, 0), true, "profile_inspect", 15, "Inspect all currently collected profiling information in 4coder's self profiler.", 80, "/Users/allenwebster/4ed/code/custom/4coder_profile_inspect.cpp", 62, 886 }, +{ PROC_LINKS(project_command_lister, 0), false, "project_command_lister", 22, "Open a lister of all commands in the currently loaded project.", 62, "/Users/allenwebster/4ed/code/custom/4coder_project_commands.cpp", 63, 1290 }, +{ PROC_LINKS(project_fkey_command, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_project_commands.cpp", 63, 871 }, +{ PROC_LINKS(project_go_to_root_directory, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_project_commands.cpp", 63, 897 }, +{ PROC_LINKS(query_replace, 0), false, "query_replace", 13, "Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.", 120, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1245 }, +{ PROC_LINKS(query_replace_identifier, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1266 }, +{ PROC_LINKS(query_replace_selection, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1282 }, +{ PROC_LINKS(redo, 0), false, "redo", 4, "Advances forwards through the undo history of the current buffer.", 65, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1724 }, +{ PROC_LINKS(redo_all_buffers, 0), false, "redo_all_buffers", 16, "Advances forward through the undo history in the buffer containing the most recent regular edit.", 96, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1809 }, +{ PROC_LINKS(rename_file_query, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1394 }, +{ PROC_LINKS(reopen, 0), false, "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1653 }, +{ PROC_LINKS(replace_in_all_buffers, 0), false, "replace_in_all_buffers", 22, "Queries the user for a needle and string. Replaces all occurences of needle with string in all editable buffers.", 112, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1155 }, +{ PROC_LINKS(replace_in_buffer, 0), false, "replace_in_buffer", 17, "Queries the user for a needle and string. Replaces all occurences of needle with string in the active buffer.", 109, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1146 }, +{ PROC_LINKS(replace_in_range, 0), false, "replace_in_range", 16, "Queries the user for a needle and string. Replaces all occurences of needle with string in the range between cursor and the mark in the active buffer.", 150, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1137 }, +{ PROC_LINKS(reverse_search, 0), false, "reverse_search", 14, "Begins an incremental search up through the current buffer for a user specified string.", 87, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1078 }, +{ PROC_LINKS(reverse_search_identifier, 0), false, "reverse_search_identifier", 25, "Begins an incremental search up through the current buffer for the word or token under the cursor.", 98, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1090 }, +{ PROC_LINKS(save, 0), false, "save", 4, "Saves the current buffer.", 25, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1643 }, +{ PROC_LINKS(save_all_dirty_buffers, 0), false, "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 382 }, +{ PROC_LINKS(save_to_query, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1361 }, +{ PROC_LINKS(search, 0), false, "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1072 }, +{ PROC_LINKS(search_identifier, 0), false, "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1084 }, +{ PROC_LINKS(seek_beginning_of_line, 0), false, "seek_beginning_of_line", 22, "Seeks the cursor to the beginning of the visual line.", 53, "/Users/allenwebster/4ed/code/custom/4coder_helper.cpp", 53, 2189 }, +{ PROC_LINKS(seek_beginning_of_textual_line, 0), false, "seek_beginning_of_textual_line", 30, "Seeks the cursor to the beginning of the line across all text.", 62, "/Users/allenwebster/4ed/code/custom/4coder_helper.cpp", 53, 2177 }, +{ PROC_LINKS(seek_end_of_line, 0), false, "seek_end_of_line", 16, "Seeks the cursor to the end of the visual line.", 47, "/Users/allenwebster/4ed/code/custom/4coder_helper.cpp", 53, 2195 }, +{ PROC_LINKS(seek_end_of_textual_line, 0), false, "seek_end_of_textual_line", 24, "Seeks the cursor to the end of the line across all text.", 56, "/Users/allenwebster/4ed/code/custom/4coder_helper.cpp", 53, 2183 }, +{ PROC_LINKS(select_all, 0), false, "select_all", 10, "Puts the cursor at the top of the file, and the mark at the bottom of the file.", 79, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 548 }, +{ PROC_LINKS(select_next_scope_absolute, 0), false, "select_next_scope_absolute", 26, "Finds the first scope started by '{' after the cursor and puts the cursor and mark on the '{' and '}'.", 102, "/Users/allenwebster/4ed/code/custom/4coder_scope_commands.cpp", 61, 57 }, +{ PROC_LINKS(select_next_scope_after_current, 0), false, "select_next_scope_after_current", 31, "If a scope is selected, find first scope that starts after the selected scope. Otherwise find the first scope that starts after the cursor.", 139, "/Users/allenwebster/4ed/code/custom/4coder_scope_commands.cpp", 61, 66 }, +{ PROC_LINKS(select_prev_scope_absolute, 0), false, "select_prev_scope_absolute", 26, "Finds the first scope started by '{' before the cursor and puts the cursor and mark on the '{' and '}'.", 103, "/Users/allenwebster/4ed/code/custom/4coder_scope_commands.cpp", 61, 82 }, +{ PROC_LINKS(select_prev_top_most_scope, 0), false, "select_prev_top_most_scope", 26, "Finds the first scope that starts before the cursor, then finds the top most scope that contains that scope.", 108, "/Users/allenwebster/4ed/code/custom/4coder_scope_commands.cpp", 61, 99 }, +{ PROC_LINKS(select_surrounding_scope, 0), false, "select_surrounding_scope", 24, "Finds the scope enclosed by '{' '}' surrounding the cursor and puts the cursor and mark on the '{' and '}'.", 107, "/Users/allenwebster/4ed/code/custom/4coder_scope_commands.cpp", 61, 27 }, +{ PROC_LINKS(select_surrounding_scope_maximal, 0), false, "select_surrounding_scope_maximal", 32, "Selects the top-most scope that surrounds the cursor.", 53, "/Users/allenwebster/4ed/code/custom/4coder_scope_commands.cpp", 61, 39 }, +{ PROC_LINKS(set_eol_mode_from_contents, 0), false, "set_eol_mode_from_contents", 26, "Sets the buffer's line ending mode to match the contents of the buffer.", 71, "/Users/allenwebster/4ed/code/custom/4coder_eol.cpp", 50, 125 }, +{ PROC_LINKS(set_eol_mode_to_binary, 0), false, "set_eol_mode_to_binary", 22, "Puts the buffer in bin line ending mode.", 40, "/Users/allenwebster/4ed/code/custom/4coder_eol.cpp", 50, 112 }, +{ PROC_LINKS(set_eol_mode_to_crlf, 0), false, "set_eol_mode_to_crlf", 20, "Puts the buffer in crlf line ending mode.", 41, "/Users/allenwebster/4ed/code/custom/4coder_eol.cpp", 50, 86 }, +{ PROC_LINKS(set_eol_mode_to_lf, 0), false, "set_eol_mode_to_lf", 18, "Puts the buffer in lf line ending mode.", 39, "/Users/allenwebster/4ed/code/custom/4coder_eol.cpp", 50, 99 }, +{ PROC_LINKS(set_face_size, 0), false, "set_face_size", 13, "Set face size of the face used by the current buffer.", 53, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 718 }, +{ PROC_LINKS(set_face_size_this_buffer, 0), false, "set_face_size_this_buffer", 25, "Set face size of the face used by the current buffer; if any other buffers are using the same face a new face is created so that only this buffer is effected", 157, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 760 }, +{ PROC_LINKS(set_mark, 0), false, "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 126 }, +{ PROC_LINKS(set_mode_to_notepad_like, 0), false, "set_mode_to_notepad_like", 24, "Sets the edit mode to Notepad like.", 35, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 427 }, +{ PROC_LINKS(set_mode_to_original, 0), false, "set_mode_to_original", 20, "Sets the edit mode to 4coder original.", 38, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 421 }, +{ PROC_LINKS(setup_build_bat, 0), false, "setup_build_bat", 15, "Queries the user for several configuration options and initializes a new build batch script.", 92, "/Users/allenwebster/4ed/code/custom/4coder_project_commands.cpp", 63, 1238 }, +{ PROC_LINKS(setup_build_bat_and_sh, 0), false, "setup_build_bat_and_sh", 22, "Queries the user for several configuration options and initializes a new build batch script.", 92, "/Users/allenwebster/4ed/code/custom/4coder_project_commands.cpp", 63, 1250 }, +{ PROC_LINKS(setup_build_sh, 0), false, "setup_build_sh", 14, "Queries the user for several configuration options and initializes a new build shell script.", 92, "/Users/allenwebster/4ed/code/custom/4coder_project_commands.cpp", 63, 1244 }, +{ PROC_LINKS(setup_new_project, 0), false, "setup_new_project", 17, "Queries the user for several configuration options and initializes a new 4coder project with build scripts for every OS.", 120, "/Users/allenwebster/4ed/code/custom/4coder_project_commands.cpp", 63, 1231 }, +{ PROC_LINKS(show_filebar, 0), false, "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 689 }, +{ PROC_LINKS(show_scrollbar, 0), false, "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 675 }, +{ PROC_LINKS(show_the_log_graph, 0), true, "show_the_log_graph", 18, "Parses *log* and displays the 'log graph' UI", 44, "/Users/allenwebster/4ed/code/custom/4coder_log_parser.cpp", 57, 994 }, +{ PROC_LINKS(snipe_backward_whitespace_or_token_boundary, 0), false, "snipe_backward_whitespace_or_token_boundary", 43, "Delete a single, whole token on or to the left of the cursor and post it to the clipboard.", 90, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 190 }, +{ PROC_LINKS(snipe_forward_whitespace_or_token_boundary, 0), false, "snipe_forward_whitespace_or_token_boundary", 42, "Delete a single, whole token on or to the right of the cursor and post it to the clipboard.", 91, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 198 }, +{ PROC_LINKS(snippet_lister, 0), true, "snippet_lister", 14, "Opens a snippet lister for inserting whole pre-written snippets of text.", 72, "/Users/allenwebster/4ed/code/custom/4coder_combined_write_commands.cpp", 70, 237 }, +{ PROC_LINKS(suppress_mouse, 0), false, "suppress_mouse", 14, "Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.", 83, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 403 }, +{ PROC_LINKS(swap_panels, 0), false, "swap_panels", 11, "Swaps the active panel with it's sibling.", 41, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1611 }, +{ PROC_LINKS(test_double_backspace, 0), false, "test_double_backspace", 21, "Made for testing purposes (I should have deleted this if you are reading it let me know)", 88, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 115 }, +{ PROC_LINKS(theme_lister, 0), true, "theme_lister", 12, "Opens an interactive list of all registered themes.", 51, "/Users/allenwebster/4ed/code/custom/4coder_lists.cpp", 52, 785 }, +{ PROC_LINKS(to_lowercase, 0), false, "to_lowercase", 12, "Converts all ascii text in the range between the cursor and the mark to lowercase.", 82, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 574 }, +{ PROC_LINKS(to_uppercase, 0), false, "to_uppercase", 12, "Converts all ascii text in the range between the cursor and the mark to uppercase.", 82, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 561 }, +{ PROC_LINKS(toggle_filebar, 0), false, "toggle_filebar", 14, "Toggles the visibility status of the current view's filebar.", 60, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 703 }, +{ PROC_LINKS(toggle_fps_meter, 0), false, "toggle_fps_meter", 16, "Toggles the visibility of the FPS performance meter", 51, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 712 }, +{ PROC_LINKS(toggle_fullscreen, 0), false, "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 451 }, +{ PROC_LINKS(toggle_highlight_enclosing_scopes, 0), false, "toggle_highlight_enclosing_scopes", 33, "In code files scopes surrounding the cursor are highlighted with distinguishing colors.", 87, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 439 }, +{ PROC_LINKS(toggle_highlight_line_at_cursor, 0), false, "toggle_highlight_line_at_cursor", 31, "Toggles the line highlight at the cursor.", 41, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 433 }, +{ PROC_LINKS(toggle_line_numbers, 0), false, "toggle_line_numbers", 19, "Toggles the left margin line numbers.", 37, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 817 }, +{ PROC_LINKS(toggle_line_wrap, 0), false, "toggle_line_wrap", 16, "Toggles the line wrap setting on this buffer.", 45, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 823 }, +{ PROC_LINKS(toggle_mouse, 0), false, "toggle_mouse", 12, "Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.", 71, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 415 }, +{ PROC_LINKS(toggle_paren_matching_helper, 0), false, "toggle_paren_matching_helper", 28, "In code files matching parentheses pairs are colored with distinguishing colors.", 80, "/Users/allenwebster/4ed/code/custom/4coder_default_framework.cpp", 64, 445 }, +{ PROC_LINKS(toggle_show_whitespace, 0), false, "toggle_show_whitespace", 22, "Toggles the current buffer's whitespace visibility status.", 58, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 808 }, +{ PROC_LINKS(toggle_virtual_whitespace, 0), false, "toggle_virtual_whitespace", 25, "Toggles virtual whitespace for all files.", 41, "/Users/allenwebster/4ed/code/custom/4coder_code_index.cpp", 57, 1176 }, +{ PROC_LINKS(tutorial_maximize, 0), false, "tutorial_maximize", 17, "Expand the tutorial window", 26, "/Users/allenwebster/4ed/code/custom/4coder_tutorial.cpp", 55, 20 }, +{ PROC_LINKS(tutorial_minimize, 0), false, "tutorial_minimize", 17, "Shrink the tutorial window", 26, "/Users/allenwebster/4ed/code/custom/4coder_tutorial.cpp", 55, 34 }, +{ PROC_LINKS(uncomment_line, 0), false, "uncomment_line", 14, "If present, delete '//' at the beginning of the line after leading whitespace.", 78, "/Users/allenwebster/4ed/code/custom/4coder_combined_write_commands.cpp", 70, 137 }, +{ PROC_LINKS(undo, 0), false, "undo", 4, "Advances backwards through the undo history of the current buffer.", 66, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1711 }, +{ PROC_LINKS(undo_all_buffers, 0), false, "undo_all_buffers", 16, "Advances backward through the undo history in the buffer containing the most recent regular edit.", 97, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1738 }, +{ PROC_LINKS(view_buffer_other_panel, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 1599 }, +{ PROC_LINKS(view_jump_list_with_lister, 0), false, "view_jump_list_with_lister", 26, "When executed on a buffer with jumps, creates a persistent lister for all the jumps", 83, "/Users/allenwebster/4ed/code/custom/4coder_jump_lister.cpp", 58, 59 }, +{ PROC_LINKS(word_complete, 0), false, "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, "/Users/allenwebster/4ed/code/custom/4coder_search.cpp", 53, 395 }, +{ PROC_LINKS(word_complete_drop_down, 0), false, "word_complete_drop_down", 23, "Word complete with drop down menu.", 34, "/Users/allenwebster/4ed/code/custom/4coder_search.cpp", 53, 642 }, +{ PROC_LINKS(write_block, 0), false, "write_block", 11, "At the cursor, insert a block comment.", 38, "/Users/allenwebster/4ed/code/custom/4coder_combined_write_commands.cpp", 70, 94 }, +{ PROC_LINKS(write_hack, 0), false, "write_hack", 10, "At the cursor, insert a '// HACK' comment, includes user name if it was specified in config.4coder.", 99, "/Users/allenwebster/4ed/code/custom/4coder_combined_write_commands.cpp", 70, 82 }, +{ PROC_LINKS(write_note, 0), false, "write_note", 10, "At the cursor, insert a '// NOTE' comment, includes user name if it was specified in config.4coder.", 99, "/Users/allenwebster/4ed/code/custom/4coder_combined_write_commands.cpp", 70, 88 }, +{ PROC_LINKS(write_space, 0), false, "write_space", 11, "Inserts a space.", 16, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 67 }, +{ PROC_LINKS(write_text_and_auto_indent, 0), false, "write_text_and_auto_indent", 26, "Inserts text and auto-indents the line on which the cursor sits if any of the text contains 'layout punctuation' such as ;:{}()[]# and new lines.", 145, "/Users/allenwebster/4ed/code/custom/4coder_auto_indent.cpp", 58, 433 }, +{ PROC_LINKS(write_text_input, 0), false, "write_text_input", 16, "Inserts whatever text was used to trigger this command.", 55, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 59 }, +{ PROC_LINKS(write_todo, 0), false, "write_todo", 10, "At the cursor, insert a '// TODO' comment, includes user name if it was specified in config.4coder.", 99, "/Users/allenwebster/4ed/code/custom/4coder_combined_write_commands.cpp", 70, 76 }, +{ PROC_LINKS(write_underscore, 0), false, "write_underscore", 16, "Inserts an underscore.", 22, "/Users/allenwebster/4ed/code/custom/4coder_base_commands.cpp", 60, 73 }, +{ PROC_LINKS(write_zero_struct, 0), false, "write_zero_struct", 17, "At the cursor, insert a ' = {};'.", 33, "/Users/allenwebster/4ed/code/custom/4coder_combined_write_commands.cpp", 70, 100 }, }; static i32 fcoder_metacmd_ID_allow_mouse = 0; static i32 fcoder_metacmd_ID_auto_indent_line_at_cursor = 1; diff --git a/platform_mac/mac_4ed.mm b/platform_mac/mac_4ed.mm index 46997aff..f6ca20a3 100644 --- a/platform_mac/mac_4ed.mm +++ b/platform_mac/mac_4ed.mm @@ -193,10 +193,9 @@ struct Mac_Vars { String_Const_u8 binary_path; - Arena *clipboard_arena; - String_Const_u8 clipboard_contents; u32 clipboard_change_count; b32 next_clipboard_is_self; + b32 clip_catch_all; Arena clip_post_arena; String_Const_u8 clip_post; @@ -530,39 +529,7 @@ mac_get_clipboard_change_count(void){ return(result); } -function b32 -mac_read_clipboard_contents(Arena *scratch){ - b32 result = false; - - Temp_Memory temp = begin_temp(scratch); - { - NSPasteboard *board = [NSPasteboard generalPasteboard]; - NSString *utf8_type = @"public.utf8-plain-text"; - NSArray *types_array = [NSArray arrayWithObjects:utf8_type, nil]; - NSString *has_string = [board availableTypeFromArray:types_array]; - if (has_string != nil){ - NSData *data = [board dataForType:utf8_type]; - if (data != nil){ - u32 copy_length = data.length; - if (copy_length > 0){ - Arena *clip_arena = mac_vars.clipboard_arena; - linalloc_clear(clip_arena); - - mac_vars.clipboard_contents = string_const_u8_push(clip_arena, copy_length); - [data getBytes:mac_vars.clipboard_contents.str - length:mac_vars.clipboard_contents.size]; - - result = true; - } - } - } - } - end_temp(temp); - - return(result); -} - -function void +internal void mac_post_clipboard(Arena *scratch, char *text, i32 len){ NSPasteboard *board = [NSPasteboard generalPasteboard]; @@ -583,6 +550,65 @@ mac_post_clipboard(Arena *scratch, char *text, i32 len){ //////////////////////////////// +internal +system_get_clipboard_sig(){ + String_Const_u8 result = {}; + u32 change_count = mac_get_clipboard_change_count(); + if (change_count != mac_vars.clipboard_change_count){ + if (mac_vars.next_clipboard_is_self){ + mac_vars.next_clipboard_is_self = false; + } else { + NSPasteboard *board = [NSPasteboard generalPasteboard]; + NSString *utf8_type = @"public.utf8-plain-text"; + NSArray *types_array = [NSArray arrayWithObjects:utf8_type, nil]; + NSString *has_string = [board availableTypeFromArray:types_array]; + if (has_string != nil){ + NSData *data = [board dataForType:utf8_type]; + if (data != nil){ + u32 copy_length = data.length; + if (copy_length > 0){ + result = string_const_u8_push(arena, copy_length); + [data getBytes:result.str length:result.size]; + } + } + } + } + mac_vars.clipboard_change_count = change_count; + } + return(result); +} + +internal +system_post_clipboard_sig(){ + Arena *arena = &mac_vars.clip_post_arena; + if (arena->base_allocator == 0){ + *arena = make_arena_system(); + } else{ + linalloc_clear(arena); + } + + mac_vars.clip_post.str = push_array(arena, u8, str.size + 1); + if (mac_vars.clip_post.str != 0){ + block_copy(mac_vars.clip_post.str, str.str, str.size); + mac_vars.clip_post.str[str.size] = 0; + mac_vars.clip_post.size = str.size; + } else{ + // NOTE(yuval): Failed to allocate buffer for clipboard post + } +} + +internal +system_set_clipboard_catch_all_sig(){ + mac_vars.clip_catch_all = enabled?true:false; +} + +internal +system_get_clipboard_catch_all_sig(){ + return(mac_vars.clip_catch_all); +} + +//////////////////////////////// + function void mac_toggle_fullscreen(void){ [mac_vars.window toggleFullScreen:nil]; @@ -712,31 +738,11 @@ mac_toggle_fullscreen(void){ } // NOTE(yuval): Frame clipboard input + Scratch_Block scratch(mac_vars.tctx); MacProfileScope("Frame Clipboard Input"){ - block_zero_struct(&mac_vars.clipboard_contents); - input.clipboard_changed = false; - - if (mac_vars.clipboard_change_count != 0){ - u32 change_count = mac_get_clipboard_change_count(); - if (change_count != mac_vars.clipboard_change_count){ - if (mac_vars.next_clipboard_is_self){ - mac_vars.next_clipboard_is_self = false; - } else{ - for (i32 r = 0; r < 4; ++r){ - Scratch_Block scratch(mac_vars.tctx, Scratch_Share); - - if (mac_read_clipboard_contents(scratch)){ - input.clipboard_changed = true; - break; - } - } - } - - mac_vars.clipboard_change_count = change_count; - } + if (mac_vars.clipboard_change_count != 0 && mac_vars.clip_catch_all){ + input.clipboard = system_get_clipboard(scratch, 0); } - - input.clipboard = mac_vars.clipboard_contents; } mac_vars.clip_post.size = 0; @@ -759,7 +765,6 @@ mac_toggle_fullscreen(void){ // NOTE(yuval): Post new clipboard content MacProfileScope("Post Clipboard"){ if (mac_vars.clip_post.size > 0){ - Scratch_Block scratch(mac_vars.tctx, Scratch_Share); mac_post_clipboard(scratch, (char*)mac_vars.clip_post.str, (i32)mac_vars.clip_post.size); } } @@ -1326,16 +1331,11 @@ main(int arg_count, char **args){ // NOTE(yuval): Initialize clipboard { - mac_vars.clipboard_arena = reserve_arena(mac_vars.tctx); + Scratch_Block scratch(mac_vars.tctx); + mac_post_clipboard(scratch, "", 0); mac_vars.clipboard_change_count = mac_get_clipboard_change_count(); mac_vars.next_clipboard_is_self = false; - // NOTE(yuval): Read the current clipboard - { - Scratch_Block scratch(mac_vars.tctx, Scratch_Share); - mac_read_clipboard_contents(scratch); - } - // NOTE(yuval): Start the clipboard polling timer [NSTimer scheduledTimerWithTimeInterval: 0.5 target:mac_vars.view @@ -1368,7 +1368,7 @@ main(int arg_count, char **args){ Scratch_Block scratch(mac_vars.tctx, Scratch_Share); String_Const_u8 curdir = system_get_path(scratch, SystemPath_CurrentDirectory); curdir = string_mod_replace_character(curdir, '\\', '/'); - app.init(mac_vars.tctx, &target, mac_vars.base_ptr, mac_vars.clipboard_contents, curdir, custom); + app.init(mac_vars.tctx, &target, mac_vars.base_ptr, curdir, custom); } // diff --git a/platform_mac/mac_4ed_functions.mm b/platform_mac/mac_4ed_functions.mm index 135a8f10..3478dede 100644 --- a/platform_mac/mac_4ed_functions.mm +++ b/platform_mac/mac_4ed_functions.mm @@ -440,27 +440,6 @@ system_sleep_sig(){ //////////////////////////////// -function -system_post_clipboard_sig(){ - Arena *arena = &mac_vars.clip_post_arena; - if (arena->base_allocator == 0){ - *arena = make_arena_system(); - } else{ - linalloc_clear(arena); - } - - mac_vars.clip_post.str = push_array(arena, u8, str.size + 1); - if (mac_vars.clip_post.str != 0){ - block_copy(mac_vars.clip_post.str, str.str, str.size); - mac_vars.clip_post.str[str.size] = 0; - mac_vars.clip_post.size = str.size; - } else{ - // NOTE(yuval): Failed to allocate buffer for clipboard post - } -} - -//////////////////////////////// - function system_cli_call_sig(){ b32 result = false; diff --git a/platform_mac/mac_4ed_old.cpp b/platform_mac/mac_4ed_old.cpp deleted file mode 100644 index 81e7ffc3..00000000 --- a/platform_mac/mac_4ed_old.cpp +++ /dev/null @@ -1,874 +0,0 @@ -/* - * Mr. 4th Dimention - Allen Webster - * - * 28.06.2017 - * - * Mac C++ layer for 4coder - * - */ - -// TOP - -#define IS_PLAT_LAYER - -#include "4coder_base_types.h" -#include "4coder_API/4coder_version.h" - -#include "4coder_lib/4coder_utf8.h" - -#if defined(FRED_SUPER) -# include "4coder_lib/4coder_arena.h" -# include "4coder_lib/4coder_arena.cpp" -# define FSTRING_IMPLEMENTATION -# include "4coder_lib/4coder_string.h" - -#include "4coder_keycode_extension.h" -# include "4coder_API/4coder_style.h" -# include "4coder_API/4coder_types.h" - -#else -# include "4coder_default_bindings.cpp" -#endif - -#include "osx_objective_c_to_cpp_links.h" - -#include "4ed_math.h" - -#include - -#include "4ed_font.h" -#include "4ed_system.h" -#include "4ed_render_target.h" -#include "4ed_render_format.h" -#include "4ed.h" -#include "4ed_linked_node_macros.h" - -#include "4ed_file_track.h" -#include "4ed_system_shared.h" - -#include "unix_4ed_headers.h" -#include - -#undef external -#undef internal -#include -#define external extern "C" -#define internal static -#include - -#include - -//////////////////////////////// - -#include "4ed_shared_thread_constants.h" -#include "unix_threading_wrapper.h" -#include "mac_semaphore_wrapper.h" - -// TODO(allen): Make an intrinsics header that uses the cracked OS to define a single set of intrinsic names. -#define InterlockedCompareExchange(dest, ex, comp) \ -__sync_val_compare_and_swap((dest), (comp), (ex)) - -//////////////////////////////// - -#define SLASH '/' -#define DLL "so" - -global System_Functions sysfunc; -#include "4ed_shared_library_constants.h" -#include "unix_library_wrapper.h" - -#include "4ed_standard_libraries.cpp" -#include "4ed_coroutine.cpp" -#include "4ed_font.cpp" - -//////////////////////////////// - -struct OSX_Vars{ - Application_Step_Input input; - String clipboard_contents; - b32 keep_running; - - b32 has_prev_time; - u64 prev_time_u; - - File_Track_System track; - void *track_table; - u32 track_table_size; - u32 track_node_size; -}; - -//////////////////////////////// - -OSX_Objective_C_Vars osx_objc; -OSX_Vars osxvars; -global Render_Target target; -global Application_Memory memory_vars; -global Plat_Settings plat_settings; - -global Libraries libraries; -global App_Functions app; -global Custom_API custom_api; - -global Coroutine_System_Auto_Alloc coroutines; - -//////////////////////////////// - -#include "mac_error_box.cpp" - -//////////////////////////////// - -internal -Sys_Get_4ed_Path_Sig(system_get_4ed_path){ - Partition *scratch = &shared_vars.scratch; - Temp_Memory temp = begin_temp_memory(scratch); - char *temp_buffer = push_array(scratch, char, capacity); - i32 size = 0; - u32 buf_size = capacity; - i32 status = _NSGetExecutablePath(temp_buffer, &buf_size); - buf_size = str_size(temp_buffer); - if (status == 0){ - ssize_t ln_len = readlink(temp_buffer, out, capacity); - if (ln_len != -1){ - out[ln_len] = 0; - String str = make_string_cap(out, ln_len, capacity); - remove_last_folder(&str); - terminate_with_null(&str); - size = str.size; - } - else{ - memcpy(out, temp_buffer, buf_size); - String str = make_string_cap(out, buf_size, capacity); - remove_last_folder(&str); - terminate_with_null(&str); - size = str.size; - } - } - end_temp_memory(temp); - return(size); -} - -//#include "mac_fd_check.cpp" -#include "unix_4ed_functions.cpp" - -internal -Sys_Now_Time_Sig(system_now_time){ - f64 t = osx_timer_seconds(); - u64 result = (u64)(t*1000000.f); - return(result); -} - -//////////////////////////////// - -void -osx_log(char *m, i32 l){ - system_log(m, l); -} - -//////////////////////////////// - -internal void -system_schedule_step(void){ - osx_schedule_step(); -} - -//////////////////////////////// - -#include "4ed_work_queues.cpp" - -//////////////////////////////// - -internal -Sys_Show_Mouse_Cursor_Sig(system_show_mouse_cursor){ - switch (show){ - case MouseCursorShow_Never: - { - osx_show_cursor(-1, 0); - }break; - - case MouseCursorShow_Always: - { - osx_show_cursor(1, 0); - }break; - } -} - -internal -Sys_Set_Fullscreen_Sig(system_set_fullscreen){ - osx_objc.do_toggle = (osx_objc.full_screen != full_screen); - return(true); -} - -internal -Sys_Is_Fullscreen_Sig(system_is_fullscreen){ - b32 result = (osx_objc.full_screen != osx_objc.do_toggle); - return(result); -} - -#include "4ed_coroutine_functions.cpp" - -#include "4ed_system_shared.cpp" - -// File Change Listeners - -internal b32 -handle_track_out_of_memory(i32 val){ - b32 result = false; - - switch (val){ - case FileTrack_OutOfTableMemory: - { - u32 new_table_size = osxvars.track_table_size*2; - void *new_table = system_memory_allocate(new_table_size); - move_track_system(&osxvars.track, &shared_vars.scratch, new_table, new_table_size); - system_memory_free(osxvars.track_table, osxvars.track_table_size); - osxvars.track_table_size = new_table_size; - osxvars.track_table = new_table; - }break; - - case FileTrack_OutOfListenerMemory: - { - osxvars.track_node_size *= 2; - void *node_expansion = system_memory_allocate(osxvars.track_node_size); - expand_track_system_listeners(&osxvars.track, &shared_vars.scratch, node_expansion, osxvars.track_node_size); - }break; - - default: result = true; break; - } - - return(result); -} - -internal -Sys_Add_Listener_Sig(system_add_listener){ - b32 result = false; - for (;;){ - i32 track_result = add_listener(&osxvars.track, &shared_vars.scratch, (u8*)filename); - if (handle_track_out_of_memory(track_result)){ - if (track_result == FileTrack_Good){ - result = true; - } - break; - } - } - return(result); -} - -internal -Sys_Remove_Listener_Sig(system_remove_listener){ - b32 result = false; - i32 track_result = remove_listener(&osxvars.track, &shared_vars.scratch, (u8*)filename); - if (track_result == FileTrack_Good){ - result = true; - } - return(result); -} - -internal -Sys_Get_File_Change_Sig(system_get_file_change){ - b32 result = false; - - i32 size = 0; - i32 get_result = get_change_event(&osxvars.track, &shared_vars.scratch, (u8*)buffer, max, &size); - - *required_size = size; - *mem_too_small = false; - if (get_result == FileTrack_Good){ - result = true; - } - else if (get_result == FileTrack_MemoryTooSmall){ - *mem_too_small = true; - result = true; - } - - return(result); -} - - -// -// Clipboard -// - -internal -Sys_Post_Clipboard_Sig(system_post_clipboard){ - char *string = str.str; - if (!terminate_with_null(&str)){ - if (osx_objc.clipboard_space_max <= str.size + 1){ - if (osx_objc.clipboard_space != 0){ - system_memory_free(osx_objc.clipboard_space, osx_objc.clipboard_space_max); - } - osx_objc.clipboard_space_max = l_round_up_u32(str.size*2 + 1, KB(4096)); - osx_objc.clipboard_space = (char*)system_memory_allocate(osx_objc.clipboard_space_max); - } - memcpy(osx_objc.clipboard_space, str.str, str.size); - osx_objc.clipboard_space[str.size] = 0; - string = osx_objc.clipboard_space; - } - osx_post_to_clipboard(string); -} - -// -// CLI -// - -// HACK(allen): ALMOST an exact duplicate from the Linux version. Just epoll doesn't port. deduplicate or switch to NSTask. -global i32 cli_count = 0; - -internal -Sys_CLI_Call_Sig(system_cli_call, path, script_name, cli_out){ - i32 pipe_fds[2]; - if (pipe(pipe_fds) == -1){ - - return 0; - } - - i32 child_pid = fork(); - if (child_pid == -1){ - - return 0; - } - - enum { PIPE_FD_READ, PIPE_FD_WRITE }; - - // child - if (child_pid == 0){ - close(pipe_fds[PIPE_FD_READ]); - dup2(pipe_fds[PIPE_FD_WRITE], STDOUT_FILENO); - dup2(pipe_fds[PIPE_FD_WRITE], STDERR_FILENO); - - if (chdir(path) == -1){ - - exit(1); - } - - char* argv[] = { - "sh", - "-c", - script_name, - 0 - }; - - if (execv("/bin/sh", argv) == -1){ - - } - exit(1); - } - else{ - close(pipe_fds[PIPE_FD_WRITE]); - - *(pid_t*)&cli_out->proc = child_pid; - *(int*)&cli_out->out_read = pipe_fds[PIPE_FD_READ]; - *(int*)&cli_out->out_write = pipe_fds[PIPE_FD_WRITE]; - - ++cli_count; - } - - return(true); -} - -internal -Sys_CLI_Begin_Update_Sig(system_cli_begin_update){ - // NOTE(inso): I don't think anything needs to be done here. -} - -internal -Sys_CLI_Update_Step_Sig(system_cli_update_step){ - i32 pipe_read_fd = *(i32*)&cli->out_read; - - fd_set fds; - FD_ZERO(&fds); - FD_SET(pipe_read_fd, &fds); - - struct timeval tv = {}; - - size_t space_left = max; - char* ptr = dest; - - while (space_left > 0 && select(pipe_read_fd + 1, &fds, NULL, NULL, &tv) == 1){ - ssize_t num = read(pipe_read_fd, ptr, space_left); - if (num == -1){ - - } else if (num == 0){ - // NOTE(inso): EOF - break; - } else { - ptr += num; - space_left -= num; - } - } - - *amount = (ptr - dest); - return((ptr - dest) > 0); -} - -internal -Sys_CLI_End_Update_Sig(system_cli_end_update){ - pid_t pid = *(pid_t*)&cli->proc; - b32 close_me = false; - - int status; - if (pid && waitpid(pid, &status, WNOHANG) > 0){ - close_me = true; - - cli->exit = WEXITSTATUS(status); - - close(*(int*)&cli->out_read); - close(*(int*)&cli->out_write); - - --cli_count; - } - - return(close_me); -} - -#include "4ed_font_provider_freetype.h" -global u32 system_font_method = SystemFontMethod_FilePath; -#include "4ed_font_provider_freetype.cpp" - -internal -Sys_Font_Path(name, parameters){ - b32 italic = (parameters != 0 && parameters->italics); - b32 bold = (parameters != 0 && parameters->bold); - i32 pt_size = 12; - if (parameters != 0){ - pt_size = parameters->pt_size; - } - - OSX_Font_Match match = osx_get_font_match(name, pt_size, italic, bold); - - Font_Path path = {}; - Partition *part = &shared_vars.font_scratch; - path.temp = begin_temp_memory(part); - - if (match.path != 0){ - i32 len = str_size(match.path); - char *buffer = push_array(part, char, len + 1); - if (buffer == 0){ - sysshared_partition_grow(part, l_round_up_i32(len + 1, KB(4))); - buffer = push_array(part, char, len + 1); - } - - if (buffer != 0){ - push_align(part, 8); - memcpy(buffer, match.path, len + 1); - path.len = len; - path.name = buffer; - } - } - - return(path); -} - -Sys_Font_Data_Not_Used; - -internal void -osx_get_loadable_fonts(Partition *part, Font_Setup_List *list){ - OSX_Loadable_Fonts fonts = osx_list_loadable_fonts(); - for (i32 i = 0; i < fonts.count; ++i){ - char *name = fonts.names[i]; - char *path = fonts.paths[i]; - - if (name == 0 || path == 0){ - continue; - } - - Temp_Memory reset= begin_temp_memory(part); - Font_Setup *setup = push_array(part, Font_Setup, 1); - - if (setup != 0){ - memset(setup, 0, sizeof(*setup)); - - i32 len = str_size(path); - if (len < sizeof(setup->stub.name)){ - i32 name_len = str_size(name); - if (name_len < sizeof(setup->name)){ - setup->stub.load_from_path = true; - memcpy(setup->stub.name, path, len + 1); - setup->stub.len = len; - setup->has_display_name = true; - setup->len = name_len; - memcpy(setup->name, name, name_len + 1); - sll_push(list->first, list->last, setup); - } - else{ - end_temp_memory(reset); - } - } - else{ - end_temp_memory(reset); - } - } - } - - free(fonts.names); -} - -#include -#include -#include "opengl/4ed_opengl_render.cpp" - -//////////////////////////////// - -#include "4ed_link_system_functions.cpp" -#include "4ed_shared_init_logic.cpp" - -external void* -osx_allocate(u64 size){ - void *result = system_memory_allocate(size); - return(result); -} - -external void -osx_free(void *ptr, u64 size){ - system_memory_free(ptr, size); -} - -external void -osx_resize(int width, int height){ - if (width > 0 && height > 0){ - osx_objc.width = width; - osx_objc.height = height; - - target.width = width; - target.height = height; - - osx_schedule_step(); - } -} - -internal void -osx_push_key(Key_Code code, Key_Code chr, Key_Code chr_nocaps, b8 *mods){ - i32 count = osxvars.input.keys.count; - - if (count < KEY_INPUT_BUFFER_SIZE){ - Key_Event_Data *data = osxvars.input.keys.keys; - - data[count].keycode = code; - data[count].character = chr; - data[count].character_no_caps_lock = chr_nocaps; - - memcpy(data[count].modifiers, mods, sizeof(*mods)*MDFR_INDEX_COUNT); - - osxvars.input.keys.count = count + 1; - } -} - -internal void -osx_mods_struct_to_array(OSX_Keyboard_Modifiers flags, b8 *mods){ - mods[MDFR_SHIFT_INDEX] = ((flags.shift) != 0); - mods[MDFR_CONTROL_INDEX] = ((flags.control) != 0); - mods[MDFR_ALT_INDEX] = ((flags.option) != 0); - mods[MDFR_COMMAND_INDEX] = ((flags.command) != 0); - mods[MDFR_CAPS_INDEX] = ((flags.caps) != 0); -} - -external void -osx_character_input(u32 code, OSX_Keyboard_Modifiers modifier_flags){ - Key_Code c = 0; - switch (code){ - // TODO(allen): Find the canonical list of these things. - case 0x007F: c = key_back; break; - case 0xF700: c = key_up; break; - case 0xF701: c = key_down; break; - case 0xF702: c = key_left; break; - case 0xF703: c = key_right; break; - case 0xF728: c = key_del; break; - case 0xF729: c = key_home; break; - case 0xF72B: c = key_end; break; - case 0xF72C: c = key_page_up; break; - case 0xF72D: c = key_page_down; break; - case 0x001B: c = key_esc; break; - - case 0xF704: c = key_f1; break; - case 0xF705: c = key_f2; break; - case 0xF706: c = key_f3; break; - case 0xF707: c = key_f4; break; - - case 0xF708: c = key_f5; break; - case 0xF709: c = key_f6; break; - case 0xF70A: c = key_f7; break; - case 0xF70B: c = key_f8; break; - - case 0xF70C: c = key_f9; break; - case 0xF70D: c = key_f10; break; - case 0xF70E: c = key_f11; break; - case 0xF70F: c = key_f12; break; - - case 0xF710: c = key_f13; break; - case 0xF711: c = key_f14; break; - case 0xF712: c = key_f15; break; - case 0xF713: c = key_f16; break; - } - - b8 mods[MDFR_INDEX_COUNT] = {}; - osx_mods_struct_to_array(modifier_flags, mods); - - if (c != 0){ - osx_push_key(c, 0, 0, mods); - } - else if (code != 0){ - if (code < 0xE000 || code > 0xF8FF){ - if (code == '\r'){ - code = '\n'; - } - Key_Code chr = code; - Key_Code nocaps = code; - if (modifier_flags.caps){ - if ('a' <= nocaps && nocaps <= 'z'){ - chr += 'A' - 'a'; - } - else if ('A' <= nocaps && nocaps <= 'Z'){ - chr += 'a' - 'A'; - } - } - osx_push_key(code, chr, nocaps, mods); - } - else{ - fprintf(stdout, "unhandled private code %x\n", code); - } - } - else{ - osx_push_key(0, 0, 0, mods); - } - - osx_schedule_step(); -} - -external void -osx_mouse(i32 mx, i32 my, u32 type){ - i32 new_x = mx; - i32 new_y = osx_objc.height - my; - if (new_x != osxvars.input.mouse.x || new_y != osxvars.input.mouse.y){ - osxvars.input.mouse.x = new_x; - osxvars.input.mouse.y = new_y; - osx_schedule_step(); - } - - if (type == MouseType_Press){ - osxvars.input.mouse.press_l = true; - osxvars.input.mouse.l = true; - osx_schedule_step(); - } - if (type == MouseType_Release){ - osxvars.input.mouse.release_l = true; - osxvars.input.mouse.l = false; - osx_schedule_step(); - } -} - -external void -osx_mouse_wheel(float dx, float dy){ - osxvars.input.mouse.wheel = - (int32_t)(dy); - osx_schedule_step(); -} - -external void -osx_try_to_close(void){ - osxvars.keep_running = false; - osx_schedule_step(); -} - -external void -osx_step(void){ - - Application_Step_Result result = {}; - - // NOTE(allen): Prepare the Frame Input - osxvars.input.dt = 1.f/60.f; - if (osxvars.has_prev_time){ - u64 time_u = system_now_time(); - u64 time_elapsed_u = time_u - osxvars.prev_time_u; - osxvars.input.dt = time_elapsed_u/1000000.f; - osxvars.prev_time_u = time_u; - } - else{ - osxvars.has_prev_time = true; - osxvars.prev_time_u = system_now_time(); - } - - // TODO(allen): CROSS REFERENCE WITH WINDOWS SPECIAL CODE "TIC898989" - Application_Step_Input frame_input = osxvars.input; - frame_input.trying_to_kill = !osxvars.keep_running; - OSX_Keyboard_Modifiers mods = osx_get_modifiers(); - osx_mods_struct_to_array(mods, frame_input.keys.modifiers); - - osxvars.input.first_step = false; - memset(&osxvars.input.keys, 0, sizeof(osxvars.input.keys)); - osxvars.input.mouse.press_l = false; - osxvars.input.mouse.release_l = false; - osxvars.input.mouse.press_r = false; - osxvars.input.mouse.release_r = false; - osxvars.input.mouse.wheel = 0; - - - // NOTE(allen): Frame Clipboard Input - if (osx_objc.has_clipboard_item){ - frame_input.clipboard = make_string(osx_objc.clipboard_data, (i32)osx_objc.clipboard_size); - } - else{ - frame_input.clipboard = null_string; - } - - // HACK(allen): Got this all messed up with respect to how everyone else (other OS layers) work - osx_objc.do_toggle = false; - osx_objc.full_screen = osx_is_fullscreen(); - - // HACK(allen): THIS SHIT IS FUCKED (happens on linux too) - b32 keep_running = osxvars.keep_running; - - // NOTE(allen): Application Core Update - target.buffer.pos = 0; - if (app.step != 0){ - result = app.step(&sysfunc, &target, &memory_vars, &frame_input); - } - else{ - //LOG("app.step == 0 -- skipping\n"); - } - - // NOTE(allen): Finish the Loop - if (result.perform_kill){ - osx_close_app(); - } - else if (!keep_running && !osxvars.keep_running){ - osxvars.keep_running = true; - } - - // NOTE(allen): Switch to New Title - if (result.has_new_title){ - osx_change_title(result.title_string); - } - - // NOTE(allen): Switch to New Cursor - osx_show_cursor(0, result.mouse_cursor_type); - - // NOTE(allen): Render - osx_begin_render(); - gl_render(&target, &shared_vars.pixel_scratch); - osx_end_render(); - - // NOTE(allen): Toggle Full Screen - if (osx_objc.do_toggle){ - osx_toggle_fullscreen(); - } - - // NOTE(allen): Schedule Another Step if Needed - if (result.animating || cli_count > 0){ - osx_schedule_step(); - } -} - -external void -osx_init(){ - // - // System Linkage - // - - link_system_code(); - - // - // Memory init - // - - memset(&target, 0, sizeof(target)); - memset(&memory_vars, 0, sizeof(memory_vars)); - memset(&plat_settings, 0, sizeof(plat_settings)); - - memset(&libraries, 0, sizeof(libraries)); - memset(&app, 0, sizeof(app)); - memset(&custom_api, 0, sizeof(custom_api)); - - memory_init(); - - osxvars.keep_running = true; - osxvars.input.first_step = true; - - // - // HACK(allen): - // Previously zipped stuff is here, it should be zipped in the new pattern now. - // - - init_shared_vars(); - - osxvars.track_table_size = KB(16); - osxvars.track_table = system_memory_allocate(osxvars.track_table_size); - - osxvars.track_node_size = KB(16); - void *track_nodes = system_memory_allocate(osxvars.track_node_size); - - i32 track_result = init_track_system(&osxvars.track, &shared_vars.scratch, - osxvars.track_table, osxvars.track_table_size, - track_nodes, osxvars.track_node_size); - - if (track_result != FileTrack_Good){ - exit(1); - } - - // - // Load Core Code - // - load_app_code(); - - // - // Read command line - // - read_command_line(osx_objc.argc, osx_objc.argv); - - // - // Load Custom Code - // -#if defined(FRED_SUPER) - load_custom_code(); -#else - DontCompile; -#endif - - // - // Threads - // - - work_system_init(); - - // - // Coroutines - // - - coroutines_init(); - - // - // Font System Init - // - - Partition *scratch = &shared_vars.scratch; - Temp_Memory temp = begin_temp_memory(scratch); - Font_Setup_List font_setup = system_font_get_local_stubs(scratch); - osx_get_loadable_fonts(scratch, &font_setup); - system_font_init(&sysfunc.font, plat_settings.font_size, plat_settings.use_hinting, font_setup); - end_temp_memory(temp); - - // - // App Init - // - - char cwd[4096]; - u32 size = sysfunc.get_current_path(cwd, sizeof(cwd)); - if (size == 0 || size >= sizeof(cwd)){ - system_error_box("Could not get current directory at launch."); - } - String curdir = make_string(cwd, size); - terminate_with_null(&curdir); - replace_char(&curdir, '\\', '/'); - - - - String clipboard_string = {}; - if (osx_objc.has_clipboard_item){ - clipboard_string = make_string(osx_objc.clipboard_data, osx_objc.clipboard_size); - } - - //LOG("Initializing application variables\n"); - app.init(&sysfunc, &target, &memory_vars, clipboard_string, curdir, custom_api); -} - -#include "mac_4ed_file_track.cpp" - -// BOTTOM - diff --git a/platform_mac/mac_4ed_old.m b/platform_mac/mac_4ed_old.m deleted file mode 100644 index fad0565e..00000000 --- a/platform_mac/mac_4ed_old.m +++ /dev/null @@ -1,895 +0,0 @@ -/* - * Mr. 4th Dimention - Allen Webster - * - * 28.06.2017 - * - * Mac Objective C layer for 4coder - * - */ - -// TOP - -#define IS_OBJC_LAYER - -#include "4coder_base_types.h" - -#include "4coder_API/4coder_version.h" - -#include "4ed_cursor_codes.h" -#include "4ed_linked_node_macros.h" - -#undef global -#undef external -#define external - -#include "osx_objective_c_to_cpp_links.h" - -#include -#import -#import -#import -#import -#import - -#include -#include -#include -#include - -#include - -void -osx_post_to_clipboard(char *str){ - NSPasteboard *board = [NSPasteboard generalPasteboard]; - NSString *utf8_type = @"public.utf8-plain-text"; - NSArray *typesArray = [NSArray arrayWithObjects: utf8_type, nil]; - [board declareTypes:typesArray owner:nil]; - NSString *paste_string = [NSString stringWithUTF8String:str]; - [board setString:paste_string forType:utf8_type]; - osx_objc.just_posted_to_clipboard = true; -} - - -void -osx_error_dialogue(char *str){ - NSAlert *alert = [[NSAlert alloc] init]; - [alert addButtonWithTitle:@"OK"]; - NSString *text = [NSString stringWithUTF8String:str]; - [alert setMessageText:text]; - [alert setAlertStyle:NSCriticalAlertStyle]; - [alert runModal]; -} - -// -// Entry point, OpenGL window setup. -// - -@interface AppDelegate : NSObject -@end - -@interface My4coderView : NSOpenGLView{ - @public - //CVDisplayLinkRef displayLink; -} - -- (void)requestDisplay; -- (void)checkClipboard; -- (CVReturn)getFrame; -- (void)drawRect:(NSRect)bounds; -@end - -#define DISPLINK_SIG(n) CVReturn n(CVDisplayLinkRef link, const CVTimeStamp *now, const CVTimeStamp *output, CVOptionFlags flags_in, CVOptionFlags *flags_out, void *context) -static DISPLINK_SIG(osx_display_link); - -static OSX_Keyboard_Modifiers -osx_mods_nsevent_to_struct(NSEventModifierFlags flags){ - OSX_Keyboard_Modifiers mods = {}; - mods.shift = ((flags & NSEventModifierFlagShift) != 0); - mods.command = ((flags & NSEventModifierFlagCommand) != 0); - mods.control = ((flags & NSEventModifierFlagControl) != 0); - mods.option = ((flags & NSEventModifierFlagOption) != 0); - mods.caps = ((flags & NSEventModifierFlagCapsLock) != 0); - return(mods); -} - -@implementation My4coderView - -- (void)keyDown:(NSEvent *)event{ - NSString *real = [event charactersIgnoringModifiers]; - NSString *with_mods = [event characters]; - - b32 is_dead_key = false; - if (real && !with_mods){ - is_dead_key = true; - } - - OSX_Keyboard_Modifiers mods = osx_get_modifiers(); - - // TODO(allen): Not ideal solution, look for realer text - // input on Mac. This just makes sure we're getting good - // results for unmodified keys when cmnd and ctrl aren't down. - NSString *which = with_mods; - if (mods.command || mods.control){ - which = real; - } - - u32 length = which.length; - for (u32 i = 0; i < length; ++i){ - unichar c = [which characterAtIndex:i]; - osx_character_input(c, mods); - } -} - -- (void)mouseDown:(NSEvent*)event{ - NSPoint m = [event locationInWindow]; - osx_mouse(m.x, m.y, MouseType_Press); -} - -- (void)mouseDragged:(NSEvent*)event{ - NSPoint m = [event locationInWindow]; - osx_mouse(m.x, m.y, MouseType_Move); -} - -- (void)mouseMoved:(NSEvent*)event{ - NSPoint m = [event locationInWindow]; - osx_mouse(m.x, m.y, MouseType_Move); -} - -- (void)mouseUp:(NSEvent*)event{ - NSPoint m = [event locationInWindow]; - osx_mouse(m.x, m.y, MouseType_Release); -} - -- (void)scrollWheel:(NSEvent*)event{ - float dx = event.scrollingDeltaX; - float dy = event.scrollingDeltaY; - osx_mouse_wheel(dx, dy); -} - -- (BOOL)windowShouldClose:(NSWindow*)sender{ - osx_try_to_close(); - return(NO); -} - -- (void)requestDisplay{ - CGRect cg_rect = CGRectMake(0, 0, osx_objc.width, osx_objc.height); - NSRect rect = NSRectFromCGRect(cg_rect); - [self setNeedsDisplayInRect:rect]; -} - -static i32 did_update_for_clipboard = true; -- (void)checkClipboard{ - NSPasteboard *board = [NSPasteboard generalPasteboard]; - if (board.changeCount != osx_objc.prev_clipboard_change_count && did_update_for_clipboard){ - [self requestDisplay]; - did_update_for_clipboard = false; - } -} - -- (CVReturn)getFrame{ - did_update_for_clipboard = true; - - @autoreleasepool - { - if (osx_objc.running){ - osx_objc.has_clipboard_item = false; - NSPasteboard *board = [NSPasteboard generalPasteboard]; - if (board.changeCount != osx_objc.prev_clipboard_change_count){ - if (!osx_objc.just_posted_to_clipboard){ - NSString *utf8_type = @"public.utf8-plain-text"; - NSArray *array = [NSArray arrayWithObjects: utf8_type, nil]; - NSString *has_string = [board availableTypeFromArray:array]; - if (has_string != nil){ - NSData *data = [board dataForType: utf8_type]; - if (data != nil){ - u32 copy_length = data.length; - if (copy_length > 0){ - if (copy_length + 1 > osx_objc.clipboard_max){ - osx_free(osx_objc.clipboard_data, osx_objc.clipboard_max); - osx_objc.clipboard_max = l_round_up_u32(copy_length + 1, KB(4)); - osx_objc.clipboard_data = osx_allocate(osx_objc.clipboard_max); - } - - if (copy_length + 1 < osx_objc.clipboard_max){ - osx_objc.clipboard_size = copy_length; - [data - getBytes: osx_objc.clipboard_data - length: copy_length]; - ((char*)osx_objc.clipboard_data)[copy_length] = 0; - osx_objc.has_clipboard_item = true; - } - } - } - } - } - else{ - osx_objc.just_posted_to_clipboard = false; - } - osx_objc.prev_clipboard_change_count = board.changeCount; - } - - osx_step(); - } - } - return kCVReturnSuccess; -} - -- (void)reshape -{ - [super reshape]; - - NSRect rect = [self bounds]; - osx_resize(rect.size.width, rect.size.height); -} - -- (void)init_gl -{ - if (osx_objc.gl_is_initialized){ - return; - } - - [self setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; - - NSOpenGLPixelFormatAttribute attrs[] = { - NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersionLegacy, - NSOpenGLPFAColorSize, 24, - NSOpenGLPFAAlphaSize, 8, - NSOpenGLPFAAccelerated, - NSOpenGLPFADoubleBuffer, - 0 - }; - - NSOpenGLPixelFormat* format = [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs]; - if(format == nil){ - fprintf(stderr, "Error creating OpenGLPixelFormat\n"); - exit(1); - } - - NSOpenGLContext* context = [[NSOpenGLContext alloc] initWithFormat:format shareContext:nil]; - - [self setPixelFormat:format]; - [self setOpenGLContext:context]; - - [context makeCurrentContext]; - - osx_objc.gl_is_initialized = true; -} - -- (id)init -{ - self = [super init]; - if(self == nil) - { - return nil; - } - - [self init_gl]; - return self; -} - -- (void)drawRect: (NSRect) bounds{ - [self getFrame]; -} - -- (void)awakeFromNib -{ - [self init_gl]; -} - -- (void)prepareOpenGL -{ - [super prepareOpenGL]; - - [[self openGLContext] makeCurrentContext]; - - GLint swapInt = 1; - [[self openGLContext] setValues:&swapInt forParameter:NSOpenGLCPSwapInterval]; -} - -- (void)dealloc -{ - [super dealloc]; -} - -- (BOOL)acceptsFirstResponder -{ - return YES; -} - -- (BOOL)becomeFirstResponder -{ - return YES; -} - -- (BOOL)resignFirstResponder -{ - return YES; -} -@end - -@implementation AppDelegate -- (void)applicationDidFinishLaunching:(id)sender -{ -} -- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)sender -{ - return YES; -} -- (void)applicationWillTerminate:(NSApplication*)sender -{ -} -@end - -////////////////// - -typedef struct File_Change_Node File_Change_Node; -struct File_Change_Node{ - File_Change_Node *next; - char *name; - i32 len; -}; - -typedef struct{ - File_Change_Node *first; - File_Change_Node *last; - volatile i64 lock; -} File_Change_Queue; - -static File_Change_Queue file_queue = {}; - -File_Change_Node* -file_change_node(char *name){ - i32 len = strlen(name); - void *block = malloc(len + 1 + sizeof(File_Change_Node)); - File_Change_Node *node = (File_Change_Node*)block; - memset(node, 0, sizeof(*node)); - node->name = (char*)(node + 1); - node->len = len; - memcpy(node->name, name, len + 1); - return(node); -} - -void -file_change_node_free(File_Change_Node *node){ - free(node); -} - -#define file_queue_lock() for(;;){i64 v=__sync_val_compare_and_swap(&file_queue.lock,0,1);if(v==0){break;}} - -#define file_queue_unlock() __sync_lock_test_and_set(&file_queue.lock, 0) - -void -file_watch_callback(ConstFSEventStreamRef stream, void *callbackInfo, size_t numEvents, void *evPaths, const FSEventStreamEventFlags *evFlags, const FSEventStreamEventId *evIds){ - char **paths = (char**)evPaths; - for (int i = 0; i < numEvents; ++i){ - File_Change_Node *node = file_change_node(paths[i]); - file_queue_lock(); - sll_push(file_queue.first, file_queue.last, node); - file_queue_unlock(); - } -} - -////////////////// - -typedef struct{ - FSEventStreamRef stream; -} File_Watching_Handle; - -File_Watching_Handle -schedule_file_watching(char *f){ - File_Watching_Handle handle = {}; - - CFStringRef arg = CFStringCreateWithCString(0, f, kCFStringEncodingUTF8); - - CFArrayRef paths = CFArrayCreate(0, (const void**)&arg, 1, 0); - - void *callbackInfo = 0; - CFAbsoluteTime latency = 2.0; - - handle.stream = FSEventStreamCreate(0, &file_watch_callback, 0, paths, kFSEventStreamEventIdSinceNow, latency, kFSEventStreamCreateFlagFileEvents); - - FSEventStreamScheduleWithRunLoop(handle.stream, CFRunLoopGetMain(), kCFRunLoopDefaultMode); - - if (!FSEventStreamStart(handle.stream)){ - fprintf(stdout, "BAD SCHED: %s\n", f); - } - - return(handle); -} - -void -unschedule_file_watching(File_Watching_Handle handle){ - FSEventStreamStop(handle.stream); - FSEventStreamInvalidate(handle.stream); - FSEventStreamRelease(handle.stream); -} - -typedef struct File_Table_Entry{ - u64 hash; - void *name; - i32 counter; - File_Watching_Handle handle; -} File_Table_Entry; - -typedef struct File_Change_Table{ - File_Table_Entry *table; - i32 count; - i32 size; -} File_Change_Table; - -static File_Change_Table file_change_table = {}; - -void* -osx_file_name_prefixed_length(char *name){ - i32 len = 0; - for (; name[len] != 0; ++len); - char *name_stored = (char*)malloc(4 + l_round_up_u32(len + 1, 4)); - *(i32*)name_stored = len; - memcpy(name_stored + 4, name, len); - name_stored[4 + len] = 0; - return(name_stored); -} - -b32 -osx_name_prefixed_match(void *a, void *b){ - b32 result = false; - i32 *len_a = (i32*)a; - i32 *len_b = (i32*)b; - if (*len_a == *len_b){ - char *str_a = (char*)(len_a + 1); - char *str_b = (char*)(len_b + 1); - if (strncmp(str_a, str_b, *len_a) == 0){ - result = true; - } - } - return(result); -} - -File_Table_Entry* -osx_file_listener_lookup_and_return_pointer(u64 hash, void *name){ - File_Table_Entry *result = 0; - i32 index = (i32)(hash % file_change_table.size); - i32 first_index = index; - - for (;;){ - File_Table_Entry *entry = &file_change_table.table[index]; - if (entry->hash == hash){ - if (osx_name_prefixed_match(name, entry->name)){ - result = entry; - break; - } - } - if (entry->name == 0){ - break; - } - - index = (index + 1)%file_change_table.size; - if (index == first_index){ - break; - } - } - - return(result); -} - -void -osx_file_listener_table_entry_erase(File_Table_Entry *entry){ - free(entry->name); - unschedule_file_watching(entry->handle); - memset(entry, 0, sizeof(*entry)); - entry->name = (void*)1; -} - -b32 -osx_file_listener_lookup_and_decrement(u64 hash, void *name){ - b32 found = false; - File_Table_Entry *entry = osx_file_listener_lookup_and_return_pointer(hash, name); - if (entry != 0){ - found = true; - --entry->counter; - if (entry->counter <= 0){ - osx_file_listener_table_entry_erase(entry); - } - } - return(found); -} - -b32 -osx_file_listener_hash(u64 hash, void *name, i32 counter, File_Watching_Handle **handle_address_out){ - b32 result = 0; - if (file_change_table.count*6 < file_change_table.size*5){ - i32 index = (i32)(hash % file_change_table.size); - i32 first_index = index; - - for (;;){ - File_Table_Entry *entry = &file_change_table.table[index]; - if (entry->name == 0 || entry->name == (void*)1){ - entry->hash = hash; - entry->name = name; - entry->counter = counter; - *handle_address_out = &entry->handle; - result = true; - ++file_change_table.count; - break; - } - - index = (index + 1)%file_change_table.size; - if (index == first_index){ - break; - } - } - - if (!result){ - //LOG("file change listener table error: could not find a free slot in the table\n"); - } - } - - return(result); -} - -void -osx_file_listener_grow_table(i32 size){ - if (file_change_table.size < size){ - File_Table_Entry *old_table = file_change_table.table; - i32 old_size = file_change_table.size; - - file_change_table.table = (File_Table_Entry*)osx_allocate(size*sizeof(File_Table_Entry)); - memset(file_change_table.table, 0, size*sizeof(File_Table_Entry)); - file_change_table.size = size; - - for (i32 i = 0; i < old_size; ++i){ - void *name = file_change_table.table[i].name; - if (name != 0 && name != (void*)1){ - File_Table_Entry *e = &file_change_table.table[i]; - File_Watching_Handle *handle_address = 0; - osx_file_listener_hash(e->hash, e->name, e->counter, &handle_address); - *handle_address = e->handle; - } - } - - if (old_table != 0){ - osx_free(old_table, old_size*sizeof(File_Table_Entry)); - } - } -} - -void -osx_file_listener_double_table(){ - osx_file_listener_grow_table(file_change_table.size*2); -} - -b32 -osx_file_listener_insert_or_increment_always(u64 hash, void *name, File_Watching_Handle **handle_address_out){ - b32 was_already_in_table = false; - File_Table_Entry *entry = osx_file_listener_lookup_and_return_pointer(hash, name); - if (entry != 0){ - ++entry->counter; - was_already_in_table = true; - } - else{ - b32 result = osx_file_listener_hash(hash, name, 1, handle_address_out); - if (!result){ - osx_file_listener_double_table(); - osx_file_listener_hash(hash, name, 1, handle_address_out); - } - } - return(was_already_in_table); -} - -u64 -osx_get_file_hash(void *name){ - u32 count = *(u32*)(name); - char *str = (char*)name + 4; - u64 hash = 0; - u64 state = count; - u64 inc = 1 + 2*count; - for (u32 i = 0; i <= count; ++i){ - u64 old_state = state; - state = state*6364136223846783005ULL + inc; - u32 xorshifted = ((old_state >> 18u) ^ old_state) >> 27u; - u32 rot = old_state >> 59u; - hash = (hash << 3) + (hash & 1) + ((xorshifted >> rot) | (xorshifted << ((-rot) & 31))); - if (i < count){ - inc = 1 + 2*(((inc - 1) << 7) | (u8)str[i]); - } - } - return(hash); -} - -void -osx_file_listener_init(void){ - osx_file_listener_grow_table(4096); -} - -void -osx_add_file_listener(char *dir_name){ - // TODO(allen): Decide what to do about these darn string mallocs. - void *name_stored = osx_file_name_prefixed_length(dir_name); - File_Watching_Handle *handle_address = 0; - b32 was_already_in_table = osx_file_listener_insert_or_increment_always(osx_get_file_hash(name_stored), name_stored, &handle_address); - if (was_already_in_table){ - free(name_stored); - } - else{ - *handle_address = schedule_file_watching(dir_name); - } -} - -void -osx_remove_file_listener(char *dir_name){ - void *name_stored = osx_file_name_prefixed_length(dir_name); - osx_file_listener_lookup_and_decrement(osx_get_file_hash(name_stored), name_stored); - free(name_stored); -} - -i32 -osx_get_file_change_event(char *buffer, i32 max, i32 *size){ - file_queue_lock(); - File_Change_Node *node = file_queue.first; - sll_pop(file_queue.first, file_queue.last); - file_queue_unlock(); - - i32 result = 0; - if (node != 0){ - if (node->len < max){ - result = 1; - memcpy(buffer, node->name, node->len); - *size = node->len; - } - else{ - result = -1; - // TODO(allen): Somehow save the node? - } - file_change_node_free(node); - } - - return(result); -} - -void -osx_show_cursor(i32 show, i32 cursor_type){ - local_persist b32 cursor_is_shown = 1; - if (show == 1){ - if (!cursor_is_shown){ - [NSCursor unhide]; - cursor_is_shown = true; - } - } - else if (show == -1){ - if (cursor_is_shown){ - [NSCursor hide]; - cursor_is_shown = false; - } - } - - if (cursor_type > 0){ - switch (cursor_type){ - case APP_MOUSE_CURSOR_ARROW: - { - [[NSCursor arrowCursor] set]; - }break; - - case APP_MOUSE_CURSOR_IBEAM: - { - [[NSCursor IBeamCursor] set]; - }break; - - case APP_MOUSE_CURSOR_LEFTRIGHT: - { - [[NSCursor resizeLeftRightCursor] set]; - }break; - - case APP_MOUSE_CURSOR_UPDOWN: - { - [[NSCursor resizeUpDownCursor] set]; - }break; - } - } -} - -My4coderView* view = 0; -NSWindow* window = 0; - -void -osx_begin_render(){ - CGLLockContext([[view openGLContext] CGLContextObj]); - [[view openGLContext] makeCurrentContext]; -} - -void -osx_end_render(){ - [[view openGLContext] flushBuffer]; - CGLUnlockContext([[view openGLContext] CGLContextObj]); -} - -void -osx_schedule_step(void){ - [NSTimer scheduledTimerWithTimeInterval: 0.0 - target: view - selector: @selector(requestDisplay) - userInfo: nil repeats:NO]; -} - -void -osx_toggle_fullscreen(void){ - [window toggleFullScreen:nil]; -} - -b32 -osx_is_fullscreen(void){ - b32 result = (([window styleMask] & NSFullScreenWindowMask) != 0); - return(result); -} - -void -osx_close_app(void){ - [NSApp terminate: nil]; -} - -f32 -osx_timer_seconds(void){ - f32 result = CACurrentMediaTime(); - return(result); -} - -NSFontManager *font_manager = 0; - -NSString *get_font_path(NSFont *font){ - CFStringRef name = (CFStringRef)[font fontName]; - CGFloat size = [font pointSize]; - CTFontDescriptorRef ref = CTFontDescriptorCreateWithNameAndSize(name, size); - CFURLRef url = CTFontDescriptorCopyAttribute(ref, kCTFontURLAttribute); - NSString *path = [(NSURL *)CFBridgingRelease(url) path]; - return(path); -} - -OSX_Font_Match -osx_get_font_match(char *name, i32 pt_size, b32 italic, b32 bold){ - if (font_manager == 0){ - font_manager = [NSFontManager sharedFontManager]; - } - - NSString *name_string = [NSString stringWithUTF8String:name]; - NSFontTraitMask trait_mask = 0; - if (italic){ - trait_mask = (trait_mask | NSItalicFontMask); - } - NSInteger weight = 5; - if (bold){ - weight = 9; - } - - b32 used_base_file = false; - NSFont *font = [font_manager - fontWithFamily: name_string - traits: trait_mask - weight: weight - size:(float)pt_size]; - - if (font == nil){ - font = [font_manager - fontWithFamily: name_string - traits: 0 - weight: 5 - size:(float)pt_size]; - used_base_file = true; - } - - OSX_Font_Match match = {}; - if (font != nil){ - NSString *path = get_font_path(font); - char *path_c = 0; - if (path != nil){ - path_c = (char*)[path UTF8String]; - } - if (path_c != 0){ - match.path = path_c; - match.used_base_file = used_base_file; - } - } - - return(match); -} - -OSX_Loadable_Fonts -osx_list_loadable_fonts(void){ - if (font_manager == 0){ - font_manager = [NSFontManager sharedFontManager]; - } - - NSArray *fonts = [font_manager availableFontFamilies]; - - OSX_Loadable_Fonts result = {}; - NSUInteger count_u = [fonts count]; - int count = (int)count_u; - - result.count = count; - - size_t memsize = count*2*sizeof(char*); - void *mem = malloc(memsize); - result.names = (char**)mem; - result.paths = result.names + count; - - for (int i = 0; i < count; ++i){ - NSString *font_n = fonts[i]; - char *font_n_c = (char*)[font_n UTF8String]; - NSFont *font = [font_manager - fontWithFamily:font_n - traits:NSUnboldFontMask|NSUnitalicFontMask - weight:5 - size:12]; - NSString *path = get_font_path(font); - char *path_c = 0; - if (path != nil){ - path_c = (char*)[path UTF8String]; - } - result.names[i] = font_n_c; - result.paths[i] = path_c; - } - - return(result); -} - -void -osx_change_title(char *str_c){ - NSString *str = [NSString stringWithUTF8String:str_c]; - [window setTitle:str]; -} - -OSX_Keyboard_Modifiers -osx_get_modifiers(void){ - return(osx_mods_nsevent_to_struct([NSEvent modifierFlags])); -} - -int -main(int argc, char **argv){ - memset(&osx_objc, 0, sizeof(osx_objc)); - - u32 clipboard_size = KB(16); - osx_objc.clipboard_data = osx_allocate(clipboard_size); - osx_objc.clipboard_max = clipboard_size; - osx_objc.argc = argc; - osx_objc.argv = argv; - - osx_file_listener_init(); - - @autoreleasepool{ - NSApplication *app = [NSApplication sharedApplication]; - [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; - - [app setDelegate:[[AppDelegate alloc] init]]; - NSRect screenRect = [[NSScreen mainScreen] frame]; - float w = 800.f; - float h = 600.f; - NSRect frame = NSMakeRect((screenRect.size.width - w) * 0.5, (screenRect.size.height - h) * 0.5, w, h); - - u32 flags = NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask; - window = [[NSWindow alloc] initWithContentRect:frame styleMask:flags backing:NSBackingStoreBuffered defer:NO]; - - [window setAcceptsMouseMovedEvents:YES]; - - view = [[My4coderView alloc] init]; - [view setFrame:[[window contentView] bounds]]; - [view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; - - [[window contentView] addSubview:view]; - [window setMinSize:NSMakeSize(100, 100)]; - [window setTitle:@WINDOW_NAME]; - [window makeKeyAndOrderFront:nil]; - - [NSTimer scheduledTimerWithTimeInterval: 0.5 - target: view - selector: @selector(checkClipboard) - userInfo: nil repeats:YES]; - - osx_init(); - osx_objc.running = true; - - [NSApp run]; - } - - return(0); -} - -// BOTTOM - diff --git a/platform_mac/osx_objective_c_to_cpp_links_old.h b/platform_mac/osx_objective_c_to_cpp_links_old.h deleted file mode 100644 index cdc74099..00000000 --- a/platform_mac/osx_objective_c_to_cpp_links_old.h +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Mr. 4th Dimention - Allen Webster - * - * 06.29.2017 - * - * Types and functions for communication between C++ and Objective-C layers. - * - */ - -// TOP - -#if !defined(OSX_OBJECTIVE_C_TO_CPP_LINKS_H) -#define OSX_OBJECTIVE_C_TO_CPP_LINKS_H - -#include - -#if 0 -#define DBG_POINT() fprintf(stdout, "%s\n", __FILE__ ":" LINE_STR ":") -#else -#define DBG_POINT() -#endif - -typedef enum OSX_Mouse_Event_Type{ - MouseType_Move, - MouseType_Press, - MouseType_Release, -} OSX_Mouse_Event_Type; - -typedef struct OSX_Keyboard_Modifiers{ - b32 shift; - b32 command; - b32 control; - b32 option; - b32 caps; -} OSX_Keyboard_Modifiers; - -typedef struct OSX_Objective_C_Vars{ - i32 width, height; - b32 gl_is_initialized; - b32 running; - u32 key_count; - u32 keys[8]; - - u32 prev_clipboard_change_count; - b32 has_clipboard_item; - void *clipboard_data; - u32 clipboard_size; - u32 clipboard_max; - b32 just_posted_to_clipboard; - - char *clipboard_space; - u64 clipboard_space_max; - - b32 full_screen; - b32 do_toggle; - - i32 argc; - char **argv; -} OSX_Objective_C_Vars; - -typedef struct OSX_Loadable_Fonts{ - char **names; - char **paths; - i32 count; -} OSX_Loadable_Fonts; - -typedef struct OSX_Font_Match{ - char *path; - b32 used_base_file; -} OSX_Font_Match; - -// In C++ layer. -extern OSX_Objective_C_Vars osx_objc; - -external void* -osx_allocate(u64 size); - -external void -osx_free(void *ptr, u64 size); - -external void -osx_resize(int width, int height); - -external void -osx_character_input(u32 code, OSX_Keyboard_Modifiers modifier_flags); - -external void -osx_mouse(i32 mx, i32 my, u32 type); - -external void -osx_mouse_wheel(float dx, float dy); - -external void -osx_try_to_close(void); - -external void -osx_step(); - -external void -osx_init(); - -external void -osx_log(char *m, i32 l); - -// In Objective-C layer. -external void -osx_post_to_clipboard(char *str); - -external void -osx_error_dialogue(char *str); - -external void -osx_add_file_listener(char *file_name); - -external void -osx_remove_file_listener(char *file_name); - -external i32 -osx_get_file_change_event(char *buffer, i32 max, i32 *size); - -external void -osx_show_cursor(i32 show_inc, i32 cursor_type); - -external void -osx_begin_render(void); - -external void -osx_end_render(void); - -external void -osx_schedule_step(void); - -external void -osx_toggle_fullscreen(void); - -external b32 -osx_is_fullscreen(void); - -external void -osx_close_app(void); - -external f32 -osx_timer_seconds(void); - -external OSX_Font_Match -osx_get_font_match(char *name, i32 pt_size, b32 italic, b32 bold); - -external OSX_Loadable_Fonts -osx_list_loadable_fonts(void); - -external void -osx_change_title(char *str); - -external OSX_Keyboard_Modifiers -osx_get_modifiers(void); - -#endif - -// BOTTOM -