本文整理汇总了C++中Fl_Scroll::box方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Scroll::box方法的具体用法?C++ Fl_Scroll::box怎么用?C++ Fl_Scroll::box使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Scroll
的用法示例。
在下文中一共展示了Fl_Scroll::box方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main() {
Fl_Double_Window *win = new Fl_Double_Window(720,486);
Fl_Scroll *scroll = new Fl_Scroll(10,10,win->w()-20,win->h()-20);
scroll->box(FL_DOWN_BOX);
{
const int deskw = 15000;
const int deskh = 15000;
Fl_OpDesk *opdesk = new Fl_OpDesk(0,0,deskw,deskh);
opdesk->begin();
{
printf("Creating %d boxes\n", (deskw/200)*(deskh/200));
for ( int x=30; x<deskw; x+=200 ) {
for ( int y=30; y<deskh; y+=200 ) {
char s[80];
sprintf(s,"Box %d/%d",x,y);
Fl_OpBox *opbox = new Fl_OpBox(x,y,180,120,strdup(s));
opbox->begin();
{
/*Fl_OpButton *a =*/ new Fl_OpButton("A", FL_OP_INPUT_BUTTON);
/*Fl_OpButton *b =*/ new Fl_OpButton("B", FL_OP_INPUT_BUTTON);
/*Fl_OpButton *c =*/ new Fl_OpButton("CCC", FL_OP_INPUT_BUTTON);
/*Fl_OpButton *d =*/ new Fl_OpButton("OUT1", FL_OP_OUTPUT_BUTTON);
/*Fl_OpButton *e =*/ new Fl_OpButton("OUT2", FL_OP_OUTPUT_BUTTON);
}
opbox->end();
}
}
}
opdesk->end();
}
scroll->end();
win->resizable(win);
win->show();
return(Fl::run());
}
示例2: labelsize
/* 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;
}
示例3: make_window
Fl_Double_Window* SUBnoteUI::make_window() {
{ SUBparameters = new Fl_Double_Window(735, 390, "SUBsynth Parameters");
SUBparameters->user_data((void*)(this));
{ Fl_Scroll* o = new Fl_Scroll(5, 140, 435, 245);
o->type(1);
o->box(FL_THIN_UP_BOX);
{ Fl_Pack* o = harmonics = new Fl_Pack(10, 145, 425, 235);
harmonics->type(1);
for (int i=0;i<MAX_SUB_HARMONICS;i++){h[i]=new SUBnoteharmonic(0,0,15,o->h(),"");h[i]->init(pars,i);}
harmonics->end();
} // Fl_Pack* harmonics
o->end();
} // Fl_Scroll* o
{ Fl_Button* o = new Fl_Button(625, 365, 105, 20, "Close");
o->box(FL_THIN_UP_BOX);
o->labelfont(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_Close);
} // Fl_Button* o
{ Fl_Group* o = new Fl_Group(5, 5, 215, 135, "AMPLITUDE");
o->box(FL_THIN_UP_FRAME);
o->labeltype(FL_EMBOSSED_LABEL);
o->labelfont(1);
o->align(FL_ALIGN_TOP|FL_ALIGN_INSIDE);
{ Fl_Value_Slider* o = vol = new Fl_Value_Slider(10, 25, 140, 15, "Vol");
vol->tooltip("Volume");
vol->type(5);
vol->box(FL_FLAT_BOX);
vol->labelsize(11);
vol->maximum(127);
vol->step(1);
vol->callback((Fl_Callback*)cb_vol);
vol->align(FL_ALIGN_RIGHT);
o->value(pars->PVolume);
} // Fl_Value_Slider* vol
{ Fl_Value_Slider* o = vsns = new Fl_Value_Slider(10, 45, 140, 15, "V.Sns");
vsns->tooltip("Velocity Sensing Function (rightmost to disable)");
vsns->type(5);
vsns->box(FL_FLAT_BOX);
vsns->labelsize(11);
vsns->maximum(127);
vsns->step(1);
vsns->callback((Fl_Callback*)cb_vsns);
vsns->align(FL_ALIGN_RIGHT);
o->value(pars->PAmpVelocityScaleFunction);
} // Fl_Value_Slider* vsns
{ WidgetPDial* o = pan = new WidgetPDial(185, 20, 30, 30, "Pan");
pan->tooltip("Panning (leftmost is Random)");
pan->box(FL_ROUND_UP_BOX);
pan->color(FL_BACKGROUND_COLOR);
pan->selection_color(FL_INACTIVE_COLOR);
pan->labeltype(FL_NORMAL_LABEL);
pan->labelfont(0);
pan->labelsize(10);
pan->labelcolor(FL_FOREGROUND_COLOR);
pan->maximum(127);
pan->step(1);
pan->callback((Fl_Callback*)cb_pan);
pan->align(FL_ALIGN_BOTTOM);
pan->when(FL_WHEN_CHANGED);
o->value(pars->PPanning);
} // WidgetPDial* pan
{ EnvelopeUI* o = ampenv = new EnvelopeUI(10, 65, 205, 70, "SUBsynth - Amplitude Envelope");
ampenv->box(FL_FLAT_BOX);
ampenv->color((Fl_Color)51);
ampenv->selection_color(FL_BACKGROUND_COLOR);
ampenv->labeltype(FL_NORMAL_LABEL);
ampenv->labelfont(0);
ampenv->labelsize(14);
ampenv->labelcolor(FL_FOREGROUND_COLOR);
ampenv->align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE);
ampenv->when(FL_WHEN_RELEASE);
o->init(pars->AmpEnvelope,master);
ampenv->end();
} // EnvelopeUI* ampenv
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(495, 325, 235, 35);
o->box(FL_THIN_UP_FRAME);
{ Fl_Counter* o = filterstages = new Fl_Counter(515, 340, 45, 15, "Filter Stages");
filterstages->tooltip("How many times the noise is filtered");
filterstages->type(1);
filterstages->labelfont(1);
filterstages->labelsize(10);
filterstages->minimum(1);
filterstages->maximum(5);
filterstages->step(1);
filterstages->textsize(10);
filterstages->callback((Fl_Callback*)cb_filterstages);
filterstages->align(FL_ALIGN_TOP);
o->value(pars->Pnumstages);
} // Fl_Counter* filterstages
{ Fl_Choice* o = magtype = new Fl_Choice(585, 340, 65, 15, "Mag.Type");
magtype->down_box(FL_BORDER_BOX);
magtype->labelfont(1);
magtype->labelsize(10);
magtype->textsize(11);
magtype->callback((Fl_Callback*)cb_magtype);
magtype->align(FL_ALIGN_TOP);
magtype->menu(menu_magtype);
//.........这里部分代码省略.........
示例4: 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();
}