home *** CD-ROM | disk | FTP | other *** search
/ Kompuutteri Kaikille K-CD 2003 #3 / K-CD_2003-03.iso / Winamp / winamp3_0-full.exe / Wacs / xml / guiobjects / historyeditbox / historyeditbox.m next >
Text File  |  2002-07-29  |  759b  |  29 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 (StringToInteger(xui.getXmlParam("navbuttons")) == 0) {
  17.     if (back != NULL) back.hide();
  18.     if (forward != NULL) forward.hide();
  19.     if (editbox != NULL) editbox.setXmlParam("w", "-23");
  20.   }
  21. }
  22.  
  23. back.onLeftClick() {
  24.   xui.sendAction("back", "", 0, 0, 0, 0);
  25. }
  26.  
  27. forward.onLeftClick() {
  28.   xui.sendAction("forward", "", 0, 0, 0, 0);
  29. }