void CLuaRadioButton::AddButton(const std::string &label, TSTLVecSize n)
{
    Fl_Round_Button *button = new Fl_Round_Button(0, 0, 0, ButtonHeight(), MakeTranslation(label));
    button->type(FL_RADIO_BUTTON);
    button->callback(ToggleCB, this);
    
    bool first = m_RadioButtons.empty();
    
    if (n >= GetOptions().size())
    {
        m_RadioButtons.push_back(button);
        GetGroup()->add(button);
    }
    else
    {
        m_RadioButtons.insert(m_RadioButtons.begin() + n, button);
        GetGroup()->insert(*button, n+1); // +1: First is titel
    }
    
    if (first)
        Enable(0);
    
    RedrawWidgetRecursive(GetGroup());
    GetParent()->UpdateLayout();
}
Exemplo n.º 2
0
int main(int argc, char **argv) {
	ThemeLoader::init();
	IconLoader::init();
	win = new EdeWindow(455, 485, "Theme demo");
	win->begin();
	{ Fl_Button* o = new Fl_Button(355, 450, 90, 25, "Load");
	  o->tooltip("Load predefined theme");
	  o->callback(load_theme_cb);
	} // Fl_Button* o
	{ Fl_Menu_Bar* o = new Fl_Menu_Bar(0, 0, 455, 25);
	  o->menu(menu_);
	} // Fl_Menu_Bar* o
	{ Fl_Round_Button* o = new Fl_Round_Button(5, 285, 90, 25, "round");
	  o->down_box(FL_ROUND_DOWN_BOX);
	} // Fl_Round_Button* o
	{ new Fl_Return_Button(5, 195, 90, 25, "button");
	} // Fl_Return_Button* o
	{ new Fl_Input(160, 196, 285, 25, "input:");
	} // Fl_Input* o
	{ Fl_Output* o = new Fl_Output(160, 225, 285, 25, "output:");
	  o->value("Some output value");
	} // Fl_Output* o
	{ Fl_File_Browser* o = new Fl_File_Browser(5, 30, 210, 125);
	  o->load("/");
	} // Fl_File_Browser* o
	{ Fl_Check_Browser* o = new Fl_Check_Browser(220, 30, 225, 125);
	  o->add("foo");
	  o->add("foo");
	  o->add("foo");
	} // Fl_Check_Browser* o
	{ Fl_Progress* o = new Fl_Progress(5, 160, 210, 25, "progress bar");
	  o->value(50);
	} // Fl_Progress* o
	{ Fl_Slider* o = new Fl_Slider(220, 160, 225, 25);
	  o->type(1);
	  o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
	} // Fl_Slider* o
	{ new Fl_Light_Button(5, 225, 90, 25, "button");
	} // Fl_Light_Button* o
	{ Fl_Check_Button* o = new Fl_Check_Button(5, 255, 90, 25, "check");
	  o->down_box(FL_DOWN_BOX);
	} // Fl_Check_Button* o
	{ Fl_File_Input* o = new Fl_File_Input(160, 256, 285, 35, "file:");
	  o->value("/home/foo/baz/taz.txt");
	} // Fl_File_Input* o
	{ Fl_Text_Editor* o = new Fl_Text_Editor(160, 325, 285, 115, "Text editor");
	  o->buffer(new Fl_Text_Buffer());
	} // Fl_Text_Editor* o
	{ Fl_Box* o = new Fl_Box(25, 328, 80, 80, "image");
	  IconLoader::set(o, "utilities-terminal", ICON_SIZE_MEDIUM);
	} // Fl_Box* o
	win->end();
	win->show(argc, argv);

	Fl::run();
	ThemeLoader::shutdown();
	IconLoader::shutdown();
	return 0;
}
CLuaRadioButton::CLuaRadioButton(const char *desc, const TOptions &l,
                                 TSTLVecSize e) : CBaseLuaWidget(desc), CBaseLuaRadioButton(l)
{
    TSTLVecSize size = l.size(), n;
    
    for (n=0; n<size; n++)
    {
        Fl_Round_Button *button = new Fl_Round_Button(0, 0, 0, ButtonHeight(), MakeTranslation(l[n]));
        button->type(FL_RADIO_BUTTON);
        button->callback(ToggleCB, this);
        
        if (e == n)
            button->setonly();
        
        m_RadioButtons.push_back(button);
        GetGroup()->add(button);
    }
}
Exemplo n.º 4
0
//-----------------------------------------------------------------------------
void TrspDlg::create_dlg()
{
	wnd = new Fl_Double_Window(220, 170, mgl_gettext("Transpose data"));
	Fl_Group *g = new Fl_Group(10, 30, 200, 90, mgl_gettext("Select new order of dimensions"));
	g->box(FL_DOWN_BOX);
	yxz = new Fl_Round_Button(20, 40, 75, 25, "y - x - z");	yxz->callback(trsp_rad_cb,this);
	zyx = new Fl_Round_Button(20, 65, 75, 25, "z - y - x");	zyx->callback(trsp_rad_cb,this);
	zxy = new Fl_Round_Button(20, 90, 75, 25, "z - x - y");	zxy->callback(trsp_rad_cb,this);
	yzx = new Fl_Round_Button(100, 40, 75, 25, "y - z - x");yzx->callback(trsp_rad_cb,this);
	xzy = new Fl_Round_Button(100, 65, 75, 25, "x - z - y");xzy->callback(trsp_rad_cb,this);
	xyz = new Fl_Round_Button(100, 90, 75, 25, "x - y - z");xyz->callback(trsp_rad_cb,this);
	g->end();

	Fl_Button *o;
	o = new Fl_Button(25, 130, 75, 25, mgl_gettext("Cancel"));	o->callback(close_dlg_cb,wnd);
	o->box(UDAV_UP_BOX);	o->down_box(UDAV_DOWN_BOX);
	o->tooltip(mgl_gettext("Do nothing and close this window"));
	o = new Fl_Return_Button(125, 130, 75, 25, mgl_gettext("Do"));	o->callback(trsp_dlg_cb,wnd);
	o->box(UDAV_UP_BOX);	o->down_box(UDAV_DOWN_BOX);
	o->tooltip(mgl_gettext("Change data values and close this window"));
	wnd->end();
}
void makeTree()
{
  Flu_Tree_Browser::Node* n;

  // set the default leaf icon to be a blue dot
  tree->leaf_icon( &blue_dot );

  tree->clear();
  tree->label( "Tree Browser Demo" );
  //tree->select_under_mouse( true );

  n = tree->get_root();
  if( n ) n->branch_icons( &computer, &computer );

  //tree->move_only_same_group( true );

  /*
  char buf[32];
  for( int i = 0; i < 1000; i++ )
    {
      sprintf( buf, "%d", i );
      tree->add( "/", buf );
    }
  return;
  */

  n = tree->add( "/Customizable Icons!" );
  if( n ) n->leaf_icon( &red_dot );
  n = tree->add( "Text Entries!" );
  if( n ) n->leaf_icon( NULL );
  tree->add( "Identical Entries!" );
  tree->add( "Identical Entries!" );
  //n = tree->add( "/widgets!/" );
  n = tree->add_branch( "/widgets!" );
  n->always_open( true );
  //n->branch_icon( NULL );
  tree->add_branch( "two" );
  n = tree->add( "/widgets!/text item" );
  if( n ) n->leaf_icon( &text_doc );
  tree->add( "two/four" );
  n = tree->add( "/folders/six/123", "eight" );
  if( n ) n->leaf_icon( &green_dot );
  tree->add_leaf( "/folders/six/abc/" );
  tree->add( "/folders/six/seven/" );
  tree->add_leaf( "/uuu" );
  tree->add( "/folders/zilch/" );
  n = tree->find( "/folders" );
  if( n ) n->collapse_icons( &arrow_closed, &arrow_open );
  n = tree->add( "/branches/ten/eleven" );
  printf( "Path %s\n", tree->find_path( n ) );
  tree->add( "/two/this\\/that" ); // use the escape character for '/' (have to use \\ since the compiler automatically does escape replacement in strings)
  n = tree->add( "/zoom/" );
  if( n ) n->branch_icons( &cd_drive, &cd_drive );
  tree->add( "zoom", "zurb" );
  tree->add( "zoom", "zoom" );

  tree->open( true );

  // test the depth-first traversal interface
  /*
  printf( "----------------\n" );
  n = tree->last();//tree->first();
  while( n )
    {
      printf( "%s\n", n->label() );
      n = n->previous();//n->next();
    }
  */

  //return;

  Fl_Input *i = new Fl_Input( 0, 0, 100, 20 );
  tree->add( "/input/", i );

  Fl_Choice *c = new Fl_Choice( 0, 0, 100, 20 );
  c->add( "one" );
  c->add( "two" );
  c->add( "three" );
  c->add( "four" );
  c->value( 0 );
  n = tree->add( "/widgets!/choice", c );
  if( n ) n->expand_to_width( true );

  tree->leaf_icon( NULL );

  Fl_Button *b = new Fl_Button( 0, 0, 100, 20, "Button" );
  b->callback( button_callback );
  tree->add( "/widgets!/Button", b, false );
  printf( "Path %s\n", tree->find_path( b ) );

  {
    Fl_Check_Button *c = new Fl_Check_Button( 0, 0, 80, 20, "Check 1" );
    n = tree->add( "/widgets!/Check1", c, false );
    n->auto_label_color( true );
    c = new Fl_Check_Button( 0, 0, 80, 20, "Check 2" );
    n = tree->add( "/widgets!/Check2", c, true );
    n->auto_label_color( true );
    c = new Fl_Check_Button( 0, 0, 80, 20, "Check 3" );
    n = tree->add( "/widgets!/Check3", c, true );
    n->swap_label_and_widget( true );
    n->auto_label_color( true );
  }

  {
    Fl_Round_Button *r = new Fl_Round_Button( 0, 0, 70, 20, "Radio 1" );
    r->type( FL_RADIO_BUTTON );
    n = tree->add( "/widgets!/Radio1", r, false );
    n->auto_label_color( true );
    r = new Fl_Round_Button( 0, 0, 70, 20, "Radio 2" );
    r->type( FL_RADIO_BUTTON );
    n = tree->add( "/widgets!/Radio2", r, false );
    n->auto_label_color( true );
    r = new Fl_Round_Button( 0, 0, 70, 20, "Radio 3" );
    r->type( FL_RADIO_BUTTON );
    n = tree->add( "/widgets!/Radio3", r, false );
    n->auto_label_color( true );
    n->leaf_icon( &red_dot );
    n->icon_at_end( true );
  }

  {
    Fl_Round_Button *r = new Fl_Round_Button( 0, 0, 70, 20, "Radio 1" );
    r->type( FL_RADIO_BUTTON );
    n = tree->add( "/usr/Radio1", r, false );
    n->auto_label_color( true );
    r = new Fl_Round_Button( 0, 0, 70, 20, "Radio 2" );
    r->type( FL_RADIO_BUTTON );
    n->auto_label_color( true );
    n = tree->add( "/usr/Radio2", r, false );
    r = new Fl_Round_Button( 0, 0, 70, 20, "Radio 3" );
    r->type( FL_RADIO_BUTTON );
    n->auto_label_color( true );
    n = tree->add( "/usr/Radio3", r, false );
  }

  tree->add( "/usr/bin/foo" );
  tree->add( "/bin/foo" );
  tree->add( "/usr" );  // this should fail since there is already a branch called "usr"

  // disable the branch icons for this entry
  n = tree->find( "/usr" );
  if( n )
    n->branch_icons( 0, 0 );

  // test the find_next() interface
  /*
  printf( "%d\n", tree->find_number( "Identical Entries!" ) );
  n = tree->find( "Identical Entries!" );
  printf( "%d %d\n", n->id(), tree->find_next( "Identical Entries!", n )->id() );
  n = tree->find_next( "Identical Entries!", n );
  printf( "removed: %d\n", tree->remove( n ) );
  */

  //n = tree->find( "bin" );
  //if( n )
  //n->label( "New" );

  // find the absolute path of the node with unique ID = 10
  //printf( "%s\n", tree->find_path( 10 ) );

  // find the choice widget and deactivate it
  /*
  n = tree->find( c );
  if( n )
  n->deactivate();
  */

  tree->redraw();
}
Exemplo n.º 6
0
Arquivo: Main.cpp Projeto: aib/glito
void initParamWindow() {
    const int heightInput = 28;
    const int wideLabel = 205;
    const int wideInput = 130;
    const int between = 5;
    const int Ybetween = 3;
    const int YbetweenMore = 6;
    const int alignStyle = FL_ALIGN_INSIDE | FL_ALIGN_RIGHT;
    const Fl_Boxtype inputStyle = FL_PLASTIC_DOWN_BOX;
    int x = 10;
    int y = 10;
    const int wide = x+wideLabel+between+wideInput+x;
    const int height =  y + 14*(heightInput+Ybetween) - Ybetween + 9*YbetweenMore + y;
    paramWindow = new Fl_Window( wide, height, _("Parameters") );
    Fl_Group* win2 = new Fl_Group( 0, 0, wide, height );
    paramWindow->resizable(win2);
    {
	Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Schema size:") );
	o->align( alignStyle );
    }
    {
	Fl_Value_Slider* o = new Fl_Value_Slider( x+wideLabel+between, y, wideInput, heightInput );
	o->box(inputStyle);
	o->type(FL_HORIZONTAL);
	o->minimum(0);
	o->maximum(1);
	o->value(glito->getCloseEdge());
	o->step(0.01);
	o->callback( (Fl_Callback*)closeEdge_param, glito );
    }
    y += heightInput + Ybetween;
    {
	Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Preview Size:") );
	o->align( alignStyle );
    }
    {
	Fl_Value_Slider* o = new Fl_Value_Slider( x+wideLabel+between, y, wideInput, heightInput );
	o->box(inputStyle);
	o->type(FL_HORIZONTAL);
	o->minimum(0);
	o->maximum(1);
	o->value(glito->getPreviewSize());
	o->step(0.01);
	o->callback( (Fl_Callback*)previewSize_param, glito );
    }
    y += heightInput + Ybetween + YbetweenMore;
    {
	Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Rotation shift (rad):") );
	o->align( alignStyle );
    }
    {
	Fl_Value_Slider* o = new Fl_Value_Slider( x+wideLabel+between, y, wideInput, heightInput );
	o->box(inputStyle);
	o->type(FL_HORIZONTAL);
	o->minimum(0.002);
	o->maximum(0.2);
	o->value(glito->rotationShift);
	o->step(0.001);
	o->callback( (Fl_Callback*)rotationShift_param, glito );
    }
    y += heightInput + Ybetween + YbetweenMore;
    {
	Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Size of saved images:") );
	o->align( alignStyle );
    }
    {
	Fl_Int_Input* o = new Fl_Int_Input( x+wideLabel+between, y, wideInput/2-5, heightInput );
	o->box(inputStyle);
	o->value(IS::translate(glito->imageSavedWidth).c_str());
	o->callback( (Fl_Callback*)imageSavedWidth_param, glito );
    }
    {
	Fl_Box* o = new Fl_Box( x+wideLabel+between+wideInput/2-5, y, 10, heightInput, "x" );
	o->align( FL_ALIGN_INSIDE | FL_ALIGN_CENTER );
    }
    {
	Fl_Int_Input* o = new Fl_Int_Input( x+wideLabel+between+wideInput/2+5, y,
					    wideInput/2-5, heightInput );
	o->box(inputStyle);
	o->value(IS::translate(glito->imageSavedHeight).c_str());
	o->callback( (Fl_Callback*)imageSavedHeight_param, glito );
    }
    y += heightInput + Ybetween;
    {
	Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Size of animations:") );
	o->align( alignStyle );
    }
    {
	Fl_Int_Input* o = new Fl_Int_Input( x+wideLabel+between, y, wideInput/2-5, heightInput );
	o->box(inputStyle);
	o->value(IS::translate(glito->animationSavedWidth).c_str());
	o->callback( (Fl_Callback*)animationSavedWidth_param, glito );
    }
    {
	Fl_Box* o = new Fl_Box( x+wideLabel+between+wideInput/2-5, y, 10, heightInput, "x" );
	o->align( FL_ALIGN_INSIDE | FL_ALIGN_CENTER );
    }
    {
	Fl_Int_Input* o = new Fl_Int_Input( x+wideLabel+between+wideInput/2+5, y,
					    wideInput/2-5, heightInput );
	o->box(inputStyle);
	o->value(IS::translate(glito->animationSavedHeight).c_str());
	o->callback( (Fl_Callback*)animationSavedHeight_param, glito );
    }
    y += heightInput + Ybetween + YbetweenMore;
    {
	Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Frames per cycle (>1):") );
	o->align( alignStyle );
    }
    {
	Fl_Value_Input* o = new Fl_Value_Input( x+wideLabel+between, y, wideInput, heightInput );
	o->box(inputStyle);
	o->minimum(10);
	o->maximum(100);
	o->value(glito->framesPerCycle);
	o->step(1);
	o->callback( (Fl_Callback*)framesPerCycle_param, glito );
    }
    y += heightInput + Ybetween + YbetweenMore;
    {
	Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Motion detection (ms):") );
	o->align( alignStyle );
    }
    {
	Fl_Value_Slider* o = new Fl_Value_Slider( x+wideLabel+between, y, wideInput, heightInput );
	o->box(inputStyle);
	o->type(FL_HORIZONTAL);
	o->minimum(1);
	o->maximum(200);
	o->value(glito->intervalMotionDetection);
	o->step(1);
	o->callback( (Fl_Callback*)intervalMotionDetection_param, glito );
    }
    y += heightInput + Ybetween + YbetweenMore;
    {
	{
	    Fl_Button* o = new Fl_Button( x, y, 70, heightInput, _("Density") );
	    o->box(FL_PLASTIC_UP_BOX);
	    o->value( glito->trueDensity );
	    o->callback( (Fl_Callback*)trueDensity_param, glito );
	}
	{
	    Fl_Box* o = new Fl_Box( x, y, wideLabel+30, heightInput, _("or pseudo-density:") );
	    o->align( alignStyle );
	    if ( glito->trueDensity ) o->deactivate();
	}
	{
	    Fl_Value_Slider* o = new Fl_Value_Slider( x+wideLabel+30+between, y,
						      100, heightInput );
	    o->box(inputStyle);
	    if ( glito->trueDensity ) o->deactivate();
	    o->type(FL_HORIZONTAL);
	    o->minimum(0);
	    o->maximum(1);
	    o->value( ImagePseudoDensity::pseudoDensity.getProba() );
	    o->step(0.01);
	    o->callback( (Fl_Callback*)logProbaHitMax_param );
	}
    }
    y += heightInput + Ybetween + YbetweenMore;
    {
	Fl_Box* o = new Fl_Box( x, y, wideInput, heightInput, _("Points for framing:") );
	o->align( FL_ALIGN_INSIDE | FL_ALIGN_LEFT );
    }
    y += heightInput;
    {
	int xLine = 0;
	{
	    Fl_Int_Input* o = new Fl_Int_Input( x+xLine, y, 80, heightInput );
	    o->box(inputStyle);
	    o->value(IS::translate(glito->pointsForFraming).c_str());
	    o->callback( (Fl_Callback*)pointsForFraming_param, glito );
	}
	xLine += 80;
	{
	    Fl_Box* o = new Fl_Box( x+xLine, y, 20, heightInput, " (x " );
	    o->align( FL_ALIGN_INSIDE | FL_ALIGN_CENTER );
	}
	xLine += 20;
	{
	    Fl_Value_Slider* o = new Fl_Value_Slider( x+xLine, y, 100, heightInput );
	    o->box(inputStyle);
	    o->type(FL_HORIZONTAL);
	    o->minimum(0);
	    o->maximum(1);
	    o->box(inputStyle);
	    o->value(glito->animationFraming);
	    o->step(0.01);
	    o->callback( (Fl_Callback*)animationFraming_param, glito );
	}
	xLine += 100;
	{
	    Fl_Box* o = new Fl_Box( x+xLine, y, 110, heightInput, _(" for animation)") );
	    o->align( FL_ALIGN_INSIDE | FL_ALIGN_LEFT );
	}
    }
    y += heightInput + 2*Ybetween + YbetweenMore;
    {
	Fl_Box* o = new Fl_Box( x, y, wide-20, heightInput,
				_("Number of iterations limited by:") );
	o->align( FL_ALIGN_INSIDE | FL_ALIGN_LEFT );
    }
    y += heightInput;
    {
	Fl_Round_Button* o = new Fl_Round_Button( x, y, wideInput, heightInput,
						  _("Interval per frame (ms)") );
	o->box(FL_NO_BOX);
	o->type(FL_RADIO_BUTTON);
	o->when(FL_WHEN_CHANGED);
	o->value(glito->clockNumber);
	o->callback( (Fl_Callback*)clockNumber_param, glito );
    }
    {
	Fl_Value_Slider* o = new Fl_Value_Slider( x+wideLabel+between, y, wideInput, heightInput );
	o->box(inputStyle);
	if ( !glito->clockNumber ) o->deactivate();
	o->type(FL_HORIZONTAL);
	o->minimum(1);
	o->maximum(200);
	o->value(glito->intervalFrame);
	o->step(1);
	o->callback( (Fl_Callback*)intervalFrame_param, glito );
    }
    y += heightInput + Ybetween;
    {
	int xLine = 0;
	{
	    Fl_Round_Button* o = new Fl_Round_Button( x, y, 127, heightInput,
						      _("Points per frame") );
	    o->box(FL_NO_BOX);
	    o->type(FL_RADIO_BUTTON);
	    o->when(FL_WHEN_CHANGED);
	    o->value(!glito->clockNumber);
	    o->callback( (Fl_Callback*)clockNumber_param, glito );
	}
	xLine += 127 + between;
	{
	    Fl_Int_Input* o = new Fl_Int_Input( x+xLine, y, 80, heightInput );
	    o->box(inputStyle);
	    if ( glito->clockNumber ) o->deactivate();
	    o->value(IS::translate(glito->pointsPerFrame).c_str());
	    o->callback( (Fl_Callback*)pointsPerFrame_param, glito );
	}
	xLine += 80 + 2;
	{
	    Fl_Button* o = new Fl_Button( x+xLine, y, wide - (x+xLine) - 10,
					  heightInput, _("Calibrate") );
	    o->box(FL_PLASTIC_UP_BOX);
	    if ( glito->clockNumber ) o->deactivate();
	    o->callback( (Fl_Callback*)calibrate_param, glito );
	}
    }
    y += heightInput + Ybetween + 2*YbetweenMore;
    {
	int xLine = 0;
	{
	    Fl_Button* o = new Fl_Button( x, y, 90, heightInput, _("Black/White") );
	    o->box(FL_PLASTIC_UP_BOX);
	    o->value( !ImageGray::background.isBlack() );
	    o->callback( (Fl_Callback*)blackWhite_param );
	}
	xLine += 90 + 2*between + 5;
	{
	    Fl_Choice* o = new Fl_Choice( x+xLine+110, y, 95, heightInput,
					  _("Transparency:") );
	    o->add( ImageGray::transparency.stringNone().c_str(),
		    0, (Fl_Callback*)transparency_param, (void*)0 );
	    o->add( ImageGray::transparency.stringSimple().c_str(),
		    0, (Fl_Callback*)transparency_param, (void*)1 );
	    o->add( ImageGray::transparency.stringAlpha().c_str(),
		    0, (Fl_Callback*)transparency_param, (void*)2 );
	    if ( ImageGray::transparency.useAlphaTransparency() ) {
		o->value(2);
	    } else if ( ImageGray::transparency.useSimpleTransparency() ) {
		o->value(1);
	    } else {
		o->value(0);
	    }
	}
    }
    y += heightInput + Ybetween;
    {
	// invisible box to allow correct resizing
	Fl_Box* o = new Fl_Box( 0, y, 100, 0 );
	win2->resizable(*o);
    }
    win2->end();
    paramWindow->end();
}
Exemplo n.º 7
0
FltDesignUI::FltDesignUI() {
  Fl_Window* w;
  { Fl_Window* o = mainWindow = new Fl_Window(439, 249, "Filter Design UI");
    w = o;
    o->user_data((void*)(this));
    { Fl_Group* o = kernel = new Fl_Group(0, 20, 272, 140, "Filter Kernel");
      o->box(FL_ENGRAVED_FRAME);
      o->when(FL_WHEN_CHANGED);
      { Fl_Value_Input* o = ele0 = new Fl_Value_Input(5, 26, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele0);
      }
      { Fl_Value_Input* o = ele1 = new Fl_Value_Input(58, 26, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele1);
      }
      { Fl_Value_Input* o = ele2 = new Fl_Value_Input(111, 26, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele2);
      }
      { Fl_Value_Input* o = ele3 = new Fl_Value_Input(164, 26, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele3);
      }
      { Fl_Value_Input* o = ele4 = new Fl_Value_Input(217, 26, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele4);
      }
      { Fl_Value_Input* o = ele5 = new Fl_Value_Input(5, 52, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele5);
      }
      { Fl_Value_Input* o = ele6 = new Fl_Value_Input(58, 52, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele6);
      }
      { Fl_Value_Input* o = ele7 = new Fl_Value_Input(111, 52, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele7);
      }
      { Fl_Value_Input* o = ele8 = new Fl_Value_Input(164, 52, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele8);
      }
      { Fl_Value_Input* o = ele9 = new Fl_Value_Input(217, 52, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele9);
      }
      { Fl_Value_Input* o = ele10 = new Fl_Value_Input(5, 78, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele10);
      }
      { Fl_Value_Input* o = ele11 = new Fl_Value_Input(58, 78, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele11);
      }
      { Fl_Value_Input* o = ele12 = new Fl_Value_Input(111, 78, 50, 25);
        o->maximum(255);
        o->value(1);
        o->callback((Fl_Callback*)cb_ele12);
      }
      { Fl_Value_Input* o = ele13 = new Fl_Value_Input(164, 78, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele13);
      }
      { Fl_Value_Input* o = ele14 = new Fl_Value_Input(217, 78, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele14);
      }
      { Fl_Value_Input* o = ele15 = new Fl_Value_Input(5, 104, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele15);
      }
      { Fl_Value_Input* o = ele16 = new Fl_Value_Input(58, 104, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele16);
      }
      { Fl_Value_Input* o = ele17 = new Fl_Value_Input(111, 104, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele17);
      }
      { Fl_Value_Input* o = ele18 = new Fl_Value_Input(164, 104, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele18);
      }
      { Fl_Value_Input* o = ele19 = new Fl_Value_Input(217, 104, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele19);
      }
      { Fl_Value_Input* o = ele20 = new Fl_Value_Input(5, 130, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele20);
      }
      { Fl_Value_Input* o = ele21 = new Fl_Value_Input(58, 130, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele21);
      }
      { Fl_Value_Input* o = ele22 = new Fl_Value_Input(111, 130, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele22);
      }
      { Fl_Value_Input* o = ele23 = new Fl_Value_Input(164, 130, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele23);
      }
      { Fl_Value_Input* o = ele24 = new Fl_Value_Input(217, 130, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele24);
      }
      o->end();
    }
    { Fl_Value_Input* o = scale = new Fl_Value_Input(112, 163, 154, 25, "Divide by::");
      o->maximum(255);
      o->value(1);
      o->callback((Fl_Callback*)cb_scale);
    }
    { Fl_Value_Input* o = offset = new Fl_Value_Input(112, 191, 154, 25, "Offset:");
      o->maximum(255);
      o->callback((Fl_Callback*)cb_offset);
    }
    { Fl_Group* o = new Fl_Group(280, 20, 160, 64, "Filter Range");
      o->box(FL_ENGRAVED_FRAME);
      { Fl_Round_Button* o = image = new Fl_Round_Button(284, 27, 68, 28, "Whole Image");
        o->type(102);
        o->down_box(FL_ROUND_DOWN_BOX);
      }
      { Fl_Round_Button* o = selection = new Fl_Round_Button(284, 51, 68, 28, "Brush Selection");
        o->type(102);
        o->down_box(FL_ROUND_DOWN_BOX);
      }
      o->end();
    }
    { Fl_Button* o = new Fl_Button(4, 224, 124, 24, "Load");
      o->callback((Fl_Callback*)cb_Load);
    }
    { Fl_Button* o = new Fl_Button(144, 224, 124, 24, "Save");
      o->callback((Fl_Callback*)cb_Save);
    }
    { Fl_Button* o = new Fl_Button(280, 125, 156, 24, "Preview");
      o->callback((Fl_Callback*)cb_Preview);
    }
    { Fl_Button* o = new Fl_Button(280, 159, 156, 24, "Cancel");
      o->callback((Fl_Callback*)cb_Cancel);
    }
    { Fl_Button* o = new Fl_Button(280, 192, 156, 24, "Accept");
      o->callback((Fl_Callback*)cb_Accept);
    }
    { Fl_Button* o = new Fl_Button(280, 224, 156, 24, "Close");
      o->callback((Fl_Callback*)cb_Close);
    }
    o->end();
  }
}
Exemplo n.º 8
0
edisplayconf::edisplayconf() {
  Fl_Window* w;
   {Fl_Window* o = win = new Fl_Window(265, 335, _("Display configuration"));
    w = o;
    o->callback((Fl_Callback*)cb_win, (void*)(this));
     {Fl_Tabs* o = new Fl_Tabs(5, 5, 255, 285);
       {Fl_Group* o = group_mouse = new Fl_Group(0, 20, 255, 265, _("Mouse"));
        o->align(FL_ALIGN_LEFT);
         {Fl_Value_Slider* o = slider_accel = new Fl_Value_Slider(25, 25, 220, 18, _("Acceleration"));
          o->type(Fl_Value_Slider::HORIZONTAL);
          o->maximum(10);
          o->step(1);
          o->value(2);
          o->align(FL_ALIGN_TOP);
        }
         {Fl_Value_Slider* o = slider_thresh = new Fl_Value_Slider(25, 65, 220, 18, _("Threshold (pixels)"));
          o->type(Fl_Value_Slider::HORIZONTAL);
          o->maximum(20);
          o->step(1);
          o->value(4);
          o->align(FL_ALIGN_TOP);
        }
        o->end();
      }
       {Fl_Group* o = group_bell = new Fl_Group(0, 20, 255, 265, _("Bell"));
        o->hide();
         {Fl_Value_Slider* o = slider_volume = new Fl_Value_Slider(25, 25, 220, 18, _("Volume in %"));
          o->type(Fl_Value_Slider::HORIZONTAL);
          o->maximum(100);
          o->step(1);
          o->value(50);
          o->align(FL_ALIGN_TOP);
        }
         {Fl_Value_Slider* o = slider_pitch = new Fl_Value_Slider(25, 70, 220, 18, _("Pitch in Hz"));
          o->type(Fl_Value_Slider::HORIZONTAL);
          o->minimum(100);
          o->maximum(1000);
          o->step(1);
          o->value(440);
          o->align(FL_ALIGN_TOP);
        }
         {Fl_Value_Slider* o = slider_duration = new Fl_Value_Slider(25, 115, 220, 18, _("Duration in ms"));
          o->type(Fl_Value_Slider::HORIZONTAL);
          o->maximum(1000);
          o->step(1);
          o->value(200);
          o->align(FL_ALIGN_TOP);
        }
         {Fl_Button* o = new Fl_Button(180, 165, 60, 25, _("Test"));
          o->callback((Fl_Callback*)cb_Test);
        }
        o->end();
      }
       {Fl_Group* o = group_keyboard = new Fl_Group(0, 20, 255, 265, _("Keyboard"));
        o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT);
        o->hide();
         {Fl_Check_Button* o = check_autorepeat = new Fl_Check_Button(24, 25, 221, 20, _("  Repeat key activated"));
          o->selection_color((Fl_Color)2);
          o->value(1);
        }
         {Fl_Value_Slider* o = slider_click = new Fl_Value_Slider(25, 65, 220, 18, _("Click volume %"));
          o->type(Fl_Value_Slider::HORIZONTAL);
          o->maximum(100);
          o->step(1);
          o->value(50);
          o->align(FL_ALIGN_TOP);
        }
        o->end();
      }
       {Fl_Group* o = group_screen = new Fl_Group(0, 20, 255, 265, _("Screen"));
        o->hide();
         {Fl_Button* o = but_activate = new Fl_Button(165, 187, 80, 25, _("&Test"));
          o->callback((Fl_Callback*)cb_but_activate);
        }
        new Fl_Box(10, 1, 234, 55);
         {Fl_Value_Slider* o = slider_delay = new Fl_Value_Slider(25, 77, 220, 18, _("Activation delay (min)"));
          o->type(Fl_Value_Slider::HORIZONTAL);
          o->minimum(5);
          o->maximum(120);
          o->step(1);
          o->value(15);
          o->align(FL_ALIGN_TOP);
        }
         {Fl_Check_Button* o = check_blanking = new Fl_Check_Button(23, 25, 222, 20, _(" Screen blanker activated"));
          o->selection_color((Fl_Color)2);
          o->value(1);
        }
        new Fl_Box(10, 100, 234, 37);
         {Fl_Value_Slider* o = slider_pattern = new Fl_Value_Slider(25, 152, 220, 18, _("Pattern change delay (min)"));
          o->type(Fl_Value_Slider::HORIZONTAL);
          o->minimum(1);
          o->maximum(5);
          o->step(0);
          o->value(2);
          o->align(FL_ALIGN_TOP);
          o->deactivate();
        }
         {Fl_Group* o = new Fl_Group(30, 105, 210, 25);
           {Fl_Round_Button* o = radio_blank = new Fl_Round_Button(0, 5, 105, 20, _("Blank"));
            o->type(Fl_Round_Button::RADIO);
            o->selection_color((Fl_Color)1);
            o->value(1);
            o->callback((Fl_Callback*)cb_radio_blank);
          }
           {Fl_Round_Button* o = radio_pattern = new Fl_Round_Button(115, 5, 95, 20, _("Pattern"));
            o->type(Fl_Round_Button::RADIO);
            o->selection_color((Fl_Color)1);
            o->callback((Fl_Callback*)cb_radio_pattern);
          }
          o->end();
        }
        o->end();
      }
      o->end();
    }
     {Fl_Button* o = new Fl_Button(190, 300, 70, 25, _("&Cancel"));
      o->callback((Fl_Callback*)cb_Cancel);
      o->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
    }
     {Fl_Button* o = but_kbd_apply = new Fl_Button(115, 300, 70, 25, _("&Apply"));
      o->callback((Fl_Callback*)cb_but_kbd_apply);
    }
     {Fl_Return_Button* o = new Fl_Return_Button(40, 300, 70, 25, _("OK"));
      o->shortcut(0xd);
      o->callback((Fl_Callback*)cb_OK);
    }
    o->end();
  }
}
Exemplo n.º 9
0
Fl_Window* make_codingstyle_window() {
  Fl_Window* w;
   {Fl_Window* o = new Fl_Window(310, 255);
    w = o;
    o->shortcut(0xff1b);
     {Fl_Tabs* o = new Fl_Tabs(0, 0, 303, 220);
      o->color((Fl_Color)0xfffffffe);
       {Fl_Group* o = new Fl_Group(1, 24, 301, 195, _("Brace Style"));
         {Fl_Group* o = new Fl_Group(14, 22, 282, 122, _("Brace Style"));
          o->box(FL_ENGRAVED_BOX);
          o->align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
           {Fl_Box* o = new Fl_Box(20, 6, 47, 20, _("if ( x ) {"));
            o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(20, 25, 45, 20, _("++y;"));
            o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(20, 41, 36, 20, _("}"));
            o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(114, 6, 47, 20, _("if ( x )"));
            o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(114, 25, 36, 20, _("{"));
            o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(115, 42, 46, 20, _("++y;"));
            o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(114, 59, 36, 20, _("}"));
            o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
          }
           {Fl_Round_Button* o = pStyle1 = new Fl_Round_Button(16, 84, 66, 25, _("Style 1"));
            o->type(Fl_Round_Button::RADIO);
            o->value(1);
            o->callback((Fl_Callback*)cb_pStyle1);
          }
           {Fl_Box* o = new Fl_Box(201, 6, 47, 20, _("if ( x )"));
            o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(201, 25, 36, 20, _("{"));
            o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(227, 42, 34, 22, _("++y;"));
            o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
          }
           {Fl_Box* o = new Fl_Box(201, 59, 36, 20, _("}"));
            o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
          }
           {Fl_Round_Button* o = pStyle2 = new Fl_Round_Button(109, 84, 66, 25, _("Style 2"));
            o->type(Fl_Round_Button::RADIO);
            o->callback((Fl_Callback*)cb_pStyle2);
          }
           {Fl_Round_Button* o = pStyle3 = new Fl_Round_Button(200, 84, 66, 25, _("Style 3"));
            o->type(Fl_Round_Button::RADIO);
            o->callback((Fl_Callback*)cb_pStyle3);
          }
          o->end();
        }
         {Fl_Check_Button* o = pNoSpaceParens = new Fl_Check_Button(15, 147, 195, 22, _("No space before parentheses"));
          o->callback((Fl_Callback*)cb_pNoSpaceParens);
        }
         {Fl_Check_Button* o = pBraceFuncs = new Fl_Check_Button(15, 170, 174, 22, _("Apply to function braces"));
          o->value(1);
          o->callback((Fl_Callback*)cb_pBraceFuncs);
        }
        o->end();
      }
       {Fl_Group* o = new Fl_Group(1, 24, 301, 195, _("Other"));
        o->hide();
         {Fl_Group* o = new Fl_Group(11, 22, 284, 90, _("Indentation"));
          o->box(FL_ENGRAVED_BOX);
          o->align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
           {Fl_Value_Input* o = pTabSize = new Fl_Value_Input(129, 33, 60, 22, _("Tab size for indents"));
            o->maximum(12);
            o->value(2);
            o->callback((Fl_Callback*)cb_pTabSize);
          }
           {Fl_Check_Button* o = pIndentTabs = new Fl_Check_Button(13, 7, 114, 22, _("Indent with tabs"));
            o->callback((Fl_Callback*)cb_pIndentTabs);
          }
           {Fl_Check_Button* o = pIndentCode = new Fl_Check_Button(14, 58, 151, 22, _("Indent code blocks"));
            o->callback((Fl_Callback*)cb_pIndentCode);
          }
          o->end();
        }
         {Fl_Check_Button* o = pReturnParens = new Fl_Check_Button(10, 120, 220, 22, _("Always use parentheses on return"));
          o->callback((Fl_Callback*)cb_pReturnParens);
        }
        o->end();
      }
      o->end();
    }
     {Fl_Button* o = new Fl_Button(115, 227, 59, 23, _("Cancel"));
      o->callback((Fl_Callback*)cb_Cancel);
    }
     {Fl_Button* o = new Fl_Button(180, 227, 59, 23, _("Save"));
      o->callback((Fl_Callback*)cb_Save);
    }
     {Fl_Button* o = new Fl_Button(245, 227, 59, 23, _("Use"));
      o->callback((Fl_Callback*)cb_Use);
    }
    o->end();
    o->resizable(o);
  }
  return  w;
}