mirror of https://github.com/adamdruppe/arsd.git
draw experimentation
This commit is contained in:
parent
2fb96cc507
commit
2ee9dd6b43
24
minigui.d
24
minigui.d
|
@ -468,6 +468,15 @@ version(Windows) {
|
||||||
+/
|
+/
|
||||||
class Widget : ReflectableProperties {
|
class Widget : ReflectableProperties {
|
||||||
|
|
||||||
|
private bool willDraw() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool skipPaintCycle() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/+
|
/+
|
||||||
/++
|
/++
|
||||||
Calling this directly after constructor can give you a reflectable object as-needed so you don't pay for what you don't need.
|
Calling this directly after constructor can give you a reflectable object as-needed so you don't pay for what you don't need.
|
||||||
|
@ -1783,6 +1792,9 @@ class Widget : ReflectableProperties {
|
||||||
if(hidden)
|
if(hidden)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(skipPaintCycle())
|
||||||
|
return;
|
||||||
|
|
||||||
int paintX = x;
|
int paintX = x;
|
||||||
int paintY = y;
|
int paintY = y;
|
||||||
if(this.useNativeDrawing()) {
|
if(this.useNativeDrawing()) {
|
||||||
|
@ -6413,6 +6425,11 @@ abstract class Layout : Widget {
|
||||||
tabStop = false;
|
tabStop = false;
|
||||||
super(parent);
|
super(parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
version(none)
|
||||||
|
override bool willDraw() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/++
|
/++
|
||||||
|
@ -7695,8 +7712,6 @@ class Window : Widget {
|
||||||
super(p);
|
super(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void actualRedraw() {
|
private void actualRedraw() {
|
||||||
if(recomputeChildLayoutRequired)
|
if(recomputeChildLayoutRequired)
|
||||||
recomputeChildLayoutEntry();
|
recomputeChildLayoutEntry();
|
||||||
|
@ -7719,7 +7734,7 @@ class Window : Widget {
|
||||||
ugh = ugh.parent;
|
ugh = ugh.parent;
|
||||||
}
|
}
|
||||||
auto painter = w.draw(true);
|
auto painter = w.draw(true);
|
||||||
privatePaint(WidgetPainter(painter, this), lox, loy, Rectangle(0, 0, int.max, int.max), false, true);
|
privatePaint(WidgetPainter(painter, this), lox, loy, Rectangle(0, 0, int.max, int.max), false, willDraw());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -10874,6 +10889,9 @@ class Button : MouseActivatedWidget {
|
||||||
override int heightStretchiness() { return 3; }
|
override int heightStretchiness() { return 3; }
|
||||||
override int widthStretchiness() { return 3; }
|
override int widthStretchiness() { return 3; }
|
||||||
|
|
||||||
|
version(none)
|
||||||
|
override bool skipPaintCycle() { return true; }
|
||||||
|
|
||||||
/++
|
/++
|
||||||
If true, this button will emit trigger events on double (and other quick events, if added) click events as well as on normal single click events.
|
If true, this button will emit trigger events on double (and other quick events, if added) click events as well as on normal single click events.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue