本文整理汇总了C++中Fl_Pack::h方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Pack::h方法的具体用法?C++ Fl_Pack::h怎么用?C++ Fl_Pack::h使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Pack
的用法示例。
在下文中一共展示了Fl_Pack::h方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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);
//.........这里部分代码省略.........
示例2: geMidiLearner
gdMidiInputMaster::gdMidiInputMaster()
: gdMidiInputBase(0, 0, 300, 284, "MIDI Input Setup (global)")
{
set_modal();
Fl_Group* groupHeader = new Fl_Group(G_GUI_OUTER_MARGIN, G_GUI_OUTER_MARGIN, w(), 20);
groupHeader->begin();
enable = new geCheck(G_GUI_OUTER_MARGIN, G_GUI_OUTER_MARGIN, 120, G_GUI_UNIT,
"enable MIDI input");
channel = new geChoice(enable->x()+enable->w()+44, G_GUI_OUTER_MARGIN, 120, G_GUI_UNIT);
groupHeader->resizable(nullptr);
groupHeader->end();
Fl_Pack* pack = new Fl_Pack(G_GUI_OUTER_MARGIN, groupHeader->y()+groupHeader->h()+G_GUI_OUTER_MARGIN,
LEARNER_WIDTH, 212);
pack->spacing(G_GUI_INNER_MARGIN);
pack->begin();
new geMidiLearner(0, 0, LEARNER_WIDTH, "rewind", &cb_learn, &conf::midiInRewind, nullptr);
new geMidiLearner(0, 0, LEARNER_WIDTH, "play/stop", &cb_learn, &conf::midiInStartStop, nullptr);
new geMidiLearner(0, 0, LEARNER_WIDTH, "action recording", &cb_learn, &conf::midiInActionRec, nullptr);
new geMidiLearner(0, 0, LEARNER_WIDTH, "input recording", &cb_learn, &conf::midiInInputRec, nullptr);
new geMidiLearner(0, 0, LEARNER_WIDTH, "metronome", &cb_learn, &conf::midiInMetronome, nullptr);
new geMidiLearner(0, 0, LEARNER_WIDTH, "input volume", &cb_learn, &conf::midiInVolumeIn, nullptr);
new geMidiLearner(0, 0, LEARNER_WIDTH, "output volume", &cb_learn, &conf::midiInVolumeOut, nullptr);
new geMidiLearner(0, 0, LEARNER_WIDTH, "sequencer ×2", &cb_learn, &conf::midiInBeatDouble, nullptr);
new geMidiLearner(0, 0, LEARNER_WIDTH, "sequencer ÷2", &cb_learn, &conf::midiInBeatHalf, nullptr);
pack->end();
ok = new geButton(w()-88, pack->y()+pack->h()+G_GUI_OUTER_MARGIN, 80, G_GUI_UNIT, "Close");
end();
ok->callback(cb_close, (void*)this);
enable->value(conf::midiIn);
enable->callback(cb_enable, (void*)this);
channel->add("Channel (any)");
channel->add("Channel 1");
channel->add("Channel 2");
channel->add("Channel 3");
channel->add("Channel 4");
channel->add("Channel 5");
channel->add("Channel 6");
channel->add("Channel 7");
channel->add("Channel 8");
channel->add("Channel 9");
channel->add("Channel 10");
channel->add("Channel 11");
channel->add("Channel 12");
channel->add("Channel 13");
channel->add("Channel 14");
channel->add("Channel 15");
channel->add("Channel 16");
channel->value(conf::midiInFilter -1 ? 0 : conf::midiInFilter + 1);
channel->callback(cb_setChannel, (void*)this);
u::gui::setFavicon(this);
show();
}