Table of Contents

Class: ConnectedBox PmwContribD-r2_0_1/ConnectedBox.py

Subclass of HandledBox which allows connections between handles.

Base Classes   
HandledBox.HandledBox
Methods   
__init__
__str__
add_connection
add_handle
center_of_line
connection_point
dehighlight_handle
highlight_handle
move
  __init__ 
__init__ (
        self,
        canvas,
        connectingCanvas,
        **kw,
        )

  __str__ 
__str__ ( self )

  add_connection 
add_connection ( self,  conn )

Add a new connection.

  add_handle 
add_handle (
        self,
        handle_name=None,
        edge=Tkinter.LEFT,
        helpMessage=None,
        relief=Tkinter.RAISED,
        color='red',
        highlight_color='green',
        )

Add a new handle to the edge of the box.

Arguments

handle_name

The name of the handle.

edge

A side specification. Defaults to Tkinter.LEFT.

helpMessage

Balloon help to be displayed when the mouse pointer is over the handle.

relief

3-D relief specification. Defaults to Tkinter.RAISED.

color

Usual color of the handle target spot.

highlight_color

Color of the handle target spot when the mouse pointer is over it.

  center_of_line 
center_of_line (
        self,
        p1,
        p2,
        )

Return the center point of the line connecting the two points.

Arguments

p1

Point one, tuple with (x,y)

p2

Point two, tuple with (x,y)

  connection_point 
connection_point ( self,  h )

Returns the point on the handle to which Connections should be drawn.

  dehighlight_handle 
dehighlight_handle ( self,  h )

Called when handle should no longer be highlighted.

This method is the opposite of highlight_handle.

  highlight_handle 
highlight_handle ( self,  h )

Called when handle should be highlighted as feedback to the user.

  move 
move (
        self,
        delta_x,
        delta_y,
        )

Move the object on the canvas by the specified x,y offsets.


Table of Contents

This document was automatically generated on Mon Sep 17 17:47:46 2001 by HappyDoc version r2_0