| 
    IDA SDK
    
   | 
 
Chooser object. #chooser.
Inherited by chooser_multi_t, and chooser_t.
Public Attributes | |
| int | x0 = -1 | 
| screen position, Functions: generic list choosers  | |
| int | y0 = -1 | 
| int | x1 = -1 | 
| int | y1 = -1 | 
| int | width = 0 | 
| (in chars)  | |
| int | height = 0 | 
| (in chars)  | |
| const char * | title | 
| menu title (includes ptr to help).  More... | |
| int | columns | 
| number of columns  | |
| const int * | widths | 
| column widths  More... | |
| const char *const * | header | 
| header line; contains the tooltips, and column name for each of 'columns' columns.  More... | |
| int | icon = -1 | 
| default icon  | |
| qstring | popup_names [NSTDPOPUPS] | 
| array of custom labels of the standard actions.  More... | |
| int | deflt_col = 0 | 
| Column that will have focus.  | |
Static Public Attributes | |
| static constexpr ssize_t | NO_SELECTION = -1 | 
| there is no selected item  | |
| static constexpr ssize_t | EMPTY_CHOOSER = -2 | 
| the chooser has no data and cannot be displayed  | |
| static constexpr ssize_t | ALREADY_EXISTS = -3 | 
| the non-modal chooser with the same data is already open  | |
| static constexpr ssize_t | NO_ATTR = -4 | 
| reserved for IDAPython  | |
Public Member Functions | |
| chooser_base_t (uint32 flags_=0, int columns_=0, const int *widths_=nullptr, const char *const *header_=nullptr, const char *title_=nullptr, uint16 flags2_=0) | |
| void | call_destructor () | 
| virtual void * | get_chooser_obj () | 
| get pointer to some custom data.  More... | |
| virtual const void * | get_obj_id (size_t *len) const | 
| get the id of the chooser data.  More... | |
| bool | is_same (const chooser_base_t *other) const | 
| do the current and the given objects hold the same data?  | |
| bool | can_ins () const | 
| is an operation allowed?  | |
| bool | can_del () const | 
| bool | can_edit () const | 
| bool | can_refresh () const | 
| bool | popup_allowed (int stdact_idx) const | 
| is a standard action allowed?  | |
| bool | is_status_bar_hidden () const | 
| bool | should_restore_geometry () const | 
| bool | is_modal () const | 
| is choose modal?  | |
| bool | has_widget_lifecycle () const | 
| should chooser object be deleted when the widget gets destroyed?  | |
| bool | is_multi () const | 
| is multi-selection allowed?  | |
| bool | ask_item_attrs () const | 
| should chooser generate ui_get_chooser_item_attrs events?  | |
| bool | is_force_default () const | 
| should selection of the already opened non-modal chooser be changed?  | |
| uint | get_builtin_number () const | 
| get number of the built-in chooser  | |
| void | set_ask_item_attrs (bool enable) | 
| enable or disable generation of ui_get_chooser_item_attrs events  | |
| void | check_version (uint32 ver) const | 
| bool | is_quick_filter_visible_initially () const | 
| int | get_quick_filter_initial_mode () const | 
| bool | has_dirtree () const | 
| bool | has_diff_capability () const | 
| bool | can_sort () const | 
| bool | can_filter () const | 
| bool | should_rename_trigger_edit () const | 
| bool | is_dirtree_persisted () const | 
| bool | is_lazy_loaded () const | 
| bool | has_inode_to_index () const | 
| virtual bool idaapi | init () | 
| initialize the chooser and populate it.  More... | |
| virtual size_t idaapi | get_count () const =0 | 
| get the number of elements in the chooser  | |
| virtual void idaapi | get_row (qstrvec_t *out, int *out_icon, chooser_item_attrs_t *out_attrs, size_t n) const =0 | 
| get a description of an element.  More... | |
| virtual ea_t idaapi | get_ea (size_t) const | 
| get the address of an element.  More... | |
| virtual void idaapi | closed () | 
| The chooser window is closed.  | |
Public Types | |
| enum | {  POPUP_INS , POPUP_DEL , POPUP_EDIT , POPUP_REFRESH , NSTDPOPUPS }  | 
| enum | cbres_t { NOTHING_CHANGED , ALL_CHANGED , SELECTION_CHANGED } | 
| return value of ins(), del(), edit(), enter(), refresh() callbacks  More... | |
Protected Attributes | |
| uint8 | version = 3 | 
| version of the class  | |
| uint8 | reserved = 0 | 
| uint16 | flags2 | 
| Extended chooser flags  | |
| uint32 | flags | 
| Generic chooser flags  | |
Protected Member Functions | |
| void | init_popup_names (const char *const default_popup_names[NSTDPOPUPS]) | 
return value of ins(), del(), edit(), enter(), refresh() callbacks
If the chooser implements get_dirtree(), and has ins() and/or del() capabilities, the meaning of the returned index(es) combined with ALL_CHANGED and SELECTION_CHANGED must be as follows:
      
  | 
  inlinevirtual | 
get pointer to some custom data.
      
  | 
  inlinevirtual | 
get the id of the chooser data.
The choosers are the same if they have the same data ids.
| [out] | len | length of the id. If it is 0 then it is considered that the method returned an unique id. | 
      
  | 
  inlinevirtual | 
initialize the chooser and populate it.
| false | the chooser is empty, do not display it | 
      
  | 
  pure virtual | 
get a description of an element.
| [out] | out | vector of strings.  will receive the contents of each column  | 
| [out] | out_icon | element's icon id, -1 - no icon | 
| [out] | out_attrs | element attributes | 
| n | element number (0..get_count()-1) | 
      
  | 
  inlinevirtual | 
get the address of an element.
When this function returns valid addresses: * If any column has the `CHCOL_FNAME` flag, rows will be colored according to the attributes of the functions who own those addresses (extern, library function, Lumina, ... - similar to what the "Functions" widget does) * When a selection is present and the user presses `<Enter>` (`<Shift+Enter>` if the chooser is modal), IDA will jump to that address (through jumpto())
| n | element number (0-based) | 
| const char* chooser_base_t::title | 
menu title (includes ptr to help).
May have chooser title prefixes (see "Chooser title" above).
| const int* chooser_base_t::widths | 
column widths
| const char* const* chooser_base_t::header | 
header line; contains the tooltips, and column name for each of 'columns' columns.
When tooltips need to be provided, the syntax should be: "#tooltip#column-name". (Otherwise, the syntax is simply "column-name".)
| qstring chooser_base_t::popup_names[NSTDPOPUPS] | 
array of custom labels of the standard actions.
Used to replace labels for these actions. 
An empty name means that the default name will be used.