本文整理汇总了C++中Fl_Box::labelfont方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Box::labelfont方法的具体用法?C++ Fl_Box::labelfont怎么用?C++ Fl_Box::labelfont使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Box
的用法示例。
在下文中一共展示了Fl_Box::labelfont方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
//constructeur
Fl_Progress_Window() : Fl_Window(238,105,"Progression...")
{
// Progress 1 Label
Fl_Box *label = new Fl_Box(10,10,215,15,"Pourcentage Général:");
label->labelsize(12);
label->labelfont(1);
label->labelcolor((Fl_Color)136);
label->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
//Progress1
progress1 = new Fl_Progress(10,28,215,20,"0%");
progress1->selection_color((Fl_Color)175);
progress1->maximum(100);
progress1->minimum(0);
progress1->labelsize(12);
// Progress filename (label progress 2)
progress_filename = new Fl_Box(10,52,215,15, "Fichier:");
progress_filename->labelsize(12);
progress_filename->labelfont(1);
progress_filename->labelcolor((Fl_Color)136);
progress_filename->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
// Progress 2
progress2 = new Fl_Progress(10,70,215,20,"0%");
progress2->maximum(100);
progress2->minimum(0);
progress2->labelsize(12);
progress2->selection_color((Fl_Color)175);
//fin du window...
this->set_modal();
this->end();
}
示例2: make_window
Fl_Group* SUBnoteharmonic::make_window() {
{ harmonic = new Fl_Group(0, 0, 90, 225);
harmonic->box(FL_FLAT_BOX);
harmonic->color(FL_BACKGROUND_COLOR);
harmonic->selection_color(FL_BACKGROUND_COLOR);
harmonic->labeltype(FL_NO_LABEL);
harmonic->labelfont(0);
harmonic->labelsize(14);
harmonic->labelcolor(FL_FOREGROUND_COLOR);
harmonic->user_data((void*)(this));
harmonic->align(FL_ALIGN_TOP);
harmonic->when(FL_WHEN_RELEASE);
{ Fl_Slider* o = mag = new Fl_Slider(0, 15, 10, 115);
mag->tooltip("harmonic\'s magnitude");
mag->type(4);
mag->box(FL_FLAT_BOX);
mag->selection_color((Fl_Color)222);
mag->maximum(127);
mag->step(1);
mag->value(127);
mag->callback((Fl_Callback*)cb_mag);
o->value(127-pars->Phmag[n]);
if (pars->Phmag[n]==0) o->selection_color(0);
} // Fl_Slider* mag
{ Fl_Slider* o = bw = new Fl_Slider(0, 135, 10, 75);
bw->tooltip("harmonic\'s bandwidth");
bw->type(4);
bw->box(FL_FLAT_BOX);
bw->selection_color((Fl_Color)222);
bw->maximum(127);
bw->step(1);
bw->value(64);
bw->callback((Fl_Callback*)cb_bw);
o->value(127-pars->Phrelbw[n]);
} // Fl_Slider* bw
{ Fl_Box* o = new Fl_Box(10, 170, 5, 5);
o->box(FL_FLAT_BOX);
o->color(FL_DARK2);
if (n+1==MAX_SUB_HARMONICS) o->hide();
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(0, 210, 10, 15, "01");
o->labelfont(1);
o->labelsize(9);
o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
char tmp[10];snprintf(tmp,10,"%d",n+1);o->label(strdup(tmp));
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(0, 0, 10, 15, "01");
o->labelfont(1);
o->labelsize(9);
o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
char tmp[10];snprintf(tmp,10,"%d",n+1);o->label(strdup(tmp));
} // Fl_Box* o
harmonic->end();
} // Fl_Group* harmonic
return harmonic;
}
示例3: 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
}
示例4: window
window(int x, int y, int w, int h, const char *label = 0)
: Fl_Window(x, y, w, h, label)
{
Fl_Box *o = new Fl_Box(10, 10, 300, 25,
"Open CSV file to convert to HTML -->");
o->box(FL_BORDER_BOX);
o->align(FL_ALIGN_INSIDE | FL_ALIGN_WRAP| FL_ALIGN_CENTER);
o->color((Fl_Color)215);
o->labelfont(FL_HELVETICA_BOLD);
Fl_Button *but = new Fl_Button(320, 10, 80, 25, "Pick Files");
but->callback(on_pick_button_click, this);
encode_check = new Fl_Check_Button(10, 40, 280, 25,
"Escape special HTML characters.");
encode_check->value(1);
open_file_check = new Fl_Check_Button(10, 65, 280, 25,
"Open HTML in browser.");
open_file_check->value(1);
Fl_Button *author = new Fl_Button(320, 65, 80, 25, "Mingjie Li");
author->box(FL_FLAT_BOX);
author->align(FL_ALIGN_INSIDE | FL_ALIGN_RIGHT);
author->labelsize(12);
author->labelcolor(fl_rgb_color(128, 128, 128));
author->callback(on_author_click, this);
}
示例5: main
int main(int argc, char **argv) {
Fl_Window *window = new Fl_Window(300,180);
Fl_Box *box = new Fl_Box(FL_UP_BOX,20,40,260,100,"Hello, World!");
box->labelfont(FL_BOLD+FL_ITALIC);
box->labelsize(36);
box->labeltype(FL_SHADOW_LABEL);
window->end();
window->show(argc, argv);
return Fl::run();
}
示例6: run_main
int run_main (int argc, ACE_TCHAR *argv[])
{
ACE_START_TEST (ACE_TEXT ("FlReactor_Test"));
Fl_Window window (300, 370);
Test_Window tw (10, 75, window.w () - 20, window.h ()-90);
window.resizable (&tw);
Fl_Hor_Slider slider (60, 5, window.w () - 70, 30, "Sides:");
slider.align (FL_ALIGN_LEFT);
slider.callback (sides_cb, &tw);
slider.value (tw.sides ());
slider.step (1);
slider.bounds (3, 10);
ACE_FlReactor reactor;
ACE_Reactor r (&reactor);
Fl_Box *box = new Fl_Box (FL_UP_BOX, 10, 40,
window.w () - 20, 30,
"Setting up");
box->labelfont (FL_BOLD);
Acceptor acceptor (&tw, box);
ACE_INET_Addr address;
if (acceptor.open (address, &r) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"%p\n",
"open acceptor"),
-1);
acceptor.acceptor ().get_local_addr (address);
const int bufsiz = 128;
char buf[bufsiz];
address.addr_to_string (buf, bufsiz, 0);
char msg[2 * bufsiz];
ACE_OS::sprintf (msg, "Listening on <%s>\n", buf);
box->label (msg);
box->redraw ();
window.end ();
window.show (argc, argv);
tw.show ();
return Fl::run ();
ACE_END_TEST;
}
示例7: main
int main(int argc, char *argv[]) {
Fl_Window *window = new Fl_Window (800,700,"TETRIS");
window->color(56);
Board *b = new Board();
Fl_Box *scorebox = new Fl_Box(tilesize*xmaxtiles+10,50,300,200,"Score: 0\0");
scorebox->box(FL_UP_BOX);
scorebox->labelfont(FL_BOLD+FL_ITALIC);
scorebox->labelsize(36);
scorebox->labeltype(FL_ENGRAVED_LABEL);
b->setScoreBox(&scorebox);
Fl_Box *exi = new Fl_Box(tilesize*2,ymaxtiles*15,300,200,"Press Escape to Exit");
exi->box(FL_UP_BOX);
exi->labelfont(FL_BOLD+FL_ITALIC);
exi->labelsize(36);
exi->labeltype(FL_ENGRAVED_LABEL);
window->end();
window->show();
Fl::add_timeout(0.1, timeractions,b);
return(Fl::run());
}
示例8: AddDividerBox
//==== Create & Init Box Divider ====//
void GroupLayout::AddDividerBox( const string& text, int used_w )
{
assert( m_Group && m_Screen );
//==== Add Divider Box ====//
int dw = FitWidth( used_w, m_ButtonWidth );
Fl_Box* flbox = new Fl_Box( m_X, m_Y, dw, m_DividerHeight );
flbox->box( FL_BORDER_BOX );
flbox->color( ( Fl_Color )12 );
flbox->labelfont( 1 );
flbox->labelcolor( FL_BACKGROUND2_COLOR );
flbox->copy_label( text.c_str() );
m_Group->add( flbox );
AddX( dw );
AddY( m_DividerHeight );
NewLineX();
}
示例9: box
Mixer::Mixer ( int X, int Y, int W, int H, const char *L ) :
Fl_Group( X, Y, W, H, L )
{
Loggable::dirty_callback( &Mixer::handle_dirty, this );
_rows = 1;
box( FL_FLAT_BOX );
labelsize( 96 );
{ Fl_Group *o = new Fl_Group( X, Y, W, 24 );
{ Fl_Menu_Bar *o = menubar = new Fl_Menu_Bar( X, Y, W, 24 );
o->add( "&Project/&New" );
o->add( "&Project/&Open" );
o->add( "&Project/&Save", FL_CTRL + 's', 0, 0 );
o->add( "&Project/&Quit", FL_CTRL + 'q', 0, 0 );
o->add( "&Mixer/&Add Strip", 'a', 0, 0 );
o->add( "&Mixer/Add &N Strips" );
o->add( "&Mixer/&Import Strip" );
o->add( "&Mixer/&Rows/One", '1', 0, 0 );
o->add( "&Mixer/&Rows/Two", '2', 0, 0 );
o->add( "&Mixer/&Rows/Three", '3', 0, 0 );
o->add( "&View/&Theme", 0, 0, 0 );
o->add( "_&Options/&Display/&Knobs/&Arc", 0, 0, 0, FL_MENU_RADIO );
o->add( "_&Options/&Display/&Knobs/&Burnished", 0, 0, 0, FL_MENU_RADIO );
o->add( "_&Options/&Display/&Knobs/&Plastic", 0, 0, 0, FL_MENU_RADIO | FL_MENU_VALUE );
o->add( "_&Options/&Display/&Sliders/&Nice", 0, 0, 0, FL_MENU_RADIO | FL_MENU_VALUE );
o->add( "_&Options/&Display/&Sliders/&Fill", 0, 0, 0, FL_MENU_RADIO );
o->add( "_&Options/&Display/&Sliders/&Simple", 0, 0, 0, FL_MENU_RADIO );
o->add( "_&Options/&Display/&Colors/&System", 0, 0, 0, FL_MENU_RADIO );
o->add( "&Help/&Manual" );
o->add( "&Help/&About" );
o->callback( cb_menu, this );
}
{ Fl_Box *o = project_name = new Fl_Box( X + 150, Y, W, 24 );
o->labelfont( FL_HELVETICA_ITALIC );
o->label( 0 );
o->align( FL_ALIGN_INSIDE | FL_ALIGN_CENTER );
o->labeltype( FL_SHADOW_LABEL );
Fl_Group::current()->resizable( o );
}
{ sm_blinker = new Fl_Button( ( X + W) - 37, Y + 4, 35, 15, "SM");
sm_blinker->box(FL_ROUNDED_BOX);
sm_blinker->down_box(FL_ROUNDED_BOX);
sm_blinker->color(FL_DARK2);
sm_blinker->selection_color((Fl_Color)93);
sm_blinker->labeltype(FL_NORMAL_LABEL);
sm_blinker->labelfont(3);
sm_blinker->labelsize(14);
sm_blinker->labelcolor(FL_DARK3);
sm_blinker->align(Fl_Align(FL_ALIGN_CENTER));
sm_blinker->when(FL_WHEN_RELEASE);
sm_blinker->deactivate();
} // Fl_Blink_Button* sm_blinker
o->end();
}
{ Fl_Scroll *o = scroll = new Fl_Scroll( X, Y + 24, W, H - 24 );
o->box( FL_FLAT_BOX );
// o->type( Fl_Scroll::HORIZONTAL_ALWAYS );
// o->box( Fl_Scroll::BOTH );
{
Fl_Flowpack *o = mixer_strips = new Fl_Flowpack( X, Y + 24, W, H - 18 - 24 );
// label( "Non-Mixer" );
align( (Fl_Align)(FL_ALIGN_CENTER | FL_ALIGN_INSIDE) );
o->box( FL_FLAT_BOX );
o->type( Fl_Pack::HORIZONTAL );
o->hspacing( 2 );
o->vspacing( 2 );
o->end();
Fl_Group::current()->resizable( o );
}
o->end();
Fl_Group::current()->resizable( o );
}
end();
// Fl::add_timeout( STATUS_UPDATE_FREQ, update_cb, this );
update_menu();
load_options();
}
示例10: make_window
Fl_Double_Window* make_window() {
Fl_Double_Window* w;
{ Fl_Double_Window* o = new Fl_Double_Window(400, 605);
w = o;
{ undobutton = new Fl_Button(6, 25, 40, 25, "Undo");
undobutton->down_box(FL_DOWN_BOX);
undobutton->callback((Fl_Callback*)undo_cb);
} // Fl_Button* undobutton
{ forceslider = new Fl_Slider(206, 25, 75, 25, "Force");
forceslider->type(5);
forceslider->selection_color((Fl_Color)1);
forceslider->minimum(0.05);
forceslider->value(0.5);
forceslider->callback((Fl_Callback*)lerp_cb);
forceslider->align(Fl_Align(FL_ALIGN_RIGHT));
} // Fl_Slider* forceslider
{ rgbmode = new Fl_Button(331, 25, 35, 25, "HSB");
rgbmode->labelsize(12);
rgbmode->callback((Fl_Callback*)rgbmode_cb);
rgbmode->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
} // Fl_Button* rgbmode
{ fnamebox = new Fl_Input(31, 60, 355, 25, "File:");
fnamebox->labeltype(FL_ENGRAVED_LABEL);
fnamebox->labelsize(12);
fnamebox->callback((Fl_Callback*)input_cb);
fnamebox->when(FL_WHEN_ENTER_KEY_ALWAYS);
} // Fl_Input* fnamebox
{ cshow.hsblbls[0] = new Fl_Box(30, 219, 80, 20, "Hue (L)");
cshow.hsblbls[0]->box(FL_FLAT_BOX);
cshow.hsblbls[0]->color((Fl_Color)34);
cshow.hsblbls[0]->labelfont(1);
cshow.hsblbls[0]->labelsize(12);
cshow.hsblbls[0]->labelcolor((Fl_Color)3);
} // Fl_Box* cshow.hsblbls[0]
{ cshow.hsblbls[1] = new Fl_Box(115, 219, 75, 20, "Sat(M)");
cshow.hsblbls[1]->box(FL_FLAT_BOX);
cshow.hsblbls[1]->color((Fl_Color)34);
cshow.hsblbls[1]->labelfont(1);
cshow.hsblbls[1]->labelsize(12);
cshow.hsblbls[1]->labelcolor((Fl_Color)2);
} // Fl_Box* cshow.hsblbls[1]
{ cshow.hsblbls[2] = new Fl_Box(195, 219, 75, 20, "Bright(R)");
cshow.hsblbls[2]->box(FL_FLAT_BOX);
cshow.hsblbls[2]->color((Fl_Color)34);
cshow.hsblbls[2]->labelfont(1);
cshow.hsblbls[2]->labelsize(12);
cshow.hsblbls[2]->labelcolor((Fl_Color)235);
} // Fl_Box* cshow.hsblbls[2]
{ Fl_Box* o = new Fl_Box(275, 219, 80, 20, "Alpha(shift)");
o->box(FL_FLAT_BOX);
o->color((Fl_Color)34);
o->labelfont(1);
o->labelsize(12);
o->labelcolor(FL_BACKGROUND2_COLOR);
} // Fl_Box* o
{ cmedit = new class CMedit(5, 239, 380, 270);
cmedit->box(FL_FLAT_BOX);
cmedit->color(FL_BACKGROUND_COLOR);
cmedit->selection_color(FL_BACKGROUND_COLOR);
cmedit->labeltype(FL_NORMAL_LABEL);
cmedit->labelfont(0);
cmedit->labelsize(14);
cmedit->labelcolor(FL_FOREGROUND_COLOR);
cmedit->align(Fl_Align(FL_ALIGN_CENTER));
cmedit->when(FL_WHEN_RELEASE);
Fl_Group::current()->resizable(cmedit);
} // class CMedit* cmedit
{ cshow.color = new colorpatch(62, 515, 50, 40);
cshow.color->box(FL_DOWN_BOX);
cshow.color->color(FL_BACKGROUND_COLOR);
cshow.color->selection_color(FL_BACKGROUND_COLOR);
cshow.color->labeltype(FL_NO_LABEL);
cshow.color->labelfont(0);
cshow.color->labelsize(14);
cshow.color->labelcolor(FL_FOREGROUND_COLOR);
cshow.color->align(Fl_Align(FL_ALIGN_CENTER));
cshow.color->when(FL_WHEN_RELEASE);
} // colorpatch* cshow.color
{ cshow.cindex = new Fl_Value_Input(7, 530, 50, 25, " (index");
cshow.cindex->box(FL_FLAT_BOX);
cshow.cindex->color((Fl_Color)16);
cshow.cindex->maximum(0);
cshow.cindex->step(1);
cshow.cindex->textsize(12);
cshow.cindex->callback((Fl_Callback*)report_cb);
cshow.cindex->align(Fl_Align(FL_ALIGN_TOP));
} // Fl_Value_Input* cshow.cindex
{ cshow.hsba = new Fl_Output(117, 530, 120, 25, "HSBA");
cshow.hsba->box(FL_FLAT_BOX);
cshow.hsba->color((Fl_Color)16);
cshow.hsba->textsize(11);
cshow.hsba->align(Fl_Align(FL_ALIGN_TOP));
} // Fl_Output* cshow.hsba
{ cshow.rgba = new Fl_Output(247, 530, 125, 25, "rgb");
cshow.rgba->box(FL_FLAT_BOX);
cshow.rgba->color((Fl_Color)16);
cshow.rgba->textsize(11);
cshow.rgba->align(Fl_Align(FL_ALIGN_TOP));
} // Fl_Output* cshow.rgba
{ cshow.postscalein = new Fl_Value_Input(317, 570, 65, 25, "* Amax");
//.........这里部分代码省略.........