Package libavg :: Module avg :: Class AVGNode

Class AVGNode




Root node of any avg tree. Defines the properties of the display and handles key press events. The AVGNode's width and height define the coordinate system for the display and are the default for the window size used (i.e. by default, the coordinate system is pixel-based.)

Instance Methods
 
getCropSetting()
Returns true if cropping is active.

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __getattribute__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

    Inherited from DivNode
 
appendChild(node)
Adds a new child to the container behind the last existing child.
 
getChild(pos)
Returns the child at position pos.
 
getNumChildren()
Returns the number of immediate children that this div contains.
 
indexOf(childnode)
Returns the index of the child given or -1 if childnode isn't a child of the container.
 
insertChild(node, pos)
Adds a new child to the container at position pos.
 
insertChildBefore(newNode, oldChild)
Adds a new child to the container in front of the existing node oldChild.
 
removeChild(node)
Removes the child given by pNode.
 
reorderChild(oldPos, newPos)
Moves the child at index pos so it's at index newPos.
    Inherited from Node
 
__eq__(...)
 
__hash__(...)
hash(x)
 
__init__(...)
Raises an exception This class cannot be instantiated from Python
 
__ne__(...)
 
getAbsPos(relpos)
Transforms a position in coordinates relative to the node to a position in window coordinates.
 
getMediaSize()
Returns the size in pixels of the media in the node.
 
getParent()
Returns the container (AVGNode or DivNode) the node is in.
 
getRelPos(abspos)
Transforms a position in window coordinates to a position in coordinates relative to the node.
 
releaseEventCapture(cursorid)
Restores normal mouse operation after a call to setEventCapture().
 
setEventCapture(cursorid)
Sets up event capturing so that cursor events are sent to this node regardless of the cursor position.
 
setEventHandler(type, source, pyfunc)
Sets a callback function that is invoked whenever an event of the specified type from the specified source occurs.
 
unlink()
Removes a node from it's parent container.
Properties

Inherited from object: __class__

    Inherited from DivNode
  crop
Turns clipping on or off.
  mediadir
The directory that the media files for the children of this node are in.
    Inherited from Node
  active
If this attribute is true, the node behaves as usual.
  angle
The angle that the node is rotated to in radians.
  height
  id
A unique identifier that can be used to reference the node.
  opacity
A measure of the node's transparency.
  pivotx
x coordinate of the point that the node is rotated around.
  pivoty
y coordinate of the point that the node is rotated around.
  pos
The position of the node's top left corner relative to it's parent node.
  sensitive
A node only reacts to events if sensitive is true.
  size
  width
  x
The position of the node's left edge relative to it's parent node.
  y
The position of the node's top edge relative to it's parent node.
Method Details

getCropSetting()

 
Returns true if cropping is active. Cropping can be turned off globally in the avg file. (Deprecated. This attribute is only nessesary because of certain buggy display drivers that don't work with cropping.)
Returns:
isCropActive