From d776b25ed5594fe32c4ec3a0950b40e34bd59c76 Mon Sep 17 00:00:00 2001 From: gianlucaelia Date: Wed, 20 Apr 2022 19:32:13 +0100 Subject: [PATCH] resizable and layoutable guis (#83) * resizable and layoutable guis * FluidWaveform: rename 'win' to 'parent' * FluidWaveform/FluidPlotter: update help * FluidWaveform/Plotter: make views before forking This way views are immediately available upon creation, for example to be added to layouts. Views are still correctly updated with data from within the fork, whenever they are ready. * Thanks @elgiano! + a few small edits Co-authored-by: Ted Moore --- release-packaging/Classes/FluidPlotter.sc | 122 +++-- release-packaging/Classes/FluidWaveform.sc | 511 +++++++++--------- .../HelpSource/Classes/FluidPlotter.schelp | 35 +- .../HelpSource/Classes/FluidWaveform.schelp | 27 +- 4 files changed, 373 insertions(+), 322 deletions(-) diff --git a/release-packaging/Classes/FluidPlotter.sc b/release-packaging/Classes/FluidPlotter.sc index b6f3e5c..d78a474 100644 --- a/release-packaging/Classes/FluidPlotter.sc +++ b/release-packaging/Classes/FluidPlotter.sc @@ -2,36 +2,28 @@ FluidPlotterPoint { var id, color, <>size = 1; *new { - arg id, x, y, color, size = 1; - ^super.new.init(id,x,y,color,size); - } - - init { - arg id_, x_, y_, color_, size_ = 1; - id = id_; - x = x_; - y = y_; - color = color_ ? Color.black; - size = size_; + arg id, x, y, color(Color.black), size = 1; + ^super.newCopyArgs(id,x,y,color,size); } } FluidPlotter : FluidViewer { - var