IDAPython 9.0
Loading...
Searching...
No Matches
simplecustviewer_t Class Reference
Inheritance diagram for simplecustviewer_t:

Classes

class  UI_Hooks_Trampoline
 

Public Member Functions

 __init__ (self)
 
 OnPopup (self, form, popup_handle)
 
 Create (self, title)
 
 Close (self)
 
 Show (self)
 
 Refresh (self)
 
 RefreshCurrent (self)
 
 Count (self)
 
 GetSelection (self)
 
 ClearLines (self)
 
 AddLine (self, line, fgcolor=None, bgcolor=None)
 
 InsertLine (self, lineno, line, fgcolor=None, bgcolor=None)
 
 EditLine (self, lineno, line, fgcolor=None, bgcolor=None)
 
 PatchLine (self, lineno, offs, value)
 
 DelLine (self, lineno)
 
 GetLine (self, lineno)
 
 GetCurrentWord (self, mouse=0)
 
 GetCurrentLine (self, mouse=0, notags=0)
 
 GetPos (self, mouse=0)
 
 GetLineNo (self, mouse=0)
 
 Jump (self, lineno, x=0, y=0)
 
 IsFocused (self)
 
 GetWidget (self)
 

Public Attributes

 ui_hooks_trampoline = self.UI_Hooks_Trampoline(self)
 
 title = title
 

Detailed Description

The base class for implementing simple custom viewers

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self)

Member Function Documentation

◆ AddLine()

AddLine ( self,
line,
fgcolor = None,
bgcolor = None )
Adds a colored line to the view
@return: Boolean

◆ ClearLines()

ClearLines ( self)
Clears all the lines

◆ Close()

Close ( self)
Destroys the view.
One has to call Create() afterwards.
Show() can be called and it will call Create() internally.
@return: Boolean

◆ Count()

Count ( self)
Returns the number of lines in the view

◆ Create()

Create ( self,
title )
Creates the custom view. This should be the first method called after instantiation

@param title: The title of the view
@return: 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()

DelLine ( self,
lineno )
Deletes an existing line
@return: Boolean

◆ EditLine()

EditLine ( self,
lineno,
line,
fgcolor = None,
bgcolor = None )
Edits an existing line.
@return: Boolean

◆ GetCurrentLine()

GetCurrentLine ( self,
mouse = 0,
notags = 0 )
Returns the current line.
@param mouse: Current line at mouse pos
@param notags: If True then tag_remove() will be called before returning the line
@return: Returns the current line (colored or uncolored) or None on failure

◆ GetCurrentWord()

GetCurrentWord ( self,
mouse = 0 )
Returns the current word
@param mouse: Use mouse position or cursor position
@return: None if failed or a String containing the current word at mouse or cursor

◆ GetLine()

GetLine ( self,
lineno )
Returns a line
@param lineno: The line number
@return:
    Returns a tuple (colored_line, fgcolor, bgcolor) or None

◆ GetLineNo()

GetLineNo ( self,
mouse = 0 )
Calls GetPos() and returns the current line number or -1 on failure

◆ GetPos()

GetPos ( self,
mouse = 0 )
Returns the current cursor or mouse position.
@param mouse: return mouse position
@return: Returns a tuple (lineno, x, y)

◆ GetSelection()

GetSelection ( self)
Returns the selected range or None
@return:
    - tuple(x1, y1, x2, y2)
    - None if no selection

◆ GetWidget()

GetWidget ( self)
Return the TWidget underlying this view.

@return: The TWidget underlying this view, or None.

◆ InsertLine()

InsertLine ( self,
lineno,
line,
fgcolor = None,
bgcolor = None )
Inserts a line in the given position
@return: Boolean

◆ IsFocused()

IsFocused ( self)
Returns True if the current view is the focused view

◆ Jump()

Jump ( self,
lineno,
x = 0,
y = 0 )

◆ OnPopup()

OnPopup ( self,
form,
popup_handle )
Context menu popup is about to be shown. Create items dynamically if you wish
@return: Boolean. True if you handled the event

◆ PatchLine()

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

◆ Refresh()

Refresh ( self)

◆ RefreshCurrent()

RefreshCurrent ( self)
Refreshes the current line only

◆ Show()

Show ( self)
Shows an already created view. It the view was closed, then it will call Create() for you
@return: Boolean

Member Data Documentation

◆ title

title = title

◆ ui_hooks_trampoline

ui_hooks_trampoline = self.UI_Hooks_Trampoline(self)

The documentation for this class was generated from the following file: