本文整理汇总了C++中Fl_Value_Slider类的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Value_Slider类的具体用法?C++ Fl_Value_Slider怎么用?C++ Fl_Value_Slider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Fl_Value_Slider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: VOID_TO_ASGWIN
/* Callback function for the render out button. */
void AnimatedSGWindow::timelineCB(Fl_Widget *w, void *data)
{
VOID_TO_ASGWIN(data);
Fl_Value_Slider* timeline = (Fl_Value_Slider*)(w);
std::cout << "Frame #" << timeline->value() << std::endl;
/* Change the dials to the current transformation values */
aSGWin->setTransformationG();
aSGWin->setColorChooser();
/* Change the transformation num in the GLWindow */
aSGWin->glWin->setTransformNum((unsigned int)timeline->value());
aSGWin->glWin->redraw();
}
示例2: ModelerUserInterface
void ModelerApplication::Init(ModelerViewCreator_f createView,
const ModelerControl controls[], unsigned numControls)
{
int i;
m_animating = false;
m_numControls = numControls;
// ********************************************************
// Create the FLTK user interface
// ********************************************************
m_ui = new ModelerUserInterface();
// Store pointers to the controls for manipulation
m_controlLabelBoxes = new Fl_Box*[numControls];
m_controlValueSliders = new Fl_Value_Slider*[numControls];
// Constants for user interface setup
const int textHeight = 20;
const int sliderHeight = 20;
const int packWidth = m_ui->m_controlsPack->w();
m_ui->m_controlsPack->begin();
// For each control, add appropriate objects to the user interface
for (i=0; i<m_numControls; i++)
{
// Add the entry to the selection box
m_ui->m_controlsBrowser->add(controls[i].m_name);
// Add the label (but make it invisible for now)
Fl_Box *box = new Fl_Box(0, 0, packWidth, textHeight, controls[i].m_name);
box->labelsize(10);
box->hide();
box->box(FL_FLAT_BOX); // otherwise, Fl_Scroll messes up (ehsu)
m_controlLabelBoxes[i] = box;
// Add the slider (but make it invisible for now)
Fl_Value_Slider *slider = new Fl_Value_Slider(0, 0, packWidth, sliderHeight,0);
slider->type(1);
slider->range(controls[i].m_minimum, controls[i].m_maximum);
slider->step(controls[i].m_stepsize);
slider->value(controls[i].m_value);
slider->hide();
m_controlValueSliders[i] = slider;
slider->callback((Fl_Callback*)ModelerApplication::SliderCallback);
}
m_ui->m_controlsPack->end();
// Make sure that we remove the view from the
// Fl_Group, otherwise, it'll blow up
// THIS BUG FIXED 04-18-01 ehsu
m_ui->m_modelerWindow->remove(*(m_ui->m_modelerView));
delete m_ui->m_modelerView;
m_ui->m_modelerWindow->begin();
m_ui->m_modelerView = createView(0, 0, m_ui->m_modelerWindow->w(), m_ui->m_modelerWindow->h() ,NULL);
Fl_Group::current()->resizable(m_ui->m_modelerView);
m_ui->m_modelerWindow->end();
}
示例3: main
int main(int argc, char **argv) {
Fl_Window *w;
{Fl_Window* o = new Fl_Window(365, 525);
w = o;
scroll = new Fl_Scroll(10,10,345,285);
{Fl_Pack* o = new Fl_Pack(10, 10, 345, 285);
pack = o;
o->box(FL_DOWN_BOX);
//o->box(FL_ENGRAVED_FRAME);
(void) new Fl_Button(35, 35, 25, 25, "b1");
(void) new Fl_Button(45, 45, 25, 25, "b2");
(void) new Fl_Button(55, 55, 25, 25, "b3");
(void) new Fl_Button(65, 65, 25, 25, "b4");
(void) new Fl_Button(75, 75, 25, 25, "b5");
(void) new Fl_Button(85, 85, 25, 25, "b6");
(void) new Fl_Button(95, 95, 25, 25, "b7");
(void) new Fl_Button(105, 105, 25, 25, "b8");
(void) new Fl_Button(115, 115, 25, 25, "b9");
(void) new Fl_Button(125, 125, 25, 25, "b10");
(void) new Fl_Button(135, 135, 25, 25, "b11");
(void) new Fl_Button(145, 145, 25, 25, "b12");
(void) new Fl_Button(155, 155, 25, 25, "b13");
(void) new Fl_Button(165, 165, 25, 25, "b14");
(void) new Fl_Button(175, 175, 25, 25, "b15");
(void) new Fl_Button(185, 185, 25, 25, "b16");
(void) new Fl_Button(195, 195, 25, 25, "b17");
(void) new Fl_Button(205, 205, 25, 25, "b18");
(void) new Fl_Button(215, 215, 25, 25, "b19");
(void) new Fl_Button(225, 225, 25, 25, "b20");
(void) new Fl_Button(235, 235, 25, 25, "b21");
(void) new Fl_Button(245, 245, 25, 25, "b22");
(void) new Fl_Button(255, 255, 25, 25, "b23");
(void) new Fl_Button(265, 265, 25, 25, "b24");
o->end();
w->resizable(o);
}
scroll->end();
{Fl_Light_Button* o = new Fl_Light_Button(10, 325, 175, 25, "HORIZONTAL");
o->type(FL_RADIO_BUTTON);
o->callback((Fl_Callback*)type_cb, (void*)(Fl_Pack::HORIZONTAL));
}
{Fl_Light_Button* o = new Fl_Light_Button(10, 350, 175, 25, "VERTICAL");
o->type(FL_RADIO_BUTTON);
o->value(1);
o->callback((Fl_Callback*)type_cb, (void*)(Fl_Pack::VERTICAL));
}
{Fl_Value_Slider* o = new Fl_Value_Slider(50,375, 295,25,"spacing:");
o->clear_flag(FL_ALIGN_MASK);
o->set_flag(FL_ALIGN_LEFT);
o->type(Fl_Slider::HORIZONTAL);
o->range(0,30);
o->step(1);
o->callback((Fl_Callback*)spacing_cb);
}
w->end();
}
w->show(argc, argv);
return Fl::run();
}
示例4: Fl_Box
void ModelerUI::addControl(const char* szName, float fMin, float fMax, float fStepSize, float fInitVal)
{
Fl_Group* pgrpCurrBak = Fl_Group::current();
Fl_Group::current(m_ppckPack);
const int k_iTextHeight = 20;
const int k_iSliderHeight = 20;
// Setup the label box
Fl_Box* box = new Fl_Box(0, 0, m_ppckPack->w(), k_iTextHeight, szName);
box->labelsize(10);
box->hide();
box->box(FL_FLAT_BOX); // otherwise, Fl_Scroll messes up (ehsu)
// Setup the slider
Fl_Value_Slider *slider = new Fl_Value_Slider(0, 0, m_ppckPack->w(), k_iSliderHeight, 0);
slider->type(1);
slider->hide();
slider->user_data(this);
slider->callback(cb_sliders);
slider->range(fMin, fMax);
slider->step(fStepSize);
slider->value(fInitVal);
Fl_Group::current(pgrpCurrBak);
// Add this entry to the browser
string strName = "@C0"; // FLTK color encoding, we'll use @[email protected]
strName += szName;
m_pbrsBrowser->add(strName.c_str());
// Setup the curve
m_pwndGraphWidget->addCurve(fInitVal, fMin, fMax);
++m_iCurrControlCount;
}
示例5: main
int main(int argc, char** argv) {
temp = argc;
temp2 = argv;
//All the FLTK controls
Fl_Window win (500,500, "window");
//Title Box
Fl_Box title(-5,-5,510,50,"Teapot Finder!");
title.box(FL_UP_BOX);
title.labelsize(36);
title.labelfont(FL_BOLD+FL_ITALIC);
//Description section
Fl_Multiline_Output desc(0,45,500,250,"");
desc.value(
" Welcome to Teapot Finder. This is a maze game, find the spinning teapot!\n\nControls:\n\t~Drag the mouse along the x axis (side to side) to control the camera.\n\t~Use the arrow keys to navigate the maze\n\t~Click the right mouse button for a bird's eye view\n\nSetup:\n\t~Choose the level of difficulty on the slider below (5=easy, 20=hard).\n\t Then, choose your player!\n\nDescription:\n\t~In this game you must navigate through a maze and find the spinning\n\t teapot. But be aware! Every time you find the teapot, it changes\n\t location and maze regenerates! Find the teapot 5 times to win!");
//Maze size slider, still getting a seg fault if never moved
Fl_Value_Slider sizeSlider (100,300,300,50,"Maze Size (Must Slide To Prevent Seg Fault)");
sizeSlider.type(FL_HORIZONTAL);
sizeSlider.value(5);
sizeSlider.minimum(5);
sizeSlider.maximum(20);
sizeSlider.step(1);
sizeSlider.callback(sizeCB);
//Buttons for different player shapes
Fl_Button sphereButton (50,400,120,25,"Super Sphere");
sphereButton.callback (sphereCB);
Fl_Button cubeButton (200, 400, 120, 25, "Courageous Cube");
cubeButton.callback (cubeCB);
Fl_Button donughtButton (350, 400, 120, 25, "Doughnut!");
donughtButton.callback (donughtCB);
win.end();
win.show();
return Fl::run();
return 0;
}
示例6: main
int main (int argc, char **argv) {
Fl_Window* w;
fl_init_locale_support("ewmconf", PREFIX"/share/locale");
readConfiguration();
{Fl_Window* o = new Fl_Window(320, 370, _("Window manager settings"));
w = o;
{Fl_Tabs* o = new Fl_Tabs(2, 5, 318, 325);
o->color((Fl_Color)16);
{Fl_Group* o = new Fl_Group(1, 29, 316, 295, _("&Titlebar"));
o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT);
{Fl_Choice* o = new Fl_Choice(83, 13, 105, 22, _("Text align:")); o->begin();
o->callback((Fl_Callback*)cb_Text);
new Fl_Item(_("Left"));
new Fl_Item(_("Right"));
new Fl_Item(_("Center"));
o->value(title_align);
o->end();
}
{Fl_Value_Input* o = new Fl_Value_Input(243, 13, 60, 22, _("Height:"));
o->minimum(10);
o->maximum(50);
o->step(1);
o->value(20);
o->callback((Fl_Callback*)cb_Height);
o->value(title_height);
}
{Fl_Button* o = titlebarLabelColorButton = new Fl_Button(85, 55, 60, 20, _("Titlebar label color: "));
o->box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_titlebarLabelColorButton);
o->align(132);
o->color((Fl_Color)title_normal_color_text);
}
{Fl_Button* o = titlebarColorButton = new Fl_Button(85, 120, 60, 20, _("Titlebar color: "));
o->box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_titlebarColorButton);
o->align(132);
o->color((Fl_Color) title_normal_color);
}
{Fl_Group* o = new Fl_Group(153, 45, 160, 110);
{Fl_Button* o = titlebarActiveLabelColorButton = new Fl_Button(90, 10, 60, 20, _("Titlebar active label color: "));
o->box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_titlebarActiveLabelColorButton);
o->align(132);
o->color((Fl_Color) title_active_color_text);
}
{Fl_Button* o = titlebarActiveColorButton = new Fl_Button(90, 75, 60, 20, _("Titlebar active color: "));
o->box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_titlebarActiveColorButton);
o->align(132);
o->color((Fl_Color)title_active_color);
}
o->end();
}
{Fl_Choice* o = titlebarDrawGrad = new Fl_Choice(85, 157, 163, 23, _("Box type:")); o->begin();
o->callback((Fl_Callback*)cb_titlebarDrawGrad);
o->align(132);
new Fl_Item(_("Flat"));
new Fl_Item(_("Horizontal shade"));
new Fl_Item(_("Thin down"));
new Fl_Item(_("Up box"));
new Fl_Item(_("Down box"));
new Fl_Item(_("Plastic"));
o->value(title_draw_grad);
o->end();
}
{Fl_Check_Button* o = useThemeButton = new Fl_Check_Button(8, 220, 300, 20, _("&Use theme"));
o->callback((Fl_Callback*)cb_useThemeButton);
o->value(use_theme);
}
{Fl_Input* o = themePathInput = new Fl_Input(65, 247, 210, 23, _("Path:"));
o->callback((Fl_Callback*)cb_themePathInput);
o->deactivate();
themePathInput->value(theme_path);
}
{Fl_Button* o = browse_btn = new Fl_Button(280, 247, 25, 23, _("..."));
o->callback((Fl_Callback*)cb_browse_btn);
o->deactivate();
}
{Fl_Divider* o = new Fl_Divider(8, 190, 300, 25, _("label"));
o->color((Fl_Color)16);
}
{Fl_Divider* o = new Fl_Divider(8, 85, 297, 25, _("label"));
o->color((Fl_Color)16);
}
o->end();
}
{Fl_Group* o = new Fl_Group(3, 20, 310, 305, _("&Resizing"));
o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT);
o->hide();
{Fl_Check_Button* o = animateButton = new Fl_Check_Button(10, 10, 300, 20, _("Animate size changes"));
o->value(1);
o->callback((Fl_Callback*)cb_animateButton);
o->value(animate);
}
{Fl_Value_Slider* o = animateSlider = new Fl_Value_Slider(70, 35, 235, 20, _("Speed:"));
o->type(Fl_Value_Slider::HORIZONTAL|Fl_Slider::TICK_ABOVE);
o->box(FL_DOWN_BOX);
o->text_size(10);
o->minimum(5);
//.........这里部分代码省略.........
示例7: Fl_Double_Window
ct_image_window::ct_image_window( ) {
Fl_Double_Window* w;
{ Fl_Double_Window* o = image_window = new Fl_Double_Window(421, 528);
w = o;
o->user_data((void*)(this));
{ Fl_Group* o = new Fl_Group(5, 30, 410, 410);
o->box(FL_PLASTIC_DOWN_FRAME);
{ ct_draw_area* o = ct_image = new ct_draw_area(10, 35, 400, 400, "label");
o->box(FL_FLAT_BOX);
o->color(FL_DARK3);
o->selection_color(FL_BACKGROUND_COLOR);
o->labeltype(FL_NORMAL_LABEL);
o->labelfont(0);
o->labelsize(14);
o->labelcolor(FL_BLACK);
o->align(FL_ALIGN_CENTER);
o->when(FL_WHEN_RELEASE);
}
o->end();
}
{ Fl_Menu_Bar* o = new Fl_Menu_Bar(0, 0, 100, 25);
o->box(FL_FLAT_BOX);
o->menu(menu_);
}
{ Fl_Value_Slider* o = WL = new Fl_Value_Slider(40, 470, 375, 20, "WL");
o->type(1);
o->box(FL_PLASTIC_THIN_DOWN_BOX);
o->minimum(-2000);
o->maximum(7000);
o->step(1);
o->value(40);
o->callback((Fl_Callback*)cb_WL);
o->align(FL_ALIGN_LEFT);
}
{ Fl_Value_Slider* o = WW = new Fl_Value_Slider(40, 495, 375, 20, "WW");
o->type(1);
o->box(FL_PLASTIC_THIN_DOWN_BOX);
o->minimum(1);
o->maximum(4000);
o->step(1);
o->value(300);
o->callback((Fl_Callback*)cb_WW);
o->align(FL_ALIGN_LEFT);
}
{ Fl_Value_Slider* o = Indx = new Fl_Value_Slider(40, 445, 375, 20, "Indx");
o->type(1);
o->box(FL_PLASTIC_THIN_DOWN_BOX);
o->step(1);
o->callback((Fl_Callback*)cb_Indx);
o->align(FL_ALIGN_LEFT);
}
{ Fl_Progress* o = progress_bar = new Fl_Progress(115, 5, 300, 20);
o->box(FL_PLASTIC_THIN_UP_BOX);
o->selection_color((Fl_Color)1);
o->hide();
}
o->end();
}
}
示例8: Fl_Window
BrushConfigUI::BrushConfigUI() {
Fl_Window* w;
{ Fl_Window* o = mainWindow = new Fl_Window(234, 116, "Brush Property");
w = o;
o->user_data((void*)(this));
/*{ Fl_Group* o = new Fl_Group(5, 25, 120, 55, "Brush Type:");
o->box(FL_ENGRAVED_FRAME);
{ Fl_Round_Button* o = round = new Fl_Round_Button(9, 30, 111, 25, "Round Brush");
o->type(102);
o->down_box(FL_ROUND_DOWN_BOX);
o->callback((Fl_Callback*)cb_round);
}
{ Fl_Check_Button* o = square = new Fl_Check_Button(6, 50, 111, 28, "Square Brush");
o->type(102);
o->down_box(FL_DIAMOND_DOWN_BOX);
o->callback((Fl_Callback*)cb_square);
}
o->end();
}*/
{ Fl_Value_Slider* o = brushSize = new Fl_Value_Slider(70, 25, 90, 20, "Brush Size:");
o->type(1);
o->maximum(20);
o->step(1);
o->value(10);
o->callback((Fl_Callback*)cb_brushSize);
o->align(FL_ALIGN_TOP);
o->when(FL_WHEN_RELEASE);
}
{ Fl_Value_Slider* o = brushOpacity = new Fl_Value_Slider(70, 60, 90, 19, "Brush Opacity:");
o->type(1);
o->value(1);
o->callback((Fl_Callback*)cb_brushOpacity);
o->align(FL_ALIGN_TOP);
o->when(FL_WHEN_RELEASE);
}
{ Fl_Button* o = new Fl_Button(5, 90, 107, 25, "Clean All");
o->callback((Fl_Callback*)cb_Clean);
}
{ Fl_Button* o = new Fl_Button(128, 90, 102, 25, "Close");
o->callback((Fl_Callback*)cb_Close);
}
o->end();
}
}
示例9: Fl_Double_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);
//.........这里部分代码省略.........
示例10: initParamWindow
void initParamWindow() {
const int heightInput = 28;
const int wideLabel = 205;
const int wideInput = 130;
const int between = 5;
const int Ybetween = 3;
const int YbetweenMore = 6;
const int alignStyle = FL_ALIGN_INSIDE | FL_ALIGN_RIGHT;
const Fl_Boxtype inputStyle = FL_PLASTIC_DOWN_BOX;
int x = 10;
int y = 10;
const int wide = x+wideLabel+between+wideInput+x;
const int height = y + 14*(heightInput+Ybetween) - Ybetween + 9*YbetweenMore + y;
paramWindow = new Fl_Window( wide, height, _("Parameters") );
Fl_Group* win2 = new Fl_Group( 0, 0, wide, height );
paramWindow->resizable(win2);
{
Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Schema size:") );
o->align( alignStyle );
}
{
Fl_Value_Slider* o = new Fl_Value_Slider( x+wideLabel+between, y, wideInput, heightInput );
o->box(inputStyle);
o->type(FL_HORIZONTAL);
o->minimum(0);
o->maximum(1);
o->value(glito->getCloseEdge());
o->step(0.01);
o->callback( (Fl_Callback*)closeEdge_param, glito );
}
y += heightInput + Ybetween;
{
Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Preview Size:") );
o->align( alignStyle );
}
{
Fl_Value_Slider* o = new Fl_Value_Slider( x+wideLabel+between, y, wideInput, heightInput );
o->box(inputStyle);
o->type(FL_HORIZONTAL);
o->minimum(0);
o->maximum(1);
o->value(glito->getPreviewSize());
o->step(0.01);
o->callback( (Fl_Callback*)previewSize_param, glito );
}
y += heightInput + Ybetween + YbetweenMore;
{
Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Rotation shift (rad):") );
o->align( alignStyle );
}
{
Fl_Value_Slider* o = new Fl_Value_Slider( x+wideLabel+between, y, wideInput, heightInput );
o->box(inputStyle);
o->type(FL_HORIZONTAL);
o->minimum(0.002);
o->maximum(0.2);
o->value(glito->rotationShift);
o->step(0.001);
o->callback( (Fl_Callback*)rotationShift_param, glito );
}
y += heightInput + Ybetween + YbetweenMore;
{
Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Size of saved images:") );
o->align( alignStyle );
}
{
Fl_Int_Input* o = new Fl_Int_Input( x+wideLabel+between, y, wideInput/2-5, heightInput );
o->box(inputStyle);
o->value(IS::translate(glito->imageSavedWidth).c_str());
o->callback( (Fl_Callback*)imageSavedWidth_param, glito );
}
{
Fl_Box* o = new Fl_Box( x+wideLabel+between+wideInput/2-5, y, 10, heightInput, "x" );
o->align( FL_ALIGN_INSIDE | FL_ALIGN_CENTER );
}
{
Fl_Int_Input* o = new Fl_Int_Input( x+wideLabel+between+wideInput/2+5, y,
wideInput/2-5, heightInput );
o->box(inputStyle);
o->value(IS::translate(glito->imageSavedHeight).c_str());
o->callback( (Fl_Callback*)imageSavedHeight_param, glito );
}
y += heightInput + Ybetween;
{
Fl_Box* o = new Fl_Box( x, y, wideLabel, heightInput, _("Size of animations:") );
o->align( alignStyle );
}
{
Fl_Int_Input* o = new Fl_Int_Input( x+wideLabel+between, y, wideInput/2-5, heightInput );
o->box(inputStyle);
o->value(IS::translate(glito->animationSavedWidth).c_str());
o->callback( (Fl_Callback*)animationSavedWidth_param, glito );
}
{
Fl_Box* o = new Fl_Box( x+wideLabel+between+wideInput/2-5, y, 10, heightInput, "x" );
o->align( FL_ALIGN_INSIDE | FL_ALIGN_CENTER );
}
{
Fl_Int_Input* o = new Fl_Int_Input( x+wideLabel+between+wideInput/2+5, y,
wideInput/2-5, heightInput );
//.........这里部分代码省略.........
示例11: sizeCB
//Get maze size
void sizeCB(Fl_Widget* o, void*) {
Fl_Value_Slider* gettingValue = (Fl_Value_Slider*)o;
theSize=gettingValue->value();
}
示例12: main
int main (int argc, char **argv) {
Fl_Window* w;
fl_init_locale_support("eiconsconf", PREFIX"/share/locale");
readIconsConfiguration();
{Fl_Window* o = iconsConfWindow = new Fl_Window(265, 314, _("Icons settings"));
w = o;
o->shortcut(0xff1b);
{Fl_Button* o = new Fl_Button(25, 280, 75, 25, _("&OK"));
o->callback((Fl_Callback*)cb_OK);
}
{Fl_Button* o = new Fl_Button(185, 280, 75, 25, _("&Cancel"));
o->callback((Fl_Callback*)cb_Cancel);
}
{Fl_Button* o = new Fl_Button(105, 280, 75, 25, _("&Apply"));
o->callback((Fl_Callback*)cb_Apply);
}
{Fl_Tabs* o = new Fl_Tabs(3, 5, 257, 265);
o->color((Fl_Color)0xfffffffe);
{Fl_Group* o = new Fl_Group(1, 23, 255, 241, _("Look&&feel"));
o->align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
{Fl_Button* o = colorButton = new Fl_Button(165, 17, 60, 18, _("Background color: "));
o->box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_colorButton);
o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
o->color((Fl_Color) label_background);
if(label_trans) o->deactivate();
}
{Fl_Button* o = colorButton1 = new Fl_Button(165, 47, 60, 18, _("Label color: "));
o->box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_colorButton1);
o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
o->color((Fl_Color) label_foreground);
}
{Fl_Value_Slider* o = maxWidthSlider = new Fl_Value_Slider(115, 95, 125, 20, _("Maximum width: "));
o->type(Fl_Value_Slider::HORIZONTAL);
o->minimum(48);
o->maximum(200);
o->step(1);
o->value(50);
o->slider_size(10);
o->callback((Fl_Callback*)cb_maxWidthSlider);
o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
o->value(label_maxwidth);
}
{Fl_Value_Slider* o = fontsizeSlider = new Fl_Value_Slider(115, 125, 125, 20, _("Font height: "));
o->type(Fl_Value_Slider::HORIZONTAL|Fl_Slider::TICK_ABOVE);
o->minimum(8);
o->maximum(48);
o->step(1);
o->value(10);
o->slider_size(10);
o->callback((Fl_Callback*)cb_fontsizeSlider);
o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
o->value(label_fontsize);
}
{Fl_Value_Slider* o = gridspaceSlider = new Fl_Value_Slider(115, 155, 125, 20, _("Grid spacing: "));
o->type(Fl_Value_Slider::HORIZONTAL|Fl_Slider::TICK_ABOVE);
o->minimum(1);
o->maximum(50);
o->step(1);
o->value(10);
o->slider_size(10);
o->callback((Fl_Callback*)cb_gridspaceSlider);
o->align(FL_ALIGN_LEFT|FL_ALIGN_WRAP);
o->value(label_gridspacing);
}
{Fl_Check_Button* o = autoArrButton = new Fl_Check_Button(25, 215, 222, 20, _("Auto arrange icons"));
o->callback((Fl_Callback*)cb_autoArrButton);
o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_CLIP);
o->value(auto_arr);
}
{Fl_Check_Button* o = engageButton = new Fl_Check_Button(25, 190, 222, 20, _("Engage with just one click"));
o->callback((Fl_Callback*)cb_engageButton);
o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_CLIP);
o->value(label_engage_1click);
}
{Fl_Check_Button* o = bg_color_check = new Fl_Check_Button(227, 17, 20, 18);
o->callback((Fl_Callback*)cb_bg_color_check);
o->tooltip(_("Clear this, to get transparent background."));
if(!label_trans) o->set_value();
}
o->end();
}
o->end();
}
o->end();
o->resizable(o);
}
w->show(argc, argv);
return Fl::run();
}
示例13: make_window
Fl_Double_Window* make_window() {
Fl_Double_Window* w;
{Fl_Double_Window* o = new Fl_Double_Window(560, 489);
w = o;
o->type(241);
{Fl_Box* o = imbox = new Fl_Box(5, 30, 385, 455);
o->box(FL_ENGRAVED_BOX);
o->align(FL_ALIGN_CLIP);
Fl_Group::current()->resizable(o);
}
{Fl_Box* o = filename_box = new Fl_Box(5, 5, 385, 20, "No file loaded...");
o->box(FL_THIN_DOWN_BOX);
o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
}
{Fl_Group* o = new Fl_Group(395, 5, 160, 480);
o->box(FL_THIN_DOWN_BOX);
{Fl_Button* o = new Fl_Button(10, 10, 140, 25, "Load File");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)cb_Load);
}
{Fl_Button* o = new Fl_Button(10, 40, 140, 25, "Exit");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)cb_Exit);
}
new Fl_Divider(10, 75, 140, 15, "label");
{Fl_Button* o = new Fl_Button(10, 100, 140, 25, "Fit To Box");
o->type(Fl_Button::TOGGLE);
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)cb_Fit);
}
{Fl_Button* o = new Fl_Button(10, 130, 140, 25, "Tile");
o->type(Fl_Button::TOGGLE);
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)cb_Tile);
}
{Fl_Choice* o = filter_choice = new Fl_Choice(10, 335, 140, 25, "Filter:"); o->begin();
o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT);
o->tooltip("Choose filter");
{Fl_Item* o = new Fl_Item("None");
o->user_data((void*)(0));
}
{Fl_Item* o = new Fl_Item("Brightness");
o->user_data((void*)(FILTER_BRIGHTNESS));
}
{Fl_Item* o = new Fl_Item("Contrast");
o->user_data((void*)(FILTER_CONTRAST));
}
{Fl_Item* o = new Fl_Item("Grayscale");
o->user_data((void*)(FILTER_GRAYSCALE));
}
{Fl_Item* o = new Fl_Item("Gamma");
o->user_data((void*)(FILTER_GAMMA));
}
{Fl_Item* o = new Fl_Item("Fore Blend");
o->user_data((void*)(FILTER_FOREBLEND));
}
{Fl_Item* o = new Fl_Item("Back Blend");
o->user_data((void*)(FILTER_BACKBLEND));
}
o->end();
}
{Fl_Box* o = new Fl_Box(10, 160, 140, 160);
o->parent()->resizable(o);
}
{Fl_Value_Slider* o = Rslider = new Fl_Value_Slider(25, 380, 125, 15, "R");
o->type(Fl_Value_Slider::HORIZONTAL);
o->label_size(10);
o->text_size(10);
o->minimum(-3);
o->maximum(3);
o->value(1);
o->slider_size(5);
o->align(FL_ALIGN_LEFT);
o->tooltip("Red value for filter");
}
{Fl_Value_Slider* o = Gslider = new Fl_Value_Slider(25, 400, 125, 15, "G");
o->type(Fl_Value_Slider::HORIZONTAL);
o->label_size(10);
o->text_size(10);
o->minimum(-3);
o->maximum(3);
o->value(1);
o->slider_size(5);
o->align(FL_ALIGN_LEFT);
o->tooltip("Green value for filter");
}
{Fl_Value_Slider* o = Bslider = new Fl_Value_Slider(25, 420, 125, 15, "B");
o->type(Fl_Value_Slider::HORIZONTAL);
o->label_size(10);
o->text_size(10);
o->minimum(-3);
o->maximum(3);
o->value(1);
o->slider_size(5);
o->align(FL_ALIGN_LEFT);
o->tooltip("Blue value for filter");
}
{Fl_Button* o = new Fl_Button(10, 445, 140, 25, "Apply");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)cb_Apply);
//.........这里部分代码省略.........
示例14: Fl_Double_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;
}
示例15: make_window
Fl_Window * make_window()
{
Fl_Window * w;
{
Fl_Window * o = main_window = new Fl_Window(741, 622, "ASF/AMC Motion Capture Player");
w = o;
{
Fl_Group * o = new Fl_Group(10, 485, 615, 140);
{
Fl_Button * o = loadSkeleton_button = new Fl_Button(10, 495, 120, 40, "Load Skeleton");//***
o->callback((Fl_Callback *)load_callback);
}
{
Fl_Button * o = loadMotion_button = new Fl_Button(140, 495, 120, 40, "Load Motion"); //***
o->callback((Fl_Callback *)load_callback);
}
// "Reload motion" always reload the last skeleton loaded
{
Fl_Button * o = reloadMotion_button = new Fl_Button(270, 495, 120, 40, "Reload Motion");//***
o->callback((Fl_Callback *)reload_callback);
}
{
Fl_Button * o = resetScene_button = new Fl_Button(400, 495, 120, 40, "Reset Scene");
o->callback((Fl_Callback *)resetScene_callback);
}
{
Fl_Light_Button* o = record_button = new Fl_Light_Button(380, 575, 40, 25, "R");
o->callback((Fl_Callback *)record_callback, (void*)(0));
}
{
Fl_Button * o = screenShot_button = new Fl_Button(280, 575, 90, 25, "ScreenShot");
o->callback((Fl_Callback *)saveScreenToFile_callback);
}
{
Fl_Button * o = pause_button = new Fl_Button(430, 575, 35, 25, "@||");
o->labeltype(FL_SYMBOL_LABEL);
o->labelsize(12);
o->callback((Fl_Callback *)play_callback);
}
{
Fl_Button* o = rewind_button = new Fl_Button(465, 575, 35, 25, "@|<");
o->labeltype(FL_SYMBOL_LABEL);
o->labelsize(12);
o->callback((Fl_Callback *)play_callback);
}
{
Fl_Button* o = play_button = new Fl_Button(500, 575, 35, 25, "@>");
o->labeltype(FL_SYMBOL_LABEL);
o->labelsize(12);
o->callback((Fl_Callback *)play_callback, (void*)(0));
}
{
Fl_Button* o = minusOne_button = new Fl_Button(535, 575, 35, 25, "-1");
o->labeltype(FL_SYMBOL_LABEL);
o->labelsize(12);
o->callback((Fl_Callback *)play_callback, (void*)(0));
}
{
Fl_Button* o = plusOne_button = new Fl_Button(570, 575, 35, 25, "+1");
o->labeltype(FL_SYMBOL_LABEL);
o->labelsize(12);
o->callback((Fl_Callback *)play_callback, (void*)(0));
}
{
Fl_Button* o = repeat_button = new Fl_Button(605, 575, 35, 25, "@<->");
o->labeltype(FL_SYMBOL_LABEL);
o->labelsize(12);
o->callback((Fl_Callback *)play_callback, (void*)(0));
}
o->end();
} // FL_group
{
Player_Gl_Window * o = glwindow = new Player_Gl_Window(5, 5, 640, 480, "label");
o->box(FL_DOWN_FRAME);
o->labeltype(FL_NO_LABEL);
}
{
Fl_Value_Slider* o = frame_slider = new Fl_Value_Slider(10, 545, 630, 20); // slider
o->type(5);
o->labelsize(18);
o->minimum(1);
o->maximum(60000);
o->step(1);
o->callback((Fl_Callback*)fslider_callback, (void*)(0));
o->align(197);
}
{
Fl_Value_Input* o = speedUp = new Fl_Value_Input(65, 575, 40, 25, "Speed");
o->minimum(0);
o->value(1);
o->callback((Fl_Callback*)playSpeed_callback);
//.........这里部分代码省略.........