- case "text": CHECKSET_STRING(text); MARK_RESIZE; dirty();
- case "strokecolor": value = N(stringToColor((String)value)); CHECKSET_INT(strokecolor); MARK_RESIZE; dirty();
- case "textcolor": value = N(stringToColor((String)value)); CHECKSET_INT(strokecolor); MARK_RESIZE; dirty();
- case "text": CHECKSET_STRING(text); MARK_RESIZE; dirty();
- case "strokewidth": CHECKSET_SHORT(strokewidth); dirty();
- case "shrink": put("hshrink", value); put("vshrink", value);
- case "hshrink": CHECKSET_FLAG(HSHRINK); MARK_RESIZE;
- case "vshrink": CHECKSET_FLAG(VSHRINK); MARK_RESIZE;
- case "width": put("maxwidth", value); put("minwidth", value); MARK_RESIZE;
- case "height": put("maxheight", value); put("minheight", value); MARK_RESIZE;
- case "maxwidth": setMaxWidth(value);
- case "minwidth": CHECKSET_INT(minwidth); MARK_RESIZE;
- if (parent == null && getSurface() != null)
- getSurface().setMinimumSize(minwidth, minheight, minwidth != maxwidth || minheight != maxheight);
- case "maxheight": setMaxHeight(value);
- case "minheight": CHECKSET_INT(minheight); MARK_RESIZE;
- if (parent == null && getSurface() != null)
- getSurface().setMinimumSize(minwidth, minheight, minwidth != maxwidth || minheight != maxheight);
- case "colspan": CHECKSET_SHORT(colspan); MARK_REPACK_parent;
- case "rowspan": CHECKSET_SHORT(rowspan); MARK_REPACK_parent;
- case "rows": CHECKSET_SHORT(rows); if (rows==0){set(FIXED, COLS);if(cols==0)cols=1;} else set(FIXED, ROWS); MARK_REPACK;
- case "cols": CHECKSET_SHORT(cols); if (cols==0){set(FIXED, ROWS);if(rows==0)rows=1;} else set(FIXED, COLS); MARK_REPACK;
- case "clip": CHECKSET_FLAG(CLIP); if (parent == null) dirty(); else parent.dirty();
- case "visible": CHECKSET_FLAG(VISIBLE); dirty(); MARK_RESIZE; dirty();
- case "packed": CHECKSET_FLAG(PACKED); MARK_REPACK_parent;
- case "aspect": CHECKSET_INT(aspect); dirty();
- case "globalx": put("x", N(globalToLocalX(toInt(value))));
- case "globaly": put("y", N(globalToLocalY(toInt(value))));
- case "align": clear(ALIGNS); setAlign(value == null ? "center" : value); MARK_RESIZE;
- case "cursor": setCursor(value);
- case "fill": setFill(value);
+ case "thisbox": if (value == null) removeSelf();
+ case "text": if (value == null) value = ""; CHECKSET_STRING(text); RECONSTRAIN(); DIRTY;
+ case "strokecolor": value = N(stringToColor((String)value)); CHECKSET_INT(strokecolor); DIRTY;
+ case "textcolor": value = N(stringToColor((String)value)); CHECKSET_INT(strokecolor); DIRTY;
+ case "strokewidth": CHECKSET_SHORT(strokewidth); DIRTY;
+ case "shrink": CHECKSET_FLAG(HSHRINK | VSHRINK); RECONSTRAIN();
+ case "hshrink": CHECKSET_FLAG(HSHRINK); RECONSTRAIN();
+ case "vshrink": CHECKSET_FLAG(VSHRINK); RECONSTRAIN();
+ case "width": setWidth(toInt(value), toInt(value));
+ case "height": setHeight(toInt(value), toInt(value));
+ case "maxwidth": setWidth(minwidth, toInt(value));
+ case "minwidth": setWidth(toInt(value), maxwidth);
+ case "maxheight": setHeight(minheight, toInt(value));
+ case "minheight": setHeight(toInt(value), maxheight);
+ case "colspan": if (toInt(value) > 0) { CHECKSET_SHORT(colspan); if (parent != null) parent.REPACK(); }
+ case "rowspan": if (toInt(value) > 0) { CHECKSET_SHORT(rowspan); if (parent != null) parent.REPACK(); }
+ case "visible": CHECKSET_FLAG(VISIBLE); RECONSTRAIN(); DIRTY;
+ case "packed": CHECKSET_FLAG(PACKED); if (parent != null) { parent.REPACK(); } else { REPACK(); }
+ case "align": clear(ALIGNS); setAlign(value == null ? "center" : value); REPLACE();
+ case "cursor": setCursor(value);
+ case "fill": setFill(value);
+ case "clip": CHECKSET_FLAG(CLIP); if (parent == null) DIRTY; else parent.DIRTY;
+ case "rows": CHECKSET_SHORT(rows); if (rows==0){set(FIXED, COLS);if(cols==0)cols=1;} else set(FIXED, ROWS); REPACK();
+ case "cols": CHECKSET_SHORT(cols); if (cols==0){set(FIXED, ROWS);if(rows==0)rows=1;} else set(FIXED, COLS); REPACK();
+
+ // FIXME: remove