home *** CD-ROM | disk | FTP | other *** search
/ PC World 2004 May / PCWorld_2004-05_cd.bin / software / temacd / winamp / winamp503_snowpatrol.exe / Plugins / historyeditbox.m < prev    next >
Text File  |  2003-08-25  |  835b  |  33 lines

  1. #include <lib/std.mi>
  2.  
  3. Global Button back, forward;
  4. Global Edit editbox;
  5. Global GuiObject xui;
  6.  
  7. System.onScriptLoaded() {
  8.   Group pgroup = getScriptGroup();
  9.   if (pgroup == NULL) return;
  10.  
  11.   back = pgroup.findObject("historyeditbox.back.button");
  12.   forward = pgroup.findObject("historyeditbox.forward.button");
  13.   editbox = pgroup.findObject("historyeditbox.edit");
  14.   xui = pgroup.getParent();
  15.  
  16.   if (xui != NULL) {
  17.    if (StringToInteger(xui.getXmlParam("navbuttons")) == 0) {
  18.      if (back != NULL) back.hide();
  19.      if (forward != NULL) forward.hide();
  20.      if (editbox != NULL) editbox.setXmlParam("w", "-17");
  21.    }
  22.   }
  23. }
  24.  
  25. back.onLeftClick() {
  26.   if (xui != NULL)
  27.     xui.sendAction("back", "", 0, 0, 0, 0);
  28. }
  29.  
  30. forward.onLeftClick() {
  31.   if (xui != NULL)
  32.     xui.sendAction("forward", "", 0, 0, 0, 0);
  33. }