Monday, November 08, 2010 at 12:01 AM.
system.verbs.apps.cardEditor.web.coolSitesInButtons
local (adr = @system.verbs.apps.netscape.examples.coolSites);
local (gridOn, gridVisible, gridUnits);
cardEditor.getCardGrid (@gridOn, @gridVisible, @gridUnits);
local (buttonheight = 23, vertinset = 5, horizinset = 17, buttonwidth = 130);
local (t = 0, l = 20, b = buttonheight, r = l + buttonwidth);
for i = 1 to sizeof (adr^) {
local (webaddress = adr^ [i]);
local (buttontext = nameof (adr^ [i]));
local (buttonname = "button" + i);
cardEditor.newObject (card.types.buttonType, buttonname, buttontext, webaddress);
bundle { <<set up attributes of new object
local (atts);
new (tableType, @atts);
atts.rect = rectangle.set (t, l, b, r);
t = b + vertinset;
if t > 750 {
t = 0;
l = r + horizinset;
r = l + buttonwidth};
b = t + buttonheight;
atts.enab = true;
atts.filc = rgb.set (-1, -1, -1);
atts.txtc = rgb.set (0, 0, 0);
atts.frmc = rgb.set (0, 0, 0);
atts.flag = false; <<it's not the default button
atts.lang = 'NURL';
atts.font = "geneva";
atts.size = 9;
atts.styl = 0;
atts.fram = false;
atts.just = 1;
atts.sdwd = 0;
atts.tran = false;
atts.visi = true;
cardEditor.setObjectAttributes (buttonname, @atts)}}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.