X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2FBox.java;h=8ff61a13f644967f0d6744c3819ef71f643263ee;hb=2d7544453d8169502df235384d915255384dd8fc;hp=b2608fb8f5bef762262b992eaeb142332814e522;hpb=d892b1ff73b696e37812afd7d78c2eaae3342a0b;p=org.ibex.core.git diff --git a/src/org/ibex/Box.java b/src/org/ibex/Box.java index b2608fb..8ff61a1 100644 --- a/src/org/ibex/Box.java +++ b/src/org/ibex/Box.java @@ -2,6 +2,12 @@ // Copyright 2004 Adam Megacz, see the COPYING file for licensing [GPL] package org.ibex; +// FIXME: are traps on x/y meaningful? +// FIXME: if we trap on cols, then set rows to 0 (forcing cols to 1), does the cols trap get triggered? +// FIXME: if we change min{width/height}, thereby forcing a change to max{min/height}, does a trap on those get triggered? +// FIXME: trap on numchildren? replaces ChildChanged? +// FIXME: trap on visible, trigger when parent visibility changes + // FEATURE: mark to reflow starting with a certain child // FEATURE: reintroduce surface.abort @@ -62,15 +68,6 @@ public final class Box extends JSScope implements Scheduler.Task { } // FIXME update these - // box properties can not be trapped - static final String[] props = new String[] { - "shrink", "hshrink", "vshrink", "x", "y", "width", "height", "cols", "rows", - "colspan", "rowspan", "align", "visible", "packed", "globalx", "globaly", - "minwidth", "maxwidth", "minheight", "maxheight", "indexof", "thisbox", "clip", - "numchildren", "redirect", "cursor", "mouse" - }; - - // FIXME update these // events can have write traps, but not read traps static final String[] events = new String[] { "Press1", "Press2", "Press3", @@ -475,18 +472,6 @@ public final class Box extends JSScope implements Scheduler.Task { return super.callMethod(method, a0, a1, a2, rest, nargs); } - protected boolean isTrappable(Object key, boolean isRead) { - if (key == null) return false; - else if (key instanceof String) { - // not allowed to trap box properties, and no read traps on events - String name = (String)key; - for (int i=0; i < props.length; i++) if (name.equals(props[i])) return false; - if (isRead) for (int i=0; i < events.length; i++) if (name.equals(events[i])) return false; - } - - return true; - } - public Object get(Object name) throws JSExn { if (name instanceof Number) return redirect == null ? null : redirect == this ? getChild(toInt(name)) : redirect.get(name);