Exemple #1
0
void
Fl_Arc_Dial::draw ( void )
{
    int X = x();
    int Y = y();
    int W = w();
    int H = h();

    draw_box();
    draw_label();

    X += Fl::box_dx(box());
    Y += Fl::box_dy(box());
    W -= Fl::box_dw(box());
    H -= Fl::box_dh(box());

    double angle = ( angle2() - angle1() ) * ( value() - minimum()) / ( maximum() - minimum() ) + angle1();

    fl_line_style( FL_SOLID, W / 6 );

    X += W / 8;
    Y += H / 8;
    W -= W / 4;
    H -= H / 4;

    if ( box() == FL_NO_BOX )
    {
        /* draw backgrond arc */
        fl_color( fl_color_average( FL_BLACK, selection_color(), 0.80f ) );
        fl_arc( X, Y, W, H, 270 - angle1(), 270 - angle2() );
    }

    fl_color( selection_color() );
//    fl_color( fl_color_average( FL_RED, selection_color(), ( value() - minimum() ) / ( maximum() - minimum() ) ) );


    if ( type() == FL_FILL_DIAL )
        fl_arc( X, Y, W, H, 270 - angle1(), 270 - angle  );
    else
    {
        const int d = 6;

        /* account for edge conditions */
        angle = angle < angle1() + d ? angle1() + d : angle;
        angle = angle > angle2() - d ? angle2() - d : angle;

        fl_arc( X, Y, W, H, 270 - (angle - d), 270 - (angle + d) );
    }

    fl_line_style( FL_SOLID, 0 );

    fl_color( labelcolor() );

    char s[10];

    fl_font( FL_HELVETICA, 8 );

    snprintf( s, sizeof( s ), "%.1f", value() );
    fl_draw( s, X, Y, W, H, FL_ALIGN_BOTTOM );
}
Exemple #2
0
void
SpectrumView::draw ( void ) 
{
    //Clear Widget
    Fl_Box::draw();

    int W = w() - padding_right;
    int H = h() - padding_bottom;

    if ( !_bands ) {
        analyze_data( W );
    }

    //Draw grid
    fl_color(fl_color_add_alpha(fl_rgb_color( 100,100,100), 50 ));

    draw_semilog();

    fl_push_clip( x(),y(),W,H);

            
    fl_color(fl_color_add_alpha( selection_color(), 20 ));
   
    fl_push_matrix();
    fl_translate( x(), y() + 2 );
    fl_scale( W,H- 2 );

    fl_begin_polygon();
    
    fl_vertex(0.0,1.0);

    draw_curve();

    fl_vertex(1.0,1.0);
                  
    fl_end_polygon();

    fl_color(fl_color_add_alpha( selection_color(), 100 ));
    fl_begin_line();
    fl_line_style(FL_SOLID,2);
    
    /* fl_vertex(0.0,1.0); */

    draw_curve();

    /* fl_vertex(1.0,1.0); */

    fl_end_line();
    
    fl_pop_matrix();

    fl_line_style(FL_SOLID,0);

    fl_pop_clip();
}
Exemple #3
0
Fl_Gauge::Fl_Gauge(int x, int y, int w, int h, const char *l)
    : Fl_Dial(x,y,w,h,l)
{
    selection_color(FL_RED);
    box(FL_FLAT_BOX);
    color(FL_BLACK);
}
Exemple #4
0
void
Sequence_Region::draw_box ( void )
{
    Fl_Color c = selected() ? selection_color() : box_color();

    fl_draw_box( box(), line_x(), y(), abs_w(), h(), fl_color_add_alpha( c, 127 ) );
}
Fl_Value_Input_Spin::Fl_Value_Input_Spin(int in_x, int in_y, int in_w, int in_h, const char* in_l) : 
  Fl_Valuator(in_x,in_y,in_w,in_h,in_l), 
  input(in_x, in_y, in_w, in_h, nullptr)
{
  soft_ = 0;
  if (input.parent())
  {
    // defeat automatic-add
    ((Fl_Group*)input.parent())->remove(input);
  }
  input.parent((Fl_Group *)this); // kludge!
  input.callback(input_cb, this);
  input.when(FL_WHEN_CHANGED);
  selection_color(input.selection_color());
  align(FL_ALIGN_LEFT);
  box(input.box());
  value_damage();
  buttonssize(15);
  ix=in_x;
  iy=in_y; 
  drag=0;
  indrag=0;
  sldrag=0;
  mouseobj = 0;
  deltadir=0;
  delta=0;
}
Exemple #6
0
Fichier : Module.C Projet : 0mk/non
void
Module::init ( void )
{

    /* we use pointers to these vector elements for port auto connection stuff and need to prevent reallocation from invalidating them. */
    audio_input.reserve(16);
    audio_output.reserve(16);
    control_input.reserve(16);
    control_output.reserve(16);
    aux_audio_input.reserve(16);
    aux_audio_output.reserve(16);
    
//    _latency = 0;
    _is_default = false;
    _editor = 0;
    _chain = 0;
    _instances = 1;
    _bypass = 0;

    box( FL_UP_BOX );
    labeltype( FL_NO_LABEL );
    align( FL_ALIGN_CENTER | FL_ALIGN_INSIDE );
    set_visible_focus();
    selection_color( FL_YELLOW );

    labelsize(12);
    color( fl_rgb_color( 122,190,200 ) );
    tooltip();
}
Exemple #7
0
void Fl_ProgressBar::draw()
{
    int bdx, bdy;
    double pct;
    if(damage() & FL_DAMAGE_ALL) draw_box();

    int X = 0, Y = 0;
    bdx = box()->dx();
    bdy = box()->dy();

    fl_color(selection_color());
    if(mPresent > mMax)
        mPresent = mMax;
    if(mPresent < mMin)
        mPresent = mMin;
    pct = (mPresent - mMin) / mMax;
    fl_rectf(X + bdx, Y + bdy, (int)(((double)w() - 2*bdx) * pct), h() - (2*bdy + 1));
    if(mShowPct)
    {
        char buffer[30];
        sprintf(buffer, "%d%%", (int) (pct * 100));
        fl_color(textcolor());
        fl_font(this->label_font(), this->label_size());
        fl_draw(buffer, X + (w() - fl_width(buffer))/2, Y + fl_height() + (((h() - 2*bdy) - fl_height())/2));
    }
}
Exemple #8
0
/*
 * FIXME: icon will loose focus if is selected then press OK, which will take focus from it.
 * In this case, nothing will be returned; double-click works as expected.
 */
int IconBox::handle(int event) {
	switch(event) {
		case FL_FOCUS:
			corig = color();
			color(selection_color());
			redraw();
			sel = true;
			return 1;
		case FL_UNFOCUS:
			color(corig);
			redraw();
			sel = false;
			return 1;
		case FL_PUSH:
			take_focus();
			// double-click
			if(Fl::event_clicks())
				do_callback();
			return 1;
		case FL_RELEASE:
			return 1;
		default:
			return Fl_Button::handle(event);
	}
	return 1;
}
Flu_Combo_Box :: Flu_Combo_Box( int X, int Y, int W, int H, const char* l )
  : Fl_Group( X, Y, W, H, l ), input( X, Y, W, H )
{
  box( FL_DOWN_BOX );
  align( FL_ALIGN_LEFT );
  pop_height( 100 );

  _cbox = NULL;
  _valbox = FL_UP_BOX;

  input_callback( NULL );
  input.box( FL_FLAT_BOX );
  input.callback( input_cb, this );
  input.when( FL_WHEN_ENTER_KEY_ALWAYS );
  input.color( FL_WHITE, selection_color());
  input.textfont( FL_HELVETICA );
  input.textsize(  FL_NORMAL_SIZE );
  input.textcolor( FL_FOREGROUND_COLOR );

  input.resize( X+Fl::box_dx(box()), Y+Fl::box_dy(box()), 
		W-18-Fl::box_dw(box()), H-Fl::box_dh(box()) );

  editable( true );

  end();
}
Exemple #10
0
MolBrowser::MolBrowser(VMDApp *vmdapp, MainFltkMenu *mm,
                       int x, int y, int xw, int yw)
: Fl_Multi_Browser(x, y, xw, yw), app(vmdapp) {
  mainmenu = mm;
  dragpending = 0;  
  align(FL_ALIGN_TOP_LEFT);
  column_widths(widths);
  color(VMDMENU_BROWSER_BG);
  selection_color(VMDMENU_BROWSER_SEL);

  VMDFLTKTOOLTIP(this, "Select molecule, toggle top/active/drawn/fixed, \nload/save coordinates or trajectory frames, \ndouble-click to rename molecule")

  new Fl_Box(x,   y-20,30,20,"ID");
  new Fl_Box(x+32,y-20,18,20,"T");
  new Fl_Box(x+50,y-20,18,20,"A");
  new Fl_Box(x+68,y-20,18,20,"D");
  new Fl_Box(x+86,y-20,18,20,"F");
  Fl_Box *b = new Fl_Box(x+102,y-20,220,20,"Molecule");
  b->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
  b = new Fl_Box(x+262,y-20,80,20,"Atoms");
  b->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
  b = new Fl_Box(x+342,y-20,60,20,"Frames");
  b->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
  b = new Fl_Box(x+412,y-20,30,20,"Vol");
  b->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
  end();
}
Exemple #11
0
void
Control_Point::draw_box ( void )
{
    if ( selected() )
        fl_color( selection_color() );
    else
        fl_color( box_color() );

    fl_pie( x() - w() / 2, y() - h() / 2, w(), h(), 0, 360 );

    if ( this == Sequence_Widget::belowmouse() ||
         this == Sequence_Widget::pushed() )
    {
        char val[10];
        snprintf( val, sizeof( val ), "%+.2f", 1.0 - _y * 2 );

        Fl_Align a = 0;

        if ( x() < _sequence->x() + ( _sequence->w() / 2 ) )
            a |= FL_ALIGN_RIGHT;
        else
            a |= FL_ALIGN_LEFT;

        if ( y() < _sequence->y() + ( _sequence->h() / 2 ) )
            a |= FL_ALIGN_BOTTOM;
        else
            a |= FL_ALIGN_TOP;
            
        draw_label( val, a, FL_FOREGROUND_COLOR );
    }
}
void Fl_Value_Slider_Input::draw() {

  int sxx = x(); 
	int syy = y();
	int sww = w();
	int shh = h();

  int bxx = x();
	int byy = y();
	int bww = w();
	int bhh = h();

  int X = x();
	int Y = y();
	int W = w();
	int H = h();

	UNUSED(bxx); 
	UNUSED(byy);
	UNUSED(bhh);

  int border_size=Fl::box_dx(box());

  if (horizontal())
  {
    bww = textboxsize();
    UNUSED(bww);
    sxx += textboxsize(); 
    sww -= textboxsize();
    input.resize(X,Y,W-sww,shh);
  }
  else
  {
    fl_font(input.textfont(), input.textsize());
    syy += fl_height()+(border_size+1)*2; shh -= fl_height()+(border_size+1)*2;
    input.resize(X,Y,W,H-shh);
  }
  if (damage()&~FL_DAMAGE_CHILD)  input.clear_damage(FL_DAMAGE_ALL);
  input.box(box());
  input.color(FL_WHITE, selection_color());
  input.doDraw();
  input.resize(X,Y,W,H);
  input.clear_damage();
//  if (horizontal())   input.doDraw();
  clear_damage();
  draw_box(box(),sxx,syy,sww,shh,color());
  sxx+=border_size;
  syy+=border_size; 
  sww-=border_size*2;  
  shh-=border_size*2;
  if(border_size<2) {
    sxx++;
    syy++;
    sww--;
    shh--;
  }  
  Fl_Slider::draw(sxx,syy,sww,shh);
}
Exemple #13
0
gDial::gDial(int x, int y, int w, int h, const char *L)
: Fl_Dial(x, y, w, h, L) {
	labelsize(11);
	labelcolor(COLOR_TEXT_0);
	align(FL_ALIGN_LEFT);
	type(FL_FILL_DIAL);
	angles(0, 360);
	color(COLOR_BG_0);            // background
	selection_color(COLOR_BG_1);   // selection
}
void GroupBankRoundButton::draw()
{
    Fl_Round_Button::draw();
    if ( !active() )
    {
        int o = 5;
        fl_color( fl_inactive( selection_color() ) );
        fl_line( x() + o, y() + o, x() + w() - o, y() + h() - o );
        fl_line( x() + o, y() + h() - o, x() + w() - o, y() + o );
    }
}
Exemple #15
0
Fl_ProgressBar::Fl_ProgressBar(int x, int y, int w, int h, const char *lbl)
    : Fl_Widget(x,y,w,h,lbl)
{
    mMin = mPresent = 0;
    mMax = 100;
    mShowPct = true;
    box(FL_DOWN_BOX);
    selection_color(FL_BLUE);
    color(FL_WHITE);
    textcolor(FL_RED);
}
void Fl_ToggleTree::draw_node(int depth, int cy, Fl_Node* node) {
  Fl_ToggleNode* tnode = (Fl_ToggleNode*)node;

  if (damage() == FL_DAMAGE_CHILD && !tnode->changed_ && damaged_ == 0) {
    return;
  }

  tnode->changed_ = 0;
  if (tnode->selected_) {
    fl_color(selection_color());
    fl_rectf(x(), cy + 1, w(), height_(tnode) - 1);
  } else {
    fl_color((cy - y()) & 1 ? color() : alternate_color());
    fl_rectf(x(), cy + 1, w(), height_(tnode) - 1);
  }
  fl_color(trim_color());
  fl_line(x(), cy, x() + w(), cy);
  fl_color(FL_BLACK);

  if (draw_lines_)
    {
      int i;
      Fl_ToggleNode * n;
      fl_xyline(x()+depth*16+8, cy+8, x()+(depth+1)*16, cy+8); 
      if (tnode->next_) 
    fl_xyline(x()+depth*16+8, cy, x()+depth*16+8, cy+16); 
      else 
    fl_xyline(x()+depth*16+8, cy, x()+depth*16+8, cy+8); 
      for (i=depth-1, n = (Fl_ToggleNode*)tnode->up_; n; i--, 
         n = (Fl_ToggleNode*)n->up_) 
    if (n->next_) 
      fl_xyline(x()+i*16+8, cy, x()+i*16+8, cy+16); 
    }

  if (tnode->can_open_) {
    if (tnode->opened_)
      opened_pixmap_->draw(x() + depth*16, cy);
    else
      closed_pixmap_->draw(x() + depth*16, cy);
  }

  if (tnode->selected_)
    textcolor(selection_label_color());
  else
    textcolor(labelcolor());

  if (tnode->label_) {
    int D = depth * 16 + label_offset_;
    draw_label(tnode->label_, D, x(), cy, w(), 16);
  }
  if (tnode->pixmap_) {
    tnode->pixmap_->draw(x() + depth*16 + pixmap_offset_, cy + 1);
  }
}
Exemple #17
0
void Fl_Spin::draw() {

  int sxx = x(), syy = y(), sww = w(), shh = h(); 
  Fl_Boxtype box1 = (Fl_Boxtype)(box());
  int border_size=Fl::box_dx(box());

  if (damage()&~FL_DAMAGE_CHILD) clear_damage(FL_DAMAGE_ALL);

  if (!box1) box1 = (Fl_Boxtype)(box()&-2);

  if((indrag || mouseobj) && deltadir!=0) {
     if(deltadir>0) {
       draw_box(down(box1),sxx,syy,sww,shh/2,color());
       draw_box(box1,sxx,syy+shh/2,sww,shh/2,color());
     } else {
       draw_box(box1,sxx,syy,sww,shh/2,color());
       draw_box(down(box1),sxx,syy+shh/2,sww,shh/2,color());
     }
  } else {
   draw_box(box1,sxx,syy,sww,shh/2,color());
   draw_box(box1,sxx,syy+shh/2,sww,shh/2,color());
  }
  sxx+=border_size;
  syy+=border_size;
  sww-=border_size*2;  
  shh-=border_size*2;
  if (active_r()) {
        fl_color(selection_color());  
  } else {
        fl_color(selection_color() | 8);
  }    
  int w1 = (sww-1)|1; // use odd sizes only
  int X = sxx+w1/2;
  int W = w1/3;
  int h1 = shh/2-border_size-2;
  int Y= syy;
  fl_polygon(X, Y, X+W,Y+h1 , X-W, Y+h1);
  Y=syy+shh/2+border_size+1+h1; 
  fl_polygon(X, Y, X-W, Y-h1, X+W, Y-h1); 
  clear_damage();  
} 
Exemple #18
0
Flu_Button :: Flu_Button( int X,int Y,int W,int H,const char *l )
  : Fl_Button( X,Y,W,H,l )
{
  flags = 0;
  inactiveImg = downImg = NULL;
  color( FL_GRAY );
  selection_color( FL_GRAY );
  retBtn = linkBtn = false;
  overLink = false;
  hover = false;
  eBox = FL_NO_BOX;
}
//*****************************************************************************
// Vp_Value_Input_Spin::draw() -- Draw widget
void Vp_Value_Input_Spin::draw()
{
  int sxx = x(), syy = y(), sww = w(), shh = h();
  sxx += sww - buttonssize(); sww = buttonssize();
  Fl_Boxtype box1 = FL_BORDER_FRAME;
  //int border_size=Fl::box_dx(FL_BORDER_FRAME);
  int border_size=1;

  if (damage()&~FL_DAMAGE_CHILD) input.clear_damage(FL_DAMAGE_ALL);
  input.box(box());
  input.color(FL_WHITE, selection_color());
  Fl_Widget * draw_hack = &input;
  draw_hack->draw();
  input.clear_damage();
  sxx+=border_size;
  syy+=border_size;
  sww-=border_size*2;
  shh-=border_size*2;

  if (!box1) box1 = (Fl_Boxtype)(box()&-2);

  if((indrag || mouseobj) && deltadir!=0) {
     if(deltadir>0) {
       draw_box(down(box1),sxx,syy,sww,shh/2,color());
       draw_box(box1,sxx,syy+shh/2,sww,shh/2,color());
     } else {
       draw_box(box1,sxx,syy,sww,shh/2,color());
       draw_box(down(box1),sxx,syy+shh/2,sww,shh/2,color());
     }
  } else {
   draw_box(box1,sxx,syy,sww,shh/2,color());
   draw_box(box1,sxx,syy+shh/2,sww,shh/2,color());
  }
  sxx+=border_size;
  syy+=border_size;
  sww-=border_size*2;
  shh-=border_size*2;
  if (active_r()) {
        fl_color(labelcolor());
  } else {
        fl_color(labelcolor() | 8);
  }
  int w1 = (sww-1)|1; // use odd sizes only
  int X = sxx+w1/2;
  int W = w1/3;
  int h1 = shh/2-border_size-2;
  int Y= syy;
  fl_polygon(X, Y, X+W,Y+h1 , X-W, Y+h1);
  Y=syy+shh/2+border_size+1+h1;
  fl_polygon(X, Y, X-W, Y-h1, X+W, Y-h1);
  clear_damage();
}
Exemple #20
0
MenuBase::MenuBase(int X,int Y,int W,int H,const char* l)
: Fl_Widget(X,Y,W,H,l) {
  set_flag(SHORTCUT_LABEL);
  box(FL_UP_BOX);
  when(FL_WHEN_RELEASE_ALWAYS);
  value_ = menu_ = 0;
  alloc = 0;
  selection_color(FL_SELECTION_COLOR);
  textfont(FL_HELVETICA);
  textsize((uchar)FL_NORMAL_SIZE);
  textcolor(FL_FOREGROUND_COLOR);
  down_box(FL_NO_BOX);
}
Exemple #21
0
gSlider::gSlider(int x, int y, int w, int h, const char *l)
	: Fl_Slider(x, y, w, h, l)
{
	type(FL_HOR_FILL_SLIDER);

	labelsize(11);
	align(FL_ALIGN_LEFT);
	labelcolor(COLOR_TEXT_0);

	box(G_BOX);
	color(COLOR_BG_0);
	selection_color(COLOR_BD_0);
}
Exemple #22
0
gInput::gInput(int x, int y, int w, int h, const char *L)
: Fl_Input(x, y, w, h, L) {
	//Fl::set_boxtype(G_BOX, gDrawBox, 1, 1, 2, 2);
	box(G_BOX);
	labelsize(11);
	labelcolor(COLOR_TEXT_0);
	color(COLOR_BG_DARK);
	textcolor(COLOR_TEXT_0);
	cursor_color(COLOR_TEXT_0);
	selection_color(COLOR_BD_0);
	textsize(11);

}
Exemple #23
0
SpectrumView::SpectrumView ( int X, int Y, int W, int H, const char *L )
    : Fl_Box(X,Y,W,H,L)
{
    _nframes = 0;
    _auto_level = 0;
    _data = 0;
    _bands = 0;
    _dbmin = -70;
    _dbmax = 30;
    box(FL_FLAT_BOX); 
    color(fl_rgb_color(20,20,20));
    selection_color( fl_rgb_color( 210, 80, 80 ) );
//    end();
}
Exemple #24
0
void
Module::init ( void )
{
    _is_default = false;
    _editor = 0;
    _chain = 0;
    _instances = 1;
    _bypass = 0;

    box( FL_UP_BOX );
    labeltype( FL_NO_LABEL );
    set_visible_focus();
    selection_color( FL_RED );
}
Exemple #25
0
Fl_Sparkline::Fl_Sparkline(int x, int y, int w, int h, const char *l)
    : Fl_Widget(x,y,w,h,l)
{
    selection_color(FL_RED);
    box(FL_FLAT_BOX);
    color(0xfffbcfff); /* greyish yellow */
    padding = 5;
    prev_x = -1;
    num_values = 0;
    table = NULL;
    scrollFunc = NULL;

    Fl_Group *save = Fl_Group::current();
    tip = new TipWin();
    tip->hide();
    Fl_Group::current(save);
}
Exemple #26
0
Fichier : Module.C Projet : 0mk/non
void
Module::draw_box ( int tx, int ty, int tw, int th )
{
    fl_color( fl_contrast( FL_FOREGROUND_COLOR, color() ) );

    fl_push_clip( tx, ty, tw, th );

    Fl_Color c = color();

    if ( ! active_r() )
        c = fl_inactive( c );

    int spacing = w() / instances();
    for ( int i = instances(); i--; )
    {
        fl_draw_box( box(), tx + (spacing * i), ty, tw / instances(), th, c );
    }


    if ( audio_input.size() && audio_output.size() )
    {
        /* maybe draw control indicators */
        if ( control_input.size() )
        {
            fl_draw_box( FL_ROUNDED_BOX, tx + 4, ty + 4, 5, 5, is_being_controlled() ? FL_YELLOW : fl_inactive( FL_YELLOW ) );

            /* fl_draw_box( FL_ROUNDED_BOX, tx + 4, ty + th - 8, 5, 5, is_being_controlled_osc() ? FL_YELLOW : fl_inactive( FL_YELLOW ) ); */
        }

        if ( control_output.size() )
            fl_draw_box( FL_ROUNDED_BOX, tx + tw - 8, ty + 4, 5, 5, is_controlling() ? FL_YELLOW : fl_inactive( FL_YELLOW ) );
    }

    fl_push_clip( tx + Fl::box_dx(box()), ty + Fl::box_dy(box()), tw - Fl::box_dw(box()), th - Fl::box_dh(box()) );

    Fl_Group::draw_children();

    fl_pop_clip();

    if ( focused_r( this ) )
        draw_focus_frame( tx,ty,tw,th, selection_color() );

    fl_pop_clip();
}
Exemple #27
0
gBrowser::gBrowser(int x, int y, int w, int h, const char *L)
 : Fl_Hold_Browser(x, y, w, h, L)
{
	box(G_BOX);
	textsize(11);
	textcolor(COLOR_TEXT_0);
	selection_color(COLOR_BG_1);
	color(COLOR_BG_0);

	this->scrollbar.color(COLOR_BG_0);
	this->scrollbar.selection_color(COLOR_BG_1);
	this->scrollbar.labelcolor(COLOR_BD_1);
	this->scrollbar.slider(G_BOX);

	this->hscrollbar.color(COLOR_BG_0);
	this->hscrollbar.selection_color(COLOR_BG_1);
	this->hscrollbar.labelcolor(COLOR_BD_1);
	this->hscrollbar.slider(G_BOX);
}
Exemple #28
0
void
Module::draw_box ( void )
{
    fl_color( fl_contrast( FL_FOREGROUND_COLOR, color() ) );

    int tw, th, tx, ty;

    tw = w();
    th = h();
    ty = y();
    tx = x();

    fl_push_clip( tx, ty, tw, th );

    Fl_Color c = is_default() ? FL_BLACK : color();

    c = active() && ! bypass() ? c : fl_inactive( c );

    int spacing = w() / instances();
    for ( int i = instances(); i--; )
    {
        fl_draw_box( box(), tx + (spacing * i), ty, tw / instances(), th, Fl::belowmouse() == this ? fl_lighter( c ) : c );
    }

    if ( this == Fl::focus() )
    {
        fl_draw_box( FL_UP_FRAME, x(), y(), w(), h(), selection_color() );
    }

    if ( audio_input.size() && audio_output.size() )
    {
        /* maybe draw control indicators */
        if ( control_input.size() )
            fl_draw_box( FL_ROUNDED_BOX, tx + 4, ty + 4, 5, 5, is_being_controlled() ? FL_YELLOW : fl_inactive( FL_YELLOW ) );
        if ( control_output.size() )
            fl_draw_box( FL_ROUNDED_BOX, tx + tw - 8, ty + 4, 5, 5, is_controlling() ? FL_YELLOW : fl_inactive( FL_YELLOW ) );
    }

    Fl_Group::draw_children();

    fl_pop_clip();
}
Fl_Value_Slider_Input::Fl_Value_Slider_Input(int in_x, int in_y, int in_w, int in_h, const char* in_l) : 
  Fl_Value_Slider(in_x,in_y,in_w,in_h,in_l),
  input(in_x, in_y, in_w, in_h, nullptr)
{
  soft_ = 0;
  if (input.parent())
  {
    // defeat automatic-add
    ((Fl_Group*)input.parent())->remove(input);
  }
  input.parent((Fl_Group*)this); // kludge!
  input.callback(input_cb, this);
//  input.when(FL_WHEN_CHANGED | FL_WHEN_ENTER_KEY);
  input.when(FL_WHEN_CHANGED );
  selection_color(input.selection_color());
  input.align(FL_ALIGN_LEFT);
  align(FL_ALIGN_LEFT);
  textboxsize(35);
  value_damage();
}
Fl_ToggleTree::Fl_ToggleTree(int x, int y, int w, int h,const char * label) : Fl_Tree(x, y, w, h) {
  pixmap_offset_ = 16;
  label_offset_ = 40;
  current_ = 0;
  state_ = FL_TOGGLE_NONE;
  closed_pixmap_ = 0;
  opened_pixmap_ = 0;
  if (s_closed_pixmap_ == 0) {
    s_closed_pixmap_ = new Fl_Pixmap(closed_icon);
  }
  if (s_opened_pixmap_ == 0) {
    s_opened_pixmap_ = new Fl_Pixmap(open_icon);
  }
  closed_pixmap(s_closed_pixmap_);
  opened_pixmap(s_opened_pixmap_);
  column_widths_ = no_columns;
  column_char_ = '\t';

  textfont_ = FL_HELVETICA;
  textsize_ = 12;
  textcolor_ = FL_BLACK;
  edit_input_ = new Fl_Input(x, y, 0, 0);
  edit_input_->box(FL_FLAT_BOX);
  edit_input_->color(FL_WHITE);
  edit_input_->textcolor(FL_BLACK);
  edit_input_->textfont(textfont_);
  edit_input_->textsize(textsize_);
  edit_callback((Fl_Callback*) edit_default_callback, this);
  edit_input_->when(FL_WHEN_RELEASE | FL_WHEN_ENTER_KEY | FL_WHEN_NOT_CHANGED);

  edit_input_->hide();
  edit_on_reselect_ = 1;

  color(FL_WHITE);
  selection_color(FL_BLACK);
  selection_label_color(FL_YELLOW);
  alternate_color(FL_LIGHT2);
  trim_color(FL_LIGHT1);
  draw_lines_ = 0;
}