summaryrefslogtreecommitdiff
path: root/binaryninjaapi.h
diff options
context:
space:
mode:
authorkat <kat@vector35.com>2023-03-16 14:26:49 -0400
committerGlenn Smith <glenn@vector35.com>2023-11-01 18:31:16 -0400
commit4b6fb132a97a7852e69a746e2e259bf423b14969 (patch)
tree307170791865c804a41a7592a1631069093cbc8e /binaryninjaapi.h
parent59f28bc770f664917dbd01a5e08c716e58f0db70 (diff)
Add interaction.get_large_choice_input for large numbers of options
Diffstat (limited to 'binaryninjaapi.h')
-rw-r--r--binaryninjaapi.h17
1 files changed, 15 insertions, 2 deletions
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<std::string>& choices);
+ size_t& idx, const std::string& prompt, const std::string& title, const std::vector<std::string>& 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<std::string>& 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<BinaryView> view, uint64_t currentAddr);
virtual bool GetChoiceInput(size_t& idx, const std::string& prompt, const std::string& title,
- const std::vector<std::string>& choices) = 0;
+ const std::vector<std::string>& choices) = 0;
+ virtual bool GetLargeChoiceInput(size_t& idx, const std::string& prompt, const std::string& title,
+ const std::vector<std::string>& 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 = "");