IDAPython 9.0
|
Classes | |
class | UI_Hooks_Trampoline |
Public Member Functions | |
__init__ (self, title, cols, flags=0, popup_names=None, icon=-1, x1=-1, y1=-1, x2=-1, y2=-1, deflt=None, embedded=False, width=None, height=None, forbidden_cb=0, flags2=0) | |
Embedded (self, create_chobj=False) | |
GetEmbSelection (self) | |
Show (self, modal=False) | |
Activate (self) | |
Refresh (self) | |
Close (self) | |
GetWidget (self) | |
adjust_last_item (self, n) | |
AddCommand (self, caption, flags=_ida_kernwin.CHOOSER_POPUP_MENU, menu_index=-1, icon=-1, emb=None, shortcut=None) | |
OnPopup (self, widget, popup_handle) | |
OnInit (self) | |
OnGetSize (self) | |
OnGetLine (self, n) | |
OnGetIcon (self, n) | |
OnGetLineAttr (self, n) | |
OnInsertLine (self, sel) | |
OnDeleteLine (self, sel) | |
OnEditLine (self, sel) | |
OnSelectLine (self, sel) | |
OnSelectionChange (self, sel) | |
OnRefresh (self, sel) | |
OnClose (self) | |
OnGetEA (self, n) | |
OnGetDirTree (self) | |
OnIndexToInode (self, n) | |
OnIndexToDiffpos (self, n) | |
OnLazyLoadDir (self, path) | |
Public Attributes | |
title = title | |
flags = flags | |
flags2 = flags2 | |
cols = cols | |
deflt = deflt | |
popup_names = popup_names | |
icon = icon | |
x1 = x1 | |
y1 = y1 | |
x2 = x2 | |
y2 = y2 | |
embedded = embedded | |
width = width | |
height = height | |
forbidden_cb = forbidden_cb | |
ui_hooks_trampoline = None | |
Static Public Attributes | |
CH_MODAL = _ida_kernwin.CH_MODAL | |
CH_MULTI = _ida_kernwin.CH_MULTI | |
CH_NOBTNS = _ida_kernwin.CH_NOBTNS | |
CH_ATTRS = _ida_kernwin.CH_ATTRS | |
CH_NOIDB = _ida_kernwin.CH_NOIDB | |
CH_FORCE_DEFAULT = _ida_kernwin.CH_FORCE_DEFAULT | |
CH_CAN_INS = _ida_kernwin.CH_CAN_INS | |
CH_CAN_DEL = _ida_kernwin.CH_CAN_DEL | |
CH_CAN_EDIT = _ida_kernwin.CH_CAN_EDIT | |
CH_CAN_REFRESH = _ida_kernwin.CH_CAN_REFRESH | |
CH_QFLT = _ida_kernwin.CH_QFLT | |
CH_QFTYP_SHIFT = _ida_kernwin.CH_QFTYP_SHIFT | |
CH_QFTYP_DEFAULT = _ida_kernwin.CH_QFTYP_DEFAULT | |
CH_QFTYP_NORMAL = _ida_kernwin.CH_QFTYP_NORMAL | |
CH_QFTYP_WHOLE_WORDS = _ida_kernwin.CH_QFTYP_WHOLE_WORDS | |
CH_QFTYP_REGEX = _ida_kernwin.CH_QFTYP_REGEX | |
CH_QFTYP_FUZZY = _ida_kernwin.CH_QFTYP_FUZZY | |
CH_QFTYP_MASK = _ida_kernwin.CH_QFTYP_MASK | |
CH_NO_STATUS_BAR = _ida_kernwin.CH_NO_STATUS_BAR | |
CH_RESTORE = _ida_kernwin.CH_RESTORE | |
CH_RENAME_IS_EDIT = _ida_kernwin.CH_RENAME_IS_EDIT | |
CH_BUILTIN_SHIFT = _ida_kernwin.CH_BUILTIN_SHIFT | |
CH_BUILTIN_MASK = _ida_kernwin.CH_BUILTIN_MASK | |
CH_HAS_DIRTREE = _ida_kernwin.CH_HAS_DIRTREE | |
CH_HAS_DIFF = _ida_kernwin.CH_HAS_DIFF | |
CHCOL_PLAIN = _ida_kernwin.CHCOL_PLAIN | |
CHCOL_PATH = _ida_kernwin.CHCOL_PATH | |
CHCOL_HEX = _ida_kernwin.CHCOL_HEX | |
CHCOL_DEC = _ida_kernwin.CHCOL_DEC | |
CHCOL_EA = _ida_kernwin.CHCOL_EA | |
CHCOL_FNAME = _ida_kernwin.CHCOL_FNAME | |
CHCOL_FORMAT = _ida_kernwin.CHCOL_FORMAT | |
CHCOL_DEFHIDDEN = _ida_kernwin.CHCOL_DEFHIDDEN | |
CHCOL_DRAGHINT = _ida_kernwin.CHCOL_DRAGHINT | |
CHCOL_INODENAME = _ida_kernwin.CHCOL_INODENAME | |
int | NO_SELECTION = -1 |
int | EMPTY_CHOOSER = -2 |
int | ALREADY_EXISTS = -3 |
int | NO_ATTR = -4 |
int | NOTHING_CHANGED = 0 |
int | ALL_CHANGED = 1 |
int | SELECTION_CHANGED = 2 |
Protected Attributes | |
_quick_commands = quick_widget_commands_t(_qccb) | |
Chooser wrapper class. Some constants are defined in this class. Please refer to kernwin.hpp for more information.
__init__ | ( | self, | |
title, | |||
cols, | |||
flags = 0, | |||
popup_names = None, | |||
icon = -1, | |||
x1 = -1, | |||
y1 = -1, | |||
x2 = -1, | |||
y2 = -1, | |||
deflt = None, | |||
embedded = False, | |||
width = None, | |||
height = None, | |||
forbidden_cb = 0, | |||
flags2 = 0 ) |
Constructs a chooser window. @param title: The chooser title @param cols: a list of colums; each list item is a list of two items example: [ ["Address", 10 | Choose.CHCOL_HEX], ["Name", 30 | Choose.CHCOL_PLAIN] ] @param flags: One of CH_XXXX constants @param flags2: One of CH2_XXXX constants @param deflt: The index of the default item (0-based) for single selection choosers or the list of indexes for multi selection chooser @param popup_names: List of new captions to replace this list ["Insert", "Delete", "Edit", "Refresh"] @param icon: Icon index (the icon should exist in ida resources or an index to a custom loaded icon) @param x1, y1, x2, y2: The default location (for txt-version) @param embedded: Create as embedded chooser @param width: Embedded chooser width @param height: Embedded chooser height @param forbidden_cb: Explicitly forbidden callbacks
Activate | ( | self | ) |
Activates a visible chooser
AddCommand | ( | self, | |
caption, | |||
flags = _ida_kernwin.CHOOSER_POPUP_MENU, | |||
menu_index = -1, | |||
icon = -1, | |||
emb = None, | |||
shortcut = None ) |
adjust_last_item | ( | self, | |
n ) |
Helper for OnDeleteLine() and OnRefresh() callbacks. They can be finished by the following line: return [Choose.ALL_CHANGED] + self.adjust_last_item(n) @param: line number of the remaining select item @return: list of selected lines numbers (one element or empty)
Close | ( | self | ) |
Closes the chooser
Embedded | ( | self, | |
create_chobj = False ) |
Creates an embedded chooser (as opposed to Show()) @return: Returns 0 on success or NO_ATTR
GetEmbSelection | ( | self | ) |
Deprecated. For embedded choosers, the selection is available through 'Form.EmbeddedChooserControl.selection'
GetWidget | ( | self | ) |
Return the TWidget underlying this view. @return: The TWidget underlying this view, or None.
OnClose | ( | self | ) |
The chooser window is closed.
OnDeleteLine | ( | self, | |
sel ) |
User deleted an element @param sel the current selection @return a tuple (changed, selection)
OnEditLine | ( | self, | |
sel ) |
User asked to edit an element. @param sel the current selection @return a tuple (changed, selection)
OnGetDirTree | ( | self | ) |
Get the dirtree_t that will be used to present a tree-like structure to the user (see CH_HAS_DIRTREE) @return the dirtree_t, or None
OnGetEA | ( | self, | |
n ) |
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()) @param n element number (0-based) @return the effective address, ida_idaapi.BADADDR if the element has no address
OnGetIcon | ( | self, | |
n ) |
Get an icon to associate with the first cell of an element @param n index of the element @return an icon ID
OnGetLine | ( | self, | |
n ) |
Get data for an element This callback is mandatory @param n the index to fetch data for @return a list of strings
OnGetLineAttr | ( | self, | |
n ) |
Get attributes for an element @param n index of the element @return a tuple (color, flags)
OnGetSize | ( | self | ) |
Get the number of elements in the chooser. This callback is mandatory @return the number of elements
OnIndexToDiffpos | ( | self, | |
n ) |
Map an element index to a diffpos_t This callback is mandatory if CH_HAS_DIFF is specified @param n index of the element @return the diffpos
OnIndexToInode | ( | self, | |
n ) |
Map an element index to a dirtree_t inode This callback is mandatory if CH_HAS_DIRTREE is specified @param n index of the element @return the inode number
OnInit | ( | self | ) |
Initialize the chooser and populate it. This callback is optional
OnInsertLine | ( | self, | |
sel ) |
User asked to insert an element @param sel the current selection @return a tuple (changed, selection)
OnLazyLoadDir | ( | self, | |
path ) |
Callback for lazy-loaded, dirtree-based choosers; the function will be called when a folder is expanded and it has not been loaded before. The implementation should use the given dirtree's link() or mkdir() methods to add the folder contents. @param path an absolute dirtree path to the directory that is being expanded @return success
OnPopup | ( | self, | |
widget, | |||
popup_handle ) |
OnRefresh | ( | self, | |
sel ) |
The chooser needs to be refreshed. It returns the new positions of the selected items. @param sel the current selection @return a tuple (changed, selection)
OnSelectionChange | ( | self, | |
sel ) |
Selection changed @param sel the new selection
OnSelectLine | ( | self, | |
sel ) |
User pressed the enter key, or double-clicked a selection @param sel the current selection @return a tuple (changed, selection)
Refresh | ( | self | ) |
Causes the refresh callback to trigger
Show | ( | self, | |
modal = False ) |
Activates or creates a chooser window @param modal: Display as modal dialog @return: For all choosers it will return NO_ATTR if some mandatory attribute is missing. The mandatory attributes are: flags, title, cols, OnGetSize(), OnGetLine(); For modal choosers it will return the selected item index (0-based), or NO_SELECTION if no selection, or EMPTY_CHOOSER if the OnRefresh() callback returns EMPTY_CHOOSER; For non-modal choosers it will return 0 or ALREADY_EXISTS if the chooser was already open and is active now;
|
protected |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
cols = cols |
deflt = deflt |
embedded = embedded |
|
static |
flags = flags |
flags2 = flags2 |
forbidden_cb = forbidden_cb |
height = height |
icon = icon |
|
static |
|
static |
|
static |
popup_names = popup_names |
|
static |
title = title |
ui_hooks_trampoline = None |
width = width |
x1 = x1 |
x2 = x2 |
y1 = y1 |
y2 = y2 |