本文整理汇总了C++中Fl_Choice::down_box方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Choice::down_box方法的具体用法?C++ Fl_Choice::down_box怎么用?C++ Fl_Choice::down_box使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Choice
的用法示例。
在下文中一共展示了Fl_Choice::down_box方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: plotWindow
ImageWindow::ImageWindow() {
Fl_Double_Window* w;
{ Fl_Double_Window* o = new Fl_Double_Window(930, 580, "Total Counts");
w = o;
o->user_data((void*)(this));
{ new Fl_Button(30, 190, 285, 30, "Save Image");
} // Fl_Button* o
{ new Fl_Button(30, 240, 285, 30, "Reset Image");
} // Fl_Button* o
{ new Fl_Light_Button(85, 492, 175, 40, "Analyze Pointing");
} // Fl_Light_Button* o
{ new Fl_Value_Output(127, 384, 115, 25, "RA");
} // Fl_Value_Output* o
{ new Fl_Value_Output(127, 419, 115, 25, "Dec");
} // Fl_Value_Output* o
{ new Fl_Value_Output(127, 455, 115, 25, "Roll");
} // Fl_Value_Output* o
{ Fl_Box* o = new Fl_Box(25, 359, 300, 214, "Current Pointing");
o->box(FL_THIN_UP_FRAME);
o->labelfont(1);
o->align(Fl_Align(FL_ALIGN_TOP));
} // Fl_Box* o
{ Fl_Choice* o = new Fl_Choice(456, 535, 155, 25, "Image Scaling");
o->down_box(FL_BORDER_BOX);
} // Fl_Choice* o
{ new Fl_Value_Output(199, 55, 115, 25, "Total Counts");
} // Fl_Value_Output* o
{ Fl_Value_Output* o = new Fl_Value_Output(199, 97, 115, 25, "Average Count Rate");
o->align(Fl_Align(132));
} // Fl_Value_Output* o
{ Fl_Value_Output* o = new Fl_Value_Output(199, 140, 115, 25, "Bright Pixel Count Rate");
o->align(Fl_Align(132));
} // Fl_Value_Output* o
{ Fl_Box* o = new Fl_Box(23, 37, 300, 258, "Image Statistics");
o->box(FL_THIN_UP_FRAME);
o->labelfont(1);
o->align(Fl_Align(FL_ALIGN_TOP));
} // Fl_Box* o
{ new Fl_Progress(30, 540, 290, 30);
} // Fl_Progress* o
{ Fl_Box* o = new Fl_Box(365, 40, 530, 475, "Detector Image");
o->box(FL_THIN_UP_FRAME);
o->labelfont(1);
o->align(Fl_Align(FL_ALIGN_TOP));
} // Fl_Box* o
{ Fl_Choice* o = new Fl_Choice(760, 535, 155, 25, "Pixel Arrangement");
o->down_box(FL_BORDER_BOX);
} // Fl_Choice* o
plot = new plotWindow (100,100,500,500);
o->end();
w->show();
} // Fl_Double_Window* o
}
示例2: Point
Panner::Panner ( int X, int Y, int W, int H, const char *L ) :
Fl_Group( X, Y, W, H, L )
{
_bg_image = 0;
_bg_image_scaled = 0;
_bg_image_projection = 0;
// _projection = POLAR;
_points.push_back( Point( 1, 0 ) );
static float ranges[] = { 1,3,5,10,15 };
{ Fl_Choice *o = _range_choice = new Fl_Choice(X + 40,Y + H - 18,75,18,"Range:");
o->box(FL_UP_FRAME);
o->down_box(FL_DOWN_FRAME);
o->textsize(9);
o->labelsize(9);
o->align(FL_ALIGN_LEFT);
o->add("1 Meter",0,0,&ranges[0]);
o->add("3 Meters",0,0,&ranges[1]);
o->add("5 Meters",0,0,&ranges[2]);
o->add("10 Meters",0,0,&ranges[3]);
o->add("15 Meters",0,0,&ranges[4]);
o->value(_range_mode);
o->callback( cb_mode, this );
}
{ Fl_Choice *o = _projection_choice = new Fl_Choice(X + W - 75,Y + H - 18,75,18,"Projection:");
o->box(FL_UP_FRAME);
o->down_box(FL_DOWN_FRAME);
o->textsize(9);
o->labelsize(9);
o->align(FL_ALIGN_LEFT);
o->add("Spherical");
o->add("Planar");
o->value(_projection_mode);
o->callback( cb_mode, this );
}
end();
}
示例3: init_appendai_choices
void init_appendai_choices() {
Fl_Choice* o = new Fl_Choice(5, 145+40, 140, 20, "");
o->down_box(FL_DOWN_BOX);
std::shared_ptr<AppendAIPatch> aip = std::dynamic_pointer_cast<AppendAIPatch>(mods->get("aip"));
if(!aip->valid()) {
o->deactivate();
}
else {
std::map<std::string, unsigned> order;
auto entities = aip->entities();
{
int idx = 0;
for(unsigned entity : entities) {
order[AppendAIPatch::FriendlyName(entity)] = entity;
idx++;
}
if(choice_entity_map.empty()) {
idx = 0;
for(std::pair<std::string, unsigned> pair : order) {
choice_entity_map[idx] = pair.second;
idx++;
}
}
for(std::pair<std::string, unsigned> pair : order) {
o->add(pair.first.c_str());
}
}
o->value(o->find_item(order.begin()->first.c_str()));
}
entity_list = o;
}
示例4: make_window
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();
}
//.........这里部分代码省略.........
示例5: VMDFltkMenu
SaveTrajectoryFltkMenu::SaveTrajectoryFltkMenu(VMDApp *vmdapp)
: VMDFltkMenu("save", "Save Trajectory", vmdapp) {
size(450, 250);
{ Fl_Choice* o = molchooser = new Fl_Choice(120, 10, 320, 25, "Save data from: ");
o->box(FL_THIN_UP_BOX);
o->down_box(FL_BORDER_BOX);
o->color(VMDMENU_CHOOSER_BG);
o->selection_color(VMDMENU_CHOOSER_SEL);
o->callback(molchooser_cb, this);
}
{ Fl_Input *o = selectinput = new Fl_Input(120, 45, 295, 25, "Selected atoms:");
o->selection_color(VMDMENU_VALUE_SEL);
}
{ Fl_Choice* o = repchooser = new Fl_Choice(415, 45, 25, 25);
o->down_box(FL_BORDER_BOX);
o->align(FL_ALIGN_TOP_LEFT);
o->color(VMDMENU_CHOOSER_BG, VMDMENU_CHOOSER_SEL);
o->callback(repchooser_cb, this);
}
{ Fl_Choice* o = filetypechooser = new Fl_Choice(20, 90, 115, 25, "File type:");
o->down_box(FL_BORDER_BOX);
o->align(FL_ALIGN_TOP_LEFT);
o->color(VMDMENU_CHOOSER_BG, VMDMENU_CHOOSER_SEL);
}
savebutton = new Fl_Return_Button(345, 90, 95, 25, "Save...");
savebutton->callback(save_cb, this);
{ Fl_Group* o = timestepgroup = new Fl_Group(20, 145, 165, 95, "Frames: ");
o->box(FL_ENGRAVED_FRAME);
o->align(FL_ALIGN_TOP_LEFT);
{ Fl_Button* o = saveinbackgroundbutton = new Fl_Round_Button(30, 215, 150, 20, "Save in background");
o->down_box(FL_ROUND_DOWN_BOX);
o->type(FL_RADIO_BUTTON);
}
{ Fl_Button* o = allatoncebutton = new Fl_Round_Button(30, 195, 150, 20, "Save all at once");
o->down_box(FL_ROUND_DOWN_BOX);
o->type(FL_RADIO_BUTTON);
}
{ Fl_Input* o = firstinput = new Fl_Int_Input(25, 170, 45, 20, "First:");
o->align(FL_ALIGN_TOP);
o->selection_color(VMDMENU_VALUE_SEL);
}
{ Fl_Input* o = lastinput = new Fl_Int_Input(80, 170, 45, 20, "Last:");
o->align(FL_ALIGN_TOP);
o->selection_color(VMDMENU_VALUE_SEL);
}
{ Fl_Input* o = strideinput = new Fl_Int_Input(135, 170, 45, 20, "Stride:");
o->align(FL_ALIGN_TOP);
o->selection_color(VMDMENU_VALUE_SEL);
}
o->end();
datasetbrowser = new Fl_Multi_Browser(195, 145, 240, 95, "Volumetric Datasets");
datasetbrowser->align(5);
datasetbrowser->color(VMDMENU_BROWSER_BG, VMDMENU_BROWSER_SEL);
}
end();
allatoncebutton->value(1);
selected_molid = -1;
datasetbrowser->deactivate();
command_wanted(Command::PLUGIN_UPDATE);
command_wanted(Command::MOL_NEW);
command_wanted(Command::MOL_RENAME);
command_wanted(Command::MOL_DEL);
command_wanted(Command::MOL_ADDREP);
command_wanted(Command::MOL_DELREP);
command_wanted(Command::MOL_MODREP);
command_wanted(Command::MOL_MODREPITEM);
command_wanted(Command::ANIM_DELETE);
}
示例6: make_window
Fl_Double_Window* IntersectionInterface::make_window() {
Fl_Double_Window* w;
{ Fl_Double_Window* o = m_intersectionWindow = new Fl_Double_Window(420, 265, "Intersection UI");
w = o;
o->user_data((void*)(this));
{ Fl_Group* o = new Fl_Group(5, 25, 145, 30);
o->end();
}
{ Fl_Choice* o = m_iShapeType = new Fl_Choice(5, 25, 145, 30, "Object type");
o->down_box(FL_BORDER_BOX);
o->align(FL_ALIGN_TOP_LEFT);
o->menu(menu_m_iShapeType);
}
{ Fl_Value_Slider* o = m_dXAt = new Fl_Value_Slider(5, 75, 200, 25, "At x pos");
o->type(5);
o->minimum(-1.5);
o->maximum(1.5);
o->callback((Fl_Callback*)cb_m_dXAt);
o->align(FL_ALIGN_TOP_LEFT);
}
{ Fl_Value_Slider* o = m_dYAt = new Fl_Value_Slider(5, 115, 200, 25, "At y pos");
o->type(5);
o->minimum(-1.5);
o->maximum(1.5);
o->callback((Fl_Callback*)cb_m_dYAt);
o->align(FL_ALIGN_TOP_LEFT);
}
{ Fl_Value_Slider* o = m_dZAt = new Fl_Value_Slider(5, 155, 200, 25, "At z pos");
o->type(5);
o->minimum(-1.5);
o->maximum(1.5);
o->callback((Fl_Callback*)cb_m_dZAt);
o->align(FL_ALIGN_TOP_LEFT);
}
{ Fl_Value_Slider* o = m_dTheta = new Fl_Value_Slider(5, 195, 200, 25, "Vec theta");
o->type(5);
o->maximum(360);
o->step(1);
o->callback((Fl_Callback*)cb_m_dTheta);
o->align(FL_ALIGN_TOP_LEFT);
}
{ Fl_Value_Slider* o = m_dPhi = new Fl_Value_Slider(5, 235, 200, 25, "Vec phi");
o->type(5);
o->minimum(-90);
o->maximum(90);
o->step(1);
o->value(45);
o->callback((Fl_Callback*)cb_m_dPhi);
o->align(FL_ALIGN_TOP_LEFT);
}
{ Fl_Button* o = new Fl_Button(330, 25, 85, 25, "Write test");
o->callback((Fl_Callback*)cb_Write);
}
{ Fl_Value_Slider* o = m_dXRot = new Fl_Value_Slider(215, 75, 200, 25, "View rotation");
o->type(5);
o->maximum(360);
o->step(1);
o->callback((Fl_Callback*)cb_m_dXRot);
o->align(FL_ALIGN_TOP_LEFT);
}
{ Fl_Value_Slider* o = m_dYRot = new Fl_Value_Slider(215, 115, 200, 25, "View height");
o->type(5);
o->minimum(-90);
o->maximum(90);
o->step(1);
o->callback((Fl_Callback*)cb_m_dYRot);
o->align(FL_ALIGN_TOP_LEFT);
}
{ Fl_Check_Button* o = m_bGrid = new Fl_Check_Button(215, 155, 25, 25, "Show grid");
o->down_box(FL_DOWN_BOX);
o->value(1);
o->callback((Fl_Callback*)cb_m_bGrid);
}
{ Fl_Check_Button* o = m_bRay = new Fl_Check_Button(215, 195, 25, 25, "Show ray");
o->down_box(FL_DOWN_BOX);
o->value(1);
o->callback((Fl_Callback*)cb_m_bRay);
}
{ Fl_Check_Button* o = m_bRayShadow = new Fl_Check_Button(215, 235, 25, 25, "Show ray shadow");
o->down_box(FL_DOWN_BOX);
o->value(1);
o->callback((Fl_Callback*)cb_m_bRayShadow);
}
m_iSeed = new Fl_Value_Input(240, 30, 85, 20, "Seed");
o->end();
o->resizable(o);
}
return w;
}