SDS2 Parametric API
 All Classes Namespaces Functions Variables Pages
List of all members
diagram.DiagramBuilder.LabeledArrowItem Class Reference

A diagram item that adds a labeled arrow to the canvas. More...

Inheritance diagram for diagram.DiagramBuilder.LabeledArrowItem:
diagram.DiagramBuilder.CompositeItem diagram.DiagramBuilder.DiagramItem

Methods defined here:

def __init__

Methods inherited from CompositeItem:

def ClearHighlight
def Highlight

Methods inherited from DiagramItem:

def ClearHover
def Draw
def Erase
def Hover

Static methods inherited from DiagramItem:

def CleanArgs

Data and other attributes inherited from DiagramItem:

float expansion_factor = 100.0

Additional Inherited Members

- Public Member Functions inherited from diagram.DiagramBuilder.CompositeItem
- Public Member Functions inherited from diagram.DiagramBuilder.DiagramItem
- Static Public Attributes inherited from diagram.DiagramBuilder.CompositeItem
float expansion_factor = 100.0
- Static Public Attributes inherited from diagram.DiagramBuilder.DiagramItem
float expansion_factor = 100.0

Detailed Description

A diagram item that adds a labeled arrow to the canvas.

Note: The dimension label will not scale with the reset of the diagram. You will need to adjust the font size and possibly the DiagramBuilder's scale adjustment (see DiagramBuilder.SetScaleAdjustment()) to make the label display as desired.

Method resolution order

LabeledArrowItem
CompositeItem
DiagramItem

Constructor & Destructor Documentation

def diagram.DiagramBuilder.LabeledArrowItem.__init__ (   args)
 Creates a new instance.
 Parameters:  
 location: The 2D location (tuple) of the pointer of the arrow.
 length: The length of the arrow.
 pull_dir: A 2D vector (tuple) that gives the direction in which to pull
 the arrow stem.
 line_args: A dictionary that gives the Tk canvas agruments for the arrow. 
 These are the same arguments that are provided to 
 Tkinter.Canvas.create_line with the addition of the 'highlight' argument 
 for the highlight color.  If the 'highlight' argument is not provided then 
 calls to highlight the arrow will be ignored.
 label_args: A dictionary that gives the Tk canvas arguments for the label.
 These are the same arguments that are provided to 
 Tkinter.Canvas.create_text with the addition of the 'highlight' argument 
 for the highlight color.  If the 'highlight' argument is not provided 
 then calls to highlight the label will be ignored.

Reimplemented from diagram.DiagramBuilder.CompositeItem.

Member Function Documentation

def diagram.DiagramBuilder.LabeledArrowItem.CleanArgs (   args)
 CleanArgs(args)

Reimplemented from diagram.DiagramBuilder.CompositeItem.

def diagram.DiagramBuilder.LabeledArrowItem.ClearHighlight (   args)
 ClearHighlight(args)

Reimplemented from diagram.DiagramBuilder.CompositeItem.

def diagram.DiagramBuilder.LabeledArrowItem.ClearHover (   args)
 ClearHover(args)

Reimplemented from diagram.DiagramBuilder.CompositeItem.

def diagram.DiagramBuilder.LabeledArrowItem.Draw (   args)
 Draws the diagram item on the canvas.
 Parameters:
 canvas: The canvas widget.
 Returns A list of ids of items added to the canvas.

Reimplemented from diagram.DiagramBuilder.CompositeItem.

def diagram.DiagramBuilder.LabeledArrowItem.Erase (   args)
 Erases the diagram item from the canvas.
 Parameters:
 canvas: The canvas widget.

Reimplemented from diagram.DiagramBuilder.CompositeItem.

def diagram.DiagramBuilder.LabeledArrowItem.Highlight (   args)
 Highlight(args)

Reimplemented from diagram.DiagramBuilder.CompositeItem.

def diagram.DiagramBuilder.LabeledArrowItem.Hover (   args)
 Hover(args)

Reimplemented from diagram.DiagramBuilder.CompositeItem.

Member Data Documentation

float diagram.DiagramBuilder.LabeledArrowItem.expansion_factor = 100.0
static