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


C++ Fl_Group类代码示例

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


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

示例1: TuileParamWidget

SwitchParamWidget::SwitchParamWidget(TuileWidget* widget, 
                                        MidiOscSwitchTuile* switchTuile):
                                            TuileParamWidget(widget,
                                                             switchTuile),
                                            m_switchTuile(switchTuile) {

    m_selectInput = new Fl_Simple_Counter(0, 0, 50, 20, "Selected Child");
    m_selectInput->align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
    m_selectInput->callback(statTuileSwitchInputs,this);
    m_selectInput->labelsize(12);
    m_selectInput->step(1);
    m_selectInput->bounds(0,10);
    Fl_Group *tmpGroup = new Fl_Group(0,0,80,20,"");
    tmpGroup->end();
    tmpGroup->add(m_selectInput);
    tmpGroup->resizable(false);
    add(tmpGroup);
    end();
}
开发者ID:scrime,项目名称:LiveTuiles,代码行数:19,代码来源:SwitchParamWidget.cpp

示例2: _get_fl_group

Scheme_Object*
spark_fltk_group::array(int argc, Scheme_Object** argv)
{
  DEFAULT_RET_INIT;

  Fl_Group* group = _get_fl_group(argc, argv, 0);
  if (group)
    {
      Fl_Widget** widgets = const_cast<Fl_Widget**>(group->array());
      if (!widgets)
	{
	  DEFAULT_RET_FINISH;
	}
      int i = 0;
      Fl_Widget* w = widgets[i];
      std::vector<Fl_Widget*> w_vec;
      while (w)
	{
	  w_vec.push_back(w);
	  ++i;
	  w = widgets[i];
	}
      size_t sz = w_vec.size();
      Scheme_Object** elems = new Scheme_Object*[sz];
      for (size_t i=0; i<sz; ++i)
	{
	  Scheme_Object* obj = NULL;
	  Scheme_Object* tag = 0;
	  MZ_GC_DECL_REG(2);
	  MZ_GC_VAR_IN_REG(0, obj);
	  MZ_GC_VAR_IN_REG(1, tag);
	  MZ_GC_REG();
	  tag = scheme_make_integer(FL_WIDGET_TAG);
	  obj = scheme_make_cptr(w_vec[i], tag);
	  elems[i] = obj;
	  MZ_GC_UNREG();
	}
      _ret_ = scheme_build_list(sz, elems);      
      delete[] elems;
    }

  DEFAULT_RET_FINISH;
}
开发者ID:johnwcowan,项目名称:spark-scheme,代码行数:43,代码来源:spark_fltk_group.cpp

示例3: Fl_Group

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();
}
开发者ID:gtfold,项目名称:RNAStructViz,代码行数:43,代码来源:FolderWindow.cpp

示例4: Fl_Group

void onelabGroup::_addViewMenu(int num)
{
  std::ostringstream path;
  path << "0Post-processing/View" << num;
  Fl_Tree_Item *n;
  if((n = _tree->find_item(path.str().c_str())) != NULL) { // check if the item already exists
    _tree->remove(n);
  }
  n = _tree->add(path.str().c_str());
  int ww = _baseWidth - (n->depth() + 1) * _indent;
  int hh = n->labelsize() + 4;
  _tree->begin();
  Fl_Group *grp = new Fl_Group(1, 1, ww, hh);
  new viewButton(1, 1, ww, hh, num, _tree->color());
  grp->end();
  if(!_enableTreeWidgetResize) grp->resizable(0);
  _treeWidgets.push_back(grp);
  n->widget(grp);
  _tree->end();
}
开发者ID:kevinr2763,项目名称:gmsh,代码行数:20,代码来源:onelab2Group.cpp

示例5: Fl_Window

ButtonSelectionDialog::ButtonSelectionDialog(int actionNumber_){
	actionNumber = actionNumber_;
	buttonReader = JoystickSingleton::Instance().CreateReader();
	buttonReader->callback(OnButtonSelected, this);

	win = new Fl_Window(550, 130, "Press Joystick Button");
	sprintf(labelText, "Press button for \"%s\" on joystick \"%s\"", ActionName(actionNumber), JoystickSingleton::Instance().Name());
	Fl_Group* label = new Fl_Group(10, 35, 530, 5, labelText);
	label->end();
	errorLabel = new Fl_Group(15, 70, 530, 5);
	errorLabel->labelcolor((Fl_Color)1);
	errorLabel->hide();
	errorLabel->end();
	Fl_Button* btn = new Fl_Button(435, 90, 100, 25, "Cancel");
	btn->callback(OnClose, this);
	win->callback(OnClose, this);
	win->end();
	win->set_modal();
	win->show();
}
开发者ID:oliver,项目名称:DoConfigure,代码行数:20,代码来源:DoConfig.cpp

示例6: CBaseLuaWidget

CLuaDirSelector::CLuaDirSelector(const char *desc, const char *val) : CBaseLuaWidget(desc)
{
    const int dirinputh = 35, buttonh = 25;
    
    // Group for placing widgets next to eachother
    Fl_Group *dirgroup = new Fl_Group(0, 0, 0, dirinputh);
    dirgroup->resizable(NULL);
    GetGroup()->add(dirgroup);
    
    m_pDirInput = new Fl_File_Input(0, 0, 0, dirinputh);
    m_pDirInput->callback(InputChangedCB, this);
    
    if (val && *val)
        m_pDirInput->value(val);
    
    m_pBrowseButton = new Fl_Button(0, (dirinputh-buttonh)/2, 0, buttonh, GetTranslation("Browse"));
    m_pBrowseButton->callback(BrowseCB, this);
    
    dirgroup->end();
}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:20,代码来源:luadirselector.cpp

示例7: Fl_Window

VDBWindow::VDBWindow() : Fl_Window(640+180,480,"vdb") {
	gl = new GLWindow(0, 0, w() - 180, h());
	
	Fl_Group * group = new Fl_Group(640,0,180,h());
	
	point_size = new Fl_Slider(640+10, 20, 160, 20, "Point Size");
	setupSlider(point_size,1,5,5,this);
	filter_value = new Fl_Slider(640+10, 60, 160 , 20, "Filter");
	setupSlider(filter_value,0,1,1,this);
	
	color_by = new Fl_Choice(640+30, 100, 110, 20, "Color By");
	color_by->align(FL_ALIGN_TOP);
	color_by->add("vdb_color",0,color_by_wrapper,this);
	color_by->add("vdb_label",0,color_by_wrapper,this);
	color_by->value(0);
	makePretty(color_by);
	
	clear_button = new Fl_Button(640+130, h() - 40, 40, 30, "Clear");
	clear_button->callback(clear_wrapper,gl);
	makePretty(clear_button);
	
	makePretty(this);
	for(int i = 0; i < N_CATEGORY_COLORS; i++) {
		Fl::set_color(i+8,category_colors[i][0],category_colors[i][1],category_colors[i][2]);
	}
	
	static int column_widths[] = { 30, 100, 0 };
	Fl_Browser * b = gl->legend = new Fl_Browser(640+10,130, 160, h() - 130 - 50);
	b->column_widths(column_widths);
	b->format_char('@');
	b->column_char('\t');
	b->hide();
	group->end();
	group->resizable(NULL);
	
	this->resizable(gl);
	this->size_range(500,480);
	
	this->end();
};
开发者ID:Mx7f,项目名称:vdb,代码行数:40,代码来源:VDBWindow.cpp

示例8: cb_open_about

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
}
开发者ID:patrwall,项目名称:calc80,代码行数:28,代码来源:calc80.cpp

示例9: Fl_Double_Window

//-----------------------------------------------------------------------------
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();
}
开发者ID:ClinicalGraphics,项目名称:MathGL,代码行数:23,代码来源:table.cpp

示例10: Fl_Group

Fl_Group* gdSampleEditor::createUpperBar()
{
  using namespace giada::m;

  Fl_Group* g = new Fl_Group(G_GUI_OUTER_MARGIN, G_GUI_OUTER_MARGIN, w()-16, G_GUI_UNIT);
  g->begin();
    grid    = new geChoice(g->x(), g->y(), 50, G_GUI_UNIT);
    snap    = new geCheck(grid->x()+grid->w()+4, g->y()+3, 12, 12, "Snap");
    sep1    = new geBox(snap->x()+snap->w()+4, g->y(), 506, G_GUI_UNIT);
    zoomOut = new geButton(sep1->x()+sep1->w()+4, g->y(), G_GUI_UNIT, G_GUI_UNIT, "", zoomOutOff_xpm, zoomOutOn_xpm);
    zoomIn  = new geButton(zoomOut->x()+zoomOut->w()+4, g->y(), G_GUI_UNIT, G_GUI_UNIT, "", zoomInOff_xpm, zoomInOn_xpm);
  g->end();
  g->resizable(sep1);

  grid->add("(off)");
  grid->add("2");
  grid->add("3");
  grid->add("4");
  grid->add("6");
  grid->add("8");
  grid->add("16");
  grid->add("32");
  grid->add("64");
  if (conf::sampleEditorGridVal == 0)
    grid->value(0);
  else 
    grid->value(grid->find_item(u::string::iToString(conf::sampleEditorGridVal).c_str()));
  grid->callback(cb_changeGrid, (void*)this);

  snap->value(conf::sampleEditorGridOn);
  snap->callback(cb_enableSnap, (void*)this);

  /* TODO - redraw grid if != (off) */

  zoomOut->callback(cb_zoomOut, (void*)this);
  zoomIn->callback(cb_zoomIn, (void*)this);

  return g;
}
开发者ID:monocasual,项目名称:giada,代码行数:39,代码来源:sampleEditor.cpp

示例11: Fl_Window

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

示例12: Fl_Group

/* Creates the group for the timeline and its controls and returns it. */
Fl_Group* AnimatedSGWindow::makeFrameControlG(const int x, const int y)
{
	Fl_Group* frameControlG = new Fl_Group(x, y, 200, 50);
	
	/* Create the frame rate spinner. */
	this->framerateSpinner = new Fl_Spinner(x, y, 50, 25, "Frame rate");
	this->framerateSpinner->box(FL_UP_BOX);
	this->framerateSpinner->maximum(60);
	this->framerateSpinner->value(10);
	this->framerateSpinner->align(Fl_Align(FL_ALIGN_TOP));
	
	/* Create the number of frames spinner. */
	this->numFramesSpinner = new Fl_Spinner(x+100, y, 70, 25, "Number of Frames");
	this->numFramesSpinner->box(FL_UP_BOX);
	this->numFramesSpinner->maximum(999);
	this->numFramesSpinner->value(20);
	this->numFramesSpinner->align(Fl_Align(FL_ALIGN_TOP));
	this->numFramesSpinner->callback(AnimatedSGWindow::numFramesCB, this);
	
	frameControlG->end();
	return frameControlG;
}
开发者ID:zfergus2,项目名称:Animated_Scene_Graph_Editor,代码行数:23,代码来源:AnimatedSGWindow.cpp

示例13: CBaseLuaWidget

CLuaCFGMenu::CLuaCFGMenu(const char *desc) : CBaseLuaWidget(desc)
{
    m_ColumnWidths[0] = m_ColumnWidths[1] = 0;
    
    const int inputh = 25, dirinputh = 35, inputspacing = 10;
    GetGroup()->begin();
    
    m_pVarListView = new Fl_Hold_Browser(0, 0, 0, GroupHeight() - (inputspacing+dirinputh));
    m_pVarListView->callback(SelectionCB, this);
    
    m_pInputField = new Fl_Input(0, 0, 0, inputh);
    m_pInputField->callback(InputChangedCB, this);
    m_pInputField->when(FL_WHEN_CHANGED);
    m_pInputField->hide();
    
    m_pChoiceMenu = new Fl_Choice(0, 0, 0, inputh);
    m_pChoiceMenu->callback(ChoiceChangedCB, this);
    m_pChoiceMenu->hide();
    
    // Group for placing widgets next to eachother
    Fl_Group *dirgroup = new Fl_Group(0, 0, 0, dirinputh);
    dirgroup->resizable(NULL);
    
    m_pDirInput = new Fl_File_Input(0, 0, 0, dirinputh);
    m_pDirInput->callback(InputChangedCB, this);
    m_pDirInput->when(FL_WHEN_CHANGED);
    m_pDirInput->hide();
    
    m_pBrowseButton = new Fl_Button(0, (dirinputh-inputh) / 2, 0, inputh, GetTranslation("Browse"));
    SetButtonWidth(m_pBrowseButton);
    m_pBrowseButton->callback(BrowseCB, this);
    m_pBrowseButton->hide();
    
    dirgroup->end();
    
    GetGroup()->end();
}
开发者ID:BackupTheBerlios,项目名称:nixstaller-svn,代码行数:37,代码来源:luacfgmenu.cpp

示例14: Fl_Group

Fl_Group* TabScreen::MakeTab( const string& title )
{
    int rx, ry, rw, rh;
    m_MenuTabs->client_area( rx, ry, rw, rh, TAB_H );

    Fl_Group* grp = new Fl_Group( rx, ry, rw, rh );
    grp->copy_label( title.c_str() );
    grp->selection_color( FL_GRAY );
    grp->labelfont( 1 );
    grp->labelcolor( FL_BLACK );
    grp->hide();
    m_TabGroupVec.push_back( grp );

    return grp;
}
开发者ID:aeromedia,项目名称:OpenVSP,代码行数:15,代码来源:ScreenBase.cpp

示例15: Fl_Group

void DelayGUI::CreateGUI(int xoff, int yoff, char *name)
{
	 Fl_Group* o = GUIDelayGroup = new Fl_Group(xoff, yoff, 300, 60, name);
      o->type(1);
	  o->color(GUIBG2_COLOUR);
	  o->box(FL_UP_BOX);
      o->labeltype(FL_ENGRAVED_LABEL);
      o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
	  o->user_data((void*)(this));
       	  
	  DelayA = new Fl_Knob(xoff+50, yoff+5, 40, 40, "Delay");
	  DelayA->color(GUI_COLOUR);
      DelayA->labelsize(10);
	  DelayA->maximum(1);
      DelayA->step(0.01);
      DelayA->value(0.5);
      DelayA->callback((Fl_Callback*)cb_Delay);
	  
	  Feedback = new Fl_Knob(xoff+100, yoff+5, 40, 40, "Feedback");
	  Feedback->color(GUI_COLOUR);
      Feedback->labelsize(10);
	  Feedback->maximum(1.0);
      Feedback->step(0.01);
      Feedback->value(0.5);
      Feedback->callback((Fl_Callback*)cb_Feedback);
	  
	  Bypass = new Fl_Button(xoff+5, yoff+25, 40, 20, "Bypass");
	  Bypass->color(GUIBG2_COLOUR);
	  Bypass->labelsize(10);
	  Bypass->type(1);
	  Bypass->value(1);
	  Bypass->callback((Fl_Callback*)cb_Bypass);
	  
      o->end();
    
}
开发者ID:original-male,项目名称:spiralsynthmodular,代码行数:36,代码来源:DelayGUI.C


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