#Rationale Version 130.54 can_be_loaded_by 120.53 uses_features_from 120.53 #-- Start of Prelude -- Node = None Views = [] Loading = True if not CurrentFileFormat.IsLaterThan(130, 54): morphTarget = None def Create(type): global Node if morphTarget == None: Node = app.Create(type) else: Morph(morphTarget, type) Node = morphTarget return Node def CreateChild(parent, type): global Node Node = app.CreateChild(parent, type) return Node def CreateAnnotation(parent, type): global Node Node = app.CreateAnnotation(parent, type) return Node def SetText(text): app.SetText(Node, text) def SetEvaluation(evaluation): app.SetEvaluation(Node, evaluation) def SetTint(tint): app.SetTint(Node, tint) def StringToImage(guid, imageAsString): return app.StringToImage(guid, imageAsString) def Morph(node, flavor): global Node app.Morph(node, flavor) Node = node def GetFernViews(): global Views global View global Loading Views = [v for v in app.Views if v.TypeName == "FernView"] Loading = len(Views) == 0 if Loading: View = app.Gui.CreateView("FernView") Views = [ View ] def SetLocation(node, x, y): # if Loading: # View.SetLocation(node, x, y) # else: for v in Views: v.SetLocation(node, x, y) def SetOffset(offsetFrom, node, x, y): if Loading: View.SetOffset(offsetFrom, node, x, y) else: for v in Views: v.SetOffset(offsetFrom, node, x, y) def SetSize(node, width, height): if Loading: View.SetSize(node, width, height) else: for v in Views: v.SetSize(node, width, height) def ShowPrintPagePreview(show): if Loading: View.ShowPrintPagePreview(show, False) def SetBackgroundImage(image): if Loading: View.SetBackgroundImage(image, False) def SetOpacity(opacity): if Loading: View.SetOpacity(opacity) def SetSelection(node): if Loading: View.SetSelection(node) #-- End of Prelude -- map0_0 = Create("Claim") SetText("Chocolate is good for your health") map1_0 = Create("Reason") SetText("Chocolate contains cocoa which is good for your health") map2_0 = Create("Objection") SetText("Chocolate contains sugar which is not good for your health") map3_0 = Create("Reason") SetText("Too much sugar causes diabetes") map4_0 = Create("Objection") SetText("Not all chocolate has cocoa") map5_0 = Create("Objection") SetText("The body needs some sugar to be healthy") map6_0 = Create("Reason") SetText("Cocoa contains flavonoids which protect the heart") GetFernViews() SetLocation(map0_0, -676, -52) SetLocation(map1_0, -414, 66) SetSize(map1_0, 172, 72) SetLocation(map2_0, -687, 131) SetSize(map2_0, 160, 75) SetLocation(map3_0, -665, -228) SetLocation(map4_0, -401, -151) SetLocation(map5_0, -901, -146) SetSize(map5_0, 156, 72) SetLocation(map6_0, -934, 50) SetSize(map6_0, 156, 72) ShowPrintPagePreview(False)