Logo Search packages:      
Sourcecode: ranger version File versions  Download package

Public Member Functions | Public Attributes | Private Attributes | Static Private Attributes

ranger::gui::displayable::Displayable Class Reference

Inheritance diagram for ranger::gui::displayable::Displayable:
Inheritance graph
[legend]
Collaboration diagram for ranger::gui::displayable::Displayable:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __contains__
def __init__
def __nonzero__
def __str__
def addch
def addnstr
def addstr
def click
def color
def color_at
def color_reset
def contains_point
def destroy
def draw
def finalize
def fm
def poke
def press
def resize
def set_fg_bg_attr
def settings

Public Attributes

 env
 fm
 focused
 hei
 need_redraw
 parent
 paryx
 settings
 visible
 wid
 win
 x
 y

Private Attributes

 _old_visible

Static Private Attributes

 __bool__ = __nonzero__

Detailed Description

Displayables are objects which are displayed on the screen.

This is just the abstract class, defining basic operations
such as resizing, printing, changing colors.
Subclasses of displayable can extend these methods:

draw() -- draw the object. Is only called if visible.
poke() -- is called just before draw(), even if not visible.
finalize() -- called after all objects finished drawing.
click(event) -- called with a MouseEvent. This is called on all
      visible objects under the mouse, until one returns True.
press(key) -- called after a key press on focused objects.
destroy() -- called before destroying the displayable object

Additionally, there are these methods:

__contains__(item) -- is the item (y, x) inside the widget?

These attributes are set:

Modifiable:
      focused -- Focused objects receive press() calls.
      visible -- Visible objects receive draw() and finalize() calls
      need_redraw -- Should the widget be redrawn? This variable may
            be set at various places in the script and should eventually be
            handled (and unset) in the draw() method.

Read-Only: (i.e. reccomended not to change manually)
      win -- the own curses window object
      parent -- the parent (DisplayableContainer) object or None
      x, y, wid, hei -- absolute coordinates and boundaries
      settings, fm, env -- inherited shared variables

Definition at line 21 of file displayable.py.


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

Generated by  Doxygen 1.6.0   Back to index