当前位置: 首页>>代码示例>>C++>>正文


C++ Fl_Tabs::end方法代码示例

本文整理汇总了C++中Fl_Tabs::end方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Tabs::end方法的具体用法?C++ Fl_Tabs::end怎么用?C++ Fl_Tabs::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Fl_Tabs的用法示例。


在下文中一共展示了Fl_Tabs::end方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnAddCommunity

//callback for add Community
void OnAddCommunity(Fl_Widget* pWidget,void * pParam)
{
    const char * scName=fl_input("New Community Name", "");
    if(scName==NULL)
        return ;
    
    char * sName = new char[strlen(scName)*2];
    strcpy(sName,scName);
    
    Fl_Tabs* pTab = (Fl_Tabs*)(pParam);
    Fl_Group* pG = (Fl_Group*)pTab->value();
    
    pTab->begin();
    MakeCommunityPane(10,30,pG->w()-20,pG->h()-10,sName);
    pTab->end();
    
}
开发者ID:HSOFEUP,项目名称:MOOS-IvP-releases,代码行数:18,代码来源:uMS.cpp

示例2: GetRegisterEntries

CAppManager::CAppManager()
{
    const int mainw = 560, mainh = 330;
    m_pMainWindow = new Fl_Window(mainw, mainh, "Nixstaller - App Manager");

    m_pAppList = new Fl_Hold_Browser(20, 40, 180, 240, "Installed applications");
    m_pAppList->align(FL_ALIGN_TOP);
    GetRegisterEntries(&m_AppVec);
    for (std::vector<app_entry_s *>::iterator it=m_AppVec.begin(); it!=m_AppVec.end(); it++)
        m_pAppList->add(MakeCString((*it)->name));
    m_pAppList->callback(AppListCB, this);
    m_pAppList->value(1);

    Fl_Tabs *pTabs = new Fl_Tabs((m_pAppList->x()+m_pAppList->w())+20, 20, 300, 260);
    
    Fl_Group *pInfoTab = new Fl_Group((m_pAppList->x()+m_pAppList->w())+20, 40, 300, 260, "Info");
    m_pInfoOutput = new Fl_Help_View((m_pAppList->x()+m_pAppList->w())+20, 40, 300, 240);
    m_pInfoOutput->align(FL_ALIGN_TOP);
    pInfoTab->end();
    
    Fl_Group *pFilesTab = new Fl_Group((m_pAppList->x()+m_pAppList->w())+20, 40, 300, 260, "Files");
    m_pFilesTextDisplay = new Fl_Text_Display((m_pAppList->x()+m_pAppList->w())+20, 40, 300, 240);
    m_pFilesTextBuffer = new Fl_Text_Buffer;
    m_pFilesTextDisplay->buffer(m_pFilesTextBuffer);
    
    pFilesTab->end();
    
    pTabs->end();
    m_pUninstallButton = new Fl_Button(20, (m_pAppList->y()+m_pAppList->h())+20, 120, 25, "Uninstall");
    m_pUninstallButton->callback(UninstallCB, this);
    m_pExitButton = new Fl_Button((mainw-140), (m_pAppList->y()+m_pAppList->h())+20, 120, 25, "Exit");
    m_pExitButton->callback(ExitCB);
    
    UpdateInfo(true);

    m_pUninstallWindow = new CUninstallWindow(this);
    
    m_pMainWindow->end();
}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:39,代码来源:appmanager.cpp

示例3:

meshContextWindow::meshContextWindow(int deltaFontSize)
{
  FL_NORMAL_SIZE -= deltaFontSize;

  static Fl_Menu menu_transfinite_dir[] = {
    {"Left", 0, 0, 0},
    {"Right", 0, 0, 0},
    {"Alternated", 0, 0, 0},
    {0}
  };

  int width = 29 * FL_NORMAL_SIZE;
  int height = 4 * WB + 4 * BH;

  win = new paletteWindow
    (width, height, CTX::instance()->nonModalWindows, "Contextual Mesh Definitions");
  win->box(GMSH_WINDOW_BOX);
  {
    Fl_Tabs *o = new Fl_Tabs(WB, WB, width - 2 * WB, height - 2 * WB);
    // 0: Element size at points
    {
      group[0] = new Fl_Group
        (WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Element size at points");
      input[0] = new Fl_Input(2 * WB, 2 * WB + 1 * BH, IW, BH, "Value");
      input[0]->value("0.1");
      input[0]->align(FL_ALIGN_RIGHT);
      group[0]->end();
    }
    // 1: Transfinite line
    {
      group[1] = new Fl_Group
        (WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Transfinite Line");
      input[1] = new Fl_Input(2 * WB, 2 * WB + 1 * BH, IW, BH, "Number of points");
      input[1]->value("10");
      input[2] = new Fl_Input(2 * WB, 2 * WB + 3 * BH, IW, BH, "Parameter");
      input[2]->value("1");
      for(int i = 1; i < 3; i++) {
        input[i]->align(FL_ALIGN_RIGHT);
      }
      static Fl_Menu_Item menu_trsf_mesh[] = {
        {"Progression", 0, 0, 0},
        {"Bump", 0, 0, 0},
        {0}
      };
      choice[0] = new Fl_Choice(2 * WB, 2 * WB + 2 * BH, IW, BH, "Type");
      choice[0]->menu(menu_trsf_mesh);
      choice[0]->align(FL_ALIGN_RIGHT);
      group[1]->end();
    }

    // 2: Transfinite surface
    {
      group[2] = new Fl_Group
        (WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Transfinite Surface");

      choice[1] = new Fl_Choice
        (2 * WB, 2 * WB + 1 * BH, IW, BH, "Transfinite Arrangement");
      choice[1]->menu(menu_transfinite_dir);
      choice[1]->align(FL_ALIGN_RIGHT);

      group[2]->end();
    }
    o->end();
  }

  win->position(CTX::instance()->ctxPosition[0], CTX::instance()->ctxPosition[1]);
  win->end();

  FL_NORMAL_SIZE += deltaFontSize;
}
开发者ID:iyer-arvind,项目名称:gmsh,代码行数:70,代码来源:contextWindow.cpp

示例4: main

int main(int argc, char **argv) {
#ifdef HAVE_XKBRULES
	/* must be opened first */
	fl_open_display();

	/* only apply what was written in config */
	if(argc > 1 && strcmp(argv[1], "--apply") == 0) {
		String layout;

		read_config(&layout);
		apply_changes_on_x(layout.c_str(), NULL);
		return 0;
	} else {
		read_config(NULL);
	}

	EDE_APPLICATION("ede-keyboard-conf");

	String cl;
	dialog_canceled = false;

	/* get layout X holds */
	fetch_current_layout(cl);

	/* construct GUI */
	win = new AppWindow(340, 320, _("Keyboard configuration tool"));
	win->begin();
		Fl_Tabs *tabs = new Fl_Tabs(10, 10, 320, 265);
		tabs->begin();
			Fl_Group *layout_group = new Fl_Group(15, 30, 310, 240, _("Layout"));
			layout_group->begin();
				layout_browser = new Fl_Hold_Browser(20, 40, 300, 190);

				/* so things can be nicely aligned per column */
				int cwidths [] = {100, 0};
				layout_browser->column_widths(cwidths);
				layout_browser->column_char('\t');

				layout_group->resizable(layout_browser);

				show_flag = new Fl_Check_Button(20, 240, 300, 25, _("Show country flag"));
				show_flag->tooltip(_("Display country flag in panel keyboard applet"));
				show_flag->down_box(FL_DOWN_BOX);
				show_flag->value(show_flag_value);
				show_flag->callback(show_flag_cb);
			layout_group->end();
			Fl_Group::current()->resizable(layout_group);

			Fl_Group *details_group = new Fl_Group(15, 30, 310, 240, _("Details"));
			details_group->hide();
			details_group->begin();
				repeat_press = new Fl_Check_Button(20, 45, 300, 25, _("Repeat pressed key"));
				repeat_press->tooltip(_("Allow pressed key to be repeated"));
				repeat_press->down_box(FL_DOWN_BOX);
				repeat_press->value(repeat_press_value);
				repeat_press->callback(repeat_press_cb);
			details_group->end();
		tabs->end();

		/* resizable box */
		Fl_Box *rbox = new Fl_Box(30, 163, 65, 52);
		Fl_Group::current()->resizable(rbox);

		Fl_Button *ok_button = new Fl_Button(145, 285, 90, 25, _("&OK"));
		ok_button->callback(ok_cb);

		Fl_Button *cancel_button = new Fl_Button(240, 285, 90, 25, _("&Cancel"));
		cancel_button->callback(cancel_cb);
	win->end();

	/* read all XKB layouts */
	XkbRF_RulesPtr xkb_rules = fetch_all_layouts(cl);

	window_center_on_screen(win);
	win->show(argc, argv);
	Fl::run();

	/* do not save configuration if was canceled */
	if(!dialog_canceled && xkb_rules && layout_browser->value()) {
		int  i = layout_browser->value();
		/* get the layout that matches browser row */
		char *n  = xkb_rules->layouts.desc[i - 1].name;

		save_config(n);
		apply_changes_on_x(n, &cl);
	}

	if(xkb_rules) 
		XkbRF_Free(xkb_rules, True);

#else
	alert(_("ede-keyboard-conf was compiled without XKB extension. Please recompile it again"));
#endif /* HAVE_XKBRULES */

	return 0;
}
开发者ID:edeproject,项目名称:ede,代码行数:96,代码来源:ede-keyboard-conf.cpp

示例5: main

int main (int argc, char **argv) {

  Fl_Window* w;
  fl_init_locale_support("ewmconf", PREFIX"/share/locale");
  readConfiguration();
   {Fl_Window* o = new Fl_Window(320, 370, _("Window manager settings"));
    w = o;
     {Fl_Tabs* o = new Fl_Tabs(2, 5, 318, 325);
      o->color((Fl_Color)16);
       {Fl_Group* o = new Fl_Group(1, 29, 316, 295, _("&Titlebar"));
        o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT);
         {Fl_Choice* o = new Fl_Choice(83, 13, 105, 22, _("Text align:")); o->begin();
          o->callback((Fl_Callback*)cb_Text);
          new Fl_Item(_("Left"));
          new Fl_Item(_("Right"));
          new Fl_Item(_("Center"));
          o->value(title_align);
          o->end();
        }
         {Fl_Value_Input* o = new Fl_Value_Input(243, 13, 60, 22, _("Height:"));
          o->minimum(10);
          o->maximum(50);
          o->step(1);
          o->value(20);
          o->callback((Fl_Callback*)cb_Height);
          o->value(title_height);
        }
         {Fl_Button* o = titlebarLabelColorButton = new Fl_Button(85, 55, 60, 20, _("Titlebar label color: "));
          o->box(FL_DOWN_BOX);
          o->callback((Fl_Callback*)cb_titlebarLabelColorButton);
          o->align(132);
          o->color((Fl_Color)title_normal_color_text);
        }
         {Fl_Button* o = titlebarColorButton = new Fl_Button(85, 120, 60, 20, _("Titlebar color: "));
          o->box(FL_DOWN_BOX);
          o->callback((Fl_Callback*)cb_titlebarColorButton);
          o->align(132);
          o->color((Fl_Color) title_normal_color);
        }
         {Fl_Group* o = new Fl_Group(153, 45, 160, 110);
           {Fl_Button* o = titlebarActiveLabelColorButton = new Fl_Button(90, 10, 60, 20, _("Titlebar active label color: "));
            o->box(FL_DOWN_BOX);
            o->callback((Fl_Callback*)cb_titlebarActiveLabelColorButton);
            o->align(132);
            o->color((Fl_Color) title_active_color_text);
          }
           {Fl_Button* o = titlebarActiveColorButton = new Fl_Button(90, 75, 60, 20, _("Titlebar active color: "));
            o->box(FL_DOWN_BOX);
            o->callback((Fl_Callback*)cb_titlebarActiveColorButton);
            o->align(132);
            o->color((Fl_Color)title_active_color);
          }
          o->end();
        }
         {Fl_Choice* o = titlebarDrawGrad = new Fl_Choice(85, 157, 163, 23, _("Box type:")); o->begin();
          o->callback((Fl_Callback*)cb_titlebarDrawGrad);
          o->align(132);
          new Fl_Item(_("Flat"));
          new Fl_Item(_("Horizontal shade"));
          new Fl_Item(_("Thin down"));
          new Fl_Item(_("Up box"));
          new Fl_Item(_("Down box"));
          new Fl_Item(_("Plastic"));
          o->value(title_draw_grad);
          o->end();
        }
         {Fl_Check_Button* o = useThemeButton = new Fl_Check_Button(8, 220, 300, 20, _("&Use theme"));
          o->callback((Fl_Callback*)cb_useThemeButton);
          o->value(use_theme);
        }
         {Fl_Input* o = themePathInput = new Fl_Input(65, 247, 210, 23, _("Path:"));
          o->callback((Fl_Callback*)cb_themePathInput);
          o->deactivate();
          themePathInput->value(theme_path);
        }
         {Fl_Button* o = browse_btn = new Fl_Button(280, 247, 25, 23, _("..."));
          o->callback((Fl_Callback*)cb_browse_btn);
          o->deactivate();
        }
         {Fl_Divider* o = new Fl_Divider(8, 190, 300, 25, _("label"));
          o->color((Fl_Color)16);
        }
         {Fl_Divider* o = new Fl_Divider(8, 85, 297, 25, _("label"));
          o->color((Fl_Color)16);
        }
        o->end();
      }
       {Fl_Group* o = new Fl_Group(3, 20, 310, 305, _("&Resizing"));
        o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT);
        o->hide();
         {Fl_Check_Button* o = animateButton = new Fl_Check_Button(10, 10, 300, 20, _("Animate size changes"));
          o->value(1);
          o->callback((Fl_Callback*)cb_animateButton);
          o->value(animate);
        }
         {Fl_Value_Slider* o = animateSlider = new Fl_Value_Slider(70, 35, 235, 20, _("Speed:"));
          o->type(Fl_Value_Slider::HORIZONTAL|Fl_Slider::TICK_ABOVE);
          o->box(FL_DOWN_BOX);
          o->text_size(10);
          o->minimum(5);
//.........这里部分代码省略.........
开发者ID:GustavoMOG,项目名称:ede12,代码行数:101,代码来源:ewmconf.cpp

示例6: icon_dialog_icon_edit

void icon_dialog_icon_edit(Desktop *self, DesktopIcon *d) {
	const char  *lbl = d ? _("Edit desktop icon") : _("Create desktop icon");
	DesktopFile *df  = NULL;
	char        *buf = NULL;
	old_desktop_path = "";
	curr_icon        = d;
	
	if(d) {
		df = new DesktopFile();
		if(!df->load(d->get_path())) {
			delete df;
			df = NULL;

			int ret = ask(_("Unable to load .desktop file for this icon. Would you like to create a new icon instead?"));
			if(!ret) return;

			/* force NULL on icon, so we can run dialog in 'create' mode */
			d = NULL;
		}
		
		buf = new char[BUFSIZE];
		old_desktop_path = d->get_path();
	}
	
	win = new Fl_Window(450, 220, lbl);
	Fl_Tabs *tabs = new Fl_Tabs(10, 10, 430, 165);
	tabs->begin();
		Fl_Group *g1 = new Fl_Group(15, 30, 415, 140, _("Basic"));
		g1->begin();
			img = new Fl_Button(20, 45, 80, 75);
			img->callback(img_browse_cb);
			img->tooltip(_("Click to select icon"));
			
			if(d) {
				E_ASSERT(df != NULL);
				if(df->icon(buf, BUFSIZE)) {
					IconLoader::set(img, buf, ICON_SIZE_HUGE);
					img_path = buf;
				} 
			}

			/* handles even the case when we are creating the new icon */
			if(!img->image()) {
				IconLoader::set(img, DEFAULT_ICON, ICON_SIZE_HUGE);
				img_path = DEFAULT_ICON;
			}
			
			name = new Fl_Input(210, 45, 215, 25, _("Name:"));
			if(d && df->name(buf, BUFSIZE)) name->value(buf);
			
			comment = new Fl_Input(210, 75, 215, 25, _("Comment:"));
			if(d && df->comment(buf, BUFSIZE)) comment->value(buf);
			
			execute = new Fl_Input(210, 105, 185, 25, _("Execute:"));
			if(d && df->exec(buf, BUFSIZE)) execute->value(buf);
			
			browse = new Fl_Button(400, 105, 25, 25, "...");
			browse->callback(file_browse_cb);
			
			icon_type = new Fl_Choice(210, 135, 215, 25, _("Type:"));
			icon_type->down_box(FL_BORDER_BOX);
			icon_type->menu(menu_items);
		g1->end();		   
		
		Fl_Group *g2 = new Fl_Group(15, 30, 420, 140, _("Details"));
		g2->hide();
		g2->begin();
			run_in_terminal = new Fl_Check_Button(195, 80, 235, 25, _("Run in terminal"));
			run_in_terminal->down_box(FL_DOWN_BOX);
			if(df) run_in_terminal->value(df->terminal());

			workdir = new Fl_Input(195, 45, 205, 25, _("Working directory:"));
			if(df && df->path(buf, BUFSIZE)) workdir->value(buf);

			Fl_Button *browsedir = new Fl_Button(405, 45, 25, 25, "...");
			browsedir->callback(dir_browse_cb);

			start_notify = new Fl_Check_Button(195, 110, 235, 25, _("Use startup notification"));
			start_notify->down_box(FL_DOWN_BOX);
			if(df) start_notify->value(df->startup_notify());
		g2->end();
	tabs->end();	

	ok = new Fl_Button(255, 185, 90, 25, _("&OK"));
	ok->callback(ok_cb, self);
	cancel = new Fl_Button(350, 185, 90, 25, _("&Cancel"));
	cancel->callback(cancel_cb);

	win->end();
	win->set_modal();
	
	delete df;
	delete buf;

	Fl::focus(name);
	win->show();
}
开发者ID:GustavoMOG,项目名称:ede,代码行数:97,代码来源:IconDialog.cpp

示例7: loadFieldViewList

fieldWindow::fieldWindow(int deltaFontSize) : _deltaFontSize(deltaFontSize)
{
  FL_NORMAL_SIZE -= deltaFontSize;

  int width0 = 34 * FL_NORMAL_SIZE + WB;
  int height0 = 12 * BH + 4 * WB;
  int width = (CTX::instance()->fieldSize[0] < width0) ? width0 :
    CTX::instance()->fieldSize[0];
  int height = (CTX::instance()->fieldSize[1] < height0) ? height0 :
    CTX::instance()->fieldSize[1];

  win = new paletteWindow
    (width, height, CTX::instance()->nonModalWindows ? true : false, "Size fields");
  win->box(GMSH_WINDOW_BOX);

  int x = WB, y = WB, w = (int)(1.5 * BB), h = height - 2 * WB - 3 * BH;

  Fl_Menu_Button *new_btn = new Fl_Menu_Button(x, y, w, BH, "New");
  FieldManager &fields = *GModel::current()->getFields();

  std::map<std::string, FieldFactory*>::iterator it;
  for(it = fields.map_type_name.begin(); it != fields.map_type_name.end(); it++)
    new_btn->add(it->first.c_str());
  new_btn->callback(field_new_cb);

  y += BH;
  browser = new Fl_Hold_Browser(x, y + WB, w, h - 2 * WB);
  browser->callback(field_browser_cb);

  y += h;
  delete_btn = new Fl_Button(x, y, w, BH, "Delete");
  delete_btn->callback(field_delete_cb, this);

  y += BH;
  put_on_view_btn = new Fl_Menu_Button(x, y, w, BH, "Visualize");
  put_on_view_btn->callback(field_put_on_view_cb, this);

  x += w + WB;
  y = WB;
  w = width - x - WB;
  h = height - y - WB;
  empty_message = new Fl_Box(x, y, w, h, "Create a new field\n\n"
                             "- or -\n\nSelect a field in the browser");
  empty_message->align(FL_ALIGN_CENTER);

  editor_group = new Fl_Group(x, y, w, h);

  title = new Fl_Box(x, y, w, BH, "field_name");
  title->labelfont(FL_BOLD);
  title->labelsize(FL_NORMAL_SIZE + 3);

  y += BH + WB;
  h -= BH + WB;
  Fl_Tabs *tabs = new Fl_Tabs(x, y , w, h);
  y += BH;
  h -= BH;
  x += WB;
  w -= 2 * WB;

  Fl_Group *options_tab = new Fl_Group(x, y, w, h, "Options");

  options_scroll = new Fl_Scroll(x, y + WB, w, h - BH - 3 * WB);
  options_scroll->end();

  Fl_Button *apply_btn = new Fl_Return_Button
    (x + w - BB, y + h - BH - WB, BB, BH, "Apply");
  apply_btn->callback(field_apply_cb, this);

  background_btn = new Fl_Round_Button
    (x, y + h - BH - WB, w - BB - WB, BH, "Set as background field");
  background_btn->tooltip("Only a single field can be set as background field.\n"
                          "To combine multiple fields use the Min or Max fields.");
  options_tab->end();

  Fl_Group *help_tab = new Fl_Group(x, y, w, h, "Help");
  help_display = new Fl_Help_View(x, y + WB, w, h - 2 * WB);
  help_display->textfont(FL_HELVETICA);
  help_display->textsize(FL_NORMAL_SIZE);
  help_tab->end();

  tabs->end();

  editor_group->end();

  win->resizable(new Fl_Box((int)(1.5 * BB) + 2 * WB, BH + 2 * WB,
                            width - 3 * WB - (int)(1.5 * BB),
                            height - 3 * BH - 5 * WB));
  editor_group->resizable(tabs);
  tabs->resizable(options_tab);
  options_tab->resizable(new Fl_Box(3 * BB + 4 * WB, BH + 2 * WB,
                                    width - 9 * WB - 5 * BB,
                                    height - 3 * BH - 5 * WB));
  win->size_range(width0, height0);
  win->position(CTX::instance()->fieldPosition[0], CTX::instance()->fieldPosition[1]);
  win->end();

  FL_NORMAL_SIZE += deltaFontSize;

  loadFieldViewList();
  editField(NULL);
//.........这里部分代码省略.........
开发者ID:iyer-arvind,项目名称:gmsh,代码行数:101,代码来源:fieldWindow.cpp

示例8: Fl_Tile

ModelerUserInterface::ModelerUserInterface() {
	// Make this instance the current one
	instance = this;

	// Initialize pointers to NULL
	m_nativeChooser = NULL;
	model = NULL;
	currentGroup = NULL;
	renderGroup = NULL;
	defaultCam = NULL;
	ps = NULL;
	movieWidth = 720;
	movieHeight = 480;

	// Set appearance to GTK+ for a nice look
	Fl::scheme("gtk+");

	// Set the animation speed to 24 frames/second
	framesPerSecond = 24;

	// We're not animating yet.
	animating = false;
	simulating = false;
	rendering = false;
	drawing = false;

	// Set the color scheme
	Fl::set_color(FL_BACKGROUND_COLOR, 240, 240, 240);
	Fl::set_color(FL_BACKGROUND2_COLOR, 255, 255, 255);
	Fl::set_color(FL_FOREGROUND_COLOR, 0, 0, 0);
	Fl::set_color(FL_INACTIVE_COLOR, 128, 128, 128);
	Fl::set_color(FL_SELECTION_COLOR, 51, 153, 255);

	// Create all of the UI elements
	// (autogenerated by FLUID, the FLTK UI Designer)
	Fl_Double_Window* w;
	const char* title = "Animator";
	{ Fl_Double_Window* o = m_controlsWindow = new Fl_Double_Window(800, 625, title);
		w = o;
		o->callback((Fl_Callback*)cb_m_controlsWindow, (void*)(this));
		o->when(FL_WHEN_NEVER);
		{ Fl_Menu_Bar* o = m_controlsMenuBar = new Fl_Menu_Bar(0, 0, 800, 25);
		  o->menu(menu_m_controlsMenuBar);
		}

		// Contains the controls on the left
		{ leftPane = new Fl_Group(0, 25, 250, 600);
			int tabSpace = 0, controlSpace = 0;
			int controlTop = 25 + 600 - controlSpace;

			// Modeler and Curves tabs
			{ Fl_Tabs* t = new Fl_Tabs(0, 25, 250, 600 - controlSpace);
				// Make the tab area stretch.
				leftPane->resizable(t);
				t->when(FL_WHEN_CHANGED);
				t->callback((Fl_Callback*)TabsCallback, this);
				// Curves tab
				{ Fl_Group* o = new Fl_Group(0, 50, 250, 575 - controlSpace, "Curves");
					o->box(FL_FLAT_BOX);
					o->color(FL_BACKGROUND_COLOR);
					{ Fl_Tree* o = curvesTree = new Fl_Tree(0, 50, 250, 575 - controlSpace);
					  o->when(FL_WHEN_CHANGED);
					  o->callback((Fl_Callback*)CurveTreeCallback);
					  o->marginleft(-5);
					  o->end();
					}
					o->end();
				}

				// Modeler tab
				{ Fl_Tile* o = m_controlSplitPane =
					new Fl_Tile(0, 50 + tabSpace, 250, 575 + tabSpace - controlSpace, "Modeler");
					// Make only the content area of the tabs resize.
					t->resizable(o);
					o->box(FL_FLAT_BOX);
					{ Fl_Tree* o = m_controlsTree = new Fl_Tree(0, 50 + tabSpace, 250, 100);
					  o->when(FL_WHEN_CHANGED);
					  o->callback((Fl_Callback*)TreeCallback);
					  o->marginleft(-5);
					  o->end();
					}
					{ Fl_Scroll* o = m_controlsScroll =
						new Fl_Scroll(0, 150 + tabSpace, 250, 475 - tabSpace - controlSpace);
					  o->type(Fl_Scroll::VERTICAL);
					  o->when(FL_WHEN_CHANGED);
					  { Fl_Pack* o = m_controlsPack =
						  new Fl_Pack(10, 150 + tabSpace, 215, 475 - tabSpace - controlSpace);
						Fl_Group::current()->resizable(o);
						o->spacing(2);
						o->end();
					  }
					  o->end();
					}
					o->end();
				} // end Modeler group/tab
				t->end();
			} // end tabs
			leftPane->end();
		} // left pane
		{ // TODO: remove this extra brace!
//.........这里部分代码省略.........
开发者ID:shayne1993,项目名称:ComputerGraphicProjects,代码行数:101,代码来源:modelerui.cpp

示例9: strdup

Fl_Parameters_Manager::Fl_Parameters_Manager(int x, int y, int width, int height, Fl_MDI_Viewport *s, const char *name)
{
	Fl::lock();

	s->begin();
	Fl_MDI_Window *w = PWin = new Fl_MDI_Window(0, 0, width, height, name);
	w->user_data((void *)this);
	w->resizable(w->view());

	w->titlebar()->close_button()->hide();

	w->view()->begin();

	Parameters_Tabs = new Fl_Tabs*[Num_Tunable_Blocks];
	Input_Blocks = new Param_Input_Block_T [Num_Tunable_Parameters];

	for (int i = 0; i < Num_Tunable_Blocks; i++) {
		{ Fl_Tabs *o = Parameters_Tabs[i] = new Fl_Tabs(160, 5, width-165, height-70);
		  o->new_page("Block Parameters");
		  int tot_rows = 0;
		  if (i == Num_Tunable_Blocks - 1) {
		  	for (int j = 0; j < Num_Tunable_Parameters - Tunable_Blocks[i].offset; j++) {
				char scalar_val[20];
				char param_label[MAX_NAMES_SIZE + 10];
				int val_idx;
				unsigned int ncols = Tunable_Parameters[Tunable_Blocks[i].offset+j].n_cols;
				unsigned int nrows = Tunable_Parameters[Tunable_Blocks[i].offset+j].n_rows;
				Input_Blocks[Tunable_Blocks[i].offset+j].inputW = new Fl_Float_Input*[nrows*ncols];

				sprintf(param_label, "%s", Tunable_Parameters[Tunable_Blocks[i].offset+j].param_name);
				for (unsigned int nr = 0; nr < nrows; nr++) {
					for (unsigned int nc = 0; nc < ncols; nc++) {
		  				{ Fl_Float_Input *o = new Fl_Float_Input(10 + nc*110, 30 + (j+nr+tot_rows)*40, 100, 20, strdup(param_label));
						  param_label[0] = '\0';
			    	  		  o->align(FL_ALIGN_LEFT|FL_ALIGN_TOP);
				  		  o->when(FL_WHEN_ENTER_KEY);
						  sprintf(scalar_val, "%G", get_parameter(Tunable_Parameters[Tunable_Blocks[i].offset+j], nr, nc, &val_idx));
			    	  		  o->value(strdup(scalar_val));
						  p_idx_T *idx = new p_idx_T;
						  idx->block_idx = i;
						  idx->param_idx = j;
						  idx->val_idx = val_idx;
				  		  o->callback((Fl_Callback *)rlg_update_parameters_cb, (void *)idx);
						  Input_Blocks[Tunable_Blocks[i].offset+j].inputW[val_idx]=o;
						}
					}
				}
				tot_rows = tot_rows + nrows - 1;
			}
		  } else {
		  	for (int j = 0; j < Tunable_Blocks[i+1].offset-Tunable_Blocks[i].offset; j++) {
				char scalar_val[20];
				char param_label[MAX_NAMES_SIZE + 10];
				int val_idx;
				unsigned int ncols = Tunable_Parameters[Tunable_Blocks[i].offset+j].n_cols;
				unsigned int nrows = Tunable_Parameters[Tunable_Blocks[i].offset+j].n_rows;
				Input_Blocks[Tunable_Blocks[i].offset+j].inputW = new Fl_Float_Input*[nrows*ncols];
				sprintf(param_label, "%s", Tunable_Parameters[Tunable_Blocks[i].offset+j].param_name);
				for (unsigned int nr = 0; nr < nrows; nr++) {
					for (unsigned int nc = 0; nc < ncols; nc++) {
		  				{ Fl_Float_Input *o = new Fl_Float_Input(10 + nc*110, 30 + (j+nr+tot_rows)*40, 100, 20, strdup(param_label));
						  param_label[0] = '\0';
			    	  		  o->align(FL_ALIGN_LEFT|FL_ALIGN_TOP);
				  		  o->when(FL_WHEN_ENTER_KEY);
						  sprintf(scalar_val, "%G", get_parameter(Tunable_Parameters[Tunable_Blocks[i].offset+j], nr, nc, &val_idx));
			    	  		  o->value(strdup(scalar_val));
						  p_idx_T *idx = new p_idx_T;
						  idx->block_idx = i;
						  idx->param_idx = j;
						  idx->val_idx = val_idx;
						  o->callback((Fl_Callback *)rlg_update_parameters_cb, (void *)idx);
						  Input_Blocks[Tunable_Blocks[i].offset+j].inputW[val_idx]=o;
						}
					}
				}
				tot_rows = tot_rows + nrows - 1;
			}
		  }
		  o->end();
		  Fl_Group::current()->resizable(w);
		}
	}
	for (int i = 1; i < Num_Tunable_Blocks; i++) {
		Parameters_Tabs[i]->hide();
	}
	Parameters_Tabs[0]->show();

	Batch_Download = new Fl_Check_Button(width-270, height-60, 120, 25, "Batch Download");
	Batch_Download->callback((Fl_Callback *)batch_download_cb);
	Download = new Fl_Button(width-150, height-60, 70, 25, "Download");
	Download->callback((Fl_Callback *)rlg_batch_update_parameters_cb);
	Download->deactivate();
	Upload = new Fl_Button(width-75, height-60, 70, 25, "Upload");
	Upload->callback((Fl_Callback *)rlg_upload_parameters_cb);
//	Upload->deactivate();
	Help = new Fl_Button(width-150, height-30, 70, 25, "Help");
	Close = new Fl_Button(width-75, height-30, 70, 25, "Close");
	Close->callback((Fl_Callback *)close);

	Fl_Browser *o = Parameters_Tree = new Fl_Browser(5, 5, 150, height-10);
//.........这里部分代码省略.........
开发者ID:ArcEye,项目名称:3.4.55-rtai,代码行数:101,代码来源:Fl_Params_Manager.cpp

示例10: Fl_Box

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);
//.........这里部分代码省略.........
开发者ID:GustavoMOG,项目名称:ede12,代码行数:101,代码来源:edisplayconf.cpp

示例11: main

int main( int argc, char **argv )
{
    const char* facebaseopt="--facebase=";
    char* classifierbase = 0;
    char* aviname = 0;
    int auto_run = 0;
    
    if( argc > 1 && argv[argc-1][0] != '-' )
    {
        aviname = argv[argc-1];
        auto_run = 1;
        argc--;
    }
    
    if( argc > 1 && strncmp(argv[argc-1],facebaseopt,strlen(facebaseopt))==0 )
    {
        classifierbase=argv[argc-1] + strlen(facebaseopt);
        argc--;
    }
    
    if( !InitFaceDetect(classifierbase))
    {
        fprintf( stderr, "Could not locate face classifier base at %s\n"
                         "Use --facebase=<classifier base path> option to specify the base\n",
                 classifierbase );
        return -1;
    }
	
    cpu_freq = cvGetTickFrequency(); 
    printf("Tick frequency (*10^-6): %g\n", cpu_freq );
 
    Fl_Window* w;
    {
        Fl_Window* o = root_window = new Fl_Window( root_w, root_h );
        w = o;
        {
            Fl_Tabs* o = new Fl_Tabs( 10, 10, root_w - 20, root_h - 100 );
            // camera tab
            {
                Fl_Group* o = new Fl_Group( 10, 30, root_w - 20, root_h - 110, "Face Detection" );
                {
                    VideoWindow* o = new VideoWindow( 15, 35, root_w - 30, root_h - 120 );
                    video_window = o;
                    o->box( FL_BORDER_BOX );
                    o->color(0);
                }
                o->end();
            }
            o->end();
            Fl_Group::current()->resizable(o);
        }
        {
            const int bwidth = 30, bheight = 30;
            play_button = new Fl_Button( 10, root_h - 35, bwidth, bheight, "@>" );
            play_button->callback((Fl_Callback*)cb_PauseResume);
            play_button->deactivate();
            stop_button = new Fl_Button( 10 + bwidth, root_h - 35, bwidth, bheight, "@square" );
            stop_button->callback((Fl_Callback*)cb_Stop);
            stop_button->deactivate();
            video_button = new Fl_Button( 10 + bwidth*2, root_h - 35, bwidth, bheight, "..." );
            video_button->callback((Fl_Callback*)cb_Open);
            cam_button = new Fl_Button( 10 + bwidth*3, root_h - 35, bwidth, bheight, "[o]" );
            cam_button->callback((Fl_Callback*)cb_StartCam);
            video_pos = new Fl_Value_Slider( 10 + bwidth*4 + 10, root_h - 35, 200, 20, "Position" );
            video_pos->type( FL_HOR_NICE_SLIDER );
            record_button = new Fl_Button( 10 + bwidth*4 + 230, root_h - 35, bwidth, bheight, "@circle" );
            record_button->labelcolor(FL_RED);
            record_button->callback((Fl_Callback*)cb_StartStopRecord );
            record_button->deactivate();
            fps_box = new Fl_Box( 10, root_h - 75, bwidth*4, bheight, "<No data>" );
            fps_box->box( FL_DOWN_BOX );
        }
        o->end();
    }
    Fl::visual(FL_RGB);
    w->show(argc, argv);
    if( auto_run )
        Fl::add_timeout( 0.1, cb_AutoRun, aviname );
    Fl::run();
    cb_Exit(0,0);
    return 0;
}
开发者ID:JackJone,项目名称:opencv,代码行数:82,代码来源:facedetect.cpp

示例12: make_codingstyle_window

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"));
//.........这里部分代码省略.........
开发者ID:GustavoMOG,项目名称:efltk,代码行数:101,代码来源:coding_style.cpp

示例13: main

int main (int argc, char **argv) {

  Fl_Window* w;
  fl_init_locale_support("eiconsconf", PREFIX"/share/locale");
  readIconsConfiguration();
   {Fl_Window* o = iconsConfWindow = new Fl_Window(265, 314, _("Icons settings"));
    w = o;
    o->shortcut(0xff1b);
     {Fl_Button* o = new Fl_Button(25, 280, 75, 25, _("&OK"));
      o->callback((Fl_Callback*)cb_OK);
    }
     {Fl_Button* o = new Fl_Button(185, 280, 75, 25, _("&Cancel"));
      o->callback((Fl_Callback*)cb_Cancel);
    }
     {Fl_Button* o = new Fl_Button(105, 280, 75, 25, _("&Apply"));
      o->callback((Fl_Callback*)cb_Apply);
    }
     {Fl_Tabs* o = new Fl_Tabs(3, 5, 257, 265);
      o->color((Fl_Color)0xfffffffe);
       {Fl_Group* o = new Fl_Group(1, 23, 255, 241, _("Look&&feel"));
        o->align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
         {Fl_Button* o = colorButton = new Fl_Button(165, 17, 60, 18, _("Background color: "));
          o->box(FL_DOWN_BOX);
          o->callback((Fl_Callback*)cb_colorButton);
          o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
          o->color((Fl_Color) label_background);
          if(label_trans) o->deactivate();
        }
         {Fl_Button* o = colorButton1 = new Fl_Button(165, 47, 60, 18, _("Label color: "));
          o->box(FL_DOWN_BOX);
          o->callback((Fl_Callback*)cb_colorButton1);
          o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
          o->color((Fl_Color) label_foreground);
        }
         {Fl_Value_Slider* o = maxWidthSlider = new Fl_Value_Slider(115, 95, 125, 20, _("Maximum width: "));
          o->type(Fl_Value_Slider::HORIZONTAL);
          o->minimum(48);
          o->maximum(200);
          o->step(1);
          o->value(50);
          o->slider_size(10);
          o->callback((Fl_Callback*)cb_maxWidthSlider);
          o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
          o->value(label_maxwidth);
        }
         {Fl_Value_Slider* o = fontsizeSlider = new Fl_Value_Slider(115, 125, 125, 20, _("Font height: "));
          o->type(Fl_Value_Slider::HORIZONTAL|Fl_Slider::TICK_ABOVE);
          o->minimum(8);
          o->maximum(48);
          o->step(1);
          o->value(10);
          o->slider_size(10);
          o->callback((Fl_Callback*)cb_fontsizeSlider);
          o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
          o->value(label_fontsize);
        }
         {Fl_Value_Slider* o = gridspaceSlider = new Fl_Value_Slider(115, 155, 125, 20, _("Grid spacing: "));
          o->type(Fl_Value_Slider::HORIZONTAL|Fl_Slider::TICK_ABOVE);
          o->minimum(1);
          o->maximum(50);
          o->step(1);
          o->value(10);
          o->slider_size(10);
          o->callback((Fl_Callback*)cb_gridspaceSlider);
          o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
          o->value(label_gridspacing);
        }
         {Fl_Check_Button* o = autoArrButton = new Fl_Check_Button(25, 215, 222, 20, _("Auto arrange icons"));
          o->callback((Fl_Callback*)cb_autoArrButton);
          o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_CLIP);
          o->value(auto_arr);
        }
         {Fl_Check_Button* o = engageButton = new Fl_Check_Button(25, 190, 222, 20, _("Engage with just one click"));
          o->callback((Fl_Callback*)cb_engageButton);
          o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_CLIP);
          o->value(label_engage_1click);
        }
         {Fl_Check_Button* o = bg_color_check = new Fl_Check_Button(227, 17, 20, 18);
          o->callback((Fl_Callback*)cb_bg_color_check);
          o->tooltip(_("Clear this, to get transparent background."));
          if(!label_trans) o->set_value();
        }
        o->end();
      }
      o->end();
    }
    o->end();
    o->resizable(o);
  }
  w->show(argc, argv);
  return  Fl::run();
}
开发者ID:edeproject,项目名称:svn,代码行数:92,代码来源:eiconsconf.cpp

示例14: paletteWindow

geometryContextWindow::geometryContextWindow(int deltaFontSize)
{
  FL_NORMAL_SIZE -= deltaFontSize;

  int width = 31 * FL_NORMAL_SIZE;
  int height = 4 * WB + 8 * BH;

  win = new paletteWindow(width, height, CTX::instance()->nonModalWindows ? true : false,
                          "Contextual Geometry Definitions");
  win->box(GMSH_WINDOW_BOX);
  {
    Fl_Tabs *o = new Fl_Tabs(WB, WB, width - 2 * WB, height - 2 * WB);
    // 0: Parameter
    {
      group[0] = new Fl_Group
        (WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Parameter");
      input[0] = new Fl_Input(2 * WB, 2 * WB + 1 * BH, IW, BH, "Name");
      input[0]->value("lc");
      input[1] = new Fl_Input(2 * WB, 2 * WB + 2 * BH, IW, BH, "Value");
      input[1]->value("0.1");
      input[24] = new Fl_Input(2 * WB, 2 * WB + 3 * BH, IW, BH, "Label");
      input[24]->value("");
      input[25] = new Fl_Input(2 * WB, 2 * WB + 4 * BH, IW, BH, "Path");
      input[25]->value("Parameters");
      for(int i = 0; i < 2; i++)   input[i]->align(FL_ALIGN_RIGHT);
      for(int i = 24; i < 26; i++) input[i]->align(FL_ALIGN_RIGHT);
      {
        Fl_Return_Button *o = new Fl_Return_Button
          (width - BB - 2 * WB, 2 * WB + 7 * BH, BB, BH, "Add");
        o->callback(con_geometry_define_parameter_cb);
      }
      group[0]->end();
    }
    // 1: Point
    {
      group[1] = new Fl_Group
        (WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Point");
      input[2] = new Fl_Input(2 * WB, 2 * WB + 1 * BH, IW, BH, "X coordinate");
      input[2]->value("0");
      input[3] = new Fl_Input(2 * WB, 2 * WB + 2 * BH, IW, BH, "Y coordinate");
      input[3]->value("0");
      input[4] = new Fl_Input(2 * WB, 2 * WB + 3 * BH, IW, BH, "Z coordinate");
      input[4]->value("0");
      input[5] = new Fl_Input(2 * WB, 2 * WB + 4 * BH, IW, BH, "Prescribed mesh element size at point");
      input[5]->value("1.0");
      for(int i = 2; i < 6; i++) {
        input[i]->align(FL_ALIGN_RIGHT);
      }
      value[0] = new Fl_Value_Input(2 * WB, 2 * WB + 5 * BH, IW/3, BH);
      value[1] = new Fl_Value_Input(2 * WB + IW/3, 2 * WB + 5 * BH, IW/3, BH);
      value[2] = new Fl_Value_Input(2 * WB + 2*IW/3, 2 * WB + 5 * BH, IW/3, BH,
                                    "Snapping grid spacing");
      for(int i = 0; i < 3; i++) {
        value[i]->align(FL_ALIGN_RIGHT);
        value[i]->callback(con_geometry_snap_cb);
      }
      {
        Fl_Return_Button *o = new Fl_Return_Button
          (width - BB - 2 * WB, 2 * WB + 7 * BH, BB, BH, "Add");
        o->callback(con_geometry_define_point_cb);
      }
      group[1]->end();
    }
    // 2: Translation
    {
      group[2] = new Fl_Group
        (WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Translation");
      input[6] = new Fl_Input(2 * WB, 2 * WB + 1 * BH, IW, BH, "X component");
      input[6]->value("0");
      input[7] = new Fl_Input(2 * WB, 2 * WB + 2 * BH, IW, BH, "Y component");
      input[7]->value("0");
      input[8] = new Fl_Input(2 * WB, 2 * WB + 3 * BH, IW, BH, "Z component");
      input[8]->value("1");
      for(int i = 6; i < 9; i++) {
        input[i]->align(FL_ALIGN_RIGHT);
      }
      group[2]->end();
    }
    // 3: Rotation
    {
      group[3] = new Fl_Group
        (WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Rotation");
      input[9] = new Fl_Input
        (2 * WB, 2 * WB + 1 * BH, IW, BH, "X coordinate of an axis point");
      input[9]->value("0");
      input[10] = new Fl_Input
        (2 * WB, 2 * WB + 2 * BH, IW, BH, "Y coordinate of an axis point");
      input[10]->value("0");
      input[11] = new Fl_Input
        (2 * WB, 2 * WB + 3 * BH, IW, BH, "Z coordinate of an axis point");
      input[11]->value("0");
      input[12] = new Fl_Input
        (2 * WB, 2 * WB + 4 * BH, IW, BH, "X component of axis direction");
      input[12]->value("0");
      input[13] = new Fl_Input
        (2 * WB, 2 * WB + 5 * BH, IW, BH, "Y component of axis direction");
      input[13]->value("1");
      input[14] = new Fl_Input
        (2 * WB, 2 * WB + 6 * BH, IW, BH, "Z component of axis direction");
      input[14]->value("0");
//.........这里部分代码省略.........
开发者ID:iyer-arvind,项目名称:gmsh,代码行数:101,代码来源:contextWindow.cpp

示例15: show_icon_properties_dialog

void show_icon_properties_dialog(DesktopIcon* dicon) {
	// fetch usefull data
	DesktopIconData data;
	study_and_fill(dicon, &data);

	// now construct dialog and fill it
	edelib::Window* win = new edelib::Window(315, 395, _("Icon properties"));
	win->begin();
		Fl_Tabs* tabs = new Fl_Tabs(10, 10, 295, 340);
		tabs->begin();
			Fl_Group* g1 = new Fl_Group(15, 35, 285, 310, _("General"));
			g1->begin();
				Fl_Button* icon_button = new Fl_Button(20, 50, 75, 75);
				icon_button->image(data.image);
				icon_button->callback((Fl_Callback*)icon_change_cb, &data);
				icon_button->tooltip(_("Click to change icon"));

				Fl_Input* prog_name = new Fl_Input(100, 75, 195, 25);
				prog_name->value(data.label);

				Fl_Output* prog_mime = new Fl_Output(100, 150, 195, 25, _("Type:"));
				prog_mime->box(FL_FLAT_BOX);
				prog_mime->color(FL_BACKGROUND_COLOR);
				prog_mime->value(data.type.c_str());

				Fl_Output* prog_location = new Fl_Output(100, 180, 195, 25, _("Location:"));
				prog_location->box(FL_FLAT_BOX);
				prog_location->color(FL_BACKGROUND_COLOR);
				prog_location->value(data.location);

				Fl_Output* prog_size  = new Fl_Output(100, 210, 195, 25, _("Size:"));
				prog_size->box(FL_FLAT_BOX);
				prog_size->color(FL_BACKGROUND_COLOR);
				prog_size->value(data.size.c_str());

				Fl_Output* prog_date_mod = new Fl_Output(100, 240, 195, 25, _("Modified:"));
				prog_date_mod->box(FL_FLAT_BOX);
				prog_date_mod->color(FL_BACKGROUND_COLOR);
				prog_date_mod->value(data.time_mod.c_str());

				Fl_Output* prog_date_acessed = new Fl_Output(100, 270, 195, 25, "Accessed:");
				prog_date_acessed->box(FL_FLAT_BOX);
				prog_date_acessed->color(FL_BACKGROUND_COLOR);
				prog_date_acessed->value(data.time_access.c_str());
			g1->end();

			Fl_Group* g2 = new Fl_Group(15, 35, 285, 310, _("URL"));
			g2->hide();
			g2->begin();
				Fl_Input* prog_url = new Fl_Input(20, 65, 245, 25, _("URL:"));
				prog_url->align(FL_ALIGN_TOP_LEFT);

				Fl_Button* prog_browse = new Fl_Button(270, 65, 25, 25);
				prog_browse->tooltip(_("Browse location"));

				// set icon for browse button
				if(!edelib::IconLoader::set(prog_browse, "document-open", edelib::ICON_SIZE_TINY))
					prog_browse->label("...");

			g2->end();
		tabs->end();

		Fl_Button* ok_button = new Fl_Button(120, 360, 90, 25, _("&OK"));
		ok_button->callback(ok_cb, win);
		Fl_Button* cancel_button = new Fl_Button(215, 360, 90, 25, _("&Cancel"));
		cancel_button->callback(close_cb, win);
    win->end();
	win->show();

	while(win->shown())
		Fl::wait();
}
开发者ID:edeproject,项目名称:svn,代码行数:72,代码来源:IconProperties.cpp


注:本文中的Fl_Tabs::end方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。