SourceCode: "thePMenu = av.FindGui(\"View\").GetPopUps\ns = thePMenu.GetControls.Get(0).FindByScript(\"View.ToggleInteractiveSnap\")\n\nif (s<>nil) then\n s.SetClick(\"View.ThemeSnapUpdate\")\nend\n\nfor each d in av.getproject.getdocs\n if (d.Is(View)) then\n for each t in d.GetThemes\n if (t.Is(Ftheme)) then\n if (t.IsInteractiveSnapping) then\n t.SetInteractiveSnapping(False)\n end\n end\n end\n end\nend"
)
(Script.3
Name: "snappingExt.make"
SourceCode: "snappingExt = extension.Make(\n \"$AVEXT/intersnap.avx\".asfilename,\n \"Interaktivnφ zachycovßnφ\",\n av.FindScript(\"snappingExt.Install\"),\n av.FindScript(\"snappingExt.Uninstall\"),\n {})\n\nfor each aDoc in av.getproject.getdocs\n if (adoc.is(SEd)) then\n if (adoc.iscompiled.not) then\n adoc.compile\n end\n snappingExt.add(av.FindScript(adoc.getname))\n end\nend\n\nsnappingExt.Commit"
)
(Script.4
Name: "snappingExt.uninstall"
SourceCode: "thePMenu = av.FindGui(\"View\").GetPopUps\ns = thePMenu.GetControls.Get(0).FindByScript(\"View.ThemeSnapUpdate\")\n\nif (s <> nil) then\n s.SetClick(\"View.ToggleInteractiveSnap\")\nend\n\ns = thePMenu.GetControls.Get(0).FindByScript(\"snappingExt.uninstall\")\n\nif (s <> nil) then\n s.SetClick(\"View.ToggleInteractiveSnap\")\nend\n\nthePop = thePMenu.GetControls.Get(0)\n\nfor each x in thePop.GetControls.Clone\n if (x.GetTag.Contains(\"ThemeSnap\")) then \n thePop.Remove(x)\n end\nend\n\nfor each d in av.getproject.getdocs\n if (d.Is(Vie
w)) then\n for each t in d.GetThemes\n if (t.Is(Ftheme)) then\n if (t.IsInteractiveSnapping) then\n t.SetInteractiveSnapping(False)\n end\n end\n end\n end\nend"
)
(Script.5
Name: "View.InteractiveSnapTool"
SourceCode: "theView = av.GetActiveDoc\n\nc = theView.ReturnUserCircle\nchoiceList = theView.GetThemes\n\nif (choiceList.Count < 1) then\n exit\nend\n\n\nif (c.IsNull) then\n return nil\nelse \n for each t in choicelist \n if (t.Is(Ftheme)) then\n t.SetInteractiveSnapTolerance (c.getradius) \n end\n end\nend\n"
SourceCode: "'View.ThemeSnapUpdate\n\ntheView = av.GetActiveDoc\ntheView.SetInteractiveSnappingPersistent (FALSE)\n\nif(System.IsShiftKeyDown) then\n snaptype =\"Hranice\"\nelseif (System.IsAltKeyDown) then\n snaptype =\"Pr∙seΦφk\"\nelse\n snaptype =\"Vrchol\"\nend\n\n' Get the list of active themes to be used for choices...\n\nchoiceList2 = theView.GetThemes\n\nif (choiceList2.Count < 1) then\n exit\nend\n\nsnapList = {}\nchoiceList = {}\n\nfor each t in choicelist2\n if (t.Is(Ftheme)) then\n choicelist.Add(t)\n end\nend\n\nfor each t in choicel
ist\n\n t.SetInteractiveSnapping (true)\n\n if (t.IsInteractiveSnapping ) then\n snaplist.add(t)\n end\nend\n\nif (snapList.Count < 1) then\n MsgBox.Error(\"No Snap themes in view\",\"\")\n exit\nend\n\nthePMenu = av.GetActiveGui.GetPopUps\nthePop = thePMenu.GetControls.Get(0)\n\n' Clear old items\n\nfor each x in thePop.GetControls.Clone\n if (x.GetTag.Contains(\"ThemeSnap\")) then \n thePop.Remove(x)\n end\nend\n\n' For each snapple theme, add a choice and set control properties...\n\nthePop = thePMenu.GetControls.Get(0)\nind
ex = 3\n\nfor each c in snapList\n theChoice = thePop.New( index )\n theChoice.SetLabel(\"Zachytit k \"+c.GetName + \" - \" + snaptype)\n theChoice.SetClick(\"View.ThemeSnap\")\n theChoice.SetHelp(\"Snap to theme\"++c.GetName )\n theChoice.SetTag(\"ThemeSnap\" ++ snaptype)\n theChoice.SetObjectTag(c)\n theChoice.SetUpdate(\"View.ThemeSnapUpdate\")\n index = index +1\nend\n\ntheChoice = Space.Make\ntheChoice.SetTag(\"ThemeSnap\")\nthePop.Add(theChoice,index )\n"