An abstract superclass for anything that can be displayed in a simple
curses window and can receive input.
Input keystrokes are bound to functions on the instance using a
keybinding mechanism and configuration file. An instance can be named by
setting the name member variable, which will affect keybinding
assignment.
The default draw() method includes support for drawing a header, and
skipping the draw entirely if it's not needed. The *_dirty() methods
manage skipping the draw. The header is defined by the header_fmt member
and the header_info() method, or just overriding the draw_header()
method.
|
__init__(self,
display,
name=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
|
|
|
putch(self,
ch,
esc=False) |
|
|
|
|
|
|
|
wants_terminal(self)
Return 0 if the terminal is not required, 1 if the terminal is
required with curses still enabled, 2 if curses should be
deinitialized. |
|
|
|
set_has_terminal(self,
newval) |
|
|
|
|
|
|
|
set_focus(self,
has_focus)
Used by display to inform a View that it is getting or losing focus,
as indicated by the boolean has_focus. |
|
|
|
set_visible_job(self,
job)
Called by the display object to inform each view that a new job is
the main visible job. |
|
|
|
header_info(self)
Return a dict containing details to include in the header. |
|
|
|
|
|
set_dirty(self,
newdirty=' all ' )
dirty can be None, "append", "all". |
|
|
|
get_face(self,
facename)
Return the face for the given name specific to this view. |
|
|
|
draw_cursor(self,
win)
Default implementation does not draw a cursor. |
|
|
|
draw_header(self,
win)
Draw the header into the provided window. |
|
|
|
draw_line(self,
line,
yoff,
win) |
|
|
|
_content_win(self,
win)
Given the window for the whole view, derive one for the non-header
portion. |
|
|
boolean
|
draw(self,
win,
force_redraw,
search=None)
This default implementation of draw() is purely illustrative, and
only draws the header. |
|
|
|
current_job(self)
Return the current job associated with this view, or None if there is
nothing appropriate. |
|
|
|
move_search(self,
pattern,
forward=True,
from_end=False)
Given a regular expression object, move the position of the cursor to
its next match. |
|
|
|
|
|
|
|
|
|
|
|
|
|
change_view(self,
ki,
name) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|