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())); } }
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); }
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); }
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); } }
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)); }
public Coord rootxlate(Coord c) { return (c.sub(rootpos())); }