Skip to content

Instantly share code, notes, and snippets.

@FeepingCreature
Created May 22, 2012 12:12
Show Gist options
  • Save FeepingCreature/2768682 to your computer and use it in GitHub Desktop.
Save FeepingCreature/2768682 to your computer and use it in GitHub Desktop.
class Text : RectWidget, HasSizeInfo {
[...]
void setText(string s) {
provide "recomputes width";
[...]
class LinebreakText : RectWidget, HasSizeInfo {
[...]
void make-layout() {
[...]
depend Text.setText "recomputes width";
auto rest = new Text (source.(data, settings));
[...]
rest.setText $ str[i .. $].strip();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment