"""
Copyright 2001-2002 Andrew Jones

This file is part of Pyzzle.

    Pyzzle is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    Pyzzle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Pyzzle; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


"""

#nodedata functions
import parameters, Slide
from Slide import *

#Some syntax sugar
custom = 'custom'
delay = 'delay'
LandR = 'LandR'
standard = std = 'std'
standard180 = std180 = 'std180'
fade = 'fade'
left_scroll = leftscroll ='left_scroll'
right_scroll = rightscroll = 'right_scroll'
up_scroll = upscroll = 'upscroll'
down_scroll = downscroll = 'downscroll'
none = None

action_cursor = 'action'
grab_cursor = 'action'
zip_cursor = 'zip'
left_cursor = 'left'
right_cursor = 'right'
left180_cursor = 'left180'
right180_cursor = 'right180'
forward_cursor = 'forward'
fwd_cursor = 'forward'
up_cursor = 'up'
down_cursor = 'down'

left_justified = 0
center_justified = 1
right_justified = 2

best_transition = 'BEST'
none_transition = None
fastest_transition = 'FASTEST'
normal_transition = 'NORMAL'

previousslide = None
currentslide = None
nextslide = None
newNode = None
objectreturnslide = None
cursor = None
cursorZone = None
oldCursorZone = None
FIRST_SLIDE = None
navData = 0
                    
action = Slide() # dummy action node do not remove
object_return = Slide()
def prehastype(type):
     
    for i in previousslide.contains:
        if i == type:
            return 1
    return 0

def hastype(type):
    for i in currentslide.contains:
        if i == type:
            return 1
    return 0

