Back to index

python3.2  3.2.2
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
pynche.StripViewer.LeftArrow Class Reference
Inheritance diagram for pynche.StripViewer.LeftArrow:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def move_to
def set_text

Private Member Functions

def _create
def _x

Private Attributes

 _canvas
 __text

Static Private Attributes

int _ARROWWIDTH = 30
int _ARROWHEIGHT = 15
int _YOFFSET = 13
int _TEXTYOFFSET = 1
tuple _TAG = ('leftarrow',)

Detailed Description

Definition at line 94 of file StripViewer.py.


Constructor & Destructor Documentation

def pynche.StripViewer.LeftArrow.__init__ (   self,
  canvas,
  x 
)

Definition at line 101 of file StripViewer.py.

00101 
00102     def __init__(self, canvas, x):
00103         self._canvas = canvas
00104         self.__arrow, self.__text = self._create(x)
00105         self.move_to(x)

Here is the caller graph for this function:


Member Function Documentation

def pynche.StripViewer.LeftArrow._create (   self,
  x 
) [private]

Reimplemented in pynche.StripViewer.RightArrow.

Definition at line 106 of file StripViewer.py.

00106 
00107     def _create(self, x):
00108         arrow = self._canvas.create_line(
00109             x, self._ARROWHEIGHT + self._YOFFSET,
00110             x, self._YOFFSET,
00111             x + self._ARROWWIDTH, self._YOFFSET,
00112             arrow='first',
00113             width=3.0,
00114             tags=self._TAG)
00115         text = self._canvas.create_text(
00116             x + self._ARROWWIDTH + 13,
00117             self._ARROWHEIGHT - self._TEXTYOFFSET,
00118             tags=self._TAG,
00119             text='128')
00120         return arrow, text

def pynche.StripViewer.LeftArrow._x (   self) [private]

Reimplemented in pynche.StripViewer.RightArrow.

Definition at line 121 of file StripViewer.py.

00121 
00122     def _x(self):
00123         coords = list(self._canvas.coords(self._TAG))
00124         assert coords
00125         return coords[0]

Here is the caller graph for this function:

def pynche.StripViewer.LeftArrow.move_to (   self,
  x 
)

Definition at line 126 of file StripViewer.py.

00126 
00127     def move_to(self, x):
00128         deltax = x - self._x()
00129         self._canvas.move(self._TAG, deltax, 0)

Here is the call graph for this function:

def pynche.StripViewer.LeftArrow.set_text (   self,
  text 
)

Definition at line 130 of file StripViewer.py.

00130 
00131     def set_text(self, text):
00132         self._canvas.itemconfigure(self.__text, text=text)
00133 


Member Data Documentation

Definition at line 103 of file StripViewer.py.

Definition at line 96 of file StripViewer.py.

Definition at line 95 of file StripViewer.py.

Definition at line 102 of file StripViewer.py.

tuple pynche.StripViewer.LeftArrow._TAG = ('leftarrow',) [static, private]

Reimplemented in pynche.StripViewer.RightArrow.

Definition at line 99 of file StripViewer.py.

Definition at line 98 of file StripViewer.py.

Definition at line 97 of file StripViewer.py.


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