Module idaapi :: Class Choose2
[frames] | no frames]

Class Choose2

object --+
         |
        Choose2

Choose2 wrapper class.

Some constants are defined in this class. Please refer to kernwin.hpp for more information.

Instance Methods
 
__init__(self, title, cols, flags=0, popup_names=None, icon=-1, x1=-1, y1=-1, x2=-1, y2=-1, deflt=-1)
Constructs a chooser window.
 
Show(self, modal=False)
Activates or creates a chooser window
 
Activate(self)
Activates a visible chooser
 
Refresh(self)
Causes the refresh callback to trigger
 
Close(self)
Closes the chooser
 
AddCommand(self, caption, flags=_idaapi.CHOOSER_POPUP_MENU, menu_index=-1, icon=-1)
Adds a new chooser command Save the returned value and later use it in the OnCommand handler

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables
  CH_MODAL = 0x01
  CH_MULTI = 0x02
  CH_MULTI_EDIT = 0x04
  CH_NOBTNS = 0x08
  CH_ATTRS = 0x10
  CH_BUILTIN_MASK = 0xF80000
  CHCOL_PLAIN = 0x00000000
  CHCOL_PATH = 0x00010000
  CHCOL_HEX = 0x00020000
  CHCOL_DEC = 0x00030000
  CHCOL_FORMAT = 0x00070000
Properties

Inherited from object: __class__

Method Details

__init__(self, title, cols, flags=0, popup_names=None, icon=-1, x1=-1, y1=-1, x2=-1, y2=-1, deflt=-1)
(Constructor)

 

Constructs a chooser window.

Parameters:
  • title - The chooser title
  • cols - a list of colums; each list item is a list of two items example: [ ["Address", 10 | Choose2.CHCOL_HEX], ["Name", 30 | CHCOL_PLAIN] ]
  • flags - One of CH_XXXX constants
  • deflt - Default starting item
  • popup_names - list of new captions to replace this list ["Insert", "Delete", "Edit", "Refresh"]
  • icon - Icon index (the icon should exist in ida resources)
  • x1, y1, x2, y2 - The default location
Overrides: object.__init__

AddCommand(self, caption, flags=_idaapi.CHOOSER_POPUP_MENU, menu_index=-1, icon=-1)

 

Adds a new chooser command Save the returned value and later use it in the OnCommand handler

Returns:
Returns a negative value on failure or the command index