MolBrowser::MolBrowser(VMDApp *vmdapp, MainFltkMenu *mm, int x, int y, int xw, int yw) : Fl_Multi_Browser(x, y, xw, yw), app(vmdapp) { mainmenu = mm; dragpending = 0; align(FL_ALIGN_TOP_LEFT); column_widths(widths); color(VMDMENU_BROWSER_BG); selection_color(VMDMENU_BROWSER_SEL); VMDFLTKTOOLTIP(this, "Select molecule, toggle top/active/drawn/fixed, \nload/save coordinates or trajectory frames, \ndouble-click to rename molecule") new Fl_Box(x, y-20,30,20,"ID"); new Fl_Box(x+32,y-20,18,20,"T"); new Fl_Box(x+50,y-20,18,20,"A"); new Fl_Box(x+68,y-20,18,20,"D"); new Fl_Box(x+86,y-20,18,20,"F"); Fl_Box *b = new Fl_Box(x+102,y-20,220,20,"Molecule"); b->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); b = new Fl_Box(x+262,y-20,80,20,"Atoms"); b->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); b = new Fl_Box(x+342,y-20,60,20,"Frames"); b->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); b = new Fl_Box(x+412,y-20,30,20,"Vol"); b->align(FL_ALIGN_LEFT | FL_ALIGN_INSIDE); 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(); } }
void DisplayFltkMenu::make_window() { size(235, 445); { { Fl_Counter* o = nearclip = new Fl_Counter(105, 25, 110, 25, "Near Clip"); o->align(FL_ALIGN_LEFT); o->range(0.01, 1000.0); o->step(0.05); o->lstep(0.5); o->precision(2); o->callback(nearclip_cb, app); VMDFLTKTOOLTIP(o, "Set near clipping plane (OpenGL display only)") } { Fl_Counter* o = farclip = new Fl_Counter(105, 50, 110, 25, "Far Clip"); o->align(FL_ALIGN_LEFT); o->range(0.01, 1000.0); o->step(0.05); o->lstep(0.5); o->precision(2); o->callback(farclip_cb, app); VMDFLTKTOOLTIP(o, "Set far clipping plane (OpenGL display only)") } { Fl_Counter* o = eyesep = new Fl_Counter(105, 75, 110, 25, "Eye Sep"); o->align(FL_ALIGN_LEFT); o->range(0.0, 100.0); o->step(0.01); o->lstep(0.1); o->precision(2); o->callback(eyesep_cb, app); VMDFLTKTOOLTIP(o, "Set stereo eye separation") } { Fl_Counter* o = focal = new Fl_Counter(105, 100, 110, 25, "Focal Length"); o->align(FL_ALIGN_LEFT); o->range(0.01, 1000.0); o->step(0.05); o->lstep(0.5); o->precision(2); o->callback(focal_cb, app); VMDFLTKTOOLTIP(o, "Set stereo focal point") } { Fl_Counter* o = screenh = new Fl_Counter(105, 135, 110, 25, "Screen Hgt"); o->align(FL_ALIGN_LEFT); o->range(0.0, 100000.0); o->step(0.1); o->lstep(1.0); o->precision(1); o->callback(screenh_cb, app); VMDFLTKTOOLTIP(o, "Set viewing frustum height") } { Fl_Counter* o = screend = new Fl_Counter(105, 160, 110, 25, "Screen Dist"); o->align(FL_ALIGN_LEFT); o->range(-100000.0, 100000.0); o->step(0.1); o->lstep(1.0); o->precision(1); o->callback(screend_cb, app); VMDFLTKTOOLTIP(o, "Set viewing frustum distance") } { Fl_Choice* o = cuemode = new Fl_Choice(105, 195, 110, 25, "Cue Mode"); o->color(VMDMENU_CHOOSER_BG); o->selection_color(VMDMENU_CHOOSER_SEL); o->box(FL_THIN_UP_BOX); o->align(FL_ALIGN_LEFT); o->callback(cuemode_cb, app); VMDFLTKTOOLTIP(o, "Set depth cueing mode") for (int m=0; m<app->display->num_cue_modes(); m++) cuemode->add(app->display->cue_mode_name(m)); } { Fl_Counter* o = cuestart = new Fl_Counter(105, 220, 110, 25, "Cue Start"); o->align(FL_ALIGN_LEFT); o->range(0.001, 1000.0); o->step(0.05); o->lstep(0.25); o->precision(2); o->callback(cuestart_cb, app); VMDFLTKTOOLTIP(o, "Set linear depth cueing starting distance") } { Fl_Counter* o = cueend = new Fl_Counter(105, 245, 110, 25, "Cue End"); o->align(FL_ALIGN_LEFT); o->range(0.001, 1000.0); o->step(0.05); o->lstep(0.25); o->precision(2); o->callback(cueend_cb, app); VMDFLTKTOOLTIP(o, "Set linear depth cueing end distance") } { Fl_Counter* o = cuedensity = new Fl_Counter(105, 270, 110, 25, "Cue Density"); o->align(FL_ALIGN_LEFT); o->range(0.001, 1000.0); o->step(0.05); o->lstep(0.1); o->precision(2); o->callback(cuedensity_cb, app); VMDFLTKTOOLTIP(o, "Set exponential depth cueing density") } new Fl_Box(35, 305, 170, 25, "External Renderer Options"); { Fl_Choice* o = shadowmode = new Fl_Choice(105, 330, 110, 25, "Shadows"); o->color(VMDMENU_CHOOSER_BG); o->selection_color(VMDMENU_CHOOSER_SEL); o->box(FL_THIN_UP_BOX); o->align(FL_ALIGN_LEFT); o->callback(shadowmode_cb, app); VMDFLTKTOOLTIP(o, "Enable shadows in external renderers") shadowmode->add("Off"); shadowmode->add("On"); } { Fl_Choice* o = aomode = new Fl_Choice(105, 355, 110, 25, "Amb. Occl."); o->color(VMDMENU_CHOOSER_BG); o->selection_color(VMDMENU_CHOOSER_SEL); o->box(FL_THIN_UP_BOX); o->align(FL_ALIGN_LEFT); o->callback(aomode_cb, app); VMDFLTKTOOLTIP(o, "Enable ambient occlusion lighting in external renderers") aomode->add("Off"); aomode->add("On"); } { Fl_Counter* o = aoambient = new Fl_Counter(105, 380, 110, 25, "AO Ambient"); o->align(FL_ALIGN_LEFT); o->range(0.0, 1.0); o->step(0.01); o->lstep(0.10); o->precision(2); o->callback(aoambient_cb, app); VMDFLTKTOOLTIP(o, "Ambient occlusion lighting coefficient") } { Fl_Counter* o = aodirect = new Fl_Counter(105, 405, 110, 25, "AO Direct"); o->align(FL_ALIGN_LEFT); o->range(0.0, 1.0); o->step(0.01); o->lstep(0.10); o->precision(2); o->callback(aodirect_cb, app); VMDFLTKTOOLTIP(o, "Direct lighting rescaling coefficient") } Fl_Box *box1 = new Fl_Box(10, 10, 215, 120); box1->box(FL_ENGRAVED_FRAME); Fl_Box *box2 = new Fl_Box(10, 130, 215, 65); box2->box(FL_ENGRAVED_FRAME); Fl_Box *box3 = new Fl_Box(10, 190, 215, 110); box3->box(FL_ENGRAVED_FRAME); Fl_Box *box4 = new Fl_Box(10, 300, 215, 135); box4->box(FL_ENGRAVED_FRAME); end(); end(); } }
MainFltkMenu::MainFltkMenu(VMDApp *vmdapp) : VMDFltkMenu("main", "VMD Main", vmdapp) { // set initial window size size(MAINFLTKMENUWIDTH, MAINFLTKMENUHEIGHT); // set resizable in y but not in x... size_range(MAINFLTKMENUWIDTH, MAINFLTKMENUHEIGHT, MAINFLTKMENUWIDTH, 0); command_wanted(Command::MOL_NEW); command_wanted(Command::MOL_DEL); command_wanted(Command::MOL_ACTIVE); command_wanted(Command::MOL_ON); command_wanted(Command::MOL_RENAME); command_wanted(Command::MOL_FIX); command_wanted(Command::MOL_TOP); command_wanted(Command::MOL_VOLUME); command_wanted(Command::ANIM_JUMP); command_wanted(Command::ANIM_NEW_FRAME); command_wanted(Command::ANIM_NEW_NUM_FRAMES); command_wanted(Command::MOUSE_MODE); command_wanted(Command::MENU_TK_ADD); command_wanted(Command::MENU_TK_REMOVE); command_wanted(Command::ANIM_STYLE); command_wanted(Command::ANIM_SKIP); command_wanted(Command::ANIM_SPEED); command_wanted(Command::ANIM_DIRECTION); command_wanted(Command::ANIM_JUMP); command_wanted(Command::DISP_DEPTHCUE); command_wanted(Command::DISP_CULLING); command_wanted(Command::DISP_ANTIALIAS); command_wanted(Command::DISP_FPS); command_wanted(Command::DISP_LIGHT_ON); command_wanted(Command::CMD_STAGE); command_wanted(Command::CMD_AXES); command_wanted(Command::DISP_BACKGROUNDGRADIENT); command_wanted(Command::DISP_PROJ); command_wanted(Command::DISP_STEREO); command_wanted(Command::DISP_STEREOSWAP); command_wanted(Command::DISP_CACHEMODE); command_wanted(Command::DISP_RENDERMODE); browser = new MolBrowser(vmdapp, this, 0, 60, MAINFLTKMENUWIDTH, 90); // ******** CREATE MENUS ********* // We make copies of the static data because we will be changing the state // and contents of some menus and menu items. int menulen; Fl_Menu_Item nullitem = {NULL}; // create menu instances and fill in user_data fields for menu callback use. menulen = sizeof(init_file_menuitems)/sizeof(Fl_Menu_Item); file_menuitems = new Fl_Menu_Item[menulen]; int j; for (j=0; j<menulen; j++) { file_menuitems[j] = init_file_menuitems[j]; file_menuitems[j].user_data(this); } // these are set here because the are private functions file_menuitems[1].callback(loadfile_cb); file_menuitems[2].callback(savefile_cb); menulen = sizeof(init_molecule_menuitems)/sizeof(Fl_Menu_Item); molecule_menuitems = new Fl_Menu_Item[menulen]; for (j=0; j<menulen; j++) { molecule_menuitems[j] = init_molecule_menuitems[j]; molecule_menuitems[j].user_data(browser); } // This is the popup menu in the molbrowser window (mix of file and molecule menus) menulen = sizeof(init_browserpopup_menuitems)/sizeof(Fl_Menu_Item); browserpopup_menuitems = new Fl_Menu_Item[menulen]; for (j=0; j<3; j++) { browserpopup_menuitems[j] = init_browserpopup_menuitems[j]; browserpopup_menuitems[j].user_data(this); } for (j=3; j<menulen; j++) { browserpopup_menuitems[j] = init_browserpopup_menuitems[j]; browserpopup_menuitems[j].user_data(browser); } // these are set here because the are private functions browserpopup_menuitems[1].callback(loadfile_cb); browserpopup_menuitems[2].callback(savefile_cb); menulen = sizeof(init_display_menuitems)/sizeof(Fl_Menu_Item); display_menuitems = new Fl_Menu_Item[menulen]; for (j=0; j<menulen; j++) display_menuitems[j] = init_display_menuitems[j]; if (app->display->aa_available()) display_menuitems[4].activate(); if (app->display->cueing_available()) display_menuitems[5].activate(); if (app->display->culling_available()) display_menuitems[6].activate(); menulen = app->axes->locations(); axes_menuitems_storage = new Fl_Menu_Item[menulen+2]; axes_menuitems_storage[0] = nullitem; // pad the beginning of the array // to prevent an Fltk crash axes_menuitems = axes_menuitems_storage+1; for (j=0; j<menulen; j++) { Fl_Menu_Item item = {app->axes->loc_description(j), 0, axes_cb, app, FL_MENU_RADIO}; axes_menuitems[j] = item; } axes_menuitems[menulen] = nullitem; display_menuitems[12].user_data(axes_menuitems); menulen = 2; backgroundmode_menuitems_storage = new Fl_Menu_Item[menulen+2]; backgroundmode_menuitems_storage[0] = nullitem; backgroundmode_menuitems = backgroundmode_menuitems_storage+1; { Fl_Menu_Item item = { "Solid Color", 0, backgroundmode_cb, app, FL_MENU_RADIO}; backgroundmode_menuitems[0] = item; } { Fl_Menu_Item item = { "Gradient", 0, backgroundmode_cb, app, FL_MENU_RADIO}; backgroundmode_menuitems[1] = item; } backgroundmode_menuitems[menulen] = nullitem; display_menuitems[13].user_data(backgroundmode_menuitems); menulen = app->stage->locations(); stage_menuitems_storage = new Fl_Menu_Item[menulen+2]; stage_menuitems_storage[0] = nullitem; stage_menuitems = stage_menuitems_storage+1; for (j=0; j<menulen; j++) { Fl_Menu_Item item = {app->stage->loc_description(j), 0, stage_cb, app, FL_MENU_RADIO}; stage_menuitems[j] = item; } stage_menuitems[menulen] = nullitem; display_menuitems[14].user_data(stage_menuitems); menulen = app->display->num_stereo_modes(); stereo_menuitems_storage = new Fl_Menu_Item[menulen+2]; stereo_menuitems_storage[0] = nullitem; stereo_menuitems = stereo_menuitems_storage+1; for (j=0; j<menulen; j++) { Fl_Menu_Item item = {app->display->stereo_name(j), 0, stereo_cb, vmdapp, FL_MENU_RADIO}; stereo_menuitems[j] = item; } stereo_menuitems[menulen] = nullitem; display_menuitems[15].user_data(stereo_menuitems); menulen = 2; stereoswap_menuitems_storage = new Fl_Menu_Item[menulen+2]; stereoswap_menuitems_storage[0] = nullitem; stereoswap_menuitems = stereoswap_menuitems_storage+1; for (j=0; j<menulen; j++) { const char * StereoSwap[] = { "Off", "On" }; Fl_Menu_Item item = {StereoSwap[j], 0, stereoswap_cb, vmdapp, FL_MENU_RADIO}; stereoswap_menuitems[j] = item; } stereoswap_menuitems[menulen] = nullitem; display_menuitems[16].user_data(stereoswap_menuitems); menulen = app->display->num_cache_modes(); cachemode_menuitems_storage = new Fl_Menu_Item[menulen+2]; cachemode_menuitems_storage[0] = nullitem; cachemode_menuitems = cachemode_menuitems_storage+1; for (j=0; j<menulen; j++) { Fl_Menu_Item item = {app->display->cache_name(j), 0, cachemode_cb, vmdapp, FL_MENU_RADIO}; cachemode_menuitems[j] = item; } cachemode_menuitems[menulen] = nullitem; display_menuitems[17].user_data(cachemode_menuitems); menulen = app->display->num_render_modes(); rendermode_menuitems_storage = new Fl_Menu_Item[menulen+2]; rendermode_menuitems_storage[0] = nullitem; rendermode_menuitems = rendermode_menuitems_storage+1; for (j=0; j<menulen; j++) { Fl_Menu_Item item = {app->display->render_name(j), 0, rendermode_cb, vmdapp, FL_MENU_RADIO}; rendermode_menuitems[j] = item; } rendermode_menuitems[menulen] = nullitem; display_menuitems[18].user_data(rendermode_menuitems); update_dispmode(); menulen = sizeof(init_mouse_menuitems)/sizeof(Fl_Menu_Item); mouse_menuitems_storage = new Fl_Menu_Item[menulen+2]; mouse_menuitems_storage[0] = nullitem; mouse_menuitems = mouse_menuitems_storage+1; for (j=0; j<menulen; j++) mouse_menuitems[j] = init_mouse_menuitems[j]; // ******** CREATE MENU BAR ********* menubar = new Fl_Menu_Bar(0, 0, MAINFLTKMENUWIDTH, 30); #if defined(VMDMENU_WINDOW) menubar->color(VMDMENU_WINDOW); #endif menubar->add("File",0,0,(void *)file_menuitems,FL_SUBMENU_POINTER); menubar->add("Molecule",0,0,(void *)molecule_menuitems,FL_SUBMENU_POINTER); menubar->add("Graphics",0,0,(void *)graphics_menuitems, FL_SUBMENU_POINTER); menubar->add("Display",0,0,(void*)display_menuitems, FL_SUBMENU_POINTER); menubar->add("Mouse",0,0,(void *)mouse_menuitems, FL_SUBMENU_POINTER); menubar->add(EXT_MENU_NAME,0,0, NULL, FL_SUBMENU); menubar->add("Help",0,0,(void *)init_help_menuitems, FL_SUBMENU_POINTER); menubar->user_data(vmdapp); menubar->selection_color(VMDMENU_MENU_SEL); // ******** CREATE CONTROLS ********* Fl_Group::current()->resizable(browser); Fl_Button *b; int bwidth = 20, bheight = 20; b = new Fl_Button(0, 150, bwidth, bheight, "@4->|"); VMDFLTKTOOLTIP(b, "Jump to beginning") b->labeltype(FL_SYMBOL_LABEL); b->callback(start_cb, app); reverse = new Fl_Button(0, 150+bheight, bwidth, bheight, "@<"); VMDFLTKTOOLTIP(reverse, "Play in reverse") reverse->labeltype(FL_SYMBOL_LABEL); reverse->type(FL_TOGGLE_BUTTON); reverse->callback(reverse_cb, app); b = new Fl_Button(bwidth, 150+bheight, bwidth, bheight, "@<|"); VMDFLTKTOOLTIP(b, "Step in reverse") b->labeltype(FL_SYMBOL_LABEL); b->callback(prev_cb, app); b = new Fl_Button(MAINFLTKMENUWIDTH-bwidth, 150, bwidth, bheight, "@->|"); VMDFLTKTOOLTIP(b, "Jump to end") b->labeltype(FL_SYMBOL_LABEL); b->callback(stop_cb, app); forward = new Fl_Button(MAINFLTKMENUWIDTH-bwidth, 150+bheight, bwidth, bheight, "@>"); VMDFLTKTOOLTIP(forward, "Play forward") forward->labeltype(FL_SYMBOL_LABEL); forward->type(FL_TOGGLE_BUTTON); forward->callback(forward_cb, app); b = new Fl_Button(MAINFLTKMENUWIDTH-2*bwidth, 150+bheight, bwidth, bheight, "@|>"); VMDFLTKTOOLTIP(b, "Step forward") b->labeltype(FL_SYMBOL_LABEL); b->callback(next_cb, app); curframe = new Fl_Int_Input(bwidth, 150, 2*bwidth, bheight); VMDFLTKTOOLTIP(curframe, "Set current frame") curframe->textsize(12); curframe->callback(curframe_cb, app); curframe->when(FL_WHEN_ENTER_KEY); curframe->selection_color(VMDMENU_VALUE_SEL2); frameslider = new Fl_Slider(3*bwidth, 150, MAINFLTKMENUWIDTH-4*bwidth, bheight); VMDFLTKTOOLTIP(frameslider, "Drag to set current frame") frameslider->type(FL_HOR_NICE_SLIDER); frameslider->step(1,1); frameslider->callback(frameslider_cb, this); frameslider->color(VMDMENU_SLIDER_BG, VMDMENU_SLIDER_FG); frameslider->when(FL_WHEN_CHANGED | FL_WHEN_RELEASE); step = new Fl_Counter(220,150+bheight, 45,bheight, "step"); VMDFLTKTOOLTIP(step, "Animation step size") step->labelsize(12); step->type(FL_SIMPLE_COUNTER); step->step(1,1); step->minimum(1); step->value(1); step->callback(step_cb, app); step->align(FL_ALIGN_LEFT); style = new Fl_Choice(120, 150+bheight, 65, bheight); VMDFLTKTOOLTIP(style, "Set animation looping mode") style->textsize(12); style->selection_color(VMDMENU_MENU_SEL); style->box(FL_THIN_UP_BOX); for (int s=0; s<Animation::ANIM_TOTAL_STYLES; s++) style->add(animationStyleName[s]); // XXX The Animation class starts with ANIM_LOOP as its style, so that's // what we do, too. style->value(1); style->callback(style_cb, app); zoom = new Fl_Check_Button(80, 150+bheight-2, bwidth+5, bheight+5, "zoom"); VMDFLTKTOOLTIP(zoom, "Zoom in slider onto 100-frame subrange centered on current frame") zoom->labelsize(12); zoom->align(FL_ALIGN_LEFT); zoom->value(0); //zoom->selection_color(FL_RED); zoom->color(VMDMENU_CHECKBOX_BG, VMDMENU_CHECKBOX_FG); zoom->callback(zoom_cb, this); speed = new Fl_Slider(315, 150+bheight, 90, bheight, "speed"); VMDFLTKTOOLTIP(speed, "Drag slider to change animation speed") speed->labelsize(12); speed->type(FL_HORIZONTAL); speed->color(VMDMENU_SLIDER_BG, VMDMENU_SLIDER_FG); speed->value(1.0); speed->callback(speed_cb, app); speed->align(FL_ALIGN_LEFT); guistate = UNDEFINED; update_gui_state(); callback(vmd_main_window_cb); // override default FLTK/VMD global handlers Fl_Window::end(); }