本文整理汇总了C++中Fl_Double_Window类的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Double_Window类的具体用法?C++ Fl_Double_Window怎么用?C++ Fl_Double_Window使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Fl_Double_Window类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main( int argc, char **argv )
{
Fl_Double_Window *win = new Fl_Double_Window( 100, 100, 300, 300, "Flu_Spinner_Try" );
Flu_Spinner *c = new Flu_Spinner( 100, 30, 70, 25, "Float Spinner" );
c->callback( update );
//c->deactivate();
c = new Flu_Spinner( 100, 70, 70, 25, "Int Spinner" );
//c->editable( false );
c->callback( update );
c->step( 1 );
c->range( 0, 10 );
c = new Flu_Spinner( 100, 110, 70, 25, "X: " );
c->callback( update );
c->align( FL_ALIGN_INSIDE );
c->value( 0.5f );
c = new Flu_Spinner( 100, 150, 70, 25, "Wrap Spinner" );
c->callback( update );
c->wrap_range( true );
c->step( 1 );
c->range( 0, 10 );
win->end();
win->resizable( win );
win->show();
return( Fl::run() );
}
示例2: ShowModsGUI
void ShowModsGUI() {
Fl_Double_Window* wind = make_mods_window();
wind->callback([](Fl_Widget* window) {
if(visible_callback) {
visible_callback(false);
}
if(window) {
delete (Fl_Double_Window*)window;
mods_window = nullptr;
}
if(appended_ai_tree) {
Fl_Tree_Item* first = appended_ai_tree->first();
if(first) {
for(int i = 0; i < first->children(); i++) {
delete (int*)(first->child(i)->user_data());
}
}
appended_ai_tree = nullptr;
}
});
wind->show();
visible_callback(true);
}
示例3: 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());
}
示例4: main
int main(int argc, char **argv)
{
//Fl::get_system_colors();
Fl::background(0xEE,0xEE,0xEE);
Fl::background2(0xFF,0xFF,0xFF);
Fl::scheme("gtk+");
CrashHandlerDlg dlg;
Fl_Double_Window* window = dlg.create_window();
dlg.stack_output->buffer(&buffer);
#ifndef _WIN32
std::string path = getenv("HOME");
path += "/.neoeditor/logfile.txt";
buffer.loadfile(path.c_str());
#else
std::string path = getenv("APPDATA");
path += "\\neoeditor\\logfile.txt";
buffer.loadfile(path.c_str());
#endif
window->show();
return Fl::run();
}
示例5: 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();
}
}
示例6: make_window
Fl_Double_Window* make_window() {
Fl_Double_Window* w;
{ Fl_Double_Window* o = controls = new Fl_Double_Window(255, 60, "Rotation Angle");
w = o;
{ Fl_Value_Input* o = angle_value = new Fl_Value_Input(180, 5, 70, 25, "Angle");
o->minimum(-65000);
o->maximum(65000);
o->callback((Fl_Callback*)cb_angle_value);
o->when(FL_WHEN_ENTER_KEY);
}
{ Fl_Roller* o = angle_roller = new Fl_Roller(5, 35, 245, 20);
o->type(1);
o->minimum(65000);
o->maximum(-65000);
o->step(0.1);
o->callback((Fl_Callback*)cb_angle_roller);
}
{ Fl_Button* o = new Fl_Button(70, 5, 55, 25, "next");
o->shortcut(0x66);
o->callback((Fl_Callback*)cb_next);
}
{ Fl_Button* o = new Fl_Button(5, 5, 55, 25, "prev");
o->shortcut(0x64);
o->callback((Fl_Callback*)cb_prev);
}
o->end();
o->resizable(o);
}
{ ImageWindow* o = iw1 = new ImageWindow(100, 100);
w = o;
o->box(FL_FLAT_BOX);
o->color(FL_BACKGROUND_COLOR);
o->selection_color(FL_BACKGROUND_COLOR);
o->labeltype(FL_NO_LABEL);
o->labelfont(0);
o->labelsize(14);
o->labelcolor(FL_FOREGROUND_COLOR);
o->align(FL_ALIGN_TOP);
o->when(FL_WHEN_RELEASE);
o->end();
}
{ ImageWindow* o = iw2 = new ImageWindow(100, 100);
w = o;
o->box(FL_FLAT_BOX);
o->color(FL_BACKGROUND_COLOR);
o->selection_color(FL_BACKGROUND_COLOR);
o->labeltype(FL_NO_LABEL);
o->labelfont(0);
o->labelsize(14);
o->labelcolor(FL_FOREGROUND_COLOR);
o->align(FL_ALIGN_TOP);
o->when(FL_WHEN_RELEASE);
o->end();
}
return w;
}
示例7: Fl_Double_Window
co_rc_t console_window_t::about()
{
Fl_Double_Window *win = new Fl_Double_Window(400, 300);
/* TODO: Add some text here :) */
win->end();
return CO_RC(OK);
}
示例8: main
int main(int argc, char* argv[])
{
Fl_Double_Window *w = new Fl_Double_Window( 340, 160, "uPlayBack" );
Fl_Group *pG = new CPlaybackWindow(0,0,340,160,"");
w->end();
w->resizable(pG);
w->show(argc, argv);
return Fl::run();
}
示例9: Fl_Double_Window
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
}
示例10: Fl_Double_Window
void MainWindow::Execute(void* p)
{
Fl_Double_Window* window = new Fl_Double_Window(ALIAS_WINDOW);
if ( window != NULL )
{
extern HINSTANCE fl_display;
window->icon((char *)LoadIcon(fl_display, MAKEINTRESOURCE(IDI_ICON_MAIN)));
window->label("Automatic Upgrader WIN32");
window->labelsize(DEFAULT_FONT_SIZE);
window->begin();
createComponents();
window->end();
window->show( _argc, _argv );
window->callback(window_callback);
Fl::add_timeout(0.5f, timer_cb, this);
Fl::scheme("plastic");
returnCode = Fl::run();
}
stillAlive = false;
}
示例11: main
int main(int argc, char **argv) {
Fl_Double_Window* w;
{ Fl_Double_Window* o = window_main = new Fl_Double_Window(305, 135, "FLTK window");
w = o;
o->align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE);
input = new Fl_Input(145, 10, 150, 25, "Please enter value:");
{ Fl_Button* o = btnTest = new Fl_Button(10, 100, 100, 25, "Test");
o->callback((Fl_Callback*)bt_callback, (void*)("test"));
}
{ Fl_Return_Button* o = btnClose = new Fl_Return_Button(195, 100, 100, 25, "Close");
o->callback((Fl_Callback*)bt_callback, (void*)("close"));
}
o->end();
}
w->show(argc, argv);
return Fl::run();
}
示例12: main
int main( int argc, char **argv )
{
Fl_Double_Window *win = new Fl_Double_Window( 100, 100, 300, 300, "Flu_Progress_Try" );
Flu_Progress *p1 = new Flu_Progress( 80, 40, 150, 20, "Progress" );
p1->value( 0.25 );
Flu_Progress *p2 = new Flu_Progress( 80, 100, 150, 30, "Progress" );
p2->value( 0.5 );
Flu_Progress *p3 = new Flu_Progress( 80, 170, 150, 20, "Progress" );
p3->value( 0.75 );
Fl_Button *b = new Fl_Button( 130, 220, 40, 30, "Go" );
b->callback( go );
win->end();
win->resizable( win );
win->show();
return( Fl::run() );
}
示例13: main
int main( int argc, char **argv )
{
Fl_Double_Window *win = new Fl_Double_Window( 100, 100, 400, 300, "Flu_Chat_Buffer_Try" );
Flu_Chat_Buffer *b = new Flu_Chat_Buffer( 0, 0, 400, 200 );
Fl_Input *in = new Fl_Input( 80, 210, 100, 30, "Send:" );
in->when( FL_WHEN_ENTER_KEY_ALWAYS );
in->callback( sendMsg, b );
win->end();
win->resizable( win );
b->addSystemMessage( "System message" );
b->addRemoteMessage( "<Remote User> ", "Remote user's message" );
b->addLocalMessage( "<Local User> ", "Local user's message" );
win->show();
return( Fl::run() );
}
示例14: Fl_Double_Window
Fl_Double_Window* UserInterface::makeWindow() {
// make window
Fl_Double_Window* w = new Fl_Double_Window(180, 170);
w->user_data((void*)(this));
// add saw wave button
sawWaveButton = new Fl_Light_Button(25, 25, 125, 25, "Saw &Wave");
sawWaveButton->callback((Fl_Callback*)cb_sawWaveButton, NULL); // (void*)(userdata));
// add midi through button
midiThruButton = new Fl_Light_Button(25, 65, 125, 25, "Midi &Through");
midiThruButton->callback((Fl_Callback*)cb_midiThruButton, NULL);
// add midi to synth button
midiSynthButton = new Fl_Light_Button(25, 105, 125, 25, "Midi to &Synth");
midiSynthButton->callback((Fl_Callback*)cb_midiSynthButton, NULL);
// finish
w->end();
return w;
}
示例15: main
int main() {
fl_open_display();
Fl_Double_Window* win = new Fl_Double_Window(295, 144, "Notify test");
win->begin();
txt = new Fl_Input(10, 15, 275, 25);
txt->align(FL_ALIGN_TOP_LEFT);
color_button = new Fl_Button(260, 50, 25, 25, "Color");
color_button->align(FL_ALIGN_LEFT);
color_button->callback(color_cb);
Fl_Box* bx = new Fl_Box(10, 50, 164, 85, "Type some text and choose color, then press Send. "
"Desktop should get notified about this.");
bx->align(FL_ALIGN_WRAP);
Fl_Button* send_button = new Fl_Button(195, 110, 90, 25, "&Send");
send_button->callback(send_cb);
win->end();
win->show();
return Fl::run();
}