IDA SDK
Functions
Functions: generic list choosers

Detailed Description

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

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...
 

Function Documentation

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
def_itempointer to some data that indentifies 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 has 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 is set, the cursor of the chooser will be positioned to the new item.

see the choose() function above

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 overriden in derived choosers.

Parameters
defltdefault selection or NO_SELECTION see the choose() function below
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 overriden in derived choosers.

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