本文整理汇总了C++中MyWindow::end方法的典型用法代码示例。如果您正苦于以下问题:C++ MyWindow::end方法的具体用法?C++ MyWindow::end怎么用?C++ MyWindow::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MyWindow
的用法示例。
在下文中一共展示了MyWindow::end方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createWindow
//-----------------------------------------------------------------------------
MyWindow* createWindow( int width, int height )
//-----------------------------------------------------------------------------
{
MyWindow* pWindow = new MyWindow( width, height );
if( pWindow->can_do() == 0 )
{
cout << "OpenGL not possible!!" << endl;
}
else
{
cout << "Using OpenGL." << endl;
if( pWindow->can_do_overlay() == 0 )
{
cout << "OpenGL Overlays not possible!!" << endl;
}
else
{
cout << "Using OpenGL Overlays." << endl;
}
//window->clear_border();
gl_font( FL_TIMES, 12 );
Fl::gl_visual( FL_RGB );
pWindow->end();
pWindow->show();
}
return pWindow;
}
示例2: main
int main(int argc, char** argv) {
CrazyContainer *container = new CrazyContainer();
container->loadXML();
MyWindow *window = new MyWindow();
window->setCrazyContainer(container);
Fl_Button *b1 = new Fl_Button(20, 20, 80, 25, "Connect");
b1->callback(connect,(void *)container);
Fl_Button *b2 = new Fl_Button(100, 20, 80, 25, "Go 11000");
b2->callback(run,(void *)container);
FLContainer::thrustOutput = new Fl_Value_Slider(100,50,250,25,"Thrust meter");
FLContainer::thrustOutput->type(FL_HOR_FILL_SLIDER);
FLContainer::thrustOutput->scrollvalue(5000, 100, 5000, 100000);
FLContainer::thrustOutput->callback(runCustomThrust,(void *)container);
FLContainer::pitch = new Fl_Value_Slider(100,100,250,25,"Pitch");
FLContainer::pitch->type(FL_HORIZONTAL);
FLContainer::pitch->scrollvalue(0,10,-180,370);
FLContainer::pitch->precision(2);
FLContainer::roll = new Fl_Value_Slider(100,140,250,25,"Roll");
FLContainer::roll->type(FL_HORIZONTAL);
FLContainer::roll->scrollvalue(0,10,-180,370);
FLContainer::roll->precision(2);
FLContainer::yaw = new Fl_Value_Slider(100,180,250,25,"Yaw");
FLContainer::yaw->type(FL_HORIZONTAL);
FLContainer::yaw->scrollvalue(0,10,-180,370);
FLContainer::yaw->precision(2);
FLContainer::offsetPitch = new Fl_Value_Slider(100,220,250,25,"Offset Pitch");
FLContainer::offsetPitch->type(FL_HORIZONTAL);
FLContainer::offsetPitch->scrollvalue(container->getOffsetPitch(),10,-20,50);
FLContainer::offsetPitch->precision(2);
FLContainer::offsetPitch->callback(setOffsetPitch,(void *)container);
FLContainer::offsetRoll = new Fl_Value_Slider(100,260,250,25,"Offset Roll");
FLContainer::offsetRoll->type(FL_HORIZONTAL);
FLContainer::offsetRoll->scrollvalue(container->getOffsetRoll(),10,-20,50);
FLContainer::offsetRoll->precision(2);
FLContainer::offsetRoll->callback(setOffsetRoll,(void *)container);
Fl_Button *b3 = new Fl_Button(200, 20, 80, 25, "Stop");
b3->callback(stop,(void *)container);
Fl_Button *bfocus = new Fl_Button(20, 45, 80, 25, "Focus");
Fl_Button *b5 = new Fl_Button(400, 20, 80, 25, "Kill n' Exit");
b5->callback(killnstop,(void *)container);
Fl_Button *bsave = new Fl_Button(500, 20, 80, 25, "Plot");
bsave->callback(save,(void *)container);
Fl_Button *bload = new Fl_Button(500, 50, 80, 25, "Load");
bload->callback(load,(void *)container);
window->end();
window->show(argc,argv);
return Fl::run();
}
示例3: createWindow
//-----------------------------------------------------------------------------
MyWindow* createWindow( int width, int height )
//-----------------------------------------------------------------------------
{
MyWindow* pWindow = new MyWindow( width, height );
//pWindow->clear_border();
fl_font( FL_TIMES, 12 );
pWindow->end();
Fl::visual( FL_RGB | FL_DOUBLE | FL_INDEX );
return pWindow;
}