Module ida_kernwin :: Class simplecustviewer_t
[frames] | no frames]

Class simplecustviewer_t

object --+
         |
        simplecustviewer_t

The base class for implementing simple custom viewers

Nested Classes
  UI_Hooks_Trampoline
Instance Methods
 
AddLine(self, line, fgcolor=None, bgcolor=None)
Adds a colored line to the view
 
ClearLines(self)
Clears all the lines
 
Close(self)
Destroys the view.
 
Count(self)
Returns the number of lines in the view
 
Create(self, title)
Creates the custom view.
 
DelLine(self, lineno)
Deletes an existing line
 
EditLine(self, lineno, line, fgcolor=None, bgcolor=None)
Edits an existing line.
 
GetCurrentLine(self, mouse=0, notags=0)
Returns the current line.
 
GetCurrentWord(self, mouse=0)
Returns the current word
 
GetLine(self, lineno)
Returns a line
 
GetLineNo(self, mouse=0)
Calls GetPos() and returns the current line number or -1 on failure
 
GetPos(self, mouse=0)
Returns the current cursor or mouse position.
 
GetSelection(self)
Returns the selected range or None
 
GetWidget(self)
Return the TWidget underlying this view.
 
InsertLine(self, lineno, line, fgcolor=None, bgcolor=None)
Inserts a line in the given position
 
IsFocused(self)
Returns True if the current view is the focused view
 
Jump(self, lineno, x=0, y=0)
 
OnPopup(self, form, popup_handle)
Context menu popup is about to be shown.
 
PatchLine(self, lineno, offs, value)
Patches an existing line character at the given offset.
 
Refresh(self)
 
RefreshCurrent(self)
Refreshes the current line only
 
Show(self)
Shows an already created view.
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature

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

Properties

Inherited from object: __class__

Method Details

AddLine(self, line, fgcolor=None, bgcolor=None)

 

Adds a colored line to the view

Returns:
Boolean

Close(self)

 

Destroys the view. One has to call Create() afterwards. Show() can be called and it will call Create() internally.

Returns:
Boolean

Create(self, title)

 

Creates the custom view. This should be the first method called after instantiation

Parameters:
  • title - The title of the view
Returns:
Boolean whether it succeeds or fails. It may fail if a window with the same title is already open. In this case better close existing windows

DelLine(self, lineno)

 

Deletes an existing line

Returns:
Boolean

EditLine(self, lineno, line, fgcolor=None, bgcolor=None)

 

Edits an existing line.

Returns:
Boolean

GetCurrentLine(self, mouse=0, notags=0)

 

Returns the current line.

Parameters:
  • mouse - Current line at mouse pos
  • notags - If True then tag_remove() will be called before returning the line
Returns:
Returns the current line (colored or uncolored) or None on failure

GetCurrentWord(self, mouse=0)

 

Returns the current word

Parameters:
  • mouse - Use mouse position or cursor position
Returns:
None if failed or a String containing the current word at mouse or cursor

GetLine(self, lineno)

 

Returns a line

Parameters:
  • lineno - The line number
Returns:
Returns a tuple (colored_line, fgcolor, bgcolor) or None

GetPos(self, mouse=0)

 

Returns the current cursor or mouse position.

Parameters:
  • mouse - return mouse position
Returns:
Returns a tuple (lineno, x, y)

GetSelection(self)

 

Returns the selected range or None

Returns:
  • tuple(x1, y1, x2, y2)
  • None if no selection

GetWidget(self)

 

Return the TWidget underlying this view.

Returns:
The TWidget underlying this view, or None.

InsertLine(self, lineno, line, fgcolor=None, bgcolor=None)

 

Inserts a line in the given position

Returns:
Boolean

OnPopup(self, form, popup_handle)

 

Context menu popup is about to be shown. Create items dynamically if you wish

Returns:
Boolean. True if you handled the event

PatchLine(self, lineno, offs, value)

 

Patches an existing line character at the given offset. This is a low level function. You must know what you're doing

Show(self)

 

Shows an already created view. It the view was close, then it will call Create() for you

Returns:
Boolean

__init__(self)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)