choose_with_checkboxes
summary: a flat list, with checkboxes
- description:
Shows how to subclass the ida_kernwin.Choose class to show data organized in a simple table, and react to “checked state” events.
keywords: chooser, actions
see_also: choose_multi
level: intermediate
Attributes
Classes
Chooser wrapper class. |
Module Contents
- class choose_with_checkboxes.grocery_list_chooser_t(title, flags=0, modal=False)
Bases:
ida_kernwin.ChooseChooser wrapper class.
Some constants are defined in this class. Please refer to kernwin.hpp for more information.
- n = 0
- items = [['Onions', '6'], ['Waffles', '3']]
- excluded
- modal = False
- OnGetSize()
Get the number of elements in the chooser.
This callback is mandatory
- Returns:
the number of elements
- OnGetLine(n)
Get data for an element
This callback is mandatory
- Parameters:
n – the index to fetch data for
- Returns:
a list of strings
- OnGetLineAttr(n)
Get attributes for an element
- Parameters:
n – index of the element
- Returns:
a tuple (color, flags)
- OnInsertLine(n)
User asked to insert an element
- Parameters:
sel – the current selection
- Returns:
a tuple (changed, selection)
- OnDeleteLine(n)
User deleted an element
- Parameters:
sel – the current selection
- Returns:
a tuple (changed, selection)
- OnCheckedLine(n, state)
User changed the checkbox state
- Parameters:
n – element number (0-based)
state – the new state: 0-unchecked, 1-partially checked, 2-checked
- Returns:
a tuple (changed, selection)
- show()
- choose_with_checkboxes.groceries