void fx_disp_lookup_window::setup_dialog() { regress_pro *app = regressProApp(); FXScrollWindow *scroll_window = new FXScrollWindow(this, LAYOUT_FILL_X|LAYOUT_FILL_Y); vframe = new FXVerticalFrame(scroll_window, LAYOUT_FILL_X|LAYOUT_FILL_Y); FXHorizontalFrame *thf = new FXHorizontalFrame(vframe); new FXLabel(thf, "P"); create_textfield(thf, this, ID_PARAM_0); matrix = new FXMatrix(vframe, 3, LAYOUT_SIDE_TOP|MATRIX_BY_COLUMNS); new FXLabel(matrix, ""); FXLabel *h1 = new FXLabel(matrix, "-- Dispersion --"); h1->setFont(&app->small_font); h1->setTextColor(app->blue_highlight); FXLabel *h2 = new FXLabel(matrix, "-- P --"); h2->setFont(&app->small_font); h2->setTextColor(app->blue_highlight); for (int i = 0; i < disp->disp.lookup.nb_comps; i++) { add_matrix_component(i); } new FXButton(vframe, "", regressProApp()->add_icon, this, ID_DISP_ELEMENT_ADD, FRAME_SUNKEN); }
void build_text(GUI* g) { WIDGET* ch1=NULL; WIDGET* ch2=NULL; WIDGET* ch3=NULL; ch1=create_textfield(10,160,15); set_textfield_text(ch1,"Textfield"); ch2=create_textfield(160,160,15); set_textfield_text(ch2,"Disabled"); set_textfield_enable(ch2,0); ch3=create_textfield(320,160,15); set_textfield_text(ch3,"Fancy"); set_textfield_text_color(ch3,0x00FF00FF); set_textfield_background_color(ch3,0x00000000); add_to_main(g,ch1); add_to_main(g,ch2); add_to_main(g,ch3); }
void fx_disp_cauchy_window::setup_dialog() { FXMatrix *matrix = new FXMatrix(this, 2, LAYOUT_SIDE_TOP|MATRIX_BY_COLUMNS, 0,0,0,0, 8*DEFAULT_SPACING,8*DEFAULT_SPACING,DEFAULT_SPACING,DEFAULT_SPACING, 6*DEFAULT_SPACING,DEFAULT_SPACING); new FXLabel(matrix, "N", NULL, LAYOUT_CENTER_X); new FXLabel(matrix, "K", NULL, LAYOUT_CENTER_X); for (int p = 0; p < 6; p++) { int i = p / 2, j = p % 2; create_textfield(matrix, this, ID_PARAM_0 + i + 3 * j, 14); } }
void fx_disp_fb_window::add_dispersion_element() { int n = disp->disp.fb.n; disp_add_osc(disp); FXButton *db = new FXButton(matrix, "", regressProApp()->delete_icon, this, ID_DISP_ELEMENT_DELETE + n, FRAME_SUNKEN); db->create(); for (int j = 3*n; j < 3*(n+1); j++) { FXTextField *tf = create_textfield(matrix, this, ID_PARAM_0 + j + 2); tf->create(); } matrix->childAtRowCol(1, 0)->enable(); vframe->recalc(); }
void fx_disp_fb_window::setup_dialog() { FXScrollWindow *scroll_window = new FXScrollWindow(this, LAYOUT_FILL_X|LAYOUT_FILL_Y); vframe = new FXVerticalFrame(scroll_window, LAYOUT_FILL_X|LAYOUT_FILL_Y); static const char *fb_parameter_names[] = {"N(inf)", "Eg", "A", "B", "C"}; static const char *tl_parameter_names[] = {"Eps(inf)", "Eg", "AL", "E0", "C"}; const char **pname = (disp->type == DISP_FB ? fb_parameter_names : tl_parameter_names); FXHorizontalFrame *coeff_frame = new FXHorizontalFrame(vframe, LAYOUT_FILL_X); new FXLabel(coeff_frame, "Parametrization"); FXListBox *coeff_box = new FXListBox(coeff_frame, this, ID_COEFF_FORM, LISTBOX_NORMAL|FRAME_SUNKEN); coeff_box->setNumVisible(2); coeff_box->appendItem("Standard"); coeff_box->appendItem("Peak-based"); coeff_box->setCurrentItem(this->disp->disp.fb.form); FXHorizontalFrame *ninf_frame = new FXHorizontalFrame(vframe, LAYOUT_FILL_X); new FXLabel(ninf_frame, pname[0]); create_textfield(ninf_frame, this, ID_PARAM_0); new FXLabel(ninf_frame, pname[1]); create_textfield(ninf_frame, this, ID_PARAM_0 + 1); matrix = new FXMatrix(vframe, 4, LAYOUT_SIDE_TOP|MATRIX_BY_COLUMNS); new FXLabel(matrix, ""); new FXLabel(matrix, pname[2]); new FXLabel(matrix, pname[3]); new FXLabel(matrix, pname[4]); for (int i = 0; i < disp->disp.fb.n; i++) { FXButton *db = new FXButton(matrix, "", regressProApp()->delete_icon, this, ID_DISP_ELEMENT_DELETE + i, FRAME_SUNKEN); if (disp->disp.fb.n == 1) { db->disable(); } for (int j = 3*i; j < 3*(i+1); j++) { create_textfield(matrix, this, ID_PARAM_0 + j + 2); } } new FXButton(vframe, "", regressProApp()->add_icon, this, ID_DISP_ELEMENT_ADD, FRAME_SUNKEN); }
void fx_disp_lookup_window::add_matrix_component(int index, bool create) { FXString istr; istr.format("%d", index + 1); FXButton *db = new FXButton(matrix, istr, NULL, this, ID_MENU_COMPONENT + index, FRAME_SUNKEN); FXTextField *tf1 = new FXTextField(matrix, 24, this, ID_COMPONENT_NAME + index, FRAME_SUNKEN); tf1->setText(CSTR(disp->disp.lookup.component[index].disp->name)); FXTextField *tf2 = create_textfield(matrix, this, ID_PARAM_0 + 1 + index); if (create) { db->create(); tf1->create(); tf2->create(); } }
void fx_disp_ho_window::setup_dialog() { FXScrollWindow *scroll_window = new FXScrollWindow(this, LAYOUT_FILL_X|LAYOUT_FILL_Y); vframe = new FXVerticalFrame(scroll_window, LAYOUT_FILL_X|LAYOUT_FILL_Y); matrix = new FXMatrix(vframe, 6, LAYOUT_SIDE_TOP|MATRIX_BY_COLUMNS); new FXLabel(matrix, ""); new FXLabel(matrix, "Nosc"); new FXLabel(matrix, "En"); new FXLabel(matrix, "Eg"); new FXLabel(matrix, "Nu"); new FXLabel(matrix, "Phi"); for (int i = 0; i < disp->disp.ho.nb_hos; i++) { FXButton *db = new FXButton(matrix, "", regressProApp()->delete_icon, this, ID_DISP_ELEMENT_DELETE + i, FRAME_SUNKEN); if (disp->disp.ho.nb_hos == 1) { db->disable(); } for (int j = 5*i; j < 5*(i+1); j++) { create_textfield(matrix, this, ID_PARAM_0 + j); } } new FXButton(vframe, "", regressProApp()->add_icon, this, ID_DISP_ELEMENT_ADD, FRAME_SUNKEN); }
NodeHandle Entry<TypeOfEntry>::make_naked_node( simparm::NodeHandle node ) { if ( boost::is_same< TypeOfEntry, bool >() ) return create_checkbox( node, getName() ); else return create_textfield( node, getName(), typeName( TypeOfEntry() ) ); }