Public Attributes | Public Member Functions | Public Types | Protected Attributes | Protected Member Functions | Friends | List of all members
chooser_base_t Struct Referenceabstract

Detailed Description

Chooser object.

Inherited by chooser_multi_t, and chooser_t.

Public Attributes

int x0
 screen position, Functions: generic list choosers
int y0
int x1
int y1
int width
 (in chars)
int height
 (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
int icon
 default icon
qstring popup_names [NSTDPOPUPS]
 array of custom popup menu names. More...
int deflt_col
 Column that will have focus.

Public Member Functions

 chooser_base_t (uint32 flags_=0, int columns_=0, const int *widths_=NULL, const char *const *header_=NULL, const char *title_=NULL)
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 i) const
 is a popup action allowed?
bool is_modal () const
 is choose modal?
bool is_multi () const
 is multi-selection allowed?
bool ask_item_attrs () const
 should chooser generate ui_get_chooser_item_attrs events?
bool is_noidb () const
 can use the chooser before opening the database?
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)
 enabled 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
virtual bool idaapi init ()
 initialize the chooser and populate it. More...
void idaapi get_header (qstrvec_t *cols) const
 get the header line of the chooser More...
virtual size_t idaapi get_count () const =0
 get the number of elements in the chooser
virtual void idaapi get_row (qstrvec_t *cols, int *icon_, chooser_item_attrs_t *attrs, size_t n) const =0
 get a description of an element. More...
virtual ea_t idaapi get_ea (size_t) const
 get an address of an element. More...
virtual void idaapi closed ()
 The chooser window is closed.

Public Types

enum  {
 return value of ins(), del(), edit(), enter(), refresh() callbacks

Protected Attributes

uint32 version
 version of the class
uint32 flags
 Generic chooser flags

Protected Member Functions

void init_popup_names (const char *const default_popup_names[NSTDPOPUPS])


class TChooser

Member Function Documentation

virtual void* chooser_base_t::get_chooser_obj ( )

get pointer to some custom data.

These data are also called "the underlying object". Now this method is used only in the ActionsInspector class and ida_kernwin.Choose IDAPython's class.
virtual const void* chooser_base_t::get_obj_id ( size_t *  len) const

get the id of the chooser data.

The choosers are the same if they have the same data ids.

[out]lenlength of the id. If it is 0 then it is considered that the method returned an unique id.
address of the id or NULL in the case len == 0
virtual bool idaapi chooser_base_t::init ( void  )

initialize the chooser and populate it.

Return values
falsethe chooser is empty, do not display it
void idaapi chooser_base_t::get_header ( qstrvec_t cols) const

get the header line of the chooser

[out]colsvector of strings.
will receive the contents of each column
virtual void idaapi chooser_base_t::get_row ( qstrvec_t cols,
int *  icon_,
chooser_item_attrs_t attrs,
size_t  n 
) const
pure virtual

get a description of an element.

[out]colsvector of strings.
will receive the contents of each column
[out]iconelement's icon id, -1 - no icon
[out]attrselement attributes
nelement number (0..get_count()-1)
virtual ea_t idaapi chooser_base_t::get_ea ( size_t  ) const

get an address of an element.

Used to set breakpoint in any chooser which implements this callback.

nelement number (0-based)
the effective address, BADADDR if the element has no address

Member Data Documentation

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

qstring chooser_base_t::popup_names[NSTDPOPUPS]

array of custom popup menu names.

Used to replace labels for the standard handlers (Insert, Delete, Edit, Refresh).
An empty name means that the default name will be used.

Availability of items in the popup menu is determined by the `CH_CAN_...` flags.

The documentation for this struct was generated from the following file: