From 4b6fb132a97a7852e69a746e2e259bf423b14969 Mon Sep 17 00:00:00 2001 From: kat Date: Thu, 16 Mar 2023 14:26:49 -0400 Subject: Add interaction.get_large_choice_input for large numbers of options --- binaryninjaapi.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'binaryninjaapi.h') diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 7f7fca60..7a4efee4 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -1517,7 +1517,18 @@ namespace BinaryNinja { \return Whether a choice was successfully picked */ bool GetChoiceInput( - size_t& idx, const std::string& prompt, const std::string& title, const std::vector& choices); + size_t& idx, const std::string& prompt, const std::string& title, const std::vector& choices); + + /*! Prompts the user to select the one of the provided choices out of a large list, with the option to filter choices + + \ingroup interaction + \param[out] idx Reference to the size_t the resulting index selected will be copied to + \param[in] title Title for the input popup / prompt for headless + \param[in] prompt Prompt for the input (shown on the 'Select' button in UI) + \param[in] choices List of string choices for the user to select from + \return Whether a choice was successfully picked + */ + bool GetLargeChoiceInput(size_t& idx, const std::string& title, const std::string& prompt, const std::vector& choices); /*! Prompts the user for a file name to open @@ -14527,7 +14538,9 @@ namespace BinaryNinja { virtual bool GetAddressInput(uint64_t& result, const std::string& prompt, const std::string& title, Ref view, uint64_t currentAddr); virtual bool GetChoiceInput(size_t& idx, const std::string& prompt, const std::string& title, - const std::vector& choices) = 0; + const std::vector& choices) = 0; + virtual bool GetLargeChoiceInput(size_t& idx, const std::string& prompt, const std::string& title, + const std::vector& choices) = 0; virtual bool GetOpenFileNameInput(std::string& result, const std::string& prompt, const std::string& ext = ""); virtual bool GetSaveFileNameInput(std::string& result, const std::string& prompt, const std::string& ext = "", const std::string& defaultName = ""); -- cgit v1.3.1