Latest available version: IDA and decompilers v8.4.240320sp1 see all releases
Hex-Rays logo State-of-the-art binary code analysis tools
email icon
Functions: generic list choosers

These functions display a window that allows the user to select items. More...

Functions

ssize_t choose (chooser_base_t *ch, const void *def_item)
 Display a generic list chooser (n-column) and allow the user to select an item. More...
 
ssize_t chooser_t::choose (ssize_t deflt=0)
 Display a generic list chooser and allow the user to select an item. More...
 
ssize_t chooser_multi_t::choose (const sizevec_t &deflt=sizevec_t())
 Display a generic list chooser and allow the user to select an item. More...
 

Detailed Description

These functions display a window that allows the user to select items.

Function Documentation

◆ choose() [1/3]

ssize_t choose ( chooser_base_t ch,
const void *  def_item 
)
inline

Display a generic list chooser (n-column) and allow the user to select an item.

Invoke the chooser with a chooser object (ui_choose, chtype_generic).

The closed() callback will be called when the window is closed. In addition, after the window is closed, the chooser instance will be delete()d unless CH_KEEP is specified (useful for global, or stack-allocated chooser instances, that must not be deleted.)

Parameters
chpointer to the chooser object
def_itempointer to some data that identifies the default item For modal choosers:
Returns
the index of the selected item (0-based)
Return values
chooser_base_t::NO_SELECTIONthe user refused to choose anything (pressed Esc).
chooser_base_t::EMPTY_CHOOSERthe chooser was not created because the init() callback returned 'false' For non-modal choosers:
0the chooser was created successfully
chooser_base_t::ALREADY_EXISTSdid not open a new chooser because a chooser with the same object is already open. If CH_FORCE_DEFAULT was set, the cursor of the chooser will be positioned to the new item.
chooser_base_t::EMPTY_CHOOSERthe chooser was not created because CH_FORCE_DEFAULT was set and the init() callback returned 'false'

see the choose() function above

◆ choose() [2/3]

ssize_t chooser_t::choose ( ssize_t  deflt = 0)
inline

Display a generic list chooser and allow the user to select an item.

May be overridden in derived choosers.

Parameters
defltdefault selection or NO_SELECTION see the choose() function below

◆ choose() [3/3]

ssize_t chooser_multi_t::choose ( const sizevec_t deflt = sizevec_t())
inline

Display a generic list chooser and allow the user to select an item.

May be overridden in derived choosers.

Parameters
defltdefault selection (may be empty) see the choose() function below