Example #1
0
 public void mousemove(Coord c) {
   for (Widget wdg = lchild; wdg != null; wdg = wdg.prev) {
     if (!wdg.visible) continue;
     Coord cc = xlate(wdg.c, true);
     wdg.mousemove(c.add(cc.inv()));
   }
 }
Example #2
0
 public Coord contentsz() {
   Coord max = new Coord(0, 0);
   for (Widget wdg = child; wdg != null; wdg = wdg.next) {
     if (!wdg.visible) continue;
     Coord br = wdg.c.add(wdg.sz);
     if (br.x > max.x) max.x = br.x;
     if (br.y > max.y) max.y = br.y;
   }
   return (max);
 }
Example #3
0
 public boolean mousewheel(Coord c, int amount) {
   for (Widget wdg = lchild; wdg != null; wdg = wdg.prev) {
     if (!wdg.visible) continue;
     Coord cc = xlate(wdg.c, true);
     if (c.isect(cc, wdg.sz)) {
       if (wdg.mousewheel(c.add(cc.inv()), amount)) {
         return (true);
       }
     }
   }
   return (false);
 }
Example #4
0
  public Resource getcurs(Coord c) {
    Resource ret;

    for (Widget wdg = lchild; wdg != null; wdg = wdg.prev) {
      if (!wdg.visible) continue;
      Coord cc = xlate(wdg.c, true);
      if (c.isect(cc, wdg.sz)) {
        if ((ret = wdg.getcurs(c.add(cc.inv()))) != null) return (ret);
      }
    }
    try {
      return ((cursor == null) ? null : cursor.get());
    } catch (Loading l) {
      return (null);
    }
  }
Example #5
0
 public Object tooltip(Coord c, Widget prev) {
   if (prev != this) prevtt = null;
   if (tooltip != null) {
     prevtt = null;
     return (tooltip);
   }
   for (Widget wdg = lchild; wdg != null; wdg = wdg.prev) {
     if (!wdg.visible) continue;
     Coord cc = xlate(wdg.c, true);
     if (c.isect(cc, wdg.sz)) {
       Object ret = wdg.tooltip(c.add(cc.inv()), prevtt);
       if (ret != null) {
         prevtt = wdg;
         return (ret);
       }
     }
   }
   prevtt = null;
   return (tooltip(c, prev == this));
 }
Example #6
0
 public Coord rootxlate(Coord c) {
   return (c.sub(rootpos()));
 }