コード例 #1
0
ファイル: bookmarks.cpp プロジェクト: BertieJim/fifth
void editbookmark(bookmark * const ptr) {

	if (!bookedit_win) {
		bookedit_win = new Fl_Double_Window(350, 180, _("Edit bookmark"));
		{ bookedit_name = new Fl_Input(60, 20, 265, 25, _("Name:"));
		} // Fl_Input* bookedit_name
		{ bookedit_url = new Fl_Input(60, 55, 265, 25, _("URL:"));
		} // Fl_Input* bookedit_url
		{ Fl_Box* o = new Fl_Box(60, 80, 265, 50, _("The changes get applied immediately."));
			o->align(FL_ALIGN_WRAP);
		} // Fl_Box* o
		{ Fl_Button * o = new Fl_Button(60, 130, 115, 30, _("OK"));
			o->callback(bookedit_ok);
			bookedit_okbtn = o;
		} // Fl_Button* o
		{ Fl_Button* o = new Fl_Button(195, 130, 115, 30, _("Cancel"));
			o->callback(bookedit_cancel);
		} // Fl_Button* o
		bookedit_win->end();
	} // Fl_Double_Window* bookedit_win

	bookedit_name->value(ptr->name);
	bookedit_url->value(ptr->url);
	bookedit_url->activate();

	if (!ptr->url)
		bookedit_url->deactivate();

	bookedit_okbtn->user_data(ptr);

	bookedit_win->show();
}
コード例 #2
0
ファイル: FolderWindow.cpp プロジェクト: themize/RNAStructViz
void FolderWindow::AddStructure(const char* filename, const int index)
{
    
    Fl_Pack* pack = folderPack;
    pack->begin();
    
    int vertPosn = pack->children() * 30 + pack->y();
    
    Fl_Group* group = new Fl_Group(pack->x(), vertPosn, pack->w(), 30);
    group->begin();
    
    Fl_Button* label = new Fl_Button(pack->x() + 10, vertPosn, pack->w() - 40, 30, filename);
    label->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_LEFT);
    label->callback(FolderWindow::ShowFileCallback);
    label->user_data((void*)index);
    
    Fl_Button* removeButton = new Fl_Button(pack->x() + pack->w() - 20, vertPosn + 5, 20, 20);
    removeButton->callback(FolderWindow::RemoveCallback);
    removeButton->user_data((void*)index);
    removeButton->label("@1+");
    
    //printf("Added file: %s\n",label->label());
    
    group->resizable(label);
    group->end();
    pack->end();
        
    folderScroll->redraw();
}
コード例 #3
0
ファイル: SelectorGUI.cpp プロジェクト: aabhasgarg/accessgrid
/*
  Initial creation of ui components.
*/
void SelectorGUI::create(){
  Fl_Window *window = new Fl_Window(400,460,"Stream Selector");
  x = 80;
  y = 10;
  char* participantList[100];
  test = "this is a member";
   
  window->size_range(400, 400, 600, 600);

  // Scroll window containing participants
  swindow = new Fl_Scroll(0, y, 400, 380);
  Fl_Group* o = new Fl_Group(x, y, 380, 280);
  o->box(FL_THIN_UP_FRAME);
  
  // Add buttons to scroll window
  update();
  
  // Apply and close button.
  y = 400;
  x = 150; 
  Fl_Button *applyButton = new Fl_Button(150, y, 60, 40, "Refresh");
  Fl_Button *closeButton = new Fl_Button(x + 70, y, 60, 40, "Close");
  
  // Callbacks.
  applyButton->callback(static_applyCB, this);
  closeButton->callback(static_closeCB, this);
  
  window->end();
  window->show();
    
 
  // For some reason, the idle callback causes a segfault.
  //Fl::add_idle(static_idleCB);
}
コード例 #4
0
ファイル: table.cpp プロジェクト: ClinicalGraphics/MathGL
//-----------------------------------------------------------------------------
void NrmDlg::create_dlg()
{
	Fl_Menu_Item k[]={{"x"}, {"y"}, { "z"}, {0}};
	wnd = new Fl_Double_Window(135, 215);
	min = new Fl_Value_Input(10, 25, 115, 25, mgl_gettext("Minimal value (v1)"));
	min->align(FL_ALIGN_TOP_LEFT);
	min->tooltip(mgl_gettext("Minimal value for resulting data values"));
	max = new Fl_Value_Input(10, 70, 115, 25, mgl_gettext("Maximal value (v2)"));
	max->align(FL_ALIGN_TOP_LEFT);
	max->tooltip(mgl_gettext("Maximal value for resulting data values"));
	dir = new Fl_Choice(10, 115, 115, 25, mgl_gettext("Direction"));
	dir->align(FL_ALIGN_TOP_LEFT);	dir->copy(k);
	dir->tooltip(mgl_gettext("Direction along which data will be filled"));
	sym = new Fl_Check_Button(10, 115, 115, 25, mgl_gettext("Symetrical range"));
	sym->tooltip(mgl_gettext("Normalize in symmetrical range: -max(|v1|,|v2|) ... max(|v1|,|v2|)"));

	Fl_Button *o;
	o = new Fl_Button(25, 150, 85, 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(25, 180, 85, 25, mgl_gettext("Change"));o->callback(nrm_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();
}
コード例 #5
0
ファイル: main.cpp プロジェクト: monchi59/crazyMichel
int main(int argc, char** argv) {
    
    
    CrazyContainer *container = new CrazyContainer();
    container->loadXML();
    MyWindow *window = new MyWindow();
    window->setCrazyContainer(container);
        
    Fl_Button *b1 = new Fl_Button(20, 20, 80, 25, "Connect");
    b1->callback(connect,(void *)container);
    
    Fl_Button *b2 = new Fl_Button(100, 20, 80, 25, "Go 11000");
    b2->callback(run,(void *)container);
    FLContainer::thrustOutput = new Fl_Value_Slider(100,50,250,25,"Thrust meter");
    FLContainer::thrustOutput->type(FL_HOR_FILL_SLIDER);
    FLContainer::thrustOutput->scrollvalue(5000, 100, 5000, 100000);
    FLContainer::thrustOutput->callback(runCustomThrust,(void *)container); 
    
    FLContainer::pitch = new Fl_Value_Slider(100,100,250,25,"Pitch");
    FLContainer::pitch->type(FL_HORIZONTAL);
    FLContainer::pitch->scrollvalue(0,10,-180,370);
    FLContainer::pitch->precision(2);
    FLContainer::roll = new Fl_Value_Slider(100,140,250,25,"Roll");
    FLContainer::roll->type(FL_HORIZONTAL);
    FLContainer::roll->scrollvalue(0,10,-180,370);
    FLContainer::roll->precision(2);
    FLContainer::yaw = new Fl_Value_Slider(100,180,250,25,"Yaw");
    FLContainer::yaw->type(FL_HORIZONTAL);
    FLContainer::yaw->scrollvalue(0,10,-180,370);
    FLContainer::yaw->precision(2);
    FLContainer::offsetPitch = new Fl_Value_Slider(100,220,250,25,"Offset Pitch");
    FLContainer::offsetPitch->type(FL_HORIZONTAL);
    FLContainer::offsetPitch->scrollvalue(container->getOffsetPitch(),10,-20,50);
    FLContainer::offsetPitch->precision(2);
    FLContainer::offsetPitch->callback(setOffsetPitch,(void *)container);
    FLContainer::offsetRoll = new Fl_Value_Slider(100,260,250,25,"Offset Roll");
    FLContainer::offsetRoll->type(FL_HORIZONTAL);
    FLContainer::offsetRoll->scrollvalue(container->getOffsetRoll(),10,-20,50);
    FLContainer::offsetRoll->precision(2);
    FLContainer::offsetRoll->callback(setOffsetRoll,(void *)container);
    
     Fl_Button *b3 = new Fl_Button(200, 20, 80, 25, "Stop");
    b3->callback(stop,(void *)container);
    
    Fl_Button *bfocus = new Fl_Button(20, 45, 80, 25, "Focus");
    
     Fl_Button *b5 = new Fl_Button(400, 20, 80, 25, "Kill n' Exit");
    b5->callback(killnstop,(void *)container);
    
    Fl_Button *bsave = new Fl_Button(500, 20, 80, 25, "Plot");
    bsave->callback(save,(void *)container);
    
    Fl_Button *bload = new Fl_Button(500, 50, 80, 25, "Load");
    bload->callback(load,(void *)container);
    
    
    window->end();
    window->show(argc,argv);
    return Fl::run();
}
コード例 #6
0
ファイル: FolderWindow.cpp プロジェクト: themize/RNAStructViz
FolderWindow::FolderWindow(int x, int y, int wid, int hgt, const char *label, int folderIndex): Fl_Group(x, y, wid, hgt, label)
{
    
    Fl_Button* diagramButton = new Fl_Button(x+20,y+10,90,30,"Diagram");
    diagramButton->callback(DiagramCallback);
    Fl_Button* statsButton = new Fl_Button(x+120,y+10,90,30,"Statistics");
    statsButton->callback(StatsCallback);
    
    Fl_Button* closeButton = new Fl_Button(x+wid-25,y+5,20,20,"");
    closeButton->callback(FolderWindow::CloseFolderCallback);
    closeButton->label("@1+");
    
    Fl_Box* fileLabel = new Fl_Box(x+20,y+40,120,30,"Files");
    fileLabel->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_LEFT);
    
    folderScroll = new Fl_Scroll(x+10, y+70, 280, 310);
    folderScroll->type(Fl_Scroll::VERTICAL_ALWAYS);
    folderPack = new Fl_Pack(x+10, y+70, 260, 310);
    folderPack->type(Fl_Pack::VERTICAL);
    
    folderScroll->color(FL_WHITE);
    folderPack->color(FL_WHITE);
    
    this->resizable(folderScroll);
    this->color(FL_WHITE);
    this->selection_color(FL_WHITE);
    //size_range(300, 400, 300);
    
    //title = (char*)malloc(sizeof(char) * 64);
    SetStructures(folderIndex);
}
コード例 #7
0
ファイル: ede-launch.cpp プロジェクト: edeproject/svn
static int start_dialog(int argc, char** argv) {
	LaunchWindow* win = new LaunchWindow(370, 195, _("Run Command"));
	win->begin();
		Fl_Box* icon = new Fl_Box(10, 10, 55, 55);
		icon->image(image_run);

		Fl_Box* txt = new Fl_Box(70, 10, 290, 69, _("Enter the name of the application "
													"you would like to run or the URL you would like to view"));
		txt->align(132|FL_ALIGN_INSIDE);

		dialog_input = new Fl_Input(70, 90, 290, 25, _("Open:"));

		Resource rc;
		char     buf[128];

		if(rc.load("ede-launch-history") && rc.get("History", "open", buf, sizeof(buf))) {
			dialog_input->value(buf);

			/* make text appear selected */
			dialog_input->position(0, dialog_input->size());
		}

		in_term = new Fl_Check_Button(70, 125, 290, 25, _("Run in terminal"));
		in_term->down_box(FL_DOWN_BOX);

		Fl_Button* ok = new Fl_Button(175, 160, 90, 25, _("&OK"));
		ok->callback(ok_cb, win);
		Fl_Button* cancel = new Fl_Button(270, 160, 90, 25, _("&Cancel"));
		cancel->callback(cancel_cb, win);
	win->end();
	win->window_icon(run_xpm);
	win->show(argc, argv);

	return Fl::run();
}
コード例 #8
0
ファイル: csv2html_gui.cpp プロジェクト: limingjie/csv2html
    window(int x, int y, int w, int h, const char *label = 0)
        : Fl_Window(x, y, w, h, label)
    {
        Fl_Box *o = new Fl_Box(10, 10, 300, 25,
            "Open CSV file to convert to HTML -->");
        o->box(FL_BORDER_BOX);
        o->align(FL_ALIGN_INSIDE | FL_ALIGN_WRAP| FL_ALIGN_CENTER);
        o->color((Fl_Color)215);
        o->labelfont(FL_HELVETICA_BOLD);

        Fl_Button *but = new Fl_Button(320, 10, 80, 25, "Pick Files");
        but->callback(on_pick_button_click, this);

        encode_check = new Fl_Check_Button(10, 40, 280, 25,
            "Escape special HTML characters.");
        encode_check->value(1);

        open_file_check = new Fl_Check_Button(10, 65, 280, 25,
            "Open HTML in browser.");
        open_file_check->value(1);

        Fl_Button *author = new Fl_Button(320, 65, 80, 25, "Mingjie Li");
        author->box(FL_FLAT_BOX);
        author->align(FL_ALIGN_INSIDE | FL_ALIGN_RIGHT);
        author->labelsize(12);
        author->labelcolor(fl_rgb_color(128, 128, 128));
        author->callback(on_author_click, this);
    }
コード例 #9
0
ファイル: Fl_Help_Dialog.cpp プロジェクト: edeproject/svn
void Fl_Help_Dialog::make_group(int w, int h)
{
	menubar_ = new Fl_Menu_Bar(0, 0, 595, 20); 
	menubar_->begin();
    {
		Fl_Item_Group *g = new Fl_Item_Group("&File");
        Fl_Item *i;
		
		i= new Fl_Item("Open");
		i->shortcut(FL_CTRL+'o');
		i->callback((Fl_Callback*)cb_open, this);
		
		i = new Fl_Item("Close");
		i->shortcut(FL_CTRL+'c');
		i->callback((Fl_Callback*)cb_close, this);
        g->end();
    }
	menubar_->end();

	{
		Fl_Group *g = new Fl_Group(0, 20, w, 30);
		g->box(FL_THIN_DOWN_BOX);
		
		Fl_Button *b;
     
		b = back = new Fl_Highlight_Button(35, 2, 30, 25, "@<-");        
		b->box(FL_HIGHLIGHT_UP_BOX);
		b->label_type(FL_SYMBOL_LABEL);
		b->label_color(FL_DARK3);
		b->highlight_label_color(FL_GRAY);
        b->callback((Fl_Callback*)cb_back, this);
        b->tooltip("Back");
		b->deactivate();
      
		b = next = new Fl_Highlight_Button(65, 2, 30, 25, "@->");
		b->box(FL_HIGHLIGHT_UP_BOX);

		b->label_type(FL_SYMBOL_LABEL);
		b->label_color(FL_DARK3);                
		b->highlight_label_color(FL_GRAY);
        b->callback((Fl_Callback*)cb_next, this);
        b->tooltip("Next");
		b->deactivate();

		b = new Fl_Highlight_Button(5, 2, 30, 25);
		b->image(Fl_Image::read(0, (uchar*)datas_open));
        b->box(FL_HIGHLIGHT_UP_BOX);
        b->callback((Fl_Callback*)cb_open, this);
        b->tooltip("Open");
		b->take_focus();

		g->end();
	}

        htmlWidget = new Fl_Simple_Html(0, 50, w, h-50);
        htmlWidget->callback(cb_html_link, this);
    htmlWidget->end();

	resizable(htmlWidget);
}
コード例 #10
0
void select_monitor_widget_t::populate(console_window_t *console_window)
{
	label("Select a running coLinux");

	console = console_window;

	browser = new Fl_Hold_Browser(0, 0, 400, 200);
	Fl_Button *button;

	button = new Fl_Button(0, 200, 200, 20);
	button->label("Select");
	button->when(FL_WHEN_RELEASE);
	button->callback((Fl_Callback *)console_select_monitor, this);
	select_button = button;

	button = new Fl_Button(200, 200, 200, 20);
	button->label("Cancel");
	button->when(FL_WHEN_RELEASE);
	button->callback((Fl_Callback *)console_select_monitor, this);
	cancel_button = button;

	resizable(browser);

	end();
	show();

	load_monitors_list();
}
コード例 #11
0
ファイル: spyrotate_ui.C プロジェクト: benschneider/Spyview
Fl_Double_Window* make_window() {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = controls = new Fl_Double_Window(255, 60, "Rotation Angle");
    w = o;
    { Fl_Value_Input* o = angle_value = new Fl_Value_Input(180, 5, 70, 25, "Angle");
      o->minimum(-65000);
      o->maximum(65000);
      o->callback((Fl_Callback*)cb_angle_value);
      o->when(FL_WHEN_ENTER_KEY);
    }
    { Fl_Roller* o = angle_roller = new Fl_Roller(5, 35, 245, 20);
      o->type(1);
      o->minimum(65000);
      o->maximum(-65000);
      o->step(0.1);
      o->callback((Fl_Callback*)cb_angle_roller);
    }
    { Fl_Button* o = new Fl_Button(70, 5, 55, 25, "next");
      o->shortcut(0x66);
      o->callback((Fl_Callback*)cb_next);
    }
    { Fl_Button* o = new Fl_Button(5, 5, 55, 25, "prev");
      o->shortcut(0x64);
      o->callback((Fl_Callback*)cb_prev);
    }
    o->end();
    o->resizable(o);
  }
  { ImageWindow* o = iw1 = new ImageWindow(100, 100);
    w = o;
    o->box(FL_FLAT_BOX);
    o->color(FL_BACKGROUND_COLOR);
    o->selection_color(FL_BACKGROUND_COLOR);
    o->labeltype(FL_NO_LABEL);
    o->labelfont(0);
    o->labelsize(14);
    o->labelcolor(FL_FOREGROUND_COLOR);
    o->align(FL_ALIGN_TOP);
    o->when(FL_WHEN_RELEASE);
    o->end();
  }
  { ImageWindow* o = iw2 = new ImageWindow(100, 100);
    w = o;
    o->box(FL_FLAT_BOX);
    o->color(FL_BACKGROUND_COLOR);
    o->selection_color(FL_BACKGROUND_COLOR);
    o->labeltype(FL_NO_LABEL);
    o->labelfont(0);
    o->labelsize(14);
    o->labelcolor(FL_FOREGROUND_COLOR);
    o->align(FL_ALIGN_TOP);
    o->when(FL_WHEN_RELEASE);
    o->end();
  }
  return w;
}
コード例 #12
0
ファイル: icon_chooser.cpp プロジェクト: edeproject/svn
int main() {
	Fl_Window* win = new Fl_Window(290, 180, "Icon chooser test");
	win->begin();
	Fl_Box* ibox = image_box = new Fl_Box(80, 10, 135, 110);
	ibox->box(FL_THIN_DOWN_BOX);
	Fl_Button* run = new Fl_Button(95, 145, 90, 25, "&Run");
	run->callback(run_cb);
	Fl_Button* close = new Fl_Button(190, 145, 90, 25, "&Close");
	close->callback(close_cb, win);
	win->end();
	win->show();
	return  Fl::run();
}
コード例 #13
0
ファイル: input.cpp プロジェクト: edeproject/svn
int main(int argc, char **argv) {
  Fl_Window *window = new Fl_Window(400,350);

  int y = 10;
  input[0] = new Fl_Input(70,y,300,23,"Normal:"); y += 27;
  input[0]->tooltip("Normal input field");
  // input[0]->cursor_color(FL_SELECTION_COLOR);
  //  input[0]->maximum_size(20);
  // input[0]->static_value("this is a testgarbage");
  input[1] = new Fl_Float_Input(70,y,300,23,"Float:"); y += 27;
  input[1]->tooltip("Input field for floating-point number");
  input[2] = new Fl_Int_Input(70,y,300,23,"Int:"); y += 27;
  input[2]->tooltip("Input field for integer number");
  input[3] = new Fl_Secret_Input(70,y,300,23,"Secret:"); y += 27;
  input[3]->tooltip("Input field for password");
  input[4] = new Fl_Wordwrap_Input(70,y,300,100,"Wordwrap:"); y += 105;
  input[4]->tooltip("Input field for short text with newlines");

  for (int i = 0; i < 4; i++) {
    input[i]->when(0); input[i]->callback(cb);
  }
  int y1 = y;

  Fl_Button *b;
  b = new Fl_Toggle_Button(10,y,200,23,"FL_WHEN_&CHANGED");
  b->tooltip("Do callback each time the text changes");
  b->callback(toggle_cb, FL_WHEN_CHANGED); y += 23;
  b = new Fl_Toggle_Button(10,y,200,23,"FL_WHEN_&RELEASE");
  b->callback(toggle_cb, FL_WHEN_RELEASE); y += 23;
  b->tooltip("Do callback when widget loses focus");
  b = new Fl_Toggle_Button(10,y,200,23,"FL_WHEN_&ENTER_KEY");
  b->callback(toggle_cb, FL_WHEN_ENTER_KEY); y += 23;
  b->tooltip("Do callback when user hits Enter key");
  b = new Fl_Toggle_Button(10,y,200,23,"FL_WHEN_&NOT_CHANGED");
  b->callback(toggle_cb, FL_WHEN_NOT_CHANGED); y += 23;
  b->tooltip("Do callback even if the text is not changed");
  y += 5;
  b = new Fl_Button(10,y,200,23,"&print changed()");
  b->callback(button_cb);
  b->tooltip("Print widgets that have changed() flag set");

  b = new Fl_Button(220,y1,100,23,"color"); y1 += 23;
  b->color(input[0]->color()); b->callback(color_cb, (void*)0);
  b->label_color(fl_contrast(FL_BLACK,b->color()));
  b->tooltip("Color behind the text");
  b = new Fl_Button(220,y1,100,23,"selection_color"); y1 += 23;
  b->color(input[0]->selection_color()); b->callback(color_cb, (void*)1);
  b->label_color(fl_contrast(FL_BLACK,b->color()));
  b->tooltip("Color behind selected text");
  b = new Fl_Button(220,y1,100,23,"text_color"); y1 += 23;
  b->color(input[0]->text_color()); b->callback(color_cb, (void*)2);
  b->label_color(fl_contrast(FL_BLACK,b->color()));
  b->tooltip("Color of the text");

  window->resizable(window);
  window->end();
  window->show(argc,argv);
// CET - FIXME - crashes windows  Fl::lock();
  return Fl::run();
}
コード例 #14
0
ファイル: CrashDialog.cpp プロジェクト: edeproject/svn
int crash_dialog_show(const ProgramDetails& p) {
	info_was_collected = false;
	pdetails = &p;

	win = new edelib::Window(380, WIN_H_NORMAL, _("EDE Crash Handler"));
	win->begin();
		Fl_Box* image_box = new Fl_Box(10, 10, 65, 60);
		image_box->image(image_core);

		String s;
		if(p.name)
			s.printf(_("Program '%s' quit unexpectedly."), p.name);
		else
			s = _("Program quit unexpectedly.");
		s += _("\n\nYou can inspect the details about this crash by clicking on \'Show details\' below");

		Fl_Box* txt_box = new Fl_Box(85, 10, 285, 75, s.c_str());
		txt_box->align(132|FL_ALIGN_INSIDE);

		/* only EDE applications can have 'Report' button for reporting issues on EDE bugzilla */
		if(p.ede_app) {
			Fl_Button* report = new Fl_Button(185, 95, 90, 25, _("&Report..."));
			report->callback(report_cb);
		}

		Fl_Button* close = new Fl_Button(280, 95, 90, 25, _("&Close"));
		close->callback(close_cb);

		show_details = new Fl_Button(10, 95, 165, 25, _("@> Show details"));
		show_details->box(FL_FLAT_BOX);
		show_details->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
		show_details->callback(show_details_cb);

		txt_display = new Fl_Text_Display(10, 130, 360, 165);
		txt_buf = new Fl_Text_Buffer();
		txt_display->buffer(txt_buf);
		
		txt_display->hide();

		save_as = new Fl_Button(280, 305, 90, 25, _("&Save As..."));
		save_as->hide();
		save_as->callback(save_as_cb);
	win->end();

	win->window_icon(core_xpm);
	win->show();

	return Fl::run();
}
コード例 #15
0
ファイル: Blocks.cpp プロジェクト: antoniovazquezaraujo/8x8
void BlockWindow::setup() {
	reset();
	help_button_ = new Fl_Button(0, 0, 20, 20, "?");
	help_button_->callback((Fl_Callback *)help_cb, this);
	help_button_->shortcut('?');

	play_button_ = new Fl_Button(80, (h() - 80) / 2, 80, 80, "@>");
	play_button_->callback((Fl_Callback *)play_cb, this);
	play_button_->labelsize(44);
	play_button_->shortcut(' ');

	sound_ = new BlockSound();
	prefs_.get("high_score", high_score_, 0);
	Fl::add_timeout(0.1, (Fl_Timeout_Handler)timeout_cb, (void *)this);
}
コード例 #16
0
ファイル: fltk.cpp プロジェクト: sjatakia/Beeyer
int main()
{


Fl_Window* w = new Fl_Window(width,height);


Widgets widgets;
w->begin();
widgets.img[0] = new Fl_JPEG_Image("f1.jpg");
widgets.img[1] = new Fl_JPEG_Image("f2.jpg");
widgets.img[2] = new Fl_JPEG_Image("f3.jpg");
widgets.box = new Fl_Box(100,100,100,100);
Fl_Button* button = new Fl_Button(300,400,50,30,"CHANGE");
w->end();


button->callback(button_clicked,&widgets);


w->show();

return(Fl::run());
 
}
コード例 #17
0
ファイル: calc80.cpp プロジェクト: patrwall/calc80
void cb_open_about() {
  { a_diag = new Fl_Double_Window(210, 165, "About");
    a_diag->color((Fl_Color)29);
    { a_mess = new Fl_Group(5, 10, 200, 45, "Calc 80");
      a_mess->box(FL_RFLAT_BOX);
      a_mess->color((Fl_Color)206);
      a_mess->labelsize(21);
      a_mess->align(Fl_Align(FL_ALIGN_CENTER));
      a_mess->end();
    } // Fl_Group* a_mess
    { Fl_Group* o = new Fl_Group(5, 70, 205, 25, "Version 0.04");
      o->align(Fl_Align(FL_ALIGN_CENTER));
      o->end();
    } // Fl_Group* o
    { Fl_Group* o = new Fl_Group(10, 95, 200, 25, "\302\251""2016, Patrik Wallander");
      o->align(Fl_Align(FL_ALIGN_CENTER));
      o->end();
    } // Fl_Group* o
    { Fl_Button* o = new Fl_Button(70, 135, 70, 20, "Close");
      o->box(FL_RFLAT_BOX);
      o->color(FL_BACKGROUND2_COLOR);
      o->callback((Fl_Callback*)cb_close_about);
    } // Fl_Button* o
    a_diag->show();
    a_diag->position(m_win->x(), m_win->y());
    a_diag->end();
  } // Fl_Double_Window* a_diag
}
コード例 #18
0
ファイル: theme.cpp プロジェクト: GustavoMOG/edelib
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;
}
コード例 #19
0
ファイル: Fl_Combo_Box.cpp プロジェクト: GustavoMOG/efltk
// ctor initializer - used in both ctors
void Fl_Combo_Box::ctor_init()
{
    align(FL_ALIGN_LEFT);
    style(default_style);
    layout_spacing(0);
    end();

    m_popup = new Fl_Popup_ListView(this);

    Fl_Group::begin();

    for (int i = 0; i < 5; i++) {
        Fl_Button *b = new Fl_Combo_Box_Button(this);
        m_buttons[i] = b;
        b->layout_align(FL_ALIGN_RIGHT);
        b->callback(cb_button);
        b->argument(1 << i);
        switch (i) {
            case 0: 
                b->image(browse_pixmap); 
                b->callback(cb_browse);
                break;
            case 1: 
                b->image(add_pixmap); 
                break;
            case 2: 
                b->image(edit_pixmap); 
                break;
            case 3: 
                b->image(delete_pixmap); 
                break;
            case 4: 
                b->image(refresh_pixmap); 
                break;
        }
        if (i == 0) 
            b->show();
        else b->hide();
    }

    m_panel = new Fl_Combo_Box_Panel(this);
    m_panel->layout_align(FL_ALIGN_CLIENT);

    Fl_Group::end();
}
Fineline_Options_Dialog::Fineline_Options_Dialog(int x, int y, int w, int h) : Fl_Double_Window(x, y, w, h, "Fineline Options")
{
   //ctor
   begin();

   {
	   Fl_Button* o = new Fl_Button(w - 230, h - 45, 100, 30, "Save As");
      o->callback((Fl_Callback*)button_callback, (void *)this);
      o->tooltip("Save to a text file.");
   } // Fl_Button* o
   {
      Fl_Button* o = new Fl_Button(w - 120, h - 45, 100, 30, "Close");
      o->callback((Fl_Callback*)button_callback, (void *)this);
      o->tooltip("Close dialog without saving.");
   } // Fl_Button* o

   end();
}
コード例 #21
0
ファイル: BrushConfigUI.cpp プロジェクト: itsachen/CS-4670
BrushConfigUI::BrushConfigUI() {
  Fl_Window* w;
  { Fl_Window* o = mainWindow = new Fl_Window(234, 116, "Brush Property");
    w = o;
    o->user_data((void*)(this));
    /*{ Fl_Group* o = new Fl_Group(5, 25, 120, 55, "Brush Type:");
      o->box(FL_ENGRAVED_FRAME);
      { Fl_Round_Button* o = round = new Fl_Round_Button(9, 30, 111, 25, "Round Brush");
        o->type(102);
        o->down_box(FL_ROUND_DOWN_BOX);
        o->callback((Fl_Callback*)cb_round);
      }
      { Fl_Check_Button* o = square = new Fl_Check_Button(6, 50, 111, 28, "Square Brush");
        o->type(102);
        o->down_box(FL_DIAMOND_DOWN_BOX);
        o->callback((Fl_Callback*)cb_square);
      }
      o->end();
    }*/
    { Fl_Value_Slider* o = brushSize = new Fl_Value_Slider(70, 25, 90, 20, "Brush Size:");
      o->type(1);
      o->maximum(20);
      o->step(1);
      o->value(10);
      o->callback((Fl_Callback*)cb_brushSize);
      o->align(FL_ALIGN_TOP);
      o->when(FL_WHEN_RELEASE);
    }
    { Fl_Value_Slider* o = brushOpacity = new Fl_Value_Slider(70, 60, 90, 19, "Brush Opacity:");
      o->type(1);
      o->value(1);
      o->callback((Fl_Callback*)cb_brushOpacity);
      o->align(FL_ALIGN_TOP);
      o->when(FL_WHEN_RELEASE);
    }
    { Fl_Button* o = new Fl_Button(5, 90, 107, 25, "Clean All");
      o->callback((Fl_Callback*)cb_Clean);
    }
    { Fl_Button* o = new Fl_Button(128, 90, 102, 25, "Close");
      o->callback((Fl_Callback*)cb_Close);
    }
    o->end();
  }
}
コード例 #22
0
ファイル: about_panel.cpp プロジェクト: GustavoMOG/efltk
Fl_Window* make_about_panel(const char *copyright) {
  Fl_Window* w;
   {Fl_Window* o = about_panel = new Fl_Window(330, 276, _("About eFluid"));
    w = o;
    o->type(240);
    o->selection_color((Fl_Color)47);
    o->shortcut(0xff1b);
     {Fl_Group* o = display_group = new Fl_Group(0, 0, 330, 240);
       {Fl_Group* o = new Fl_Group(5, 5, 320, 55, _("eFluid"));
        o->box(FL_ENGRAVED_BOX);
        o->label_font(fl_fonts+1);
        o->label_type(FL_EMBOSSED_LABEL);
        o->color((Fl_Color)0xb3b3be00);
        o->label_color((Fl_Color)32);
        o->selection_color((Fl_Color)47);
        o->label_size(40);
        o->align(FL_ALIGN_INSIDE);
        o->end();
      }
       {Fl_Button* o = new Fl_Button(5, 165, 320, 70, _("\302\251""2002-2003\nClick here for more information"));
        o->box(FL_ENGRAVED_BOX);
        o->label_font(fl_fonts+1);
        o->color((Fl_Color)0xb3b3be00);
        o->label_color((Fl_Color)32);
        o->highlight_color((Fl_Color)0x9d9da700);
        o->highlight_label_color((Fl_Color)55);
        o->label_size(14);
        o->callback((Fl_Callback*)cb_2002);
        o->align(FL_ALIGN_WRAP);
      }
       {Fl_Box* o = new Fl_Box(5, 60, 320, 105, _("EFLTK User Interface Designer\nVersion 2.0.3"));
        o->box(FL_ENGRAVED_BOX);
        o->label_font(fl_fonts+1);
        o->label_type(FL_EMBOSSED_LABEL);
        o->color((Fl_Color)0xb3b3be00);
        o->label_color((Fl_Color)32);
        o->selection_color((Fl_Color)47);
        o->label_size(18);
      }
      o->end();
    }
     {Fl_Box* o = copyright_box = new Fl_Box(0, 0, 330, 240);
      o->label_size(10);
      o->align(FL_ALIGN_TOP|FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_CLIP|FL_ALIGN_WRAP);
      o->hide();
      o->label(copyright);
    }
     {Fl_Return_Button* o = new Fl_Return_Button(5, 245, 320, 25, _("OK"));
      o->label_size(10);
      o->shortcut(0xff0d);
      o->callback((Fl_Callback*)cb_OK);
    }
    o->end();
  }
  return  w;
}
コード例 #23
0
ファイル: FolderWindow.cpp プロジェクト: gtfold/RNAStructViz
void FolderWindow::AddStructure(const char* filename, const int index)
{
    
    Fl_Pack* pack = folderPack;
    pack->begin();
    
    int vertPosn = pack->children() * NAVBUTTONS_BHEIGHT; //+ pack->y() + 15;
    
    Fl_Group* group = new Fl_Group(pack->x(), vertPosn, pack->w(), NAVBUTTONS_BHEIGHT);
    group->begin();
    
    Fl_Button* label = new Fl_Button(pack->x() + 10, vertPosn, pack->w() - 40, 30, filename);
    label->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_LEFT);
    label->callback(FolderWindow::ShowFileCallback);
    label->user_data((void*)index);
    label->labelcolor(GUI_BTEXT_COLOR);
    char labelWithIcon[MAX_BUFFER_SIZE];

    std::string spaceBuffer = string("                                                    ");
    int curLabelLen = 0;
    char filePrefix[MAX_BUFFER_SIZE];
    size_t fileNameBytes = strlen(filename);
    snprintf(filePrefix, MAX_BUFFER_SIZE, "%-.20s%s", filename, 
	     fileNameBytes > MAX_FOLDER_LABEL_CHARS ? "..." : "");
    snprintf(labelWithIcon, MAX_BUFFER_SIZE - 1, "@filenew   %s%s", 
	     filePrefix, spaceBuffer.substr(0, 
             MAX(0, MAX_FOLDER_LABEL_CHARS - ((int ) strlen(filePrefix)))).c_str());
    //strcat(labelWithIcon, "   @|>");
    label->copy_label(labelWithIcon);
    label->tooltip(filename); 
    
    Fl_Button* removeButton = new Fl_Button(pack->x() + pack->w() - 20, vertPosn + 5, 20, 20);
    removeButton->callback(FolderWindow::RemoveCallback);
    removeButton->user_data((void*)index);
    removeButton->label("@1+");
    removeButton->labelcolor(GUI_TEXT_COLOR);
    
    group->resizable(label);
    group->end();
    pack->end();
        
    folderScroll->redraw();
}
コード例 #24
0
ファイル: bookmarks.cpp プロジェクト: BertieJim/fifth
Fl_Tree_Item *movebookmark(const char *name) {

	static Fl_Double_Window *bookmove_win=(Fl_Double_Window *)0;
	static Fl_Box *bookmove_lbl=(Fl_Box *)0;
	static Fl_Tree *bookmove_tree = NULL;

	if (!bookmove_win) {
		bookmove_win = new Fl_Double_Window(430, 330, _("Move to directory"));
		{ bookmove_lbl = new Fl_Box(17, 10, 395, 30, _("Moving \"\""));
		} // Fl_Box* bookmove_lbl
		{ bookmove_tree = new Fl_Tree(17, 40, 395, 240);
		} // Fl_Input* bookmove_tree
		{ Fl_Button *o = new Fl_Button(45, 290, 130, 30, _("OK"));
			o->callback(bookmoveok_cb);
		} // Fl_Button* o
		{ Fl_Button *o = new Fl_Button(250, 290, 130, 30, _("Cancel"));
			o->callback(bookmovecancel_cb);
		} // Fl_Button* o
		bookmove_win->end();
	} // Fl_Double_Window* bookmove_win

	bookmove_win->user_data(NULL);

	char tmp[320];
	snprintf(tmp, 320, "Moving \"%s\"", name);
	tmp[319] = '\0';

	g->v->listdirs(bookmove_tree);
	bookmove_lbl->copy_label(tmp);

	bookmove_win->show();

	while (bookmove_win->shown())
		Fl::wait();

	if (!bookmove_win->user_data())
		return NULL;

	Fl_Tree_Item *picked = bookmove_tree->first_selected_item();
	if (!picked)
		return NULL;
	return (Fl_Tree_Item *) picked->user_data();
}
コード例 #25
0
ファイル: table.cpp プロジェクト: ClinicalGraphics/MathGL
//-----------------------------------------------------------------------------
void NwdtDlg::create_dlg()
{
	Fl_Menu_Item k[]={{mgl_gettext("Summation of")}, {mgl_gettext("Maximum of")}, { mgl_gettext("Minimum of")}, {0}};
	wnd = new Fl_Double_Window(165, 215, mgl_gettext("Extract data"));
	kind = new Fl_Choice(10, 25, 145, 25, mgl_gettext("Type of operation"));
	kind->align(FL_ALIGN_TOP_LEFT);	kind->copy(k);
	dx = new Fl_Check_Button(10, 55, 140, 25, mgl_gettext("apply in x direction"));
	dy = new Fl_Check_Button(10, 80, 140, 25, mgl_gettext("apply in y direction"));
	dz = new Fl_Check_Button(10, 105, 140, 25, mgl_gettext("apply in z direction"));
	name = new Fl_Input(10, 145, 145, 25, mgl_gettext("Name for output"));
	name->align(FL_ALIGN_TOP_LEFT);

	Fl_Button *o;
	o = new Fl_Button(10, 180, 65, 25, mgl_gettext("Cancel"));	o->callback(close_dlg_cb,wnd);
	o->box(UDAV_UP_BOX);	o->down_box(UDAV_DOWN_BOX);
	o = new Fl_Return_Button(90, 180, 65, 25, mgl_gettext("Do"));o->callback(chng_dlg_cb,wnd);
	o->box(UDAV_UP_BOX);	o->down_box(UDAV_DOWN_BOX);
	wnd->end();
}
コード例 #26
0
ファイル: BugzillaSender.cpp プロジェクト: edeproject/svn
bool bugzilla_send_with_progress(const char *title, const char *content) {
	data_submitted = false;
	cancel_sending = false;

	bdata = bugzilla_new(EDE_BUGZILLA_XMLRPC_URL);
	if(!bdata) {
		alert(_("Unable to initialize bugzilla interface!"));
		return false;
	}

	if(pipe(report_pipe) != 0) {
		alert(_("Unable to initialize communication pipe"));
		return false;
	}

	/* prepare mutex */
	pthread_mutex_init(&runner_mutex, NULL);

	/* register our callback on pipe */
	Fl::add_fd(report_pipe[0], FL_READ, report_pipe_cb);

	win = new Fl_Double_Window(275, 90, _("Sending report data"));
	win->begin();
		progress = new PulseProgress(10, 20, 255, 25, _("Sending report..."));
		progress->selection_color((Fl_Color)137);

		Fl_Button *cancel = new Fl_Button(175, 55, 90, 25, _("&Cancel"));
		cancel->callback(cancel_cb);
	win->end();

	win->set_modal();
	win->show();

	progress->label(_("Preparing data..."));
	Fl::add_timeout(PROGRESS_STEP_REFRESH, progress_timeout);

	perform_send(title, content);

	while(win->shown())
		Fl::wait();

	/* clear pipe callback */
	Fl::remove_fd(report_pipe[0]);
	clear_timeouts();

	pthread_mutex_destroy(&runner_mutex);

	close(report_pipe[0]);
	close(report_pipe[1]);

	bugzilla_free(bdata);

	/* true if we completed all stages */
	return data_submitted;
}
コード例 #27
0
ファイル: Transport.C プロジェクト: elthariel/non-daw
Transport::Transport ( int X, int Y, int W, int H, const char *L )
    : Fl_Pack( X, Y, W, H, L )
{
    recording = false;
    rolling = false;
    _stop_disables_record = true;

    const int bw = W / 3;

    type( HORIZONTAL );

    Fl_Button *o;

    _home_button = o = new Fl_Button( 0, 0, bw, 0, "@|<" );
    o->labeltype( FL_EMBOSSED_LABEL );
    o->callback( cb_button, this );
    o->shortcut( FL_Home );
    o->box( FL_UP_BOX );

    _end_button = o = new Fl_Button( 0, 0, bw, 0, "@>|" );
    o->labeltype( FL_EMBOSSED_LABEL );
    o->callback( cb_button, this );
    o->shortcut( FL_End );

    _play_button = o = new Fl_Button( 0, 0, bw, 0, "@>" );
    o->labeltype( FL_EMBOSSED_LABEL );
    o->callback( cb_button, this );
    o->shortcut( ' ' );
    o->box( FL_UP_BOX );

    _record_button = o = new Fl_Button( 0, 0, bw, 0, "@circle" );
    o->type( FL_TOGGLE_BUTTON );
    o->labeltype( FL_EMBOSSED_LABEL );
    o->labelcolor( fl_color_average( FL_RED, FL_WHITE, 0.25f ) );
    o->shortcut( 'R' );
    o->callback( cb_button, this );
    o->when( FL_WHEN_CHANGED );
    o->box( FL_UP_BOX );

    end();
}
コード例 #28
0
ファイル: display.cpp プロジェクト: ianforsyth/Maze
int main(int argc, char** argv) {
    temp = argc;
    temp2 = argv;

    //All the FLTK controls
    Fl_Window win (500,500, "window");

    //Title Box
    Fl_Box title(-5,-5,510,50,"Teapot Finder!");
    title.box(FL_UP_BOX);
    title.labelsize(36);
    title.labelfont(FL_BOLD+FL_ITALIC);

    //Description section
    Fl_Multiline_Output desc(0,45,500,250,"");
    desc.value(
        " Welcome to Teapot Finder. This is a maze game, find the spinning teapot!\n\nControls:\n\t~Drag the mouse along the x axis (side to side) to control the camera.\n\t~Use the arrow keys to navigate the maze\n\t~Click the right mouse button for a bird's eye view\n\nSetup:\n\t~Choose the level of difficulty on the slider below (5=easy, 20=hard).\n\t  Then, choose your player!\n\nDescription:\n\t~In this game you must navigate through a maze and find the spinning\n\t  teapot. But be aware! Every time you find the teapot, it changes\n\t  location and maze regenerates! Find the teapot 5 times to win!");

    //Maze size slider, still getting a seg fault if never moved
    Fl_Value_Slider sizeSlider (100,300,300,50,"Maze Size (Must Slide To Prevent Seg Fault)");
    sizeSlider.type(FL_HORIZONTAL);
    sizeSlider.value(5);
    sizeSlider.minimum(5);
    sizeSlider.maximum(20);
    sizeSlider.step(1);
    sizeSlider.callback(sizeCB);

    //Buttons for different player shapes
    Fl_Button sphereButton (50,400,120,25,"Super Sphere");
    sphereButton.callback (sphereCB);
    Fl_Button cubeButton (200, 400, 120, 25, "Courageous Cube");
    cubeButton.callback (cubeCB);
    Fl_Button donughtButton (350, 400, 120, 25, "Doughnut!");
    donughtButton.callback (donughtCB);

    win.end();
    win.show();
    return Fl::run();

    return 0;
}
コード例 #29
0
ファイル: table.cpp プロジェクト: ClinicalGraphics/MathGL
//-----------------------------------------------------------------------------
void ChngDlg::create_dlg()
{
	Fl_Menu_Item k[]={{mgl_gettext("Smooth")}, {mgl_gettext("CumSum")}, { mgl_gettext("Integrate")},
		{ mgl_gettext("Difference")}, { mgl_gettext("Double diff.")}, { mgl_gettext("Swap parts")}, {0}};
	Fl_Menu_Item t[]={{mgl_gettext("Linear *3")}, {mgl_gettext("Linear *5")}, {mgl_gettext("Parabolic *5")},{0}};
	wnd = new Fl_Double_Window(165, 215, mgl_gettext("Change data"));
	kind = new Fl_Choice(10, 25, 145, 25, mgl_gettext("Type of operation"));
	kind->align(FL_ALIGN_TOP_LEFT);	kind->copy(k);
	dx = new Fl_Check_Button(10, 55, 140, 25, mgl_gettext("apply in x direction"));
	dy = new Fl_Check_Button(10, 80, 140, 25, mgl_gettext("apply in y direction"));
	dz = new Fl_Check_Button(10, 105, 140, 25, mgl_gettext("apply in z direction"));
	type = new Fl_Choice(10, 145, 145, 25, mgl_gettext("Type of smoothing"));
	type->align(FL_ALIGN_TOP_LEFT);	type->copy(t);

	Fl_Button *o;
	o = new Fl_Button(10, 180, 65, 25, mgl_gettext("Cancel"));	o->callback(close_dlg_cb,wnd);
	o->box(UDAV_UP_BOX);	o->down_box(UDAV_DOWN_BOX);
	o = new Fl_Return_Button(90, 180, 65, 25, mgl_gettext("Do"));o->callback(chng_dlg_cb,wnd);
	o->box(UDAV_UP_BOX);	o->down_box(UDAV_DOWN_BOX);
	wnd->end();
}
コード例 #30
0
ファイル: main_ui.cpp プロジェクト: BackupTheBerlios/holap
void
make_window_banks ()
{

  int i, j, x, y, num;
  int elw, elh;

  elw = 176 * gui.BankWindow->w () / 800;
  elh = 24 * gui.BankWindow->h () / 600;



  gui.ob->begin ();

  x = 40;
  y = 10;
  num = 0;

  for (i = 1; i < 21; i++)
    {
      y += elh + 2;

      for (j = 1; j < 5; j++)
	{

	  Fl_Button *butX =
	    new Fl_Button (x + 1, y + 1, elw, elh, Banco[num].Name);
	  butX->type (0);
	  butX->color (FL_BLUE);
	  butX->box (FL_FLAT_BOX);
	  butX->selection_color (FL_RED);
	  butX->labelsize (14);
	  butX->align (68 | FL_ALIGN_INSIDE);
	  butX->user_data ((void *) (num));
	  butX->value (0);
	  butX->callback ((Fl_Callback *) preset_click);
	  gui.ob->add (butX);

	  x += elw + 4;
	  num++;

	}
      x = 40;

    }


  gui.ob->end ();

  gui.made = 1;

}