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
 
Activate(self)
Activates a visible chooser
 
AddCommand(self, caption, flags=4, menu_index=-1, icon=-1, emb=None)
Adds a new chooser command Save the returned value and later use it in the OnCommand handler
 
Close(self)
Closes the chooser
 
Embedded(self)
Creates an embedded chooser (as opposed to Show())
 
GetEmbSelection(self)
Returns the selection associated with an embedded chooser
 
Refresh(self)
Causes the refresh callback to trigger
 
Show(self, modal=False)
Activates or creates a chooser window
 
__init__(self, title, cols, flags=0, popup_names=None, icon=-1, x1=-1, y1=-1, x2=-1, y2=-1, deflt=-1, embedded=False, width=None, height=None)
Constructs a chooser window.

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

Class Variables
  CHCOL_DEC = 196608
  CHCOL_FORMAT = 458752
  CHCOL_HEX = 131072
  CHCOL_PATH = 65536
  CHCOL_PLAIN = 0
  CH_ATTRS = 16
  CH_BUILTIN_MASK = 16252928
  CH_MODAL = 1
  CH_MULTI = 2
  CH_MULTI_EDIT = 4
  CH_NOBTNS = 8
  CH_NOIDB = 32
Properties

Inherited from object: __class__

Method Details

AddCommand(self, caption, flags=4, menu_index=-1, icon=-1, emb=None)

 

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

Embedded(self)

 

Creates an embedded chooser (as opposed to Show())

Returns:
Returns 1 on success

GetEmbSelection(self)

 

Returns the selection associated with an embedded chooser

Returns:
  • None if chooser is not embedded
  • A list with selection indices (0-based)

Show(self, modal=False)

 

Activates or creates a chooser window

Parameters:
  • modal - Display as modal dialog
Returns:
For modal choosers it will return the selected item index (0-based)

__init__(self, title, cols, flags=0, popup_names=None, icon=-1, x1=-1, y1=-1, x2=-1, y2=-1, deflt=-1, embedded=False, width=None, height=None)
(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 | Choose2.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 or an index to a custom loaded icon)
  • x1, y1, x2, y2 - The default location
  • embedded - Create as embedded chooser
  • width - Embedded chooser width
  • height - Embedded chooser height
Overrides: object.__init__

[an error occurred while processing this directive]