ct_image_window::ct_image_window( ) { Fl_Double_Window* w; { Fl_Double_Window* o = image_window = new Fl_Double_Window(421, 528); w = o; o->user_data((void*)(this)); { Fl_Group* o = new Fl_Group(5, 30, 410, 410); o->box(FL_PLASTIC_DOWN_FRAME); { ct_draw_area* o = ct_image = new ct_draw_area(10, 35, 400, 400, "label"); o->box(FL_FLAT_BOX); o->color(FL_DARK3); o->selection_color(FL_BACKGROUND_COLOR); o->labeltype(FL_NORMAL_LABEL); o->labelfont(0); o->labelsize(14); o->labelcolor(FL_BLACK); o->align(FL_ALIGN_CENTER); o->when(FL_WHEN_RELEASE); } o->end(); } { Fl_Menu_Bar* o = new Fl_Menu_Bar(0, 0, 100, 25); o->box(FL_FLAT_BOX); o->menu(menu_); } { Fl_Value_Slider* o = WL = new Fl_Value_Slider(40, 470, 375, 20, "WL"); o->type(1); o->box(FL_PLASTIC_THIN_DOWN_BOX); o->minimum(-2000); o->maximum(7000); o->step(1); o->value(40); o->callback((Fl_Callback*)cb_WL); o->align(FL_ALIGN_LEFT); } { Fl_Value_Slider* o = WW = new Fl_Value_Slider(40, 495, 375, 20, "WW"); o->type(1); o->box(FL_PLASTIC_THIN_DOWN_BOX); o->minimum(1); o->maximum(4000); o->step(1); o->value(300); o->callback((Fl_Callback*)cb_WW); o->align(FL_ALIGN_LEFT); } { Fl_Value_Slider* o = Indx = new Fl_Value_Slider(40, 445, 375, 20, "Indx"); o->type(1); o->box(FL_PLASTIC_THIN_DOWN_BOX); o->step(1); o->callback((Fl_Callback*)cb_Indx); o->align(FL_ALIGN_LEFT); } { Fl_Progress* o = progress_bar = new Fl_Progress(115, 5, 300, 20); o->box(FL_PLASTIC_THIN_UP_BOX); o->selection_color((Fl_Color)1); o->hide(); } o->end(); } }
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; }
Flx_Calendar::Flx_Calendar() : Fl_Window( 0, 0, TABLE_W + 2*MARGIN, BAR_H + TABLE_H + BUTTONGROUP_H + 2*MARGIN ) , _isDragging(false) { //fl_register_images(); box(FL_DOWN_BOX); clear_border(); //make a gray bar as a replacement for the title bar, //containing 2 comboboxes for entering year and month Fl_Group *pBarGrp = new Fl_Group( MARGIN, MARGIN, TABLE_W, BAR_H ); pBarGrp->box(FL_FLAT_BOX); pBarGrp->begin(); _pMoCho = new Fl_Choice(18, 4, 55, BAR_H - 5); _pMoCho->box(FL_FLAT_BOX); _pMoCho->textsize(10); _pMoCho->visible_focus( 0 ); _pYCho = new Fl_Choice(_pMoCho->x() + 2 + _pMoCho->w(), 4, 55, BAR_H - 5); _pYCho->textsize(10); _pYCho->visible_focus( 0 ); pBarGrp->color(FL_DARK3); pBarGrp->end(); _pDayTable = new DayTable( MARGIN, MARGIN + BAR_H, TABLE_W, TABLE_H ); _pDayTable->end(); _pBtnOk = new Fl_Return_Button( 2*MARGIN, this->h() - 2*MARGIN - BUTTON_H, 70, BUTTON_H, "OK" ); _pBtnOk->labelsize( 10 ); _pBtnOk->callback( staticOnOkCancel, this ); _pBtnCancel = new Fl_Button( _pBtnOk->x() + _pBtnOk->w() + MARGIN, _pBtnOk->y(), _pBtnOk->w(), _pBtnOk->h(), "Abbrechen" ); _pBtnCancel->labelsize( _pBtnOk->labelsize() ); _pBtnCancel->callback( staticOnOkCancel, this ); end(); //controls all this stuff: _pCalCtrl = new CalendarController( *_pMoCho, *_pYCho, *_pDayTable ); //make DayTable cells the right size: _pDayTable->col_width_all( COLWIDTH ); _pDayTable->row_header_width( COLWIDTH ); _pDayTable->row_height_all( ROWHEIGHT ); }
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(); }
/* Fl_Group( X, Y, W, H, L) */ Chain::Chain ( ) : Fl_Group( 0, 0, 100, 100, "") { /* not really deleting here, but reusing this variable */ _deleting = true; int X = 0; int Y = 0; int W = 100; int H = 100; /* _outs = 1; */ /* _ins = 1; */ _configure_outputs_callback = NULL; _strip = NULL; _name = NULL; labelsize( 10 ); align( FL_ALIGN_TOP ); { Fl_Flip_Button* o = tab_button = new Fl_Flip_Button( X, Y, W, 16, "chain/controls"); o->type(1); o->labelsize( 12 ); o->callback( cb_handle, this ); } Y += 18; H -= 18; { Fl_Group *o = chain_tab = new Fl_Group( X, Y, W, H, "" ); o->labeltype( FL_NO_LABEL ); o->box( FL_FLAT_BOX ); // o->color( fl_darker( FL_BACKGROUND_COLOR ) ); // o->color( FL_BACKGROUND_COLOR ); // o->box( FL_NO_BOX ); { Fl_Packscroller *o = new Fl_Packscroller( X, Y, W, H ); o->color( FL_BACKGROUND_COLOR ); // o->box( FL_FLAT_BOX ); o->box( FL_THIN_UP_BOX ); o->type( Fl_Scroll::VERTICAL ); { Fl_Pack *o = modules_pack = new Fl_Pack( X, Y, W, H ); o->type( Fl_Pack::VERTICAL ); o->spacing( 6 ); o->end(); Fl_Group::current()->resizable( o ); } o->end(); } o->end(); } { Fl_Group *o = control_tab = new Fl_Group( X, Y, W, H, "" ); o->box( FL_FLAT_BOX ); o->color( FL_BACKGROUND_COLOR ); o->labeltype( FL_NO_LABEL ); o->hide(); { Fl_Scroll *o = new Fl_Scroll( X, Y, W, H ); o->color( FL_BACKGROUND_COLOR ); o->box( FL_NO_BOX ); o->type( Fl_Scroll::VERTICAL ); { Fl_Pack *o = controls_pack = new Fl_Pack( X, Y, W, H ); o->type( Fl_Pack::VERTICAL ); o->spacing( 5 ); // o->color( FL_RED ); o->end(); Fl_Group::current()->resizable( o ); } o->end(); Fl_Group::current()->resizable( o ); } o->end(); o->hide(); Fl_Group::current()->resizable( o ); } end(); log_create(); _deleting = false; }
void CInstaller::Init(int argc, char **argv) { const int buttonsy = WindowH()-ButtonHeight()-ButtonHSpacing(); m_pMainWindow = new Fl_Double_Window(WindowW(), WindowH(), "Nixstaller"); m_pMainWindow->callback(CancelCB, this); Fl_Group *maingroup = new Fl_Group(0, 0, WindowW(), WindowH()); maingroup->resizable(NULL); maingroup->box(FL_FLAT_BOX); maingroup->color(fl_lighter(FL_BACKGROUND_COLOR)); Fl_Pack *mainpack = new Fl_Pack(0, 0, WindowW(), WindowH()-90); mainpack->resizable(NULL); mainpack->type(Fl_Pack::VERTICAL); CreateHeader(); m_pWizard = new Fl_Wizard(0, m_pHeaderGroup->h(), WindowW(), (buttonsy-m_pHeaderGroup->h()-ButtonHSpacing())); m_pWizard->box(FL_ENGRAVED_BOX); m_pWizard->end(); mainpack->end(); m_pCancelButton = new Fl_Button(ButtonWOffset(), buttonsy, 0, ButtonHeight(), GetTranslation("Cancel")); SetButtonWidth(m_pCancelButton); m_pCancelButton->callback(CancelCB, this); m_pButtonPack = new Fl_Pack(0, buttonsy, 0, ButtonHeight()); m_pButtonPack->type(Fl_Pack::HORIZONTAL); m_pButtonPack->spacing(ButtonWSpacing()); m_pBackButton = new Fl_Button(0, buttonsy, 0, ButtonHeight(), CreateText("@<- %s", GetTranslation("Back"))); SetButtonWidth(m_pBackButton); m_pBackButton->callback(BackCB, this); m_pNextButton = new Fl_Button(0, buttonsy, 0, ButtonHeight(), CreateText("%s @->", GetTranslation("Next"))); SetButtonWidth(m_pNextButton); m_pNextButton->callback(NextCB, this); m_pButtonPack->end(); UpdateButtonPack(); maingroup->end(); CBaseInstall::Init(argc, argv); Fl_Shared_Image *img = Fl_Shared_Image::get(GetLogoFName()); if (img) { m_pLogoBox = new Fl_Box(HeaderSpacing(), HeaderSpacing(), img->w()+HeaderSpacing(), img->h()); m_pLogoBox->align(FL_ALIGN_TOP | FL_ALIGN_INSIDE); m_pLogoBox->image(img); m_pHeaderGroup->add(m_pLogoBox); } int size = m_pWizard->children(); for (int i=0; i<size; i++) { CInstallScreen *screen = GetScreen(m_pWizard->child(i)); if (screen->CanActivate()) { ActivateScreen(screen); break; } } m_pMainWindow->end(); m_pMainWindow->show(argc, argv); }
ModelerUserInterface::ModelerUserInterface() { // Make this instance the current one instance = this; // Initialize pointers to NULL m_nativeChooser = NULL; model = NULL; currentGroup = NULL; // 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; // 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 = "CSEP457 Modeler"; const char* title = "CSEP557 Modeler"; { 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 = -25, controlSpace = 0; { Fl_Tile* o = m_controlSplitPane = new Fl_Tile(0, 50 + tabSpace, 250, 575 - tabSpace); 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 leftPane->end(); } // left pane { // TODO: remove this extra brace! { Fl_Group* o = m_viewPane = new Fl_Group(250, 25, 550, 600); o->box(FL_NO_BOX); o->color(FL_BACKGROUND_COLOR); m_modelerView = new ModelerView(250, 25, 550, 600, ""); w->resizable(m_modelerView); o->end(); Fl_Group::current()->resizable(o); } } o->end(); } }
void ColorFltkMenu::make_window() { size(400, 305); { { Fl_Hold_Browser* o = categorybrowser = new Fl_Hold_Browser(10, 55, 125, 100, "Categories"); o->align(FL_ALIGN_TOP); o->color(VMDMENU_BROWSER_BG, VMDMENU_BROWSER_SEL); o->callback(category_cb, this); VMDFLTKTOOLTIP(o, "Select color category then name to set active color") } { Fl_Hold_Browser* o = itembrowser = new Fl_Hold_Browser(140, 55, 120, 100, "Names"); o->align(FL_ALIGN_TOP); o->color(VMDMENU_BROWSER_BG, VMDMENU_BROWSER_SEL); o->callback(item_cb, this); VMDFLTKTOOLTIP(o, "Select color category then name to set active color") } { Fl_Hold_Browser* o = colorbrowser = new Fl_Hold_Browser(265, 55, 125, 100, "Colors"); o->align(FL_ALIGN_TOP); o->color(VMDMENU_BROWSER_BG, VMDMENU_BROWSER_SEL); o->callback(color_cb, this); VMDFLTKTOOLTIP(o, "Select color category then name to set active color") } new Fl_Box(10, 10, 190, 25, "Assign colors to categories:"); { Fl_Tabs* o = new Fl_Tabs(0, 165, 400, 150); #if defined(VMDMENU_WINDOW) o->color(VMDMENU_WINDOW, FL_GRAY); o->selection_color(VMDMENU_WINDOW); #endif { Fl_Group* o = new Fl_Group(0, 185, 400, 125, "Color Definitions"); #if defined(VMDMENU_WINDOW) o->color(VMDMENU_WINDOW, FL_GRAY); o->selection_color(VMDMENU_WINDOW); #endif { Fl_Hold_Browser* o = colordefbrowser = new Fl_Hold_Browser(15, 195, 135, 100); o->labeltype(FL_NO_LABEL); o->color(VMDMENU_BROWSER_BG, VMDMENU_BROWSER_SEL); o->callback(colordef_cb, this); VMDFLTKTOOLTIP(o, "Select color name to adjust RGB color definition") } { Fl_Value_Slider* o = redscale = new Fl_Value_Slider(160, 195, 225, 20); o->type(FL_HORIZONTAL); o->color(VMDMENU_COLOR_RSLIDER); o->callback(rgb_cb, this); VMDFLTKTOOLTIP(o, "Adjust slider to change RGB color definition") } { Fl_Value_Slider* o = greenscale = new Fl_Value_Slider(160, 215, 225, 20); o->type(FL_HORIZONTAL); o->color(VMDMENU_COLOR_GSLIDER); o->callback(rgb_cb, this); VMDFLTKTOOLTIP(o, "Adjust slider to change RGB color definition") } { Fl_Value_Slider* o = bluescale = new Fl_Value_Slider(160, 235, 225, 20); o->type(FL_HORIZONTAL); o->color(VMDMENU_COLOR_BSLIDER); o->callback(rgb_cb, this); VMDFLTKTOOLTIP(o, "Adjust slider to change RGB color definition") } { Fl_Button* o = grayscalebutton = new Fl_Button(165, 265, 85, 25, "Grayscale"); o->type(FL_TOGGLE_BUTTON); #if defined(VMDMENU_WINDOW) o->color(VMDMENU_WINDOW, FL_GRAY); #endif VMDFLTKTOOLTIP(o, "Lock sliders for grayscale color") } defaultbutton = new Fl_Button(290, 265, 85, 25, "Default"); #if defined(VMDMENU_WINDOW) defaultbutton->color(VMDMENU_WINDOW, FL_GRAY); #endif defaultbutton->callback(default_cb, this); VMDFLTKTOOLTIP(defaultbutton, "Reset to original RGB color") o->end(); } { Fl_Group* o = new Fl_Group(0, 185, 400, 125, "Color Scale"); #if defined(VMDMENU_WINDOW) o->color(VMDMENU_WINDOW, FL_GRAY); o->selection_color(VMDMENU_WINDOW); #endif o->hide(); { Fl_Choice* o = scalemethod = new Fl_Choice(15, 220, 80, 25, "Method"); o->color(VMDMENU_CHOOSER_BG, VMDMENU_CHOOSER_SEL); o->down_box(FL_BORDER_BOX); o->align(FL_ALIGN_TOP); o->callback(scalemethod_cb, this); } offsetvalue = new Fl_Value_Slider(160, 205, 180, 20, "Offset"); offsetvalue->type(FL_HORIZONTAL); offsetvalue->color(VMDMENU_SLIDER_BG, VMDMENU_SLIDER_FG); offsetvalue->align(FL_ALIGN_LEFT); offsetvalue->range(-1.0, 1.0); offsetvalue->callback(scalesettings_cb, this); { Fl_Value_Slider* o = midpointvalue = new Fl_Value_Slider(160, 235, 180, 20, "Midpoint"); o->type(FL_HORIZONTAL); midpointvalue->align(FL_ALIGN_LEFT); midpointvalue->color(VMDMENU_SLIDER_BG, VMDMENU_SLIDER_FG); o->range(0.0, 1.0); o->callback(scalesettings_cb, this); } image = new ColorscaleImage(10, 265, 380, 25, app); o->end(); } o->end(); } end(); } }
SciCalc::SciCalc() { { win = new Fl_Double_Window(181, 262, "ecalc"); win->user_data((void*)(this)); { leddisplay = new Fl_Box(5, 3, 172, 24, "0 "); leddisplay->box(FL_DOWN_BOX); leddisplay->color((Fl_Color)207); leddisplay->labelfont(1); leddisplay->labelsize(16); leddisplay->labelcolor((Fl_Color)59); leddisplay->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE); } // Fl_Box* leddisplay { box_DEGRAD = new Fl_Box(24, 27, 35, 15, " "); box_DEGRAD->box(FL_ENGRAVED_BOX); box_DEGRAD->labelsize(9); box_DEGRAD->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE); } // Fl_Box* box_DEGRAD { box_bracket = new Fl_Box(59, 27, 65, 15); box_bracket->box(FL_ENGRAVED_BOX); box_bracket->labelsize(9); box_bracket->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE); } // Fl_Box* box_bracket { box_M = new Fl_Box(124, 27, 35, 15, "M"); box_M->box(FL_ENGRAVED_BOX); box_M->labelsize(9); box_M->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE); } // Fl_Box* box_M { Fl_Group* o = new Fl_Group(46, 44, 93, 22); o->color((Fl_Color)46); { radio_2 = new Fl_Button(49, 48, 20, 15, "2"); radio_2->type(102); radio_2->labelsize(10); radio_2->labelcolor((Fl_Color)1); radio_2->callback((Fl_Callback*)cb_radio_2); } // Fl_Button* radio_2 { radio_8 = new Fl_Button(70, 48, 21, 15, "8"); radio_8->type(102); radio_8->labelsize(10); radio_8->labelcolor((Fl_Color)1); radio_8->callback((Fl_Callback*)cb_radio_8); } // Fl_Button* radio_8 { radio_10 = new Fl_Button(92, 48, 21, 15, "10"); radio_10->type(102); radio_10->value(1); radio_10->labelsize(10); radio_10->labelcolor((Fl_Color)1); radio_10->callback((Fl_Callback*)cb_radio_10); } // Fl_Button* radio_10 { radio_16 = new Fl_Button(114, 48, 21, 15, "16"); radio_16->type(102); radio_16->labelsize(10); radio_16->labelcolor((Fl_Color)1); radio_16->callback((Fl_Callback*)cb_radio_16); } // Fl_Button* radio_16 o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(3, 163, 107, 94); o->box(FL_FLAT_BOX); o->color((Fl_Color)43); { but_7 = new Fl_Button(6, 167, 32, 20, "7"); but_7->shortcut(0x37); but_7->labelfont(1); but_7->labelsize(16); but_7->callback((Fl_Callback*)cb_but_7); } // Fl_Button* but_7 { but_8 = new Fl_Button(41, 167, 32, 20, "8"); but_8->shortcut(0x38); but_8->labelfont(1); but_8->labelsize(16); but_8->callback((Fl_Callback*)cb_but_8); } // Fl_Button* but_8 { but_9 = new Fl_Button(75, 167, 32, 20, "9"); but_9->shortcut(0x39); but_9->labelfont(1); but_9->labelsize(16); but_9->callback((Fl_Callback*)cb_but_9); } // Fl_Button* but_9 { but_4 = new Fl_Button(6, 189, 32, 20, "4"); but_4->shortcut(0x34); but_4->labelfont(1); but_4->labelsize(16); but_4->callback((Fl_Callback*)cb_but_4); } // Fl_Button* but_4 { but_5 = new Fl_Button(41, 189, 32, 20, "5"); but_5->shortcut(0x35); but_5->labelfont(1); but_5->labelsize(16); but_5->callback((Fl_Callback*)cb_but_5); } // Fl_Button* but_5 { but_6 = new Fl_Button(75, 189, 32, 20, "6"); but_6->shortcut(0x36); but_6->labelfont(1); but_6->labelsize(16); but_6->callback((Fl_Callback*)cb_but_6); } // Fl_Button* but_6 { but_1 = new Fl_Button(6, 211, 32, 20, "1"); but_1->shortcut(0x31); but_1->labelfont(1); but_1->labelsize(16); but_1->callback((Fl_Callback*)cb_but_1); } // Fl_Button* but_1 { but_2 = new Fl_Button(41, 211, 32, 20, "2"); but_2->shortcut(0x32); but_2->labelfont(1); but_2->labelsize(16); but_2->callback((Fl_Callback*)cb_but_2); } // Fl_Button* but_2 { but_3 = new Fl_Button(75, 211, 32, 20, "3"); but_3->shortcut(0x33); but_3->labelfont(1); but_3->labelsize(16); but_3->callback((Fl_Callback*)cb_but_3); } // Fl_Button* but_3 { but_0 = new Fl_Button(6, 233, 32, 20, "0"); but_0->shortcut(0x30); but_0->labelfont(1); but_0->labelsize(16); but_0->callback((Fl_Callback*)cb_but_0); } // Fl_Button* but_0 { but_dot = new Fl_Button(41, 233, 32, 20, "."); but_dot->shortcut(0x2e); but_dot->labelfont(1); but_dot->labelsize(16); but_dot->callback((Fl_Callback*)cb_but_dot); } // Fl_Button* but_dot { but_sign = new Fl_Button(75, 233, 32, 20, "+/-"); but_sign->labelfont(1); but_sign->labelsize(16); but_sign->callback((Fl_Callback*)cb_but_sign); } // Fl_Button* but_sign o->end(); } // Fl_Group* o { but_C = new Fl_Button(112, 167, 31, 20, "C"); but_C->labelfont(1); but_C->labelsize(16); but_C->callback((Fl_Callback*)cb_but_C); } // Fl_Button* but_C { but_AC = new Fl_Button(146, 167, 30, 20, "AC"); but_AC->labelfont(1); but_AC->labelsize(16); but_AC->callback((Fl_Callback*)cb_but_AC); } // Fl_Button* but_AC { but_X = new Fl_Button(112, 189, 31, 20, "x"); but_X->shortcut(0x2a); but_X->labelfont(1); but_X->labelsize(16); but_X->callback((Fl_Callback*)cb_but_X); } // Fl_Button* but_X { but_div = new Fl_Button(146, 189, 30, 20, "/"); but_div->shortcut(0x2f); but_div->labelfont(1); but_div->labelsize(16); but_div->callback((Fl_Callback*)cb_but_div); } // Fl_Button* but_div { but_plus = new Fl_Button(112, 211, 31, 20, "+"); but_plus->shortcut(0x2b); but_plus->labelfont(1); but_plus->labelsize(16); but_plus->callback((Fl_Callback*)cb_but_plus); } // Fl_Button* but_plus { but_minus = new Fl_Button(146, 211, 30, 20, "-"); but_minus->shortcut(0x2d); but_minus->labelfont(1); but_minus->labelsize(16); but_minus->callback((Fl_Callback*)cb_but_minus); } // Fl_Button* but_minus { but_pi = new Fl_Button(112, 233, 31, 20, "e/p"); but_pi->labelfont(12); but_pi->labelsize(17); but_pi->callback((Fl_Callback*)cb_but_pi); } // Fl_Button* but_pi { but_eval = new Fl_Button(146, 233, 30, 20, "="); but_eval->shortcut(0x3d); but_eval->labelfont(1); but_eval->labelsize(16); but_eval->callback((Fl_Callback*)cb_but_eval); } // Fl_Button* but_eval { but_eval_hidden = new Fl_Button(147, 253, 6, 7); but_eval_hidden->box(FL_NO_BOX); but_eval_hidden->shortcut(0xff0d); but_eval_hidden->labelfont(1); but_eval_hidden->labelsize(16); but_eval_hidden->callback((Fl_Callback*)cb_but_eval_hidden); } // Fl_Button* but_eval_hidden { but_eval_hidden2 = new Fl_Button(157, 263, 6, 7); but_eval_hidden2->box(FL_NO_BOX); but_eval_hidden2->shortcut(0xff8d); but_eval_hidden2->labelfont(1); but_eval_hidden2->labelsize(16); but_eval_hidden2->callback((Fl_Callback*)cb_but_eval_hidden2); } // Fl_Button* but_eval_hidden2 { but_sqrt = new Fl_Button(6, 70, 32, 21, "sqrt"); but_sqrt->labelsize(11); but_sqrt->labelcolor((Fl_Color)4); but_sqrt->callback((Fl_Callback*)cb_but_sqrt); } // Fl_Button* but_sqrt { but_pow = new Fl_Button(41, 70, 32, 21, "x^y"); but_pow->labelsize(11); but_pow->labelcolor((Fl_Color)4); but_pow->callback((Fl_Callback*)cb_but_pow); } // Fl_Button* but_pow { but_sin = new Fl_Button(76, 70, 31, 21, "sin"); but_sin->labelsize(11); but_sin->labelcolor((Fl_Color)4); but_sin->callback((Fl_Callback*)cb_but_sin); } // Fl_Button* but_sin { but_cos = new Fl_Button(110, 70, 31, 21, "cos"); but_cos->labelsize(11); but_cos->labelcolor((Fl_Color)4); but_cos->callback((Fl_Callback*)cb_but_cos); } // Fl_Button* but_cos { but_tan = new Fl_Button(144, 70, 30, 21, "tan"); but_tan->labelsize(11); but_tan->labelcolor((Fl_Color)4); but_tan->callback((Fl_Callback*)cb_but_tan); } // Fl_Button* but_tan { but_log = new Fl_Button(6, 93, 32, 21, "log"); but_log->labelsize(11); but_log->labelcolor((Fl_Color)4); but_log->callback((Fl_Callback*)cb_but_log); } // Fl_Button* but_log { but_ln = new Fl_Button(41, 93, 32, 21, "ln"); but_ln->labelsize(11); but_ln->labelcolor((Fl_Color)4); but_ln->callback((Fl_Callback*)cb_but_ln); } // Fl_Button* but_ln { but_int = new Fl_Button(76, 93, 31, 21, "int"); but_int->labelsize(11); but_int->labelcolor((Fl_Color)4); but_int->callback((Fl_Callback*)cb_but_int); } // Fl_Button* but_int { but_dr = new Fl_Button(110, 93, 31, 21, "d->r"); but_dr->labelsize(10); but_dr->labelcolor((Fl_Color)4); but_dr->callback((Fl_Callback*)cb_but_dr); } // Fl_Button* but_dr { but_drg = new Fl_Button(144, 93, 30, 21, "d-r-g"); but_drg->labelsize(9); but_drg->callback((Fl_Callback*)cb_but_drg); } // Fl_Button* but_drg { but_leftbr = new Fl_Button(6, 116, 32, 21, "["); but_leftbr->shortcut(0x28); but_leftbr->labelsize(11); but_leftbr->callback((Fl_Callback*)cb_but_leftbr); } // Fl_Button* but_leftbr { but_rightbr = new Fl_Button(41, 116, 32, 21, "]"); but_rightbr->shortcut(0x29); but_rightbr->labelsize(11); but_rightbr->callback((Fl_Callback*)cb_but_rightbr); } // Fl_Button* but_rightbr { but_exch = new Fl_Button(76, 116, 31, 21, "exch"); but_exch->labelsize(11); but_exch->callback((Fl_Callback*)cb_but_exch); } // Fl_Button* but_exch { but_invx = new Fl_Button(110, 116, 31, 21, "1/x"); but_invx->labelsize(11); but_invx->callback((Fl_Callback*)cb_but_invx); } // Fl_Button* but_invx { but_fact = new Fl_Button(144, 116, 30, 21, "x!"); but_fact->labelsize(11); but_fact->callback((Fl_Callback*)cb_but_fact); } // Fl_Button* but_fact { but_Mplus = new Fl_Button(6, 139, 32, 21, "M+"); but_Mplus->color((Fl_Color)93); but_Mplus->labelcolor((Fl_Color)4); but_Mplus->callback((Fl_Callback*)cb_but_Mplus); } // Fl_Button* but_Mplus { but_Mmult = new Fl_Button(41, 139, 32, 21, "M*"); but_Mmult->color((Fl_Color)93); but_Mmult->labelcolor((Fl_Color)4); but_Mmult->callback((Fl_Callback*)cb_but_Mmult); } // Fl_Button* but_Mmult { but_Mclear = new Fl_Button(76, 139, 31, 21, "MC"); but_Mclear->color((Fl_Color)93); but_Mclear->labelcolor((Fl_Color)4); but_Mclear->callback((Fl_Callback*)cb_but_Mclear); } // Fl_Button* but_Mclear { but_Mst = new Fl_Button(110, 139, 31, 21, "Mst"); but_Mst->color((Fl_Color)93); but_Mst->callback((Fl_Callback*)cb_but_Mst); } // Fl_Button* but_Mst { but_Mrc = new Fl_Button(144, 139, 30, 21, "Mrc"); but_Mrc->color((Fl_Color)93); but_Mrc->callback((Fl_Callback*)cb_but_Mrc); } // Fl_Button* but_Mrc { check_inv = new Fl_Button(6, 44, 32, 21, "inv"); check_inv->type(1); check_inv->labelsize(11); check_inv->labelcolor((Fl_Color)4); check_inv->callback((Fl_Callback*)cb_check_inv); } // Fl_Button* check_inv { but_quit = new Fl_Button(145, 44, 29, 21, "Exit"); but_quit->labelfont(1); but_quit->labelcolor((Fl_Color)33); but_quit->callback((Fl_Callback*)cb_but_quit); } // Fl_Button* but_quit win->end(); } // Fl_Double_Window* win init_value(0); drgmode = 1; base = 10; currentbrkt = 0; startbrkt[0] = 0; set_memdisp(); set_brktdisp(); radio_10->value(1); set_drgdisp(); set_display(0.0,NONE); }
void Track::init ( void ) { _row = 0; _sequence = NULL; _name = NULL; _selected = false; _size = 1; record_ds = NULL; playback_ds = NULL; labeltype( FL_NO_LABEL ); // clear_visible_focus(); Fl_Group::size( timeline->w(), height() ); Track *o = this; o->box( FL_FLAT_BOX ); { Track_Header *o = new Track_Header( x(), y(), w(), h() ); name_field = o->name_input; record_button = o->rec_button; mute_button = o->mute_button; solo_button = o->solo_button; menu_button = o->menu_button; show_all_takes_button = o->show_all_takes_button; overlay_controls_button = o->overlay_controls_button; name_field->callback( cb_button, this ); record_button->callback( cb_button, this ); mute_button->callback( cb_button, this ); solo_button->callback( cb_button, this ); show_all_takes_button->callback( cb_button, this ); overlay_controls_button->callback( cb_button, this ); menu_button->callback( cb_button, this ); resizable( o ); // o->color( (Fl_Color)53 ); } { /* this pack holds the active sequence, annotation sequence, control sequences and takes */ Fl_Pack *o = pack = new Fl_Pack( x(), y(), w(), h() ); o->type( Fl_Pack::VERTICAL ); o->labeltype( FL_NO_LABEL ); /* o->resize( x() + width(), y(), w() - width(), h() ); */ /* resizable( o ); */ { Fl_Pack *o = annotation = new Fl_Pack( 0, 0, pack->w(), 1 ); o->type( Fl_Pack::VERTICAL ); o->end(); } { { Fl_Group *o = controls_heading = new Fl_Group( 0, 0, pack->w(), 10 ); o->box( FL_FLAT_BOX ); o->color( fl_color_add_alpha( fl_rgb_color( 1,1,1 ), 127 ) ); { Fl_Box *o = new Fl_Box( 0,0, Track::width(), 10 ); o->label( "Controls" ); o->align( FL_ALIGN_RIGHT | FL_ALIGN_INSIDE ); o->labelsize( 10 ); } o->hide(); o->end(); o->resizable( 0 ); } { Fl_Sometimes_Pack *o = control = new Fl_Sometimes_Pack( 0, 0, pack->w(), 1 ); o->spacing( 1 ); o->box( FL_NO_BOX ); o->color( FL_BACKGROUND_COLOR ); o->type( Fl_Pack::VERTICAL ); o->pack( true ); o->hide(); o->align( FL_ALIGN_TOP | FL_ALIGN_LEFT ); o->end(); } } { { Fl_Group *o = takes_heading = new Fl_Group( 0, 0, pack->w(), 10 ); o->box( FL_FLAT_BOX ); o->color( fl_color_add_alpha( fl_rgb_color( 1,1,1 ), 127 ) ); { Fl_Box *o = new Fl_Box( 0,0, Track::width(), 10 ); o->label( "Takes" ); o->align( FL_ALIGN_RIGHT | FL_ALIGN_INSIDE ); o->labelsize( 10 ); } o->hide(); o->end(); o->resizable( 0 ); } { Fl_Pack *o = takes = new Fl_Pack( 0, 0, pack->w(), 1 ); o->type( Fl_Pack::VERTICAL ); o->end(); o->hide(); o->align( FL_ALIGN_TOP | FL_ALIGN_LEFT ); } } o->end(); } end(); }
helpWindow::helpWindow() { { int width = 28 * FL_NORMAL_SIZE; int height = 19 * BH; about = new paletteWindow (width, height, CTX::instance()->nonModalWindows ? true : false, "About Gmsh"); about->box(GMSH_WINDOW_BOX); Fl_Help_View *o = new Fl_Help_View(0, 0, width, height); o->textfont(FL_HELVETICA); o->textsize(FL_NORMAL_SIZE); o->box(FL_FLAT_BOX); std::ostringstream sstream; sstream << "<center><h3>Gmsh</h3><br>version " << GetGmshVersion() << "<p>Copyright (C) 1997-2015" << "<br>Christophe Geuzaine and Jean-Francois Remacle" << "<p><a href=\"http://geuz.org/gmsh/doc/CREDITS.txt\">Credits</a> " << "and <a href=\"http://geuz.org/gmsh/doc/LICENSE.txt\">licensing " << "information</a>" << "<p>Please send all questions and bug reports to the public mailing list " << "<a href=\"mailto:[email protected]\">[email protected]</a></center>" << "<ul>" << "<li><i>Build OS:</i> " << GetGmshBuildOS() << "<li><i>Build date:</i> " << GetGmshBuildDate() << "<li><i>Build host:</i> " << GetGmshBuildHost() << "<li><i>Build options:</i>" << GetGmshBuildOptions() << "<li><i>FLTK version:</i> " << FL_MAJOR_VERSION << "." << FL_MINOR_VERSION << "." << FL_PATCH_VERSION #if defined(HAVE_PETSC) << "<li><i>PETSc version:</i> " << PETSC_VERSION_MAJOR << "." << PETSC_VERSION_MINOR << "." << PETSC_VERSION_SUBMINOR #if defined(PETSC_USE_COMPLEX) << " (complex arithmetic)" #else << " (real arithmetic)" #endif #endif #if defined(HAVE_OCC) << "<li><i>OCC version:</i> " << OCC_VERSION_MAJOR << "." << OCC_VERSION_MINOR << "." << OCC_VERSION_MAINTENANCE #endif #if defined(HAVE_MED) << "<li><i>MED version:</i> " << MED_NUM_MAJEUR << "." << MED_NUM_MINEUR << "." << MED_NUM_RELEASE #endif << "<li><i>Packaged by:</i> " << GetGmshPackager() << "</ul>" << "<center>Visit <a href=\"http://geuz.org/gmsh/\">http://geuz.org/gmsh/</a> " << "for more information</center>"; o->value(sstream.str().c_str()); o->link(help_link); about->position(Fl::x() + Fl::w()/2 - width / 2, Fl::y() + Fl::h()/2 - height / 2); about->end(); } { int width = 40 * FL_NORMAL_SIZE; int height = 18 * BH; basic = new paletteWindow (width, height, CTX::instance()->nonModalWindows ? true : false, "Keyboard and Mouse Usage"); basic->box(GMSH_WINDOW_BOX); Fl_Help_View *o = new Fl_Help_View(0, 0, width, height); o->textfont(FL_HELVETICA); o->textsize(FL_NORMAL_SIZE - 1); o->box(FL_FLAT_BOX); std::string s; s += "<h3>Keyboard Shortcuts</h3>"; s += "<table border=1>"; { std::vector<std::pair<std::string, std::string> > s0 = GetShortcutsUsage(); for(unsigned int i = 0; i < s0.size(); i++) s += "<tr><td>" + s0[i].first + "</td><td>" + s0[i].second + "</td></tr>"; } s += "</table>"; s += "<h3>Mouse Actions</h3>"; s += "<table border=1>"; { std::vector<std::pair<std::string, std::string> > s0 = GetMouseUsage(); for(unsigned int i = 0; i < s0.size(); i++) s += "<tr><td>" + s0[i].first + "</td><td>" + s0[i].second + "</td></tr>"; } s += "</table>"; s += "For a 2 button mouse, Middle button = Shift+Left button.<p>"; s += "For a 1 button mouse, Middle button = Shift+Left button, " "Right button = Alt+Left button."; s += "<h3>Command Line Switches</h3>"; s += "<table border=1>"; { std::vector<std::pair<std::string, std::string> > s0 = GetUsage(); for(unsigned int i = 0; i < s0.size(); i++) if(s0[i].first.size() && s0[i].second.size()) s += "<tr><td>" + s0[i].first + "</td><td>" + s0[i].second + "</td></tr>"; else if(s0[i].first.size() && s0[i].second.empty()) s += "</table>" + s0[i].first + "<table border=1>"; } s += "</table>"; o->value(s.c_str()); basic->resizable(o); basic->position(Fl::x() + Fl::w()/2 - width / 2, Fl::y() + Fl::h()/2 - height / 2); basic->end(); } { int width = 40 * FL_NORMAL_SIZE; int height = 18 * BH; options = new paletteWindow (width, height, CTX::instance()->nonModalWindows ? true : false, "Current Options and Workspace"); options->box(GMSH_WINDOW_BOX); int BW = (width - 4 * WB) / 3; modified = new Fl_Check_Button (WB, WB, BW, BH, "Only show modified"); modified->type(FL_TOGGLE_BUTTON); modified->callback(help_options_cb); modified->tooltip("Show only values different from defaults"); showhelp = new Fl_Check_Button (2 * WB + BW, WB, BW, BH, "Show help"); showhelp->type(FL_TOGGLE_BUTTON); showhelp->callback(help_options_cb); showhelp->tooltip("Show help strings"); Fl_Group* o = new Fl_Group(3 * WB + 2 * BW, WB, BW, BH); o->tooltip("Filter values"); o->box(FL_DOWN_BOX); o->color(FL_BACKGROUND2_COLOR); search = new Fl_Input (3 * WB + 2 * BW + BH, WB + 2, BW - BH - 2, BH - 4, "@gmsh_search"); search->box(FL_FLAT_BOX); search->callback(help_options_cb); search->when(FL_WHEN_CHANGED); //search->take_focus(); cannot call this here - it triggers show() on Linux in fltk 1.3.3 o->resizable(search); o->end(); browser = new Fl_Browser(0, BH + 2 * WB, width, height - BH - 2 * WB); browser->box(GMSH_SIMPLE_TOP_BOX); browser->textfont(FL_SCREEN); browser->textsize(FL_NORMAL_SIZE - 2); browser->type(FL_MULTI_BROWSER); browser->callback(browser_cb); browser->tooltip("Double-click to edit value"); browser->scrollbar_size(std::max(10, FL_NORMAL_SIZE - 2)); // thinner scrollbars options->resizable(browser); options->position(Fl::x() + Fl::w()/2 - width / 2, Fl::y() + Fl::h()/2 - height / 2); options->size_range(width, height); options->end(); } }
SciCalc::SciCalc() { Fl_Window* w; {Fl_Window* o = win = new Fl_Window(181, 262, "eCalc"); w = o; o->label_type(FL_NO_LABEL); o->shortcut(0xff1b); o->user_data((void*)(this)); o->align(); {Fl_Box* o = leddisplay = new Fl_Box(2, 2, 176, 24, "Welcome"); o->box(FL_THIN_DOWN_BOX); o->label_font(fl_fonts+4); o->color((Fl_Color)207); o->label_color((Fl_Color)59); o->label_size(14); o->callback((Fl_Callback*)cb_leddisplay); o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE); } {Fl_Box* o = box_DEGRAD = new Fl_Box(24, 28, 35, 16); o->box(FL_THIN_DOWN_BOX); o->label_color((Fl_Color)1); o->label_size(9); o->callback((Fl_Callback*)cb_box_DEGRAD); o->align(FL_ALIGN_INSIDE); } {Fl_Box* o = box_bracket = new Fl_Box(59, 28, 65, 16); o->box(FL_THIN_DOWN_BOX); o->label_color((Fl_Color)1); o->label_size(9); o->align(FL_ALIGN_INSIDE); } {Fl_Box* o = box_M = new Fl_Box(124, 28, 35, 16); o->box(FL_THIN_DOWN_BOX); o->label_color((Fl_Color)1); o->label_size(9); o->callback((Fl_Callback*)cb_box_M); o->align(FL_ALIGN_INSIDE); } {Fl_Group* o = new Fl_Group(46, 46, 93, 22); o->color((Fl_Color)46); {Fl_Button* o = radio_2 = new Fl_Button(3, 3, 20, 15, "2"); o->type(Fl_Button::RADIO); o->label_color((Fl_Color)1); o->label_size(10); o->shortcut(0x40062); o->callback((Fl_Callback*)cb_radio_2); o->tooltip("Binary mode"); } {Fl_Button* o = radio_8 = new Fl_Button(24, 3, 21, 15, "8"); o->type(Fl_Button::RADIO); o->label_color((Fl_Color)1); o->label_size(10); o->shortcut(0x4006f); o->callback((Fl_Callback*)cb_radio_8); o->tooltip("Octal mode"); } {Fl_Button* o = radio_10 = new Fl_Button(46, 3, 21, 15, "10"); o->type(Fl_Button::RADIO); o->label_color((Fl_Color)1); o->label_size(10); o->shortcut(0x40064); o->value(1); o->callback((Fl_Callback*)cb_radio_10); o->tooltip("Decimal mode"); } {Fl_Button* o = radio_16 = new Fl_Button(68, 3, 21, 15, "16"); o->type(Fl_Button::RADIO); o->label_color((Fl_Color)1); o->label_size(10); o->shortcut(0x40068); o->callback((Fl_Callback*)cb_radio_16); o->tooltip("Hex mode"); } o->end(); } {Fl_Group* o = new Fl_Group(3, 163, 107, 94); o->box(FL_BORDER_BOX); o->color((Fl_Color)43); {Fl_Button* o = but_7 = new Fl_Button(3, 4, 32, 20, "7"); o->label_font(fl_fonts+1); o->label_size(14); o->shortcut(0x37); o->callback((Fl_Callback*)cb_but_7); } {Fl_Button* o = but_8 = new Fl_Button(38, 4, 32, 20, "8"); o->label_font(fl_fonts+1); o->label_size(14); o->shortcut(0x38); o->callback((Fl_Callback*)cb_but_8); } {Fl_Button* o = but_9 = new Fl_Button(72, 4, 32, 20, "9"); o->label_font(fl_fonts+1); o->label_size(14); o->shortcut(0x39); o->callback((Fl_Callback*)cb_but_9); } {Fl_Button* o = but_4 = new Fl_Button(3, 26, 32, 20, "4"); o->label_font(fl_fonts+1); o->label_size(14); o->shortcut(0x34); o->callback((Fl_Callback*)cb_but_4); } {Fl_Button* o = but_5 = new Fl_Button(38, 26, 32, 20, "5"); o->label_font(fl_fonts+1); o->label_size(14); o->shortcut(0x35); o->callback((Fl_Callback*)cb_but_5); } {Fl_Button* o = but_6 = new Fl_Button(72, 26, 32, 20, "6"); o->label_font(fl_fonts+1); o->label_size(14); o->shortcut(0x36); o->callback((Fl_Callback*)cb_but_6); } {Fl_Button* o = but_1 = new Fl_Button(3, 48, 32, 20, "1"); o->label_font(fl_fonts+1); o->label_size(14); o->shortcut(0x31); o->callback((Fl_Callback*)cb_but_1); } {Fl_Button* o = but_2 = new Fl_Button(38, 48, 32, 20, "2"); o->label_font(fl_fonts+1); o->label_size(14); o->shortcut(0x32); o->callback((Fl_Callback*)cb_but_2); } {Fl_Button* o = but_3 = new Fl_Button(72, 48, 32, 20, "3"); o->label_font(fl_fonts+1); o->label_size(14); o->shortcut(0x33); o->callback((Fl_Callback*)cb_but_3); } {Fl_Button* o = but_0 = new Fl_Button(3, 70, 32, 20, "0"); o->label_font(fl_fonts+1); o->label_size(14); o->shortcut(0x30); o->callback((Fl_Callback*)cb_but_0); } {Fl_Button* o = but_dot = new Fl_Button(38, 70, 32, 20, "."); o->label_font(fl_fonts+1); o->label_size(14); o->shortcut(0x2e); o->callback((Fl_Callback*)cb_but_dot); } {Fl_Button* o = but_sign = new Fl_Button(72, 70, 32, 20, "+/-"); o->label_font(fl_fonts+1); o->label_size(14); o->callback((Fl_Callback*)cb_but_sign); } o->end(); } {Fl_Button* o = but_C = new Fl_Button(112, 167, 31, 20, "C"); o->label_font(fl_fonts+1); o->label_size(14); o->callback((Fl_Callback*)cb_but_C); } {Fl_Button* o = but_AC = new Fl_Button(146, 167, 30, 20, "AC"); o->label_font(fl_fonts+1); o->label_size(14); o->callback((Fl_Callback*)cb_but_AC); } {Fl_Button* o = but_X = new Fl_Button(112, 189, 31, 20, "x"); o->label_font(fl_fonts+1); o->label_size(14); o->shortcut(0x2a); o->callback((Fl_Callback*)cb_but_X); } {Fl_Button* o = but_div = new Fl_Button(146, 189, 30, 20, "/"); o->label_font(fl_fonts+1); o->label_size(14); o->shortcut(0x2f); o->callback((Fl_Callback*)cb_but_div); } {Fl_Button* o = but_plus = new Fl_Button(112, 211, 31, 20, "+"); o->label_font(fl_fonts+1); o->label_size(14); o->shortcut(0x2b); o->callback((Fl_Callback*)cb_but_plus); } {Fl_Button* o = but_minus = new Fl_Button(146, 211, 30, 20, "-"); o->label_font(fl_fonts+1); o->label_size(14); o->shortcut(0x2d); o->callback((Fl_Callback*)cb_but_minus); } {Fl_Button* o = but_pi = new Fl_Button(112, 233, 31, 20, "e/p"); o->label_font(fl_fonts+12); o->label_size(16); o->callback((Fl_Callback*)cb_but_pi); } {Fl_Button* o = but_eval = new Fl_Button(146, 233, 30, 20, "="); o->label_font(fl_fonts+1); o->label_size(14); o->shortcut(0x3d); o->callback((Fl_Callback*)cb_but_eval); } {Fl_Button* o = but_eval_hidden = new Fl_Button(147, 253, 6, 7); o->box(FL_NO_BOX); o->label_font(fl_fonts+1); o->label_size(16); o->shortcut(0xff0d); o->callback((Fl_Callback*)cb_but_eval_hidden); } {Fl_Button* o = but_eval_hidden2 = new Fl_Button(157, 263, 6, 7); o->box(FL_NO_BOX); o->label_font(fl_fonts+1); o->label_size(16); o->shortcut(0xff8d); o->callback((Fl_Callback*)cb_but_eval_hidden2); } {Fl_Button* o = but_sqrt = new Fl_Button(6, 70, 32, 21, "sqrt"); o->label_color((Fl_Color)4); o->label_size(11); o->callback((Fl_Callback*)cb_but_sqrt); } {Fl_Button* o = but_pow = new Fl_Button(41, 70, 32, 21, "x^y"); o->label_color((Fl_Color)4); o->label_size(11); o->callback((Fl_Callback*)cb_but_pow); } {Fl_Button* o = but_sin = new Fl_Button(76, 70, 31, 21, "sin"); o->label_color((Fl_Color)4); o->label_size(11); o->callback((Fl_Callback*)cb_but_sin); } {Fl_Button* o = but_cos = new Fl_Button(110, 70, 31, 21, "cos"); o->label_color((Fl_Color)4); o->label_size(11); o->callback((Fl_Callback*)cb_but_cos); } {Fl_Button* o = but_tan = new Fl_Button(144, 70, 30, 21, "tan"); o->label_color((Fl_Color)4); o->label_size(11); o->callback((Fl_Callback*)cb_but_tan); } {Fl_Button* o = but_log = new Fl_Button(6, 93, 32, 21, "log"); o->label_color((Fl_Color)4); o->label_size(11); o->callback((Fl_Callback*)cb_but_log); } {Fl_Button* o = but_ln = new Fl_Button(41, 93, 32, 21, "ln"); o->label_color((Fl_Color)4); o->label_size(11); o->callback((Fl_Callback*)cb_but_ln); } {Fl_Button* o = but_int = new Fl_Button(76, 93, 31, 21, "int"); o->label_color((Fl_Color)4); o->label_size(11); o->callback((Fl_Callback*)cb_but_int); } {Fl_Button* o = but_dr = new Fl_Button(110, 93, 31, 21, "d->r"); o->label_color((Fl_Color)4); o->label_size(10); o->callback((Fl_Callback*)cb_but_dr); } {Fl_Button* o = but_drg = new Fl_Button(144, 93, 30, 21, "d-r-g"); o->label_size(9); o->callback((Fl_Callback*)cb_but_drg); } {Fl_Button* o = but_leftbr = new Fl_Button(6, 116, 32, 21, "["); o->label_size(11); o->shortcut(0x28); o->callback((Fl_Callback*)cb_but_leftbr); } {Fl_Button* o = but_rightbr = new Fl_Button(41, 116, 32, 21, "]"); o->label_size(11); o->shortcut(0x29); o->callback((Fl_Callback*)cb_but_rightbr); } {Fl_Button* o = but_exch = new Fl_Button(76, 116, 31, 21, "exch"); o->label_size(11); o->callback((Fl_Callback*)cb_but_exch); } {Fl_Button* o = but_invx = new Fl_Button(110, 116, 31, 21, "1/x"); o->label_size(11); o->callback((Fl_Callback*)cb_but_invx); } {Fl_Button* o = but_fact = new Fl_Button(144, 116, 30, 21, "x!"); o->label_size(11); o->callback((Fl_Callback*)cb_but_fact); } {Fl_Button* o = but_Mplus = new Fl_Button(6, 139, 32, 21, "M+"); o->color((Fl_Color)0xffb30000); o->label_color((Fl_Color)4); o->callback((Fl_Callback*)cb_but_Mplus); } {Fl_Button* o = but_Mmult = new Fl_Button(41, 139, 32, 21, "M*"); o->color((Fl_Color)0xffb30000); o->label_color((Fl_Color)4); o->callback((Fl_Callback*)cb_but_Mmult); } {Fl_Button* o = but_Mclear = new Fl_Button(76, 139, 31, 21, "MC"); o->color((Fl_Color)0xffb30000); o->label_color((Fl_Color)4); o->callback((Fl_Callback*)cb_but_Mclear); } {Fl_Button* o = but_Mst = new Fl_Button(110, 139, 31, 21, "Mst"); o->color((Fl_Color)0xffb30000); o->callback((Fl_Callback*)cb_but_Mst); } {Fl_Button* o = but_Mrc = new Fl_Button(144, 139, 30, 21, "Mrc"); o->color((Fl_Color)0xffb30000); o->callback((Fl_Callback*)cb_but_Mrc); } {Fl_Button* o = check_inv = new Fl_Button(6, 47, 32, 20, "inv"); o->type(Fl_Button::TOGGLE); o->label_color((Fl_Color)4); o->label_size(11); o->callback((Fl_Callback*)cb_check_inv); } {Fl_Button* o = but_quit = new Fl_Button(144, 47, 30, 20, "Exit"); o->label_font(fl_fonts+1); o->label_color((Fl_Color)33); o->shortcut(0x40071); o->callback((Fl_Callback*)cb_but_quit); } o->end(); } init_value(0); drgmode = 1; base = 10; currentbrkt = 0; startbrkt[0] = 0; set_memdisp(); set_brktdisp(); radio_10->value(1); set_drgdisp(); set_display(0.0,NONE); }
Fl_Double_Window* make_zoom_panel() { { zoom_panel_window = new Fl_Double_Window(670, 490, "Zoom Panel Window"); { Fl_Group* o = new Fl_Group(0, 6, 417, 148); o->box(FL_UP_BOX); o->color((Fl_Color)92); { Fl_Group* o = new Fl_Group(22, 6, 380, 118); { x_cmap_range_min_box = new Fl_Value_Input(163, 44, 89, 25, "Cmap Range(X): Min"); x_cmap_range_min_box->callback((Fl_Callback*)x_cmap_range_min_box_cb); x_cmap_range_min_box->when(FL_WHEN_RELEASE); } // Fl_Value_Input* x_cmap_range_min_box { x_cmap_range_max_box = new Fl_Value_Input(302, 44, 95, 25, "Max"); x_cmap_range_max_box->value(1); x_cmap_range_max_box->callback((Fl_Callback*)x_cmap_range_max_box_cb); x_cmap_range_max_box->when(FL_WHEN_RELEASE); } // Fl_Value_Input* x_cmap_range_max_box { x_display_range_min_box = new Fl_Value_Input(163, 74, 89, 25, "Display Range(X): Min"); x_display_range_min_box->callback((Fl_Callback*)x_display_range_min_box_cb); x_display_range_min_box->when(FL_WHEN_RELEASE); } // Fl_Value_Input* x_display_range_min_box { x_display_range_max_box = new Fl_Value_Input(302, 74, 95, 25, "Max"); x_display_range_max_box->value(1); x_display_range_max_box->callback((Fl_Callback*)x_display_range_max_box_cb); x_display_range_max_box->when(FL_WHEN_RELEASE); } // Fl_Value_Input* x_display_range_max_box { x_hist_range_max_box = new Fl_Output(302, 15, 95, 25, "Max"); x_hist_range_max_box->color((Fl_Color)31); } // Fl_Output* x_hist_range_max_box { x_hist_range_min_box = new Fl_Output(163, 15, 89, 25, "Hist Range(X): Min"); x_hist_range_min_box->color((Fl_Color)31); x_hist_range_min_box->selection_color(FL_BACKGROUND2_COLOR); } // Fl_Output* x_hist_range_min_box { x_display_range_min_slider = new Fl_Slider(137, 101, 115, 19); x_display_range_min_slider->type(5); x_display_range_min_slider->callback((Fl_Callback*)x_display_range_min_slider_cb); x_display_range_min_slider->align(Fl_Align(FL_ALIGN_LEFT)); } // Fl_Slider* x_display_range_min_slider { Fl_Slider* o = x_display_range_max_slider = new Fl_Slider(277, 102, 120, 18); x_display_range_max_slider->type(5); x_display_range_max_slider->callback((Fl_Callback*)x_display_range_max_slider_cb); o->value(o->maximum()); } // Fl_Slider* x_display_range_max_slider o->end(); } // Fl_Group* o { Fl_Box* o = new Fl_Box(402, 18, 5, 84); Fl_Group::current()->resizable(o); } // Fl_Box* o o->end(); } // Fl_Group* o { Fl_Group* o = new Fl_Group(420, 5, 245, 455); o->box(FL_UP_BOX); o->color((Fl_Color)214); { y_hist_range_max_box = new Fl_Output(562, 12, 93, 25, "Hist Range(Y) Max:"); y_hist_range_max_box->color(FL_DARK1); y_hist_range_max_box->callback((Fl_Callback*)y_hist_range_max_box_cf); } // Fl_Output* y_hist_range_max_box { y_hist_range_min_box = new Fl_Output(517, 421, 95, 25, "Min:"); y_hist_range_min_box->color((Fl_Color)46); y_hist_range_min_box->callback((Fl_Callback*)y_hist_range_min_box_cf); } // Fl_Output* y_hist_range_min_box { y_cmap_range_max_box = new Fl_Value_Input(446, 88, 70, 20, "Cmap Range(Y) \nMax:"); y_cmap_range_max_box->callback((Fl_Callback*)y_cmap_range_max_box_cb); y_cmap_range_max_box->align(Fl_Align(FL_ALIGN_TOP)); } // Fl_Value_Input* y_cmap_range_max_box { y_cmap_range_min_box = new Fl_Value_Input(446, 372, 70, 20, "Min:"); y_cmap_range_min_box->callback((Fl_Callback*)y_cmap_range_min_box_cb); y_cmap_range_min_box->align(Fl_Align(FL_ALIGN_TOP)); } // Fl_Value_Input* y_cmap_range_min_box { y_display_range_max_box = new Fl_Value_Input(565, 88, 72, 19, "Display Range(Y)\nMax:"); y_display_range_max_box->callback((Fl_Callback*)y_display_range_max_box_cb); y_display_range_max_box->align(Fl_Align(FL_ALIGN_TOP)); } // Fl_Value_Input* y_display_range_max_box { y_display_range_min_box = new Fl_Value_Input(565, 371, 72, 19, "Min:"); y_display_range_min_box->callback((Fl_Callback*)y_display_range_min_box_cb); y_display_range_min_box->align(Fl_Align(FL_ALIGN_TOP)); } // Fl_Value_Input* y_display_range_min_box { y_cmap_range_max_slider = new Fl_Slider(470, 122, 20, 98); y_cmap_range_max_slider->type(4); y_cmap_range_max_slider->callback((Fl_Callback*)y_cmap_range_max_slider_cb); } // Fl_Slider* y_cmap_range_max_slider { Fl_Slider* o = y_display_range_min_slider = new Fl_Slider(590, 234, 20, 98); y_display_range_min_slider->type(4); y_display_range_min_slider->callback((Fl_Callback*)y_display_range_min_slider_cb); o->value(o->minimum()); } // Fl_Slider* y_display_range_min_slider { Fl_Slider* o = y_cmap_range_min_slider = new Fl_Slider(470, 235, 20, 98); y_cmap_range_min_slider->type(4); y_cmap_range_min_slider->callback((Fl_Callback*)y_cmap_range_min_slider_cb); o->value(o->minimum()); } // Fl_Slider* y_cmap_range_min_slider { y_display_range_max_slider = new Fl_Slider(590, 120, 20, 98); y_display_range_max_slider->type(4); y_display_range_max_slider->callback((Fl_Callback*)y_display_range_max_slider_cb); } // Fl_Slider* y_display_range_max_slider o->end(); } // Fl_Group* o zoom_panel_window->end(); } // Fl_Double_Window* zoom_panel_window return zoom_panel_window; }
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! { Fl_Group* o = m_viewPane = new Special_Tile(250, 25, 550, 600); o->box(FL_NO_BOX); o->color(FL_BACKGROUND_COLOR); // show a smaller modeler view m_modelerView = new ModelerView(250, 25, 550, 350, ""); m_modelerView->resizable(); // show a curve window with animation controls underneath { curvePane = new Fl_Group(250, 375, 550, 250); // Row containing the curve options { Fl_Group* o = new Fl_Group(255, 380, 540, 20, "Curve Editor"); // Put particle system label inside o->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); o->labelfont(FL_HELVETICA_BOLD); // Curve type chooser chooserCurveType = new Fl_Choice(445, 380, 120, 20, "Curve Type: "); chooserCurveType->menu(curveTypeMenu); chooserCurveType->callback((Fl_Callback*)chooserCurveTypeCallback, this); chooserCurveType->deactivate(); // Wrap checkbox checkboxWrap = new Fl_Check_Button(570, 380, 60, 20, "Wrap"); checkboxWrap->callback((Fl_Callback*)checkboxWrapCallback, this); checkboxWrap->deactivate(); // Zoom All button buttonZoomAll = new Fl_Button(640, 380, 80, 20, "Zoom All"); buttonZoomAll->callback((Fl_Callback*)buttonZoomAllCallback, this); buttonZoomAll->deactivate(); // No resizing o->resizable(NULL); o->end(); } // The graph widget graph = new GraphWidget(255, 405, 540, 140); graph->callback((Fl_Callback*)graphCallback, this); curvePane->resizable(graph); // stretch the graph on resize // Camera buttons { cameraPane = new Fl_Group(255, 550, 540, 20, "Camera"); // Put camera label inside cameraPane->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); cameraPane->labelfont(FL_HELVETICA_BOLD); // Prevent internal widgets from resizing when the group is resized. cameraPane->resizable(NULL); // Use Camera button checkboxUseCamera = new Fl_Check_Button(315, 550, 165, 20, "Look Through Camera"); checkboxUseCamera->callback((Fl_Callback*)checkboxUseCameraCallback); // Plot Camera checkbox Fl_Button* buttonPlotCamera = new Fl_Button(485, 550, 120, 20, "Plot Keyframe"); buttonPlotCamera->callback((Fl_Callback*)buttonPlotCameraCallback); // Clear Plot button Fl_Button* buttonClearPlot = new Fl_Button(610, 550, 120, 20, "Clear Keyframe"); buttonClearPlot->callback((Fl_Callback*)buttonClearCameraCallback); // End this group cameraPane->end(); } // Particle system buttons { particlePane = new Fl_Group(255, 575, 540, 20, "Particle System"); // Put particle system label inside particlePane->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); particlePane->labelfont(FL_HELVETICA_BOLD); // Simulate button checkboxSimulate = new Fl_Check_Button(375, 575, 75, 20, "Simulate"); checkboxSimulate->callback((Fl_Callback*)checkboxSimulateCallback); // Clear Particles button buttonClearParticles = new Fl_Button(455, 575, 50, 20, "Clear"); buttonClearParticles->callback((Fl_Callback*)buttonClearParticlesCallback); // Particle "bake" indicator particleBakeIndicator = new IndicatorWindow(510, 575, 285, 20); // TODO: fix this: particleBakeIndicator->range(0, 20); particleBakeIndicator->deactivate(); particlePane->resizable(particleBakeIndicator); // End this group particlePane->end(); } // The playback controls { Fl_Group* o = new Fl_Group(255, 600, 540, 20, "Playback"); // Put particle system label inside o->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); o->labelfont(FL_HELVETICA_BOLD); // Rewind button Fl_Button* rewind = new Fl_Button(335, 600, 20, 20, "@|<"); rewind->labeltype(FL_SYMBOL_LABEL); rewind->callback((Fl_Callback*)buttonRewindCallback, this); // Play button buttonPlay = new Fl_Button(360, 600, 20, 20, "@>"); buttonPlay->labeltype(FL_SYMBOL_LABEL); buttonPlay->callback((Fl_Callback*)buttonPlayCallback, this); buttonPlay->labelcolor(FL_GREEN); // Fast Forward button Fl_Button* fastForward = new Fl_Button(385, 600, 20, 20, "@>|"); fastForward->labeltype(FL_SYMBOL_LABEL); fastForward->callback((Fl_Callback*)buttonFastForwardCallback, this); // Time slider sliderTime = new Fl_Value_Slider(455, 600, 340, 20, "Time:"); sliderTime->type(FL_HORIZONTAL); sliderTime->align(FL_ALIGN_LEFT); sliderTime->callback((Fl_Callback*)sliderTimeCallback, this); sliderTime->bounds(0, 20); // Stretch the time slider on resize o->resizable(sliderTime); o->end(); } curvePane->end(); } w->resizable(m_modelerView); o->end(); Fl_Group::current()->resizable(o); } } o->end(); } }