| 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

## ◆ 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

  ch | pointer to the chooser object
  def_item | pointer 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_SELECTION | the user refused to choose anything (pressed Esc).
  chooser_base_t::EMPTY_CHOOSER | the chooser was not created because the init() callback returned 'false' For non-modal choosers:
  0 | the chooser was created successfully
  chooser_base_t::ALREADY_EXISTS | did 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_CHOOSER | the 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

  deflt | default 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

  deflt | default selection (may be empty) see the choose() function below