本文整理汇总了C++中Fl_Double_Window::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Double_Window::begin方法的具体用法?C++ Fl_Double_Window::begin怎么用?C++ Fl_Double_Window::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Double_Window
的用法示例。
在下文中一共展示了Fl_Double_Window::begin方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Execute
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;
}
示例2: 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();
}
示例3: main
int main(void) {
Fl_Double_Window* win = new Fl_Double_Window(240, 165, "SevenSeg sample");
win->begin();
seg = new edelib::SevenSeg(10, 10, 70, 92);
seg->box(FL_UP_BOX);
seg->value(0);
counter = new Fl_Counter(95, 20, 135, 20, "value");
counter->type(1);
counter->step(1);
counter->minimum(-1);
counter->maximum(9);
counter->align(FL_ALIGN_TOP_LEFT);
counter->callback(change_cb);
slider = new Fl_Value_Slider(95, 65, 135, 20, "width");
slider->type(1);
slider->step(1);
slider->minimum(2);
slider->maximum(20);
slider->value(seg->bar_width());
slider->align(FL_ALIGN_TOP_LEFT);
slider->callback(slide_cb);
color_button = new Fl_Button(205, 95, 25, 25, "color");
color_button->align(FL_ALIGN_LEFT);
color_button->callback(color_cb);
color_button->color(seg->color());
chk = new Fl_Check_Button(95, 130, 135, 25, "deactivate");
chk->down_box(FL_DOWN_BOX);
chk->callback(deactivate_cb);
win->end();
win->show();
return Fl::run();
}
示例4: main
//heres the money.....
int main(int argc, char* argv[])
{
//make the frame
Fl_Double_Window *w = new Fl_Double_Window( 820, 460, "uMS" );
w->size_range(DEFAULT_WIDTH,DEFAULT_HEIGHT);
//OK - lets build a whole set of panes
std::string sWho;
{
//note scoping
Fl_Preferences app( Fl_Preferences::USER, "MOOS", "uMS" );
char Space[2048];
app.get("Communities",Space,"Unnamed:[email protected]",sizeof(Space));
sWho = std::string(Space);
}
Fl_Tabs* pTab = new Fl_Tabs(10, 10, 800, 400);
while(!sWho.empty())
{
std::string sChunk = MOOSChomp(sWho,",");
std::string sName = MOOSChomp(sChunk,":");
int nPort = atoi(MOOSChomp(sChunk,"@").c_str());
std::string sHost = sChunk;
if(!sChunk.empty() && nPort>0)
{
Fl_Group *pG = MakeCommunityPane(10,30,800,390,(char*)sName.c_str());
CScopeTabPane * pTabPane = (CScopeTabPane*)(pG);
pTabPane->SetMOOSInfo(sHost,nPort);
Fl_Group::current()->resizable(pG);
}
}
if(pTab->children()==0)
{
MakeCommunityPane(10,30,800,390,"Unnamed");
}
w->end();
//and add some buttons to control them....
w->begin();
{
//add
Fl_Button * pNewCommunityButton = new Fl_Button(10,420,160,30,"Add Community");
pNewCommunityButton->callback(OnAddCommunity,pTab);
//delete
Fl_Button * pDelCommunityButton = new Fl_Button(180,420,160,30,"Remove Community");
pDelCommunityButton->callback(OnRemoveCommunity,pTab);
//save
Fl_Button * pSaveButton = new Fl_Button(350,420,160,30,"Save Layout");
pSaveButton->callback(OnSave,pTab);
pSaveButton->callback();
//rename
Fl_Button * pRenameButton = new Fl_Button(520,420,160,30,"Rename");
pRenameButton->callback(OnRenameCommunity,pTab);
pRenameButton->callback();
}
w->end();
//need to do more work on resizing - maybe even read the manual
w->resizable(pTab);
//and GO!
w->show(argc, argv);
return Fl::run();
}