begin sketching out stuff for stateful listers being collapsed with immediate-mode autocomplete lister

This commit is contained in:
Ryan Fleury
2025-01-15 17:18:58 -08:00
parent 62894c098a
commit 4ae032efff
6 changed files with 92 additions and 68 deletions
+4 -3
View File
@@ -229,7 +229,7 @@ Rng1U64 rd_reg_slot_range_table[34] =
{OffsetOf(RD_Regs, os_event), OffsetOf(RD_Regs, os_event) + sizeof(OS_Event *)},
};
RD_CmdKindInfo rd_cmd_kind_info_table[214] =
RD_CmdKindInfo rd_cmd_kind_info_table[215] =
{
{0},
{ str8_lit_comp("launch_and_run"), str8_lit_comp("Starts debugging a new instance of a target, then runs."), str8_lit_comp("launch,start,run,target"), str8_lit_comp("Launch and Run"), RD_IconKind_Play, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_Target, CTRL_EntityKind_Null}},
@@ -441,8 +441,9 @@ RD_CmdKindInfo rd_cmd_kind_info_table[214] =
{ str8_lit_comp("pick_file"), str8_lit_comp("Opens the file browser to pick a file."), str8_lit_comp(""), str8_lit_comp("Pick File"), RD_IconKind_FileOutline, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("pick_folder"), str8_lit_comp("Opens the file browser to pick a folder."), str8_lit_comp(""), str8_lit_comp("Pick Folder"), RD_IconKind_FolderOpenFilled, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*1)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("pick_file_or_folder"), str8_lit_comp("Opens the file browser to pick a file or folder."), str8_lit_comp(""), str8_lit_comp("Pick File/Folder"), RD_IconKind_FileOutline, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*1)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("complete_query"), str8_lit_comp("Completes a query."), str8_lit_comp(""), str8_lit_comp("Complete Query"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("cancel_query"), str8_lit_comp("Cancels a query."), str8_lit_comp(""), str8_lit_comp("Cancel Query"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("push_lister"), str8_lit_comp("Pushes a new lister onto the lister stack."), str8_lit_comp(""), str8_lit_comp("Push Lister"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("complete_lister"), str8_lit_comp("Completes a lister, and pops it off the lister stack."), str8_lit_comp(""), str8_lit_comp("Complete Lister"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("cancel_lister"), str8_lit_comp("Cancels a lister, and pops it off the lister stack."), str8_lit_comp(""), str8_lit_comp("Cancel Lister"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("toggle_dev_menu"), str8_lit_comp("Opens and closes the developer menu."), str8_lit_comp(""), str8_lit_comp("Toggle Developer Menu"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
{ str8_lit_comp("log_marker"), str8_lit_comp("Logs a marker in the application log, to denote specific points in time within the log."), str8_lit_comp(""), str8_lit_comp("Log Marker"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil, CTRL_EntityKind_Null}},
};
+3 -2
View File
@@ -298,8 +298,9 @@ RD_CmdKind_Settings,
RD_CmdKind_PickFile,
RD_CmdKind_PickFolder,
RD_CmdKind_PickFileOrFolder,
RD_CmdKind_CompleteQuery,
RD_CmdKind_CancelQuery,
RD_CmdKind_PushLister,
RD_CmdKind_CompleteLister,
RD_CmdKind_CancelLister,
RD_CmdKind_ToggleDevMenu,
RD_CmdKind_LogMarker,
RD_CmdKind_COUNT,
+4 -3
View File
@@ -477,9 +477,10 @@ RD_CmdTable: // | | | |
{PickFolder 0 0 FilePath null Nil Null 0 1 0 0 0 1 FolderOpenFilled "pick_folder" "Pick Folder" "Opens the file browser to pick a folder." "" }
{PickFileOrFolder 0 0 FilePath null Nil Null 1 1 0 0 0 1 FileOutline "pick_file_or_folder" "Pick File/Folder" "Opens the file browser to pick a file or folder." "" }
//- rjf: query completion
{CompleteQuery 0 0 Null null Nil Null 0 0 0 0 0 0 Null "complete_query" "Complete Query" "Completes a query." "" }
{CancelQuery 0 0 Null null Nil Null 0 0 0 0 0 0 Null "cancel_query" "Cancel Query" "Cancels a query." "" }
//- rjf: lister stack
{PushLister 0 0 Null null Nil Null 0 0 0 0 0 0 Null "push_lister" "Push Lister" "Pushes a new lister onto the lister stack." "" }
{CompleteLister 0 0 Null null Nil Null 0 0 0 0 0 0 Null "complete_lister" "Complete Lister" "Completes a lister, and pops it off the lister stack." "" }
{CancelLister 0 0 Null null Nil Null 0 0 0 0 0 0 Null "cancel_lister" "Cancel Lister" "Cancels a lister, and pops it off the lister stack." "" }
//- rjf: developer commands
{ToggleDevMenu 1 1 Null null Nil Null 0 0 0 0 0 0 Null "toggle_dev_menu" "Toggle Developer Menu" "Opens and closes the developer menu." "" }
+28 -15
View File
@@ -3824,7 +3824,7 @@ rd_window_frame(void)
{
if(ui_slot_press(UI_EventActionSlot_Cancel))
{
rd_cmd(RD_CmdKind_CancelQuery);
rd_cmd(RD_CmdKind_CancelLister);
}
if(ui_slot_press(UI_EventActionSlot_Accept))
{
@@ -3832,11 +3832,11 @@ rd_window_frame(void)
RD_RegsScope()
{
//rd_regs_fill_slot_from_string(query->slot, str8(ws->query_input_buffer, ws->query_input_string_size));
rd_cmd(RD_CmdKind_CompleteQuery);
rd_cmd(RD_CmdKind_CompleteLister);
}
scratch_end(scratch);
}
rd_set_lister_query(.flags = 0xffffffff);
rd_set_autocomp_lister_query(.flags = 0xffffffff);
}
////////////////////////////
@@ -4701,13 +4701,13 @@ rd_window_frame(void)
//- rjf: set up autocompletion lister info
if(ui_is_focus_active())
{
rd_set_lister_query(.anchor_key = query_container_box->key,
.anchor_off = v2f32(0, dim_2f32(query_container_box->rect).y - dim_2f32(query_container_box->rect).y*(1-query_view_t)*0.25f - 2.f),
.flags = 0xffffffff,
.input = str8(ws->query_input_buffer, ws->query_input_string_size),
.cursor_off = ws->query_input_cursor.column-1,
.squish = query_squish,
.transparency= query_transparency);
rd_set_autocomp_lister_query(.anchor_key = query_container_box->key,
.anchor_off = v2f32(0, dim_2f32(query_container_box->rect).y - dim_2f32(query_container_box->rect).y*(1-query_view_t)*0.25f - 2.f),
.flags = 0xffffffff,
.input = str8(ws->query_input_buffer, ws->query_input_string_size),
.cursor_off = ws->query_input_cursor.column-1,
.squish = query_squish,
.transparency= query_transparency);
}
//- rjf: build query text input
@@ -4778,7 +4778,7 @@ rd_window_frame(void)
RD_RegsScope()
{
rd_regs_fill_slot_from_string(query->slot, str8(ws->query_input_buffer, ws->query_input_string_size));
rd_cmd(RD_CmdKind_CompleteQuery);
rd_cmd(RD_CmdKind_CompleteLister);
}
scratch_end(scratch);
}
@@ -10098,7 +10098,7 @@ rd_view_rule_lister_params_from_input_cursor(Arena *arena, String8 string, U64 c
}
internal void
rd_set_lister_query_(RD_ListerParams *params)
rd_set_autocomp_lister_query_(RD_ListerParams *params)
{
RD_Cfg *window_cfg = rd_cfg_from_handle(rd_regs()->window);
RD_WindowState *ws = rd_window_state_from_cfg(window_cfg);
@@ -15589,8 +15589,21 @@ X(getting_started)
#endif
}break;
//- rjf: query completion
case RD_CmdKind_CompleteQuery:
//- rjf: lister stack
case RD_CmdKind_PushLister:
{
RD_Cfg *wcfg = rd_cfg_from_handle(rd_regs()->window);
RD_WindowState *ws = rd_window_state_from_cfg(cfg);
if(ws != &rd_nil_window_state)
{
Arena *arena = arena_alloc();
RD_Lister *lister = push_array(arena, RD_Lister, 1);
SLLStackPush(ws->top_lister.next, lister);
lister->arena = arena;
lister->regs = rd_regs_copy(lister->arena, rd_regs());
}
}break;
case RD_CmdKind_CompleteLister:
{
#if 0 // TODO(rjf): @cfg
RD_Window *ws = rd_window_from_handle(rd_regs()->window);
@@ -15636,7 +15649,7 @@ X(getting_started)
}
#endif
}break;
case RD_CmdKind_CancelQuery:
case RD_CmdKind_CancelLister:
{
RD_Cfg *window = rd_cfg_from_handle(rd_regs()->window);
RD_WindowState *ws = rd_window_state_from_cfg(window);
+36 -28
View File
@@ -542,24 +542,26 @@ typedef U32 RD_ListerFlags;
enum
{
//- rjf: lister visual settings
RD_ListerFlag_LineEdit = (1<<0), // determines whether or not the lister has its own line edit, or if the filtering string is sourced by a user
RD_ListerFlag_Descriptions = (1<<1), // determines whether or not the lister items have descriptions (taller & bigger buttons)
RD_ListerFlag_LineEdit = (1<<0), // determines whether or not the lister has its own line edit, or if the filtering string is sourced by a user
RD_ListerFlag_Descriptions = (1<<1), // determines whether or not the lister items have descriptions (taller & bigger buttons)
//- rjf: lister item sources
RD_ListerFlag_Locals = (1<<2),
RD_ListerFlag_Registers = (1<<3),
RD_ListerFlag_ViewRules = (1<<4),
RD_ListerFlag_ViewRuleParams= (1<<5),
RD_ListerFlag_Members = (1<<6),
RD_ListerFlag_Globals = (1<<7),
RD_ListerFlag_ThreadLocals = (1<<8),
RD_ListerFlag_Procedures = (1<<9),
RD_ListerFlag_Types = (1<<10),
RD_ListerFlag_Languages = (1<<11),
RD_ListerFlag_Architectures = (1<<12),
RD_ListerFlag_Tex2DFormats = (1<<13),
RD_ListerFlag_Files = (1<<14),
RD_ListerFlag_Commands = (1<<15),
RD_ListerFlag_Locals = (1<<2),
RD_ListerFlag_Registers = (1<<3),
RD_ListerFlag_ViewRules = (1<<4),
RD_ListerFlag_ViewRuleParams = (1<<5),
RD_ListerFlag_Members = (1<<6),
RD_ListerFlag_Globals = (1<<7),
RD_ListerFlag_ThreadLocals = (1<<8),
RD_ListerFlag_Procedures = (1<<9),
RD_ListerFlag_Types = (1<<10),
RD_ListerFlag_Languages = (1<<11),
RD_ListerFlag_Architectures = (1<<12),
RD_ListerFlag_Tex2DFormats = (1<<13),
RD_ListerFlag_Files = (1<<14),
RD_ListerFlag_Commands = (1<<15),
RD_ListerFlag_Settings = (1<<16),
RD_ListerFlag_SystemProcesses= (1<<17),
};
typedef struct RD_ListerItem RD_ListerItem;
@@ -617,18 +619,23 @@ struct RD_ListerParams
F32 transparency;
};
////////////////////////////////
//~ rjf: Per-Window State
typedef struct RD_QueryMenu RD_QueryMenu;
struct RD_QueryMenu
typedef struct RD_Lister RD_Lister;
struct RD_Lister
{
RD_QueryMenu *next;
RD_Lister *next;
Arena *arena;
RD_Regs *regs;
RD_RegSlot slot;
RD_ListerParams params;
UI_ScrollPt scroll_pt;
U8 input_buffer[1024];
U64 input_string_size;
TxtPt input_cursor;
TxtPt input_mark;
};
////////////////////////////////
//~ rjf: Per-Window State
typedef struct RD_WindowState RD_WindowState;
struct RD_WindowState
{
@@ -662,6 +669,10 @@ struct RD_WindowState
B32 menu_bar_key_held;
B32 menu_bar_focus_press_started;
// rjf: lister stack state
RD_Lister top_lister; // points to chain of stateful listers
U64 autocomp_lister_last_frame_idx;
// rjf: context menu state
Arena *ctx_menu_arena;
RD_Regs *ctx_menu_regs;
@@ -687,9 +698,6 @@ struct RD_WindowState
TxtPt lister_input_cursor;
TxtPt lister_input_mark;
// rjf: query menu stack
RD_QueryMenu *top_query_menu;
// rjf: query view stack
Arena *query_cmd_arena;
String8 query_cmd_name;
@@ -1327,8 +1335,8 @@ internal void rd_lister_item_array_sort__in_place(RD_ListerItemArray *array);
internal String8 rd_lister_query_word_from_input_string_off(String8 input, U64 cursor_off);
internal String8 rd_lister_query_path_from_input_string_off(String8 input, U64 cursor_off);
internal RD_ListerParams rd_view_rule_lister_params_from_input_cursor(Arena *arena, String8 string, U64 cursor_off);
internal void rd_set_lister_query_(RD_ListerParams *params);
#define rd_set_lister_query(...) rd_set_lister_query_(&(RD_ListerParams){.flags = 0, __VA_ARGS__})
internal void rd_set_autocomp_lister_query_(RD_ListerParams *params);
#define rd_set_autocomp_lister_query(...) rd_set_autocomp_lister_query_(&(RD_ListerParams){.flags = 0, __VA_ARGS__})
////////////////////////////////
//~ rjf: Search Strings
+17 -17
View File
@@ -3171,7 +3171,7 @@ rd_watch_view_build(RD_WatchViewState *ewv, RD_WatchViewFlags flags, String8 roo
params.anchor_off = v2f32(0, dim_2f32(sig.box->rect).y);
params.input = input;
params.cursor_off = cell_edit_state->cursor.column-1;
rd_set_lister_query_(&params);
rd_set_autocomp_lister_query_(&params);
}
}
}
@@ -3762,7 +3762,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(commands)
//- rjf: submit best match when hitting enter w/ no selection
if(cv->selected_cmd_hash == 0 && ui_slot_press(UI_EventActionSlot_Accept))
{
rd_cmd(RD_CmdKind_CompleteQuery, .cmd_name = (cmd_array.count > 0 ? cmd_array.v[0].cmd_name : str8_zero()));
rd_cmd(RD_CmdKind_CompleteLister, .cmd_name = (cmd_array.count > 0 ? cmd_array.v[0].cmd_name : str8_zero()));
}
//- rjf: selected kind -> cursor
@@ -3875,7 +3875,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(commands)
UI_Signal sig = ui_signal_from_box(box);
if(ui_clicked(sig))
{
rd_cmd(RD_CmdKind_CompleteQuery, .cmd_name = item->cmd_name);
rd_cmd(RD_CmdKind_CompleteLister, .cmd_name = item->cmd_name);
}
}
}
@@ -4227,7 +4227,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(file_system)
// rjf: command search part is empty, but directory matches some file:
if(path_query_path_props.created != 0 && path_query.search.size == 0)
{
rd_cmd(RD_CmdKind_CompleteQuery, .file_path = query_normalized_with_opt_slash);
rd_cmd(RD_CmdKind_CompleteLister, .file_path = query_normalized_with_opt_slash);
}
// rjf: command argument exactly matches some file:
@@ -4243,14 +4243,14 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(file_system)
// rjf: is a file -> complete view
else
{
rd_cmd(RD_CmdKind_CompleteQuery, .file_path = query_normalized_with_opt_slash);
rd_cmd(RD_CmdKind_CompleteLister, .file_path = query_normalized_with_opt_slash);
}
}
// rjf: command argument is empty, picking folders -> use current folder
else if(path_query.search.size == 0 && dir_selection)
{
rd_cmd(RD_CmdKind_CompleteQuery, .file_path = path_query.path);
rd_cmd(RD_CmdKind_CompleteLister, .file_path = path_query.path);
}
// rjf: command argument does not exactly match any file, but lister results are in:
@@ -4266,14 +4266,14 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(file_system)
else
{
String8 file_path = push_str8f(scratch.arena, "%S%S", path_query.path, filename);
rd_cmd(RD_CmdKind_CompleteQuery, .file_path = file_path);
rd_cmd(RD_CmdKind_CompleteLister, .file_path = file_path);
}
}
// rjf: command argument does not match any file, and lister is empty (new file)
else
{
rd_cmd(RD_CmdKind_CompleteQuery, .file_path = query);
rd_cmd(RD_CmdKind_CompleteLister, .file_path = query);
}
}
@@ -4472,7 +4472,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(file_system)
}
else
{
rd_cmd(RD_CmdKind_CompleteQuery, .file_path = new_path);
rd_cmd(RD_CmdKind_CompleteLister, .file_path = new_path);
}
}
}
@@ -4693,7 +4693,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(system_processes)
if(sp->selected_pid == 0 && process_info_array.count > 0 && ui_slot_press(UI_EventActionSlot_Accept))
{
RD_ProcessInfo *info = &process_info_array.v[0];
rd_cmd(RD_CmdKind_CompleteQuery, .pid = info->info.pid);
rd_cmd(RD_CmdKind_CompleteLister, .pid = info->info.pid);
}
//- rjf: selected PID -> cursor
@@ -4781,7 +4781,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(system_processes)
// rjf: click => activate this specific process
if(ui_clicked(sig))
{
rd_cmd(RD_CmdKind_CompleteQuery, .pid = info->info.pid);
rd_cmd(RD_CmdKind_CompleteLister, .pid = info->info.pid);
}
}
}
@@ -4932,7 +4932,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(entity_lister)
if(rd_entity_is_nil(rd_entity_from_handle(fev->selected_entity_handle)) && ent_arr.count != 0 && ui_slot_press(UI_EventActionSlot_Accept))
{
RD_Entity *ent = ent_arr.v[0].entity;
rd_cmd(RD_CmdKind_CompleteQuery, .entity = rd_handle_from_entity(ent));
rd_cmd(RD_CmdKind_CompleteLister, .entity = rd_handle_from_entity(ent));
}
//- rjf: selected entity -> cursor
@@ -4997,7 +4997,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(entity_lister)
}
if(ui_clicked(ui_signal_from_box(box)))
{
rd_cmd(RD_CmdKind_CompleteQuery, .entity = rd_handle_from_entity(ent));
rd_cmd(RD_CmdKind_CompleteLister, .entity = rd_handle_from_entity(ent));
}
}
}
@@ -5148,7 +5148,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(ctrl_entity_lister)
case CTRL_EntityKind_Thread: {rd_regs()->thread = ent->handle;}break;
case CTRL_EntityKind_Module: {rd_regs()->module = ent->handle;}break;
}
rd_cmd(RD_CmdKind_CompleteQuery, .ctrl_entity = ent->handle);
rd_cmd(RD_CmdKind_CompleteLister, .ctrl_entity = ent->handle);
}
}
@@ -5224,7 +5224,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(ctrl_entity_lister)
case CTRL_EntityKind_Thread: {rd_regs()->thread = ent->handle;}break;
case CTRL_EntityKind_Module: {rd_regs()->module = ent->handle;}break;
}
rd_cmd(RD_CmdKind_CompleteQuery, .ctrl_entity = ent->handle);
rd_cmd(RD_CmdKind_CompleteLister, .ctrl_entity = ent->handle);
}
}
}
@@ -5301,7 +5301,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(symbol_lister)
String8 name = str8(name_base, name_size);
if(name.size != 0)
{
rd_cmd(RD_CmdKind_CompleteQuery, .string = name);
rd_cmd(RD_CmdKind_CompleteLister, .string = name);
}
}
}
@@ -5373,7 +5373,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(symbol_lister)
UI_Signal sig = ui_signal_from_box(box);
if(ui_clicked(sig))
{
rd_cmd(RD_CmdKind_CompleteQuery, .string = name);
rd_cmd(RD_CmdKind_CompleteLister, .string = name);
}
if(ui_hovering(sig)) UI_Tooltip
{