// Text of project URL Helper written on 8/28/56 at 01:43 // Beginning of text file definitions.f // Copyright (C) 1999 Brian Sulcer // // This program 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. // // This program 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 / ,‹x,‹@/ GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA OpenResFile(HOME & "bitmaps.rsrc"); DefConst('kAppIcon, GetPictAsBits("extras drawer icon", nil)); CloseResFile(); constant kVersionString := "v1.1"; constant kURLSlotSymbol := '|URLs:HyprMynd|; constant kNamesURLEditorViewDefSymbol := '|URLs ,‹x,‹@:HyprMynd|; constant kNotesURLDataDefSymbol := '|URL:HyprMynd|; constant kNotesURLEditorViewDefSymbol := 'default; constant kNotesURLFrameFormatSymbol := 'urlFrameFormat; constant kNotesURLPrintFormatSymbol := 'print; DefConst('kEntryTemplate, { class: kNotesURLDataDefSymbol, viewStationery: kNotesURLDataDefSymbol, title: nil, timeStamp: nil, height: 130, }); kEntryTemplate.(kNotesURLDataDefSymbol) := { who: nil, howMuch: 0, dueDate: nil, }; DefConst('kNotesURLFrameFormat, { _proto: prot ,‹x,‹@oFrameFormat, symbol: kNotesURLFrameFormatSymbol, title: "URL Frame Format", }); ditorViewDefSymbol := 'default; constant kNotesURLFrameFormatSymbol := 'urlFrameFormat; constant kNotesURLPrintFormatSymbol := 'print; DefConst('kEntryTemplate, { class: kNotesURLDataDefSymbol, viewStationery: kNotesURLDataDefSymbol, title: nil, timeStamp: nil, height: 130, }); kEntryTemplate.(kNotesURLDataDefSymbol) := { who: nil, howMuch: 0, dueDate: nil, }; DefConst('kNotesURLFrameFormat, { _proto: prot // End of text file definitions.f // Beginning of file protoAboutBox // Before Script for protoAboutBox // Copyright (C) 1999 Brian Sulcer // // This program 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. // // This program 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 this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA protoAboutBox := {viewBounds: {left: 0, top: 0, right: 200, bottom: 180}, viewDrawScript: func() begin local localBox := :LocalBox(); local text; local bounds; local titleFont := {family: 'newYork, face: kFaceBold, size: 18}; local versionFont := {family: 'geneva, face: kFaceNormal, size: 9}; local creditFont := {family: 'newYork, face: kFaceNormal, size: 12}; local textFont := {family: 'espy, face: kFaceNormal, size: 10}; local reminderFont := {family: 'espy, face: kFaceBold, size: 10}; // app title bounds := SetBounds(40, 5, localBox.right, localBox.bottom); TextBox(appName, {font: titleFont, justification: 'left}, bounds); // app version bounds := SetBounds(42, bounds.top + FontHeight(titleFont), localBox.right, localBox.bottom); TextBox(versionString, {font: versionFont, justification: 'left}, bounds); // copyright info bounds := SetBounds(5, 45, localBox.right, localBox.bottom); TextBox(copyrightString, {font: textFont, justification: 'left}, bounds); // contact info bounds := SetBounds(5, bounds.top + (FontHeight(textFont) * 2) + 5, localBox.right, localBox.bottom); TextBox(contactString, {font: textFont, justification: 'left}, bounds); // notice bounds := SetBounds(5, bounds.top + (FontHeight(textFont) * 2) + 5, localBox.right - 5, localBox.bottom); TextBox(noticeString, {font: textFont, justification: 'left}, bounds); end , viewJustify: 80, viewEffect: 7314465, appIcon: nil, appName: "Text", creditString: "Text", versionString: "Text", copyrightString: "Text", contactString: "Text", noticeString: "Text", viewSetupDoneScript: func() begin appIconView.icon := self.appIcon; end, _proto: @179 /* protoFloater */ }; appIconView := {icon: nil, viewBounds: {left: 5, top: 5, right: 37, bottom: 37}, viewFlags: 1, viewFormat: nil, viewClass: 76 /* clPictureView */ }; AddStepForm(protoAboutBox, appIconView); StepDeclare(protoAboutBox, appIconView, 'appIconView); protoAboutBox_v166_0 := {_proto: @166 /* protoCloseBox */}; AddStepForm(protoAboutBox, protoAboutBox_v166_0); constant |layout_protoAboutBox| := protoAboutBox; // End of file protoAboutBox // Beginning of file quickTextButton.t // Before Script for quickTextButton // Copyright (C) 1999 Brian Sulcer // // This program 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. // // This program 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 this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA quickTextButton := {buttonClickScript: func() begin :PopupMenu(popup, nil); end, viewBounds: {left: 0, top: 0, right: 50, bottom: 13}, popup: [ "http://", "ftp://", "telnet://", 'pickSeparator, "www.", "ftp.", 'pickSeparator, ".com", ".net", ".org", ".edu", 'pickSeparator, "/", ":", "~", "@", ] , pickActionScript: func(itemSelected) begin local view := GetView('viewFrontKey); if view then begin PostKeyString(view, popup[itemSelected]); end; end , icon: GetPictAsBits("quick text icon", nil), _proto: @198 /* protoPictureButton */ }; constant |layout_quickTextButton.t| := quickTextButton; // End of file quickTextButton.t // Beginning of file slashButton.t // Before Script for slashButton // Copyright (C) 1999 Brian Sulcer // // This program 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. // // This program 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 this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA slashButton := { buttonClickScript: func() begin local view := GetView('viewFrontKey); if view then begin PostKeyString(view, "/"); end; end , text: "/", viewBounds: {left: 0, top: 0, right: 13, bottom: 13}, _proto: @226 /* protoTextButton */ }; constant |layout_slashButton.t| := slashButton; // End of file slashButton.t // Beginning of file colonButton.t // Before Script for colonButton // Copyright (C) 1999 Brian Sulcer // // This program 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. // // This program 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 this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA colonButton := { buttonClickScript: func() begin local view := GetView('viewFrontKey); if view then begin PostKeyString(view, ":"); end; end , text: ":", viewBounds: {left: 0, top: 0, right: 13, bottom: 13}, _proto: @226 /* protoTextButton */ }; constant |layout_colonButton.t| := colonButton; // End of file colonButton.t // Beginning of file tildeButton.t // Before Script for tildeButton // Copyright (C) 1999 Brian Sulcer // // This program 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. // // This program 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 this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA tildeButton := { buttonClickScript: func() begin local view := GetView('viewFrontKey); if view then begin PostKeyString(view, "~"); end; end , text: "~", viewBounds: {left: 0, top: 0, right: 13, bottom: 13}, _proto: @226 /* protoTextButton */ }; constant |layout_tildeButton.t| := tildeButton; // End of file tildeButton.t // Beginning of file atsignButton.t // Before Script for atsignButton // Copyright (C) 1999 Brian Sulcer // // This program 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. // // This program 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 this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA atsignButton := { buttonClickScript: func() begin local view := GetView('viewFrontKey); if view then begin PostKeyString(view, "@"); end; end , text: "@", viewBounds: {left: 0, top: 0, right: 13, bottom: 13}, _proto: @226 /* protoTextButton */ }; constant |layout_atsignButton.t| := atsignButton; // End of file atsignButton.t // Beginning of file launchButton.t // Before Script for launchButton // Copyright (C) 1999 Brian Sulcer // // This program 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. // // This program 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 this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA launchButton := {viewBounds: {left: 0, top: 0, right: 20, bottom: 13}, buttonClickScript: func() begin local urlCop := GetRoot().urlCop; local result; if urlCop then begin Print(urlEntry.entryLine.text); result := urlCop:?GetURL(urlEntry.entryLine.text, nil); if not result then begin GetRoot:Notify(kNotifyAlert, kAppName, "Unable to launch helper application for this URL."); end; end; else begin GetRoot():Notify(kNotifyAlert, kAppName, "URLCop is not installed. It needs to be installed for " & "launching to work properly."); end; end , icon: GetPictAsBits("launch icon", nil), _proto: @198 /* protoPictureButton */ }; constant |layout_launchButton.t| := launchButton; // End of file launchButton.t // Beginning of file aboutBox.t // Before Script for aboutBox // Copyright (C) 1999 Brian Sulcer // // This program 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. // // This program 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 this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA aboutBox := {versionString: "version 1.1", copyrightString: "copyright \u00A9\u 1999 Brian Sulcer.\nAll rights reserved.\n", contactString: "email: bsulcer@hyprmynd.com\nurl: http://www.hyprmynd.com/\n", noticeString: "This program comes with ABSOLUTELY NO WARRANTY.\nThis is free software, and you are free to redistribute it under certain conditions. See the file license.txt for details." , appName: "URL Helper", appIcon: MakePixFamily( GetResourceFromFile({filename: "Shusaku:Brian's Stuff:Projects:url-helper:bitmaps.rsrc", resource: 128}), GetResourceFromFile({filename: ":\u01920001\u,}@", resource: }), [ {rsrcSpec: GetResourceFromFile({filename: "Shusaku:Brian's Stuff:Projects:url-helper:bitmaps.rsrc", resource: 128}), bitDepth: 1}, {rsrcSpec: GetResourceFromFile({filename: ":\u01920001\u,}@", resource: }) , bitDepth: 2}, {rsrcSpec: GetResourceFromFile({filename: ":\u01920001\u,}@", resource: }) , bitDepth: 4}, {rsrcSpec: GetResourceFromFile({filename: ":\u01920001\u,}@", resource: }) , bitDepth: 8}]);, viewBounds: {left: 0, top: 0, right: 180, bottom: 200}, _proto: protoAboutBox }; constant |layout_aboutBox.t| := aboutBox; // End of file aboutBox.t // Beginning of file infoButton.t // Before Script for infoButton // Copyright (C) 1999 Brian Sulcer // // This program 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. // // This program 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 this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA infoButton := {viewFlags: 515, DoInfoAbout: func() begin local view := BuildContext(GetLayout("aboutBox.t")); view:Open(); return true; end , _proto: @478 /* protoInfoButton */ }; constant |layout_infoButton.t| := infoButton; // End of file infoButton.t // Beginning of text file menuButtons.f // Copyright (C) 1999 Brian Sulcer // // This program 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. // // This program 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 / ,‹x,‹@/ GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA DefConst('kMenuButtons, [ GetLayout("infoButton.t"), GetLayout("quickTextButton.t"), GetLayout("slashButton.t"), GetLayout("colonButton.t"), GetLayout("tildeButton.t"), GetLayout("atsignButton.t"), GetLayout("launchButton.t"), ]); the / // End of text file menuButtons.f // Beginning of file namesURLEditorViewDef.t // Before Script for namesURLEditorViewDef // Copyright (C) 1999 Brian Sulcer // // This program 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. // // This program 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 this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA namesURLEditorViewDef := {viewBounds: {left: 0, top: 0, right: 240, bottom: 115}, viewFlags: 1, viewFormat: 0, name: "URL", symbol: kNamesURLEditorViewDefSymbol, type: 'editor, protection: 'private, infoFrame: { // slot where data is stored checkPaths: '[url], // first item specifes that first instance of URL is stored // directly in the soup entry. second item specifies that // multiple instances are allowed checkPrefix: [nil, [pathExpr: kURLSlotSymbol]], // is an array containing the URL FormatFunc: func(data) begin ParamStr("URL: ^0", data); end, ActionFunc: func(tapX, tapY, layout, bounds, entry, path, reserved) begin inherited:?ActionFunc(tapX, tapY, layout, bounds, entry, path, reserved) end, } , viewJustify: 0, viewClass: 74 /* clView */ }; urlEntry := { path: nil // this is set by the viewSetupFormScript , viewJustify: 8240, viewBounds: {left: -10, top: 0, right: -5, bottom: 96}, label: "URL", viewSetupFormScript: func() begin if IsSymbol(selectedPath) then self.path := [pathExpr: selectedPath] else self.path := Clone(selectedPath); AddArraySlot(path, 'url); inherited:?viewSetupFormScript(); end , _proto: @422 /* newtLabelInputLine */ }; AddStepForm(namesURLEditorViewDef, urlEntry); StepDeclare(namesURLEditorViewDef, urlEntry, 'urlEntry); floatingBar := {menuButtons: kMenuButtons, viewJustify: 8192, viewBounds: {left: 0, top: 0, right: 240, bottom: 25}, _proto: @459 /* newtFloatingBar */ }; AddStepForm(namesURLEditorViewDef, floatingBar); constant |layout_namesURLEditorViewDef.t| := namesURLEditorViewDef; // End of file namesURLEditorViewDef.t // Beginning of file notesURLDataDef.t // Before Script for notesURLDataDef // Copyright (C) 1999 Brian Sulcer // // This program 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. // // This program 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 this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA notesURLDataDef := {symbol: kNotesURLDataDefSymbol, name: "URL", description: "URL (Uniform Resource Locator)", superSymbol: 'notes, icon: MakePixFamily( GetResourceFromFile({filename: "Shusaku:Brian's Stuff:Projects:url-helper:bitmaps.rsrc", resource: 129}), GetResourceFromFile({filename: ":\u01920001\u,}@", resource: }), [ {rsrcSpec: GetResourceFromFile({filename: "Shusaku:Brian's Stuff:Projects:url-helper:bitmaps.rsrc", resource: 129}), bitDepth: 1}, {rsrcSpec: GetResourceFromFile({filename: ":\u01920001\u,}@", resource: }) , bitDepth: 2}, {rsrcSpec: GetResourceFromFile({filename: ":\u01920001\u,}@", resource: }) , bitDepth: 4}, {rsrcSpec: GetResourceFromFile({filename: ":\u01920001\u,}@", resource: }) , bitDepth: 8}]);, version: 2, StringExtract: func(entry, numLines) begin local text := ""; if numLines = 1 then begin if entry.title then text := entry.title; else text := entry.(kNotesURLDataDefSymbol).url; end; else begin text := entry.title & $\n & entry.(kNotesURLDataDefSymbol).url; end; return text; end , MakeNewEntry: func() begin local newEntry := DeepClone(kEntryTemplate); newEntry.title := "untitled"; newEntry.timeStamp := Time(); newEntry.(kNotesURLDataDefSymbol).url := ""; newEntry.(kNotesURLDataDefSymbol).notes := []; return newEntry; end , TextScript: func(item, target) begin item.text := ""; if target.title then begin item.text := item.text & target.title & " "; end; if target.(kNotesURLDataDefSymbol).url then begin item.text := item.text & target.(kNotesURLDataDefSymbol).url; end; return item.text; end , height: 105, _proto: @451 /* newtStationery */ }; constant |layout_notesURLDataDef.t| := notesURLDataDef; // End of file notesURLDataDef.t // Beginning of file notesURLEditorViewDef.t // Before Script for notesURLEditorViewDef // Copyright (C) 1999 Brian Sulcer // // This program 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. // // This program 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 this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA notesURLEditorViewDef := {viewBounds: {left: 0, top: 0, right: 0, bottom: 115}, viewFlags: 1, viewFormat: 0, name: "URL Editor", type: 'editor, symbol: 'default, viewJustify: 48, version: 2, viewDefHeight: 115, viewClass: 74 /* clView */ }; urlEntry := {path: [pathExpr: kNotesURLDataDefSymbol, 'url], viewJustify: 8240, viewBounds: {left: 0, top: 0, right: -5, bottom: 96}, label: "URL", viewSetupFormScript: func() begin inherited:?viewSetupFormScript(); entryLine.textFlags := entryLine.textFlags + vNoSpaces; end , _proto: @422 /* newtLabelInputLine */ }; AddStepForm(notesURLEditorViewDef, urlEntry); StepDeclare(notesURLEditorViewDef, urlEntry, 'urlEntry); floatingBar := {menuButtons: kMenuButtons, viewBounds: {left: 0, top: 0, right: 225, bottom: 15}, viewJustify: 8192, _proto: @459 /* newtFloatingBar */ }; AddStepForm(notesURLEditorViewDef, floatingBar); constant |layout_notesURLEditorViewDef.t| := notesURLEditorViewDef; // End of file notesURLEditorViewDef.t // Beginning of file notesURLPrintFormatRow.t // Before Script for _v218_0 // Copyright (C) 1999 Brian Sulcer // // This program 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. // // This program 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 this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA _v218_0 := {text: "", viewBounds: {left: 0, top: 0, right: 0, bottom: 40}, viewJustify: 8240, viewFont: simpleFont10, _proto: @218 /* protoStaticText */ }; constant |layout_notesURLPrintFormatRow.t| := _v218_0; // End of file notesURLPrintFormatRow.t // Beginning of file notesURLPrintFormat.t // Before Script for _v200_0 // Copyright (C) 1999 Brian Sulcer // // This program 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. // // This program 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 this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA _v200_0 := { printNextPageScript: func() begin if cursor:Entry() then begin :RedoChildren(); return true; end; else begin return nil; end; end , title: "URL", symbol: kNotesURLPrintFormatSymbol, usesCursors: nil, cursor: nil, viewSetupFormScript: func() begin inherited:?viewSetupFormScript(); cursor := GetTargetCursor(target, nil); end , rowTemplate: GetLayout("notesURLPrintFormatRow.t");, _proto: @200 /* protoPrintFormat */ }; _v200_0_v74_0 := {viewBounds: {top: 30, left: 30, right: -30, bottom: -30}, viewFlags: 1, viewFormat: 0, viewJustify: 240, viewSetupChildrenScript: func() begin local text, entry; local numChildren := RIntToL(:LocalBox().bottom / rowTemplate.viewBounds.bottom); local dataDef := GetDataDefs(kNotesURLDataDefSymbol); Print(numChildren); Print(dataDef); self.stepChildren := Array(numChildren, nil); entry := cursor:Entry(); for i := 0 to numChildren - 1 do begin Print(i); if not entry then // out of data; get rid of extraneous child views and end loop begin SetLength(stepChildren, i); break; end; // get the text for the item text := dataDef:StringExtract(entry, 2); // create the stepchild stepChildren[i] := {_proto: rowTemplate, text: text}; entry := cursor:Next(); end; end , viewClass: 74 /* clView */ }; AddStepForm(_v200_0, _v200_0_v74_0); constant |layout_notesURLPrintFormat.t| := _v200_0; // End of file notesURLPrintFormat.t // Beginning of text file extrasIcon.f // Copyright (C) 1999 Brian Sulcer // // This program 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. // // This program 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 / ,‹x,‹@/ GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA DefConst('kAboutString, kVersionString & "©1999 Brian Sulcer\n" & "Adds stationery that allows you to record URLs in Names and Notes.\n" & "email: bsulcer@hyprmynd.com\n" & "url: http://www.hyprmynd.com/" ); SetPartFrameSlot('text, kAppName ,‹x,‹@); SetPartFrameSlot('app, kAppSymbol); SetPartFrameSlot('icon, kAppIcon); SetPartFrameSlot('TapAction, func() begin GetRoot():Notify(kNotifyQAlert, kAppName, kAboutString); return nil; end; ); ., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA DefConst('kAboutString, kVersionString & "©1999 Brian Sulcer\n" & "Adds stationery that allows you to record URLs in Names and Notes.\n" & "email: bsulcer@hyprmynd.com\n" & "url: http://www.hyprmynd.com/" ); SetPartFrameSlot('text, kAppName // End of text file extrasIcon.f // Beginning of text file install & remove.f // Copyright (C) 1999 Brian Sulcer // // This program 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. // // This program 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 / ,‹x,‹@/ GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 // USA SetPartFrameSlot('namesURLEditorViewDef, GetLayout("namesURLEditorViewDef.t")); SetPartFrameSlot('notesURLDataDef, GetLayout("notesURLDataDef.t")); SetPartFrameSlot('notesURLEditorViewDef, GetLayout("notesURLEditorViewDef.t")); SetPartFrameSl ,‹x,‹@ot('DoNotInstall, func() not getroot().cardfile or (getroot().cardfile.version and getroot().cardfile.version > 2) ); InstallScript := func(partFrame, removeFrame) begin // register Names stationery RegisterViewDef(partFrame.namesURLEditorViewDef, EnsureInternal('person)); RegisterViewDef(partFrame.namesURLEditorViewDef, EnsureInternal('company)); // register Notes stationery local dataDefSymbol := EnsureInternal(kNotesURLDataDefSymbol); RegDataDef(dataDefSymbol, GetLayout("notesURLData ,‹x,‹@Def.t")); RegisterViewDef(GetLayout("notesURLEditorViewDef.t"), dataDefSymbol); RegisterViewDef(GetLayout("notesURLPrintFormat.t"), dataDefSymbol); RegisterViewDef(kNotesURLFrameFormat, dataDefSymbol); end; RemoveScript := func(removeFrame) begin // unregister Notes stationery UnRegisterViewDef(kNotesURLFrameFormatSymbol, kNotesURLDataDefSymbol); UnRegisterViewDef(kNotesURLPrintFormatSymbol, kNotesURLDataDefSymbol); UnRegisterViewDef(kNotesURLEditorViewDefSymbol, kNotesURLDataDefSymbol); ,‹x,‹@ UnRegDataDef(kNotesURLDataDefSymbol); // unregister Names stationery UnRegisterViewDef(kNamesURLEditorViewDefSymbol, 'person); UnRegisterViewDef(kNamesURLEditorViewDefSymbol, 'company); end; l); end; RemoveScript := func(removeFrame) begin // unregister Notes stationery UnRegisterViewDef(kNotesURLFrameFormatSymbol, kNotesURLDataDefSymbol); UnRegisterViewDef(kNotesURLPrintFormatSymbol, kNotesURLDataDefSymbol); UnRegisterViewDef(kNotesURLEditorViewDefSymbol, kNotesURLDataDefSymbol); // End of text file install & remove.f