   DU_VSEG_PointWidget * widgets_points_[8];
 
   volatile bool gate_, retrigger_;
+  bool last_gate_;
 };
 
 DU_VSEG_Function * function;


    // draw fixed elements
    Display.draw_char(widget_repeat_->x() + 1, widget_repeat_->y() + 1, 'x', DUINO_SH1106::White);

    // draw parameters
    display_loop(false);

  {
    // initialize values
    gate_ = retrigger_ = false;
    last_gate_ = false;

    // build widget hierarchy
    widget_save_ = new DUINO_SaveWidget<ParameterValues>(121, 0);
    widget_loop_ = new DUINO_DisplayWidget(0, 12, 96, 7, DUINO_Widget::Corners);
    widget_loop_->attach_scroll_callback(loop_scroll_callback);
    widget_repeat_ = new DUINO_DisplayWidget(102, 11, 13, 9, DUINO_Widget::Full);
    widget_repeat_->attach_scroll_callback(repeat_scroll_callback);
    container_loop_repeat_ = new DUINO_WidgetContainer<2>(DUINO_Widget::Click);
    container_loop_repeat_->attach_child(widget_loop_, 0);
