Phoenix Logo

phoenix_title wx.lib.ogl.composit.Constraint

The Constraint class helps specify how child shapes are laid out with respect to siblings and parents.


class_hierarchy Class Hierarchy

Inheritance diagram for class Constraint:


sub_classes Known Subclasses

wx.core.Constraint


method_summary Methods Summary

__init__ Default class constructor.
Equals Return True if a and b are approximately equal (for the purposes
Evaluate Evaluate this constraint and return True if anything changed.
SetSpacing Sets the horizontal and vertical spacing for the constraint.

api Class API



class Constraint(object)

The Constraint class helps specify how child shapes are laid out with respect to siblings and parents.


Methods



__init__(self, type, constraining, constrained)

Default class constructor.

Parameters:
  • type – see ConstraintType for valid types
  • constraining – the constraining Shape
  • constrained – the constrained Shape


Equals(self, a, b)

Return True if a and b are approximately equal (for the purposes of evaluating the constraint).

Parameters:
  • a – ???

  • b – ???



Evaluate(self)

Evaluate this constraint and return True if anything changed.



SetSpacing(self, x, y)

Sets the horizontal and vertical spacing for the constraint.

Parameters:
  • x – the x position
  • y – the y position