diff --git a/4ed_api_implementation.cpp b/4ed_api_implementation.cpp index bca1f31f..c54c128f 100644 --- a/4ed_api_implementation.cpp +++ b/4ed_api_implementation.cpp @@ -1289,11 +1289,9 @@ panel_split(Application_Links *app, Panel_ID panel_id, Dimension split_dim){ Panel *panel = imp_get_panel(models, panel_id); if (api_check_panel(panel)){ Panel *new_panel = 0; - if (layout_split_panel(layout, panel, (split_dim == Dimension_X), - &new_panel)){ + if (layout_split_panel(layout, panel, (split_dim == Dimension_X), &new_panel)){ Live_Views *view_set = &models->view_set; - View *new_view = live_set_alloc_view(&models->lifetime_allocator, - view_set, new_panel); + View *new_view = live_set_alloc_view(&models->lifetime_allocator, view_set, new_panel); view_init(app->tctx, models, new_view, models->scratch_buffer, models->view_event_handler); result = true; @@ -1338,7 +1336,7 @@ panel_set_split(Application_Links *app, Panel_ID panel_id, Panel_Split_Kind kind } api(custom) function b32 -panel_swap_children(Application_Links *app, Panel_ID panel_id, Panel_Split_Kind kind, float t){ +panel_swap_children(Application_Links *app, Panel_ID panel_id){ Models *models = (Models*)app->cmd_context; Layout *layout = &models->layout; b32 result = false; @@ -1352,6 +1350,14 @@ panel_swap_children(Application_Links *app, Panel_ID panel_id, Panel_Split_Kind return(result); } +api(custom) function Panel_ID +panel_get_root(Application_Links *app){ + Models *models = (Models*)app->cmd_context; + Layout *layout = &models->layout; + Panel *panel = layout->root; + return(panel_get_id(layout, panel)); +} + api(custom) function Panel_ID panel_get_parent(Application_Links *app, Panel_ID panel_id){ Models *models = (Models*)app->cmd_context; diff --git a/4ed_layout.cpp b/4ed_layout.cpp index d4e0bc73..3444983c 100644 --- a/4ed_layout.cpp +++ b/4ed_layout.cpp @@ -155,19 +155,34 @@ layout_split_panel(Layout *layout, Panel *panel, b32 vertical_split, Panel **new Panel *min_panel = layout__alloc_panel(layout); Panel *max_panel = layout__alloc_panel(layout); - dll_remove(&panel->node); - dll_insert(&layout->intermediate_panels, &panel->node); - - dll_insert(&layout->open_panels, &min_panel->node); - dll_insert(&layout->open_panels, &max_panel->node); - - // init min_panel - panel->view->panel = min_panel; - min_panel->parent = panel; - min_panel->kind = PanelKind_Final; - min_panel->view = panel->view; + if (panel->kind == PanelKind_Final){ + dll_remove(&panel->node); + dll_insert(&layout->intermediate_panels, &panel->node); + + // init min_panel + dll_insert(&layout->open_panels, &min_panel->node); + + panel->view->panel = min_panel; + min_panel->parent = panel; + min_panel->kind = PanelKind_Final; + min_panel->view = panel->view; + } + else{ + // init min_panel + dll_insert(&layout->intermediate_panels, &min_panel->node); + + min_panel->parent = panel; + min_panel->kind = PanelKind_Intermediate; + min_panel->view = panel->view; + min_panel->tl_panel = panel->tl_panel; + min_panel->br_panel = panel->br_panel; + min_panel->vertical_split = panel->vertical_split; + min_panel->split = panel->split; + } // init max_panel + dll_insert(&layout->open_panels, &max_panel->node); + *new_panel_out = max_panel; max_panel->parent = panel; max_panel->kind = PanelKind_Final; diff --git a/custom/4coder_base_commands.cpp b/custom/4coder_base_commands.cpp index 23721540..64eecdb9 100644 --- a/custom/4coder_base_commands.cpp +++ b/custom/4coder_base_commands.cpp @@ -1545,35 +1545,25 @@ CUSTOM_DOC("Set the other non-active panel to view the buffer that the active pa view_set_cursor_and_preferred_x(app, view, seek_pos(pos)); } -CUSTOM_COMMAND_SIG(swap_buffers_between_panels) -CUSTOM_DOC("Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.") +CUSTOM_COMMAND_SIG(swap_panels) +CUSTOM_DOC("Swaps the active panel with it's sibling.") { - View_ID view1 = get_active_view(app, Access_ReadVisible); - change_active_panel(app); - View_ID view2 = get_active_view(app, Access_ReadVisible); - - if (view1 != view2){ - Buffer_ID buffer1 = view_get_buffer(app, view1, Access_Always); - Buffer_ID buffer2 = view_get_buffer(app, view2, Access_Always); - if (buffer1 != buffer2){ - view_set_buffer(app, view1, buffer2, 0); - view_set_buffer(app, view2, buffer1, 0); - } - else{ - i64 p1 = view_get_cursor_pos(app, view1); - i64 m1 = view_get_mark_pos(app, view1); - Buffer_Scroll sc1 = view_get_buffer_scroll(app, view1); - i64 p2 = view_get_cursor_pos(app, view2); - i64 m2 = view_get_mark_pos(app, view2); - Buffer_Scroll sc2 = view_get_buffer_scroll(app, view2); - - view_set_cursor_and_preferred_x(app, view1, seek_pos(p2)); - view_set_mark(app, view1, seek_pos(m2)); - view_set_buffer_scroll(app, view1, sc2, SetBufferScroll_SnapCursorIntoView); - view_set_cursor_and_preferred_x(app, view2, seek_pos(p1)); - view_set_mark(app, view2, seek_pos(m1)); - view_set_buffer_scroll(app, view2, sc1, SetBufferScroll_SnapCursorIntoView); + View_ID view = get_active_view(app, Access_Always); + Panel_ID panel = view_get_panel(app, view); + Panel_ID parent = panel_get_parent(app, panel); + for (;parent != 0;){ + Panel_ID child_1 = panel_get_child(app, parent, Side_Min); + Panel_ID child_2 = panel_get_child(app, parent, Side_Max); + + View_ID view_1 = panel_get_view(app, child_1, Access_Always); + View_ID view_2 = panel_get_view(app, child_2, Access_Always); + + if (!view_get_is_passive(app, view_1) && !view_get_is_passive(app, view_2)){ + panel_swap_children(app, parent); + break; } + + parent = panel_get_parent(app, parent); } } diff --git a/custom/4coder_default_framework.cpp b/custom/4coder_default_framework.cpp index 5d80d216..23674a7f 100644 --- a/custom/4coder_default_framework.cpp +++ b/custom/4coder_default_framework.cpp @@ -1,16 +1,15 @@ /* -4coder_default_framework.cpp - Sets up the basics of the framework that is used for default -4coder behaviour. +4coder_default_framework.cpp - Sets up the basics of the framework that is used for default 4coder behaviour. */ // TOP -static void +function void unlock_jump_buffer(void){ locked_buffer.size = 0; } -static void +function void lock_jump_buffer(Application_Links *app, String_Const_u8 name){ if (name.size < sizeof(locked_buffer_space)){ block_copy(locked_buffer_space, name.str, name.size); @@ -22,12 +21,12 @@ lock_jump_buffer(Application_Links *app, String_Const_u8 name){ } } -static void +function void lock_jump_buffer(Application_Links *app, char *name, i32 size){ lock_jump_buffer(app, SCu8(name, size)); } -static void +function void lock_jump_buffer(Application_Links *app, Buffer_ID buffer_id){ Scratch_Block scratch(app); String_Const_u8 buffer_name = push_buffer_unique_name(app, scratch, buffer_id); @@ -46,7 +45,7 @@ get_locked_jump_buffer(Application_Links *app){ return(result); } -static View_ID +function View_ID get_view_for_locked_jump_buffer(Application_Links *app){ View_ID result = 0; Buffer_ID buffer = get_locked_jump_buffer(app); @@ -58,7 +57,7 @@ get_view_for_locked_jump_buffer(Application_Links *app){ //////////////////////////////// -static void +function void new_view_settings(Application_Links *app, View_ID view){ if (!global_config.use_scroll_bars){ view_set_setting(app, view, ViewSetting_ShowScrollbar, false); @@ -70,21 +69,27 @@ new_view_settings(Application_Links *app, View_ID view){ //////////////////////////////// -static void +function void view_set_passive(Application_Links *app, View_ID view_id, b32 value){ Managed_Scope scope = view_get_managed_scope(app, view_id); b32 *is_passive = scope_attachment(app, scope, view_is_passive_loc, b32); - *is_passive = value; + if (is_passive != 0){ + *is_passive = value; + } } -static b32 +function b32 view_get_is_passive(Application_Links *app, View_ID view_id){ Managed_Scope scope = view_get_managed_scope(app, view_id); b32 *is_passive = scope_attachment(app, scope, view_is_passive_loc, b32); - return(*is_passive); + b32 result = false; + if (is_passive != 0){ + result = *is_passive; + } + return(result); } -static View_ID +function View_ID open_footer_panel(Application_Links *app, View_ID view){ View_ID special_view = open_view(app, view, ViewSplit_Bottom); new_view_settings(app, special_view); @@ -96,7 +101,7 @@ open_footer_panel(Application_Links *app, View_ID view){ return(special_view); } -static void +function void close_build_footer_panel(Application_Links *app){ if (build_footer_panel_view_id != 0){ view_close(app, build_footer_panel_view_id); @@ -104,7 +109,7 @@ close_build_footer_panel(Application_Links *app){ } } -static View_ID +function View_ID open_build_footer_panel(Application_Links *app){ if (build_footer_panel_view_id == 0){ View_ID view = get_active_view(app, Access_Always); @@ -114,7 +119,7 @@ open_build_footer_panel(Application_Links *app){ return(build_footer_panel_view_id); } -static View_ID +function View_ID get_next_view_looped_primary_panels(Application_Links *app, View_ID start_view_id, Access_Flag access){ View_ID view_id = start_view_id; do{ @@ -126,7 +131,7 @@ get_next_view_looped_primary_panels(Application_Links *app, View_ID start_view_i return(view_id); } -static View_ID +function View_ID get_prev_view_looped_primary_panels(Application_Links *app, View_ID start_view_id, Access_Flag access){ View_ID view_id = start_view_id; do{ @@ -138,7 +143,7 @@ get_prev_view_looped_primary_panels(Application_Links *app, View_ID start_view_i return(view_id); } -static View_ID +function View_ID get_next_view_after_active(Application_Links *app, Access_Flag access){ View_ID view = get_active_view(app, access); if (view != 0){ @@ -149,7 +154,7 @@ get_next_view_after_active(Application_Links *app, Access_Flag access){ //////////////////////////////// -static void +function void call_after_ctx_shutdown(Application_Links *app, View_ID view, Custom_Command_Function *func){ view_enqueue_command_function(app, view, func); } @@ -213,7 +218,7 @@ ui_fallback_command_dispatch(Application_Links *app, View_ID view, User_Input *i //////////////////////////////// -static void +function void view_buffer_set(Application_Links *app, Buffer_ID *buffers, i32 *positions, i32 count){ if (count > 0){ Scratch_Block scratch(app, Scratch_Share); @@ -316,7 +321,7 @@ CUSTOM_DOC("Create a new panel by horizontally splitting the active panel.") // NOTE(allen): Credits to nj/FlyingSolomon for authoring the original version of this helper. -static Buffer_ID +function Buffer_ID create_or_switch_to_buffer_and_clear_by_name(Application_Links *app, String_Const_u8 name_string, View_ID default_target_view){ Buffer_ID search_buffer = get_buffer_by_name(app, name_string, Access_Always); if (search_buffer != 0){ @@ -423,7 +428,7 @@ CUSTOM_DOC("Toggle fullscreen mode on or off. The change(s) do not take effect //////////////////////////////// -static void +function void default_4coder_initialize(Application_Links *app, String_Const_u8_Array file_names, i32 override_font_size, b32 override_hinting){ Thread_Context *tctx = get_thread_context(app); @@ -431,12 +436,12 @@ default_4coder_initialize(Application_Links *app, String_Const_u8_Array file_nam #define M \ "Welcome to " VERSION "\n" \ - "If you're new to 4coder there are some tutorials at http://4coder.net/tutorials.html\n" \ - "Direct bug reports and feature requests to https://github.com/4coder-editor/4coder/issues\n" \ - "Other questions and discussion can be directed to editor@4coder.net or 4coder.handmade.network\n" \ - "The change log can be found in CHANGES.txt\n" \ - "\n" - print_message(app, string_u8_litexpr(M)); + "If you're new to 4coder there are some tutorials at http://4coder.net/tutorials.html\n" \ + "Direct bug reports and feature requests to https://github.com/4coder-editor/4coder/issues\n" \ + "Other questions and discussion can be directed to editor@4coder.net or 4coder.handmade.network\n" \ + "The change log can be found in CHANGES.txt\n" \ + "\n" + print_message(app, string_u8_litexpr(M)); #undef M #if 0 @@ -479,14 +484,14 @@ default_4coder_initialize(Application_Links *app, String_Const_u8_Array file_nam } } -static void +function void default_4coder_initialize(Application_Links *app, i32 override_font_size, b32 override_hinting){ String_Const_u8_Array file_names = {}; default_4coder_initialize(app, file_names, override_font_size, override_hinting); } -static void +function void default_4coder_initialize(Application_Links *app, String_Const_u8_Array file_names){ Face_Description description = get_face_description(app, 0); default_4coder_initialize(app, file_names, @@ -494,14 +499,14 @@ default_4coder_initialize(Application_Links *app, String_Const_u8_Array file_nam description.parameters.hinting); } -static void +function void default_4coder_initialize(Application_Links *app){ Face_Description command_line_description = get_face_description(app, 0); String_Const_u8_Array file_names = {}; default_4coder_initialize(app, file_names, command_line_description.parameters.pt_size, command_line_description.parameters.hinting); } -static void +function void default_4coder_side_by_side_panels(Application_Links *app, Buffer_Identifier left, Buffer_Identifier right){ Buffer_ID left_id = buffer_identifier_to_id(app, left); @@ -521,7 +526,7 @@ default_4coder_side_by_side_panels(Application_Links *app, view_set_active(app, view); } -static void +function void default_4coder_side_by_side_panels(Application_Links *app, Buffer_Identifier left, Buffer_Identifier right, String_Const_u8_Array file_names){ @@ -534,20 +539,20 @@ default_4coder_side_by_side_panels(Application_Links *app, default_4coder_side_by_side_panels(app, left, right); } -static void +function void default_4coder_side_by_side_panels(Application_Links *app, String_Const_u8_Array file_names){ Buffer_Identifier left = buffer_identifier(string_u8_litexpr("*scratch*")); Buffer_Identifier right = buffer_identifier(string_u8_litexpr("*messages*")); default_4coder_side_by_side_panels(app, left, right, file_names); } -static void +function void default_4coder_side_by_side_panels(Application_Links *app){ String_Const_u8_Array file_names = {}; default_4coder_side_by_side_panels(app, file_names); } -static void +function void default_4coder_one_panel(Application_Links *app, Buffer_Identifier buffer){ Buffer_ID id = buffer_identifier_to_id(app, buffer); View_ID view = get_active_view(app, Access_Always); @@ -555,7 +560,7 @@ default_4coder_one_panel(Application_Links *app, Buffer_Identifier buffer){ view_set_buffer(app, view, id, 0); } -static void +function void default_4coder_one_panel(Application_Links *app, String_Const_u8_Array file_names){ Buffer_Identifier buffer = buffer_identifier(string_u8_litexpr("*messages*")); if (file_names.count > 0){ @@ -564,7 +569,7 @@ default_4coder_one_panel(Application_Links *app, String_Const_u8_Array file_name default_4coder_one_panel(app, buffer); } -static void +function void default_4coder_one_panel(Application_Links *app){ String_Const_u8_Array file_names = {}; default_4coder_one_panel(app, file_names); diff --git a/custom/4coder_default_hooks.cpp b/custom/4coder_default_hooks.cpp index f4aef042..51475a6d 100644 --- a/custom/4coder_default_hooks.cpp +++ b/custom/4coder_default_hooks.cpp @@ -91,8 +91,7 @@ CUSTOM_DOC("Input consumption loop for default view behavior") Buffer_ID buffer = view_get_buffer(app, view, Access_Always); Managed_Scope buffer_scope = buffer_get_managed_scope(app, buffer); - Command_Map_ID *map_id_ptr = - scope_attachment(app, buffer_scope, buffer_map_id, Command_Map_ID); + Command_Map_ID *map_id_ptr = scope_attachment(app, buffer_scope, buffer_map_id, Command_Map_ID); if (*map_id_ptr == 0){ *map_id_ptr = mapid_file; } @@ -133,8 +132,7 @@ CUSTOM_DOC("Input consumption loop for default view behavior") // NOTE(allen): after the command is called do some book keeping ProfileScope(app, "after view input"); - next_rewrite = scope_attachment(app, scope, view_next_rewrite_loc, - Rewrite_Type); + next_rewrite = scope_attachment(app, scope, view_next_rewrite_loc, Rewrite_Type); if (next_rewrite != 0){ Rewrite_Type *rewrite = scope_attachment(app, scope, view_rewrite_loc, Rewrite_Type); @@ -145,8 +143,7 @@ CUSTOM_DOC("Input consumption loop for default view behavior") view_it = get_view_next(app, view_it, Access_Always)){ Managed_Scope scope_it = view_get_managed_scope(app, view_it); b32 *snap_mark_to_cursor = - scope_attachment(app, scope_it, view_snap_mark_to_cursor, - b32); + scope_attachment(app, scope_it, view_snap_mark_to_cursor, b32); if (*snap_mark_to_cursor){ i64 pos = view_get_cursor_pos(app, view_it); view_set_mark(app, view_it, seek_pos(pos)); diff --git a/custom/4coder_default_include.cpp b/custom/4coder_default_include.cpp index 5652819e..acb77ab6 100644 --- a/custom/4coder_default_include.cpp +++ b/custom/4coder_default_include.cpp @@ -105,6 +105,7 @@ #include "4coder_combined_write_commands.cpp" #include "4coder_miblo_numbers.cpp" #include "4coder_profile_inspect.cpp" +#include "4coder_tutorial.cpp" #include "4coder_default_hooks.cpp" diff --git a/custom/4coder_tutorial.cpp b/custom/4coder_tutorial.cpp new file mode 100644 index 00000000..fb5abaa4 --- /dev/null +++ b/custom/4coder_tutorial.cpp @@ -0,0 +1,63 @@ +/* +4coder_tutorial.cpp - Guided graphical tutorial system. +*/ + +// TOP + +global b32 in_tutorial = false; + +function void +kill_tutorial(Application_Links *app){ + if (in_tutorial){ + + } +} + +function void +tutorial_default_4coder_render(Application_Links *app, Frame_Info frame_info, View_ID view_id){ + View_ID active_view = get_active_view(app, Access_Always); + b32 is_active_view = (active_view == view_id); + + Rect_f32 region = draw_background_and_margin(app, view_id, is_active_view); + Rect_f32 prev_clip = draw_set_clip(app, region); + + draw_rectangle(app, rect_inner(region, 10.f), 20.f, fcolor_id(Stag_Margin)); + + draw_set_clip(app, prev_clip); +} + +function void +tutorial_default_4coder_run(Application_Links *app) +{ + View_ID view = get_this_ctx_view(app, Access_Always); + View_Context ctx = view_current_context(app, view); + ctx.render_caller = tutorial_default_4coder_render; + ctx.hides_buffer = true; + View_Context_Block ctx_block(app, view, &ctx); + + for (;;){ + User_Input input = get_next_input(app, EventPropertyGroup_Any, 0); + if (input.abort){ + break; + } + } +} + +CUSTOM_COMMAND_SIG(tutorial_default_4coder) +CUSTOM_DOC("Tutorial for built in 4coder bindings and features.") +{ + kill_tutorial(app); + + Panel_ID root_panel = panel_get_root(app); + if (panel_split(app, root_panel, Dimension_Y)){ + panel_swap_children(app, root_panel); + panel_set_split(app, root_panel, PanelSplitKind_Ratio_Min, 0.5f); + Panel_ID tutorial_panel = panel_get_child(app, root_panel, Side_Min); + View_ID tutorial_view = panel_get_view(app, tutorial_panel, Access_Always); + view_set_passive(app, tutorial_view, true); + view_enqueue_command_function(app, tutorial_view, tutorial_default_4coder_run); + } +} + +// BOTTOM + diff --git a/custom/generated/command_metadata.h b/custom/generated/command_metadata.h index 2e800f3f..13be288d 100644 --- a/custom/generated/command_metadata.h +++ b/custom/generated/command_metadata.h @@ -2,7 +2,7 @@ #define command_id(c) (fcoder_metacmd_ID_##c) #define command_metadata(c) (&fcoder_metacmd_table[command_id(c)]) #define command_metadata_by_id(id) (&fcoder_metacmd_table[id]) -#define command_one_past_last_id 214 +#define command_one_past_last_id 215 #if defined(CUSTOM_COMMAND_SIG) #define PROC_LINKS(x,y) x #else @@ -118,7 +118,7 @@ CUSTOM_COMMAND_SIG(delete_line); CUSTOM_COMMAND_SIG(open_file_in_quotes); CUSTOM_COMMAND_SIG(open_matching_file_cpp); CUSTOM_COMMAND_SIG(view_buffer_other_panel); -CUSTOM_COMMAND_SIG(swap_buffers_between_panels); +CUSTOM_COMMAND_SIG(swap_panels); CUSTOM_COMMAND_SIG(kill_buffer); CUSTOM_COMMAND_SIG(save); CUSTOM_COMMAND_SIG(reopen); @@ -221,6 +221,7 @@ CUSTOM_COMMAND_SIG(miblo_decrement_time_stamp); CUSTOM_COMMAND_SIG(miblo_increment_time_stamp_minute); CUSTOM_COMMAND_SIG(miblo_decrement_time_stamp_minute); CUSTOM_COMMAND_SIG(profile_inspect); +CUSTOM_COMMAND_SIG(tutorial_default_4coder); CUSTOM_COMMAND_SIG(default_startup); CUSTOM_COMMAND_SIG(default_try_exit); #endif @@ -235,7 +236,7 @@ char *source_name; i32 source_name_len; i32 line_number; }; -static Command_Metadata fcoder_metacmd_table[214] = { +static Command_Metadata fcoder_metacmd_table[215] = { { 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, 56 }, { 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, 207 }, { 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, 214 }, @@ -246,19 +247,19 @@ static Command_Metadata fcoder_metacmd_table[214] = { { 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, 2175 }, { 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, 2181 }, { 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, 2189 }, -{ 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, 279 }, -{ 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, 285 }, -{ 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, 295 }, -{ 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, 305 }, -{ 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, 370 }, -{ 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, 376 }, -{ 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, 382 }, -{ 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, 388 }, -{ 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, 394 }, -{ 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, 400 }, -{ 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, 406 }, -{ 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, 412 }, -{ 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, 418 }, +{ 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(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(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(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, 375 }, +{ 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, 381 }, +{ 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, 387 }, +{ 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, 393 }, +{ 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, 399 }, +{ 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, 405 }, +{ 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, 411 }, +{ 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, 417 }, +{ 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, 423 }, { PROC_LINKS(write_text_input, 0), false, "write_text_input", 16, "Inserts whatever character was used to trigger this command.", 60, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 59 }, { PROC_LINKS(write_space, 0), false, "write_space", 11, "Inserts an underscore.", 22, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 67 }, { PROC_LINKS(write_underscore, 0), false, "write_underscore", 16, "Inserts an underscore.", 22, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 73 }, @@ -345,16 +346,16 @@ static Command_Metadata fcoder_metacmd_table[214] = { { 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, 1491 }, { 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, 1523 }, { 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, 1536 }, -{ PROC_LINKS(swap_buffers_between_panels, 0), false, "swap_buffers_between_panels", 27, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1548 }, -{ PROC_LINKS(kill_buffer, 0), false, "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1582 }, -{ PROC_LINKS(save, 0), false, "save", 4, "Saves the current buffer.", 25, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1590 }, -{ 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, 1600 }, -{ 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, 1825 }, -{ 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, 1838 }, -{ 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, 1852 }, -{ 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, 1923 }, -{ 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, 2024 }, -{ 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, 2030 }, +{ 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, 1548 }, +{ PROC_LINKS(kill_buffer, 0), false, "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1572 }, +{ PROC_LINKS(save, 0), false, "save", 4, "Saves the current buffer.", 25, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1580 }, +{ 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, 1590 }, +{ 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, 1815 }, +{ 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, 1828 }, +{ 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, 1842 }, +{ 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, 1913 }, +{ 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, 2014 }, +{ 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, 2020 }, { 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, 97 }, { 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, 108 }, @@ -448,6 +449,7 @@ static Command_Metadata fcoder_metacmd_table[214] = { { 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(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(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, 779 }, +{ PROC_LINKS(tutorial_default_4coder, 0), false, "tutorial_default_4coder", 23, "Tutorial for built in 4coder bindings and features.", 51, "w:\\4ed\\code\\custom\\4coder_tutorial.cpp", 38, 46 }, { 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, 22 }, }; @@ -560,7 +562,7 @@ static i32 fcoder_metacmd_ID_delete_line = 105; static i32 fcoder_metacmd_ID_open_file_in_quotes = 106; static i32 fcoder_metacmd_ID_open_matching_file_cpp = 107; static i32 fcoder_metacmd_ID_view_buffer_other_panel = 108; -static i32 fcoder_metacmd_ID_swap_buffers_between_panels = 109; +static i32 fcoder_metacmd_ID_swap_panels = 109; static i32 fcoder_metacmd_ID_kill_buffer = 110; static i32 fcoder_metacmd_ID_save = 111; static i32 fcoder_metacmd_ID_reopen = 112; @@ -663,6 +665,7 @@ static i32 fcoder_metacmd_ID_miblo_decrement_time_stamp = 208; static i32 fcoder_metacmd_ID_miblo_increment_time_stamp_minute = 209; static i32 fcoder_metacmd_ID_miblo_decrement_time_stamp_minute = 210; static i32 fcoder_metacmd_ID_profile_inspect = 211; -static i32 fcoder_metacmd_ID_default_startup = 212; -static i32 fcoder_metacmd_ID_default_try_exit = 213; +static i32 fcoder_metacmd_ID_tutorial_default_4coder = 212; +static i32 fcoder_metacmd_ID_default_startup = 213; +static i32 fcoder_metacmd_ID_default_try_exit = 214; #endif diff --git a/custom/generated/custom_api.cpp b/custom/generated/custom_api.cpp index ccddfbe5..6eaa5205 100644 --- a/custom/generated/custom_api.cpp +++ b/custom/generated/custom_api.cpp @@ -74,6 +74,7 @@ vtable->panel_is_leaf = panel_is_leaf; vtable->panel_split = panel_split; vtable->panel_set_split = panel_set_split; vtable->panel_swap_children = panel_swap_children; +vtable->panel_get_root = panel_get_root; vtable->panel_get_parent = panel_get_parent; vtable->panel_get_child = panel_get_child; vtable->panel_get_max = panel_get_max; @@ -91,6 +92,7 @@ vtable->view_compute_cursor = view_compute_cursor; vtable->view_set_cursor = view_set_cursor; vtable->view_set_buffer_scroll = view_set_buffer_scroll; vtable->view_set_mark = view_set_mark; +vtable->view_quit_ui = view_quit_ui; vtable->view_set_buffer = view_set_buffer; vtable->view_post_fade = view_post_fade; vtable->view_push_context = view_push_context; @@ -255,6 +257,7 @@ panel_is_leaf = vtable->panel_is_leaf; panel_split = vtable->panel_split; panel_set_split = vtable->panel_set_split; panel_swap_children = vtable->panel_swap_children; +panel_get_root = vtable->panel_get_root; panel_get_parent = vtable->panel_get_parent; panel_get_child = vtable->panel_get_child; panel_get_max = vtable->panel_get_max; @@ -272,6 +275,7 @@ view_compute_cursor = vtable->view_compute_cursor; view_set_cursor = vtable->view_set_cursor; view_set_buffer_scroll = vtable->view_set_buffer_scroll; view_set_mark = vtable->view_set_mark; +view_quit_ui = vtable->view_quit_ui; view_set_buffer = vtable->view_set_buffer; view_post_fade = vtable->view_post_fade; view_push_context = vtable->view_push_context; diff --git a/custom/generated/custom_api.h b/custom/generated/custom_api.h index 5889cd65..48265760 100644 --- a/custom/generated/custom_api.h +++ b/custom/generated/custom_api.h @@ -71,7 +71,8 @@ #define custom_panel_is_leaf_sig() b32 custom_panel_is_leaf(Application_Links* app, Panel_ID panel_id) #define custom_panel_split_sig() b32 custom_panel_split(Application_Links* app, Panel_ID panel_id, Dimension split_dim) #define custom_panel_set_split_sig() b32 custom_panel_set_split(Application_Links* app, Panel_ID panel_id, Panel_Split_Kind kind, f32 t) -#define custom_panel_swap_children_sig() b32 custom_panel_swap_children(Application_Links* app, Panel_ID panel_id, Panel_Split_Kind kind, float t) +#define custom_panel_swap_children_sig() b32 custom_panel_swap_children(Application_Links* app, Panel_ID panel_id) +#define custom_panel_get_root_sig() Panel_ID custom_panel_get_root(Application_Links* app) #define custom_panel_get_parent_sig() Panel_ID custom_panel_get_parent(Application_Links* app, Panel_ID panel_id) #define custom_panel_get_child_sig() Panel_ID custom_panel_get_child(Application_Links* app, Panel_ID panel_id, Side which_child) #define custom_panel_get_max_sig() Panel_ID custom_panel_get_max(Application_Links* app, Panel_ID panel_id) @@ -89,6 +90,7 @@ #define custom_view_set_cursor_sig() b32 custom_view_set_cursor(Application_Links* app, View_ID view_id, Buffer_Seek seek) #define custom_view_set_buffer_scroll_sig() b32 custom_view_set_buffer_scroll(Application_Links* app, View_ID view_id, Buffer_Scroll scroll, Set_Buffer_Scroll_Rule rule) #define custom_view_set_mark_sig() b32 custom_view_set_mark(Application_Links* app, View_ID view_id, Buffer_Seek seek) +#define custom_view_quit_ui_sig() b32 custom_view_quit_ui(Application_Links* app, View_ID view_id) #define custom_view_set_buffer_sig() b32 custom_view_set_buffer(Application_Links* app, View_ID view_id, Buffer_ID buffer_id, Set_Buffer_Flag flags) #define custom_view_post_fade_sig() b32 custom_view_post_fade(Application_Links* app, View_ID view_id, f32 seconds, Range_i64 range, FColor color) #define custom_view_push_context_sig() b32 custom_view_push_context(Application_Links* app, View_ID view_id, View_Context* ctx) @@ -248,7 +250,8 @@ typedef b32 custom_panel_is_split_type(Application_Links* app, Panel_ID panel_id typedef b32 custom_panel_is_leaf_type(Application_Links* app, Panel_ID panel_id); typedef b32 custom_panel_split_type(Application_Links* app, Panel_ID panel_id, Dimension split_dim); typedef b32 custom_panel_set_split_type(Application_Links* app, Panel_ID panel_id, Panel_Split_Kind kind, f32 t); -typedef b32 custom_panel_swap_children_type(Application_Links* app, Panel_ID panel_id, Panel_Split_Kind kind, float t); +typedef b32 custom_panel_swap_children_type(Application_Links* app, Panel_ID panel_id); +typedef Panel_ID custom_panel_get_root_type(Application_Links* app); typedef Panel_ID custom_panel_get_parent_type(Application_Links* app, Panel_ID panel_id); typedef Panel_ID custom_panel_get_child_type(Application_Links* app, Panel_ID panel_id, Side which_child); typedef Panel_ID custom_panel_get_max_type(Application_Links* app, Panel_ID panel_id); @@ -266,6 +269,7 @@ typedef Buffer_Cursor custom_view_compute_cursor_type(Application_Links* app, Vi typedef b32 custom_view_set_cursor_type(Application_Links* app, View_ID view_id, Buffer_Seek seek); typedef b32 custom_view_set_buffer_scroll_type(Application_Links* app, View_ID view_id, Buffer_Scroll scroll, Set_Buffer_Scroll_Rule rule); typedef b32 custom_view_set_mark_type(Application_Links* app, View_ID view_id, Buffer_Seek seek); +typedef b32 custom_view_quit_ui_type(Application_Links* app, View_ID view_id); typedef b32 custom_view_set_buffer_type(Application_Links* app, View_ID view_id, Buffer_ID buffer_id, Set_Buffer_Flag flags); typedef b32 custom_view_post_fade_type(Application_Links* app, View_ID view_id, f32 seconds, Range_i64 range, FColor color); typedef b32 custom_view_push_context_type(Application_Links* app, View_ID view_id, View_Context* ctx); @@ -427,6 +431,7 @@ custom_panel_is_leaf_type *panel_is_leaf; custom_panel_split_type *panel_split; custom_panel_set_split_type *panel_set_split; custom_panel_swap_children_type *panel_swap_children; +custom_panel_get_root_type *panel_get_root; custom_panel_get_parent_type *panel_get_parent; custom_panel_get_child_type *panel_get_child; custom_panel_get_max_type *panel_get_max; @@ -444,6 +449,7 @@ custom_view_compute_cursor_type *view_compute_cursor; custom_view_set_cursor_type *view_set_cursor; custom_view_set_buffer_scroll_type *view_set_buffer_scroll; custom_view_set_mark_type *view_set_mark; +custom_view_quit_ui_type *view_quit_ui; custom_view_set_buffer_type *view_set_buffer; custom_view_post_fade_type *view_post_fade; custom_view_push_context_type *view_push_context; @@ -605,7 +611,8 @@ internal b32 panel_is_split(Application_Links* app, Panel_ID panel_id); internal b32 panel_is_leaf(Application_Links* app, Panel_ID panel_id); internal b32 panel_split(Application_Links* app, Panel_ID panel_id, Dimension split_dim); internal b32 panel_set_split(Application_Links* app, Panel_ID panel_id, Panel_Split_Kind kind, f32 t); -internal b32 panel_swap_children(Application_Links* app, Panel_ID panel_id, Panel_Split_Kind kind, float t); +internal b32 panel_swap_children(Application_Links* app, Panel_ID panel_id); +internal Panel_ID panel_get_root(Application_Links* app); internal Panel_ID panel_get_parent(Application_Links* app, Panel_ID panel_id); internal Panel_ID panel_get_child(Application_Links* app, Panel_ID panel_id, Side which_child); internal Panel_ID panel_get_max(Application_Links* app, Panel_ID panel_id); @@ -623,6 +630,7 @@ internal Buffer_Cursor view_compute_cursor(Application_Links* app, View_ID view_ internal b32 view_set_cursor(Application_Links* app, View_ID view_id, Buffer_Seek seek); internal b32 view_set_buffer_scroll(Application_Links* app, View_ID view_id, Buffer_Scroll scroll, Set_Buffer_Scroll_Rule rule); internal b32 view_set_mark(Application_Links* app, View_ID view_id, Buffer_Seek seek); +internal b32 view_quit_ui(Application_Links* app, View_ID view_id); internal b32 view_set_buffer(Application_Links* app, View_ID view_id, Buffer_ID buffer_id, Set_Buffer_Flag flags); internal b32 view_post_fade(Application_Links* app, View_ID view_id, f32 seconds, Range_i64 range, FColor color); internal b32 view_push_context(Application_Links* app, View_ID view_id, View_Context* ctx); @@ -785,6 +793,7 @@ global custom_panel_is_leaf_type *panel_is_leaf = 0; global custom_panel_split_type *panel_split = 0; global custom_panel_set_split_type *panel_set_split = 0; global custom_panel_swap_children_type *panel_swap_children = 0; +global custom_panel_get_root_type *panel_get_root = 0; global custom_panel_get_parent_type *panel_get_parent = 0; global custom_panel_get_child_type *panel_get_child = 0; global custom_panel_get_max_type *panel_get_max = 0; @@ -802,6 +811,7 @@ global custom_view_compute_cursor_type *view_compute_cursor = 0; global custom_view_set_cursor_type *view_set_cursor = 0; global custom_view_set_buffer_scroll_type *view_set_buffer_scroll = 0; global custom_view_set_mark_type *view_set_mark = 0; +global custom_view_quit_ui_type *view_quit_ui = 0; global custom_view_set_buffer_type *view_set_buffer = 0; global custom_view_post_fade_type *view_post_fade = 0; global custom_view_push_context_type *view_push_context = 0; diff --git a/custom/generated/custom_api_master_list.h b/custom/generated/custom_api_master_list.h index 6c4dc3cf..fb6ab146 100644 --- a/custom/generated/custom_api_master_list.h +++ b/custom/generated/custom_api_master_list.h @@ -71,7 +71,8 @@ api(custom) function b32 panel_is_split(Application_Links* app, Panel_ID panel_i api(custom) function b32 panel_is_leaf(Application_Links* app, Panel_ID panel_id); api(custom) function b32 panel_split(Application_Links* app, Panel_ID panel_id, Dimension split_dim); api(custom) function b32 panel_set_split(Application_Links* app, Panel_ID panel_id, Panel_Split_Kind kind, f32 t); -api(custom) function b32 panel_swap_children(Application_Links* app, Panel_ID panel_id, Panel_Split_Kind kind, float t); +api(custom) function b32 panel_swap_children(Application_Links* app, Panel_ID panel_id); +api(custom) function Panel_ID panel_get_root(Application_Links* app); api(custom) function Panel_ID panel_get_parent(Application_Links* app, Panel_ID panel_id); api(custom) function Panel_ID panel_get_child(Application_Links* app, Panel_ID panel_id, Side which_child); api(custom) function Panel_ID panel_get_max(Application_Links* app, Panel_ID panel_id); @@ -89,6 +90,7 @@ api(custom) function Buffer_Cursor view_compute_cursor(Application_Links* app, V api(custom) function b32 view_set_cursor(Application_Links* app, View_ID view_id, Buffer_Seek seek); api(custom) function b32 view_set_buffer_scroll(Application_Links* app, View_ID view_id, Buffer_Scroll scroll, Set_Buffer_Scroll_Rule rule); api(custom) function b32 view_set_mark(Application_Links* app, View_ID view_id, Buffer_Seek seek); +api(custom) function b32 view_quit_ui(Application_Links* app, View_ID view_id); api(custom) function b32 view_set_buffer(Application_Links* app, View_ID view_id, Buffer_ID buffer_id, Set_Buffer_Flag flags); api(custom) function b32 view_post_fade(Application_Links* app, View_ID view_id, f32 seconds, Range_i64 range, FColor color); api(custom) function b32 view_push_context(Application_Links* app, View_ID view_id, View_Context* ctx); diff --git a/custom/generated/remapping.h b/custom/generated/remapping.h index 893804a4..97d3095a 100644 --- a/custom/generated/remapping.h +++ b/custom/generated/remapping.h @@ -113,7 +113,7 @@ setup_default_mapping(Mapping *mapping){ Bind(redo, KeyCode_Y, KeyCode_Control); Bind(undo, KeyCode_Z, KeyCode_Control); Bind(view_buffer_other_panel, KeyCode_1, KeyCode_Control); - Bind(swap_buffers_between_panels, KeyCode_2, KeyCode_Control); + Bind(swap_panels, KeyCode_2, KeyCode_Control); Bind(if_read_only_goto_position, KeyCode_Return); Bind(if_read_only_goto_position_same_panel, KeyCode_Return, KeyCode_Shift); Bind(view_jump_list_with_lister, KeyCode_Period, KeyCode_Control, KeyCode_Shift);