本文整理汇总了C++中Fl_Double_Window::child方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Double_Window::child方法的具体用法?C++ Fl_Double_Window::child怎么用?C++ Fl_Double_Window::child使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Double_Window
的用法示例。
在下文中一共展示了Fl_Double_Window::child方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main (int argc, char ** argv)
{
Fl_Double_Window *window;
fl_register_images();
//static Fl_GIF_Image image_img1 ("lines.gif");
window = new Fl_Double_Window (850, 590,"RC Practice Utility v1.0");
#ifdef WIN32
window->icon((char*)LoadIcon(fl_display, MAKEINTRESOURCE(101)));
#endif /*WIN32*/
Fl_Button *But_Nxt,*But_Prev, *But_random;
p_no = new Fl_Input(90,5,50,30);
But_A= new Fl_Button( 430, 510, 80, 30, "A" );
But_A->labelsize(16);
But_A->labelfont(FL_BOLD);
But_A->callback(Btn_A);
But_B= new Fl_Button( 512, 510, 80, 30, "B" );
But_B->labelsize(16);
But_B->labelfont(FL_BOLD);
But_B->callback(Btn_B);
But_C= new Fl_Button( 594, 510, 80, 30, "C" );
But_C->labelsize(16);
But_C->labelfont(FL_BOLD);
But_C->callback(Btn_C);
But_D= new Fl_Button( 676, 510, 80, 30, "D" );
But_D->labelsize(16);
But_D->labelfont(FL_BOLD);
But_D->callback(Btn_D);
But_E= new Fl_Button( 758, 510, 80, 30, "E" );
But_E->labelsize(16);
But_E->labelfont(FL_BOLD);
But_E->callback(Btn_E);
info_box = new Fl_Help_View(425,510,420,50,0);
info_box->box(FL_FLAT_BOX);
info_box->color(FL_BACKGROUND_COLOR);
info_box->hide();
info_box->scrollbar_size(1);
nxt_question= new Fl_Button( 430, 550, 160, 30, "Next Question" );
nxt_question->deactivate();
nxt_question->callback(Btn_nxt_question,(void*)window);
Fl_Button *about_btn= new Fl_Button( 676, 550, 160, 30, "About" );
about_btn->callback(Btn_about_CB,(void*)window);
But_Nxt= new Fl_Button( 150, 4, 80, 30, "Next" );
But_Nxt->callback((Fl_Callback*)Btn_Nxt_CB, (void*)(0));
But_random= new Fl_Button( 240, 4, 80, 30, "Random" );
But_random->callback((Fl_Callback*)Btn_random_CB, (void*)(0));
But_Prev= new Fl_Button( 4, 4, 80, 30, "Previous" );
But_Prev->callback((Fl_Callback*)Btn_Prev_CB, (void*)(0));
clock1 = new Fl_Text_Display(425,10,350,30,0);
clock1->box(FL_NO_BOX);
clock1->color(FL_BACKGROUND_COLOR);
clock1->textsize(16);
p_no->textsize(16);
p_no->callback((Fl_Callback*)pid_no_input_CB, (void*)(0));
p_no->when(FL_WHEN_ENTER_KEY|FL_WHEN_NOT_CHANGED);
q=new Fl_Help_View(425,40,420,460,0);
q->box(FL_THIN_DOWN_BOX);
p=new Fl_Help_View(3,40,423,500,0);
p->box(FL_THIN_DOWN_BOX);
FILE *fp;
rapidxml::xml_document<> doc;
pid=0;
totalq=0;
totalp=0;
cur_qid=0;
cur_ans=0;
rs=0;
usr_ans=-1;
enable_timer=0;
cur_progress p(5, 550,423, 30,0);
obj_progress = (cur_progress*)window->child(15);
int i=strlen(argv[0]);
for(;i>0;i--)
{
if(argv[0][i]=='/')
{
argv[0][i+1]='\0';
break;
}
}
i=i+2;
current_path=(char*)malloc(i*sizeof(char));
strcpy(current_path,argv[0]);
#ifdef __APPLE__
char *file_path=NULL;
file_path = (char*)malloc((i+9)*sizeof(char));
strcpy(file_path,current_path);
strcat(file_path,"data.xml");
rapidxml::file<> f(file_path);
#else
rapidxml::file<> f("data.xml");
#endif
//printf("Ok till this point");
doc.parse<0>(f.data());
node = doc.first_node("passages");
totalp=total_psg();
//printf("%d",totalp);
srand (time(NULL));
populate_psg((int)(rand() % totalp));
//.........这里部分代码省略.........