本文整理汇总了C++中Fl_Check_Button::down_box方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Check_Button::down_box方法的具体用法?C++ Fl_Check_Button::down_box怎么用?C++ Fl_Check_Button::down_box使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Check_Button
的用法示例。
在下文中一共展示了Fl_Check_Button::down_box方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char **argv) {
ThemeLoader::init();
IconLoader::init();
win = new EdeWindow(455, 485, "Theme demo");
win->begin();
{ Fl_Button* o = new Fl_Button(355, 450, 90, 25, "Load");
o->tooltip("Load predefined theme");
o->callback(load_theme_cb);
} // Fl_Button* o
{ Fl_Menu_Bar* o = new Fl_Menu_Bar(0, 0, 455, 25);
o->menu(menu_);
} // Fl_Menu_Bar* o
{ Fl_Round_Button* o = new Fl_Round_Button(5, 285, 90, 25, "round");
o->down_box(FL_ROUND_DOWN_BOX);
} // Fl_Round_Button* o
{ new Fl_Return_Button(5, 195, 90, 25, "button");
} // Fl_Return_Button* o
{ new Fl_Input(160, 196, 285, 25, "input:");
} // Fl_Input* o
{ Fl_Output* o = new Fl_Output(160, 225, 285, 25, "output:");
o->value("Some output value");
} // Fl_Output* o
{ Fl_File_Browser* o = new Fl_File_Browser(5, 30, 210, 125);
o->load("/");
} // Fl_File_Browser* o
{ Fl_Check_Browser* o = new Fl_Check_Browser(220, 30, 225, 125);
o->add("foo");
o->add("foo");
o->add("foo");
} // Fl_Check_Browser* o
{ Fl_Progress* o = new Fl_Progress(5, 160, 210, 25, "progress bar");
o->value(50);
} // Fl_Progress* o
{ Fl_Slider* o = new Fl_Slider(220, 160, 225, 25);
o->type(1);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Slider* o
{ new Fl_Light_Button(5, 225, 90, 25, "button");
} // Fl_Light_Button* o
{ Fl_Check_Button* o = new Fl_Check_Button(5, 255, 90, 25, "check");
o->down_box(FL_DOWN_BOX);
} // Fl_Check_Button* o
{ Fl_File_Input* o = new Fl_File_Input(160, 256, 285, 35, "file:");
o->value("/home/foo/baz/taz.txt");
} // Fl_File_Input* o
{ Fl_Text_Editor* o = new Fl_Text_Editor(160, 325, 285, 115, "Text editor");
o->buffer(new Fl_Text_Buffer());
} // Fl_Text_Editor* o
{ Fl_Box* o = new Fl_Box(25, 328, 80, 80, "image");
IconLoader::set(o, "utilities-terminal", ICON_SIZE_MEDIUM);
} // Fl_Box* o
win->end();
win->show(argc, argv);
Fl::run();
ThemeLoader::shutdown();
IconLoader::shutdown();
return 0;
}
示例2: AddButton
//==== Create & Init Gui CheckButton ====//
void GroupLayout::AddButton( CheckButton& cbutton, const char* label )
{
assert( m_Group && m_Screen );
//==== Add Check Button ====//
int bw = FitWidth( 0, m_ButtonWidth );
Fl_Check_Button* flbutton = new Fl_Check_Button( m_X, m_Y, bw, m_StdHeight, label );
flbutton->box( FL_DOWN_BOX );
flbutton->down_box( FL_DOWN_BOX );
flbutton->labelfont( 1 );
flbutton->labelsize( 12 );
flbutton->labelcolor( FL_DARK_BLUE );
flbutton->copy_label( label );
m_Group->add( flbutton );
AddX( bw );
AddY( m_StdHeight );
NewLineX();
cbutton.Init( m_Screen, flbutton );
}
示例3: make_formant_window
//.........这里部分代码省略.........
o->textsize(11);
o->callback((Fl_Callback*)cb_Seq);
o->align(FL_ALIGN_TOP_LEFT);
o->bounds(1,FF_MAX_SEQUENCE-1);
o->value(pars->Psequencesize);
} // Fl_Counter* o
{ Fl_Counter* o = new Fl_Counter(595, 97, 40, 15, "S.Pos.");
o->tooltip("Current position from the sequence");
o->type(1);
o->labelfont(1);
o->labelsize(10);
o->minimum(0);
o->maximum(127);
o->step(1);
o->textsize(10);
o->callback((Fl_Callback*)cb_S);
o->align(FL_ALIGN_TOP_RIGHT);
o->bounds(0,FF_MAX_SEQUENCE-2);
o->value(nseqpos);
} // Fl_Counter* o
{ Fl_Counter* o = vowel_counter = new Fl_Counter(640, 97, 40, 15, "Vowel");
vowel_counter->type(1);
vowel_counter->labelsize(10);
vowel_counter->minimum(0);
vowel_counter->maximum(127);
vowel_counter->step(1);
vowel_counter->textsize(10);
vowel_counter->callback((Fl_Callback*)cb_vowel_counter);
vowel_counter->align(FL_ALIGN_TOP);
o->bounds(0,FF_MAX_VOWELS-1);
} // Fl_Counter* vowel_counter
{ Fl_Check_Button* o = new Fl_Check_Button(625, 132, 60, 20, "Neg.Input");
o->tooltip("Negate the input from LFO/envelopes/etc.");
o->down_box(FL_DOWN_BOX);
o->labelsize(10);
o->callback((Fl_Callback*)cb_Neg);
o->value(pars->Psequencereversed);
} // Fl_Check_Button* o
{ WidgetPDial* o = strchdial = new WidgetPDial(595, 130, 25, 25, "Strch");
strchdial->tooltip("Sequence Stretch");
strchdial->box(FL_ROUND_UP_BOX);
strchdial->color(FL_BACKGROUND_COLOR);
strchdial->selection_color(FL_INACTIVE_COLOR);
strchdial->labeltype(FL_NORMAL_LABEL);
strchdial->labelfont(0);
strchdial->labelsize(10);
strchdial->labelcolor(FL_FOREGROUND_COLOR);
strchdial->maximum(127);
strchdial->step(1);
strchdial->callback((Fl_Callback*)cb_strchdial);
strchdial->align(FL_ALIGN_TOP);
strchdial->when(FL_WHEN_CHANGED);
o->value(pars->Psequencestretch);
} // WidgetPDial* strchdial
o->end();
} // Fl_Group* o
{ Fl_Counter* o = new Fl_Counter(485, 15, 65, 20, "Num.Formants");
o->type(1);
o->labelfont(1);
o->labelsize(10);
o->minimum(0);
o->maximum(127);
o->step(1);
o->callback((Fl_Callback*)cb_Num);
o->align(FL_ALIGN_TOP_LEFT);
o->bounds(1,FF_MAX_FORMANTS);
示例4: make_window
Fl_Double_Window* UserInterface::make_window() {
Fl_Double_Window* w;
{ Fl_Double_Window* o = m_mainWindow = new Fl_Double_Window(797, 595, "Mesh viewer");
w = o;
o->user_data((void*)(this));
{ Fl_Group* o = new Fl_Group(0, 22, 125, 506, "Camera controls");
o->box(FL_ENGRAVED_BOX);
{ Fl_Slider* o = m_sldZoom = new Fl_Slider(16, 29, 95, 25, "Zoom");
o->tooltip("Zoom camera in and out");
o->type(1);
o->minimum(0.0001);
o->maximum(0.999);
o->step(0.01);
o->value(0.5);
o->slider_size(0.040404);
o->callback((Fl_Callback*)cb_m_sldZoom);
}
{ Fl_Roller* o = m_rolRotAmt = new Fl_Roller(45, 333, 75, 20, "Rot. ");
o->tooltip("Set rotation amount for key (j,k,i,m,r,R)");
o->type(1);
o->value(0.2);
o->callback((Fl_Callback*)cb_m_rolRotAmt);
o->align(FL_ALIGN_LEFT);
}
{ Fl_Dial* o = m_dialSpin = new Fl_Dial(74, 91, 31, 30, "Spin");
o->tooltip("Spin camera");
o->step(0.05);
o->callback((Fl_Callback*)cb_m_dialSpin);
}
{ Fl_Adjuster* o = m_adjXTrans = new Fl_Adjuster(5, 223, 105, 17, "Move horiz");
o->tooltip("Pan left/right");
o->minimum(-5);
o->maximum(5);
o->callback((Fl_Callback*)cb_m_adjXTrans);
}
{ Fl_Adjuster* o = m_adjYTrans = new Fl_Adjuster(5, 257, 105, 17, "Move vertical");
o->tooltip("Camera up/down");
o->minimum(-5);
o->maximum(5);
o->callback((Fl_Callback*)cb_m_adjYTrans);
}
{ Fl_Adjuster* o = m_adjInOut = new Fl_Adjuster(5, 296, 105, 17, "In/Out");
o->tooltip("Move camera in and out");
o->minimum(-5);
o->maximum(5);
o->callback((Fl_Callback*)cb_m_adjInOut);
}
{ Fl_Roller* o = m_rolTransAmt = new Fl_Roller(45, 358, 75, 15, "Trans.");
o->tooltip("Change translation amount");
o->type(1);
o->maximum(10);
o->value(0.1);
o->callback((Fl_Callback*)cb_m_rolTransAmt);
o->align(FL_ALIGN_LEFT);
}
{ Fl_Button* o = new Fl_Button(24, 378, 65, 25, "Reset");
o->tooltip("Reset camera");
o->callback((Fl_Callback*)cb_Reset);
}
{ Fl_Roller* o = m_rolUpDown = new Fl_Roller(15, 68, 20, 70, "Up/down");
o->tooltip("Rotate the camera up/down");
o->minimum(-1);
o->step(0.01);
o->callback((Fl_Callback*)cb_m_rolUpDown);
}
{ Fl_Roller* o = m_rolLeftRight = new Fl_Roller(16, 158, 85, 20, "Rot left/rignt");
o->tooltip("Rotate left to right");
o->type(1);
o->minimum(-1);
o->step(0.01);
o->callback((Fl_Callback*)cb_m_rolLeftRight);
}
{ Fl_Button* o = new Fl_Button(5, 194, 35, 25, "Zero");
o->tooltip("Zero trans sliders");
o->callback((Fl_Callback*)cb_Zero);
}
{ Fl_Check_Button* o = new Fl_Check_Button(0, 462, 20, 25, "IBar");
o->down_box(FL_DOWN_BOX);
o->value(1);
o->callback((Fl_Callback*)cb_IBar);
}
{ Fl_Check_Button* o = new Fl_Check_Button(0, 483, 25, 20, "Center obj");
o->down_box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_Center);
}
o->end();
}
{ JofGTIBar* o = m_view = new JofGTIBar(135, 3, 560, 557);
Fl_Group::current()->resizable(o);
}
o->end();
}
return w;
}
示例5: make_mods_window
Fl_Double_Window* make_mods_window() {
if(mods_window != nullptr) {
delete (Fl_Double_Window*)mods_window;
mods_window = nullptr;
}
std::shared_ptr<AppendAIPatch> aip = std::dynamic_pointer_cast<AppendAIPatch>(mods->get("aip"));
Fl_Double_Window* w;
{ Fl_Double_Window* o = new Fl_Double_Window(264, 340, "Special Mods");
w = o;
{ new DoneButton(5, 310, 255, 25, "Close Window");
} // Fl_Button* o
{ Fl_Check_Button* o = new ModCheckbox("dpos", 5, 10, 255, 15, "Dark ice caves and hell are possible");
o->down_box(FL_DOWN_BOX);
} // Fl_Check_Button* o
{ Fl_Check_Button* o = new ModCheckbox("alld", 5, 30, 255, 15, "All levels are dark");
o->down_box(FL_DOWN_BOX);
} // Fl_Check_Button* o
{ Fl_Check_Button* o = new ModCheckbox("smlt", 5, 50, 255, 15, "End Timer is not set to 99 minutes");
o->down_box(FL_DOWN_BOX);
}
{ Fl_Check_Button* o = new ModCheckbox("pret", 5, 70, 255, 15, "Display precise timer");
o->down_box(FL_DOWN_BOX);
}
{
{
init_appendai_choices();
init_appendai_list();
}
{ Fl_Check_Button* o = new Fl_Check_Button(5, 172+40, 255, 15, "Piranhas unaffected (anti-crash)");
o->callback(unstable_check_callback);
if(aip->ignored_entities().size() > 0) {
o->value(true);
}
else {
o->value(false);
}
}
}
std::shared_ptr<ShopContentsPatch> som = std::dynamic_pointer_cast<ShopContentsPatch>(mods->get("smo"));
{ Fl_Group* o = new Fl_Group(5, 190+25+40, 255, 45, "Shop Mods");
{ Fl_Check_Button* o = new ShopItemCheckbox(ITEM_JETPACK, 10, 195+25+40, 75, 15, "Jetpack");
o->down_box(FL_DOWN_BOX);
} // Fl_Check_Button* o
{ Fl_Check_Button* o = new ShopItemCheckbox(ITEM_TELEPORTER, 85, 195+25+40, 90, 15, "Teleporter");
o->down_box(FL_DOWN_BOX);
} // Fl_Check_Button* o
{ Fl_Check_Button* o = new ShopItemCheckbox(ITEM_COMPASS, 175, 195+25+40, 83, 15, "Compass");
o->down_box(FL_DOWN_BOX);
} // Fl_Check_Button* o
{ Fl_Check_Button* o = new ShopItemCheckbox(ITEM_MATTOCK, 10, 215+25+40, 85, 15, "Mattock");
o->down_box(FL_DOWN_BOX);
}
{ Fl_Check_Button* o = new ShopItemCheckbox(ITEM_BOMB_BOX, 85, 215+25+40, 110, 15, "Bomb Box");
o->down_box(FL_DOWN_BOX);
}
{ Fl_Check_Button* o = new Fl_Check_Button(175, 215+25+40, 110, 15, "1-2 Only");
o->down_box(FL_DOWN_BOX);
if(som->valid()) {
o->value(som->levels() == 4);
o->callback(shop_only12_callback);
}
else {
o->deactivate();
}
} // Fl_Check_Button* o
o->box(FL_UP_FRAME);
o->end();
} // Fl_Group* o
o->end();
} // Fl_Double_Window* o
mods_window = w;
return w;
}
示例6: main
int main(int argc, char **argv) {
fl_open_display();
/* start daemon if not started */
xscreensaver_run_daemon(fl_display);
SaverPrefs* sp = xscreensaver_read_config();
main_win = new Fl_Double_Window(340, 445, _("Screensaver options"));
/* so ESC does not interrupt running process */
main_win->callback(close_cb);
main_win->begin();
/* monitor */
Fl_Box* b1 = new Fl_Box(120, 163, 100, 15);
b1->box(FL_BORDER_BOX);
Fl_Box* b2 = new Fl_Box(65, 10, 210, 158);
b2->box(FL_THIN_UP_BOX);
Fl_Box* b3 = new Fl_Box(78, 20, 184, 138);
b3->color(FL_BLACK);
b3->box(FL_DOWN_BOX);
/* preview window in 'b3' box */
preview_win = new Fl_Double_Window(80, 22, 180, 134);
preview_win->color(FL_BLACK);
preview_win->begin();
/* if failed to load any screensaver */
if(!sp) {
Fl_Box* b4 = new Fl_Box(0, 0, 180, 134, _("No screensavers found"));
b4->labelcolor(FL_GRAY);
b4->align(FL_ALIGN_INSIDE | FL_ALIGN_WRAP);
}
preview_win->end();
Fl_Box* b4 = new Fl_Box(95, 173, 146, 14);
b4->box(FL_THIN_UP_BOX);
Fl_Group* g1 = new Fl_Group(10, 215, 320, 45, _("Screensaver"));
g1->box(FL_ENGRAVED_BOX);
g1->align(FL_ALIGN_TOP_LEFT);
g1->begin();
Fl_Choice* saver_list = new Fl_Choice(19, 225, 180, 25);
saver_list->down_box(FL_BORDER_BOX);
saver_list->add("(None)", 0, 0);
if(sp) {
int sel = 0;
saver_list->callback((Fl_Callback*)choice_cb, sp);
/* fix possible error */
if(sp->curr_hack >= sp->hacks.size())
sp->curr_hack = 0;
HackListIter it = sp->hacks.begin(), it_end = sp->hacks.end();
for(int i = 1; it != it_end; ++it, i++) {
saver_list->add((*it)->name.c_str(), 0, 0);
/*
* Check real hack index number against current one and let it match
* position in our Fl_Choice list. Note that first item is '(None)'
* so 'i' starts from 1
*/
if(sp->mode != SAVER_OFF && (*it)->sindex == sp->curr_hack)
sel = i;
}
saver_list->value(sel);
}
timeout_val = new Fl_Spinner(275, 226, 45, 25, _("Timeout:"));
timeout_val->tooltip(_("Idle time in minutes after screensaver is started"));
timeout_val->range(1, 500);
if(sp)
timeout_val->value(sp->timeout);
else
timeout_val->value(1);
g1->end();
Fl_Group* g2 = new Fl_Group(10, 290, 320, 110, _("Power management"));
g2->box(FL_ENGRAVED_BOX);
g2->align(FL_ALIGN_TOP_LEFT);
g2->begin();
Fl_Check_Button* denabled = new Fl_Check_Button(20, 299, 180, 26, _("Enabled"));
denabled->down_box(FL_DOWN_BOX);
denabled->tooltip(_("Enable or disable Display Power Management Signaling support"));
if(sp) {
denabled->callback((Fl_Callback*)dpms_enable_cb, sp);
denabled->value(sp->dpms_enabled);
} else {
denabled->value(1);
}
Fl_Box* energy_image = new Fl_Box(20, 341, 75, 49);
energy_image->image(image_energy);
standby_val = new Fl_Spinner(275, 301, 45, 24, _("Standby:"));
standby_val->tooltip(_("Minutes for standby"));
//.........这里部分代码省略.........
示例7: 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;
}