Package hsh :: Package curses_display :: Module job_view :: Class JobView
[hide private]
[frames] | no frames]

Class JobView

          object --+        
                   |        
           view.View --+    
                       |    
content_view.ContentView --+
                           |
              object --+   |
                       |   |
        jobs.JobListener --+
                           |
                          JobView

Instance Methods [hide private]
 
__init__(self, display, job)
Initialize the new ContentView.
boolean
draw(self, *args, **kwargs)
Draw this view on the provided curses window.
 
draw_cursor(self, win)
Default implementation does not draw a cursor.
 
header_info(self)
Return a dict containing details to include in the header.
 
draw_raw(self, text, channel)
 
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.
 
current_job(self)
Return the current job associated with this view, or None if there is nothing appropriate.
 
has_terminal(self)
 
wants_terminal(self)
Return 0 if the job doesn't want special access to the terminal, 1 if it wants to write curses controls on the terminal, and 2 if it wants exclusive access to input also.
 
set_has_terminal(self, newval)
 
on_job_output(self, job)
 
on_job_terminate(self, job)
 
on_job_raw_output(self, job, text, channel)
 
restart(self)
Restart this job.
 
_align_inbuff(self)
 
cycle_input(self, ki)
Cycle through the various input options.
 
close_input(self, ki)
Close standard input on the process.
 
toggle_tail(self, ki)
 
insert(self, ki)
 
input_line(self, ki)
 
delete_left(self, ki)
 
delete_job(self, ki)
 
next_job(self, ki)
 
prev_job(self, ki)
 
restart_job(self, ki)
 
edit_job(self, ki)

Inherited from content_view.ContentView: delete_line, delete_right, insert_text, is_dirty, move_bottom, move_down, move_end, move_left, move_right, move_search, move_start, move_top, move_up, page_down, page_up, paste, toggle_wrap

Inherited from view.View: change_view, draw_header, draw_line, get_face, get_name, min_height, min_width, next_window, putch, quit, set_dirty, set_visible_job, show_search

Inherited from view.View (private): _content_win

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, display, job)
(Constructor)

 

Initialize the new ContentView.

Parameters:
  • display - Where it will be drawn
  • text - What to draw
  • name - Optional unique name, defaulting to class name.
Overrides: object.__init__
(inherited documentation)

draw(self, *args, **kwargs)

 

Draw this view on the provided curses window. If force_redraw is True, then do a full redraw, otherwise just an update is enough.

Parameters:
  • force_redraw - If true the view object shouldn't try to optimize.
  • search - a regular expression object whose matches should be highlighted.
Returns: boolean
True means something was drawn or the cursor position has changed. This result is used by the main drawing loop to decide whether to draw the cursor, or take a nap.
Overrides: view.View.draw
(inherited documentation)

draw_cursor(self, win)

 

Default implementation does not draw a cursor.

Overrides: view.View.draw_cursor
(inherited documentation)

header_info(self)

 

Return a dict containing details to include in the header.

Overrides: view.View.header_info
(inherited documentation)

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. Return True if the change is accepted, False otherwise.

Overrides: view.View.set_focus
(inherited documentation)

current_job(self)

 

Return the current job associated with this view, or None if there is nothing appropriate.

Overrides: view.View.current_job
(inherited documentation)

has_terminal(self)

 
Overrides: view.View.has_terminal

wants_terminal(self)

 

Return 0 if the job doesn't want special access to the terminal, 1 if it wants to write curses controls on the terminal, and 2 if it wants exclusive access to input also.

Overrides: view.View.wants_terminal

set_has_terminal(self, newval)

 
Overrides: view.View.set_has_terminal

on_job_output(self, job)

 
Overrides: jobs.JobListener.on_job_output

on_job_terminate(self, job)

 
Overrides: jobs.JobListener.on_job_terminate

on_job_raw_output(self, job, text, channel)

 
Overrides: jobs.JobListener.on_job_raw_output

insert(self, ki)

 
Overrides: view.View.insert

delete_left(self, ki)

 
Overrides: view.View.delete_left

delete_job(self, ki)

 
Overrides: view.View.delete_job

next_job(self, ki)

 
Overrides: view.View.next_job

prev_job(self, ki)

 
Overrides: view.View.prev_job

restart_job(self, ki)

 
Overrides: view.View.restart_job

edit_job(self, ki)

 
Overrides: view.View.edit_job