Table of Contents

Class: ShadowBox PmwContribD-r2_0_1/ShadowBox.py

A canvas object which draws a box around something.

The box can have edges drawn using the relief methods of standard widgets, such as the Pmw.Group.

Methods   
__clickCB
__init__
__main_outline_coords
__motionCB
add_object
addtag
bbox
bind
compute_object_points
create_canvas_objects
delete
ibbox
lower
move
  __clickCB 
__clickCB ( self,  event )

Click callback.

  __init__ 
__init__ (
        self,
        canvas,
        name=None,
        ulx=0,
        uly=0,
        ipadx=2,
        ipady=2,
        background='grey',
        outline='black',
        allowMotion=0,
        width=25,
        height=20,
        bd=2,
        ridgeWidth=0,
        relief=Tkinter.RAISED,
        helpMessage=None,
        balloon=None,
        )

Create a ShadowBox.

Arguments

allowMotion=0

Boolean indicating whether or not the ShadowBox should allow the user to move it with the mouse.

background=grey

Background color of the box.

balloon=None

Balloon help message manager.

bd=2

Border shadow width.

canvas

Tkinter Canvas widget on which to draw.

height=20

Height of the full ShadowBox on the canvas.

helpMessage=None

Balloon help message for this ShadowBox.

ipadx

Internal space (X) allocated between the box edge and the interior.

ipady

Internal space (Y) allocated between the box edge and the interior.

name

Name of the box. This is used to create the tag of the canvas objects by prefixing it with AnimatedFolder.

outline=black

The color of the outline of the ShadowBox.

relief=Tkinter.RAISED

Tkinter relief definition.

ridgeWidth=0

Width of ridge area when relief set to Tkinter.RIDGE.

ulx

Upper left X coordinate.

uly

Upper left Y coordinate.

width=25

Width of the entire ShadowBox.

  __main_outline_coords 
__main_outline_coords ( self )

Return the coordinates of the main outline.

  __motionCB 
__motionCB ( self,  event )

Motion callback.

  add_object 
add_object ( self,  canvasObject )

Add another canvas object to those monitored by the ShadowBox.

  addtag 
addtag ( self,  tag )

Add a canvas tag to the ShadowBox.

  bbox 
bbox ( self )

Returns the bounding box of the ShadowBox.

  bind 
bind (
        self,
        sequence=None,
        command=None,
        )

Bind an event sequence to a command.

  compute_object_points 
compute_object_points ( self )

Compute canvas object coordinates.

Compute the locations of the various corners of the objects used to render the shadow box.

Corner point definitions:

          a__d___    a = ul  (upper left)         d = uil (upper inside left)
          |\ 
          | \b____   b = ulm (upper left middle)
          | |\ 
          e | \c___  c = uli (upper left inside)  e = lul (lower upper left)
          | | |

  create_canvas_objects 
create_canvas_objects ( self )

Create the visible canvas objects.

The group has already been created.

  delete 
delete ( self )

Delete the ShadowBox from the screen.

  ibbox 
ibbox ( self )

Returns the internal bounding box where something can be drawn inside the ShadowBox.

  lower 
lower ( self )

Lower the ShadowBox on the canvas stack.

  move 
move (
        self,
        delta_x,
        delta_y,
        )

Move the object by the X and Y ammounts specified.


Table of Contents

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