本文整理汇总了C++中Fl_Box::redraw方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Box::redraw方法的具体用法?C++ Fl_Box::redraw怎么用?C++ Fl_Box::redraw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Box
的用法示例。
在下文中一共展示了Fl_Box::redraw方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: run_main
int run_main (int argc, ACE_TCHAR *argv[])
{
ACE_START_TEST (ACE_TEXT ("FlReactor_Test"));
Fl_Window window (300, 370);
Test_Window tw (10, 75, window.w () - 20, window.h ()-90);
window.resizable (&tw);
Fl_Hor_Slider slider (60, 5, window.w () - 70, 30, "Sides:");
slider.align (FL_ALIGN_LEFT);
slider.callback (sides_cb, &tw);
slider.value (tw.sides ());
slider.step (1);
slider.bounds (3, 10);
ACE_FlReactor reactor;
ACE_Reactor r (&reactor);
Fl_Box *box = new Fl_Box (FL_UP_BOX, 10, 40,
window.w () - 20, 30,
"Setting up");
box->labelfont (FL_BOLD);
Acceptor acceptor (&tw, box);
ACE_INET_Addr address;
if (acceptor.open (address, &r) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"%p\n",
"open acceptor"),
-1);
acceptor.acceptor ().get_local_addr (address);
const int bufsiz = 128;
char buf[bufsiz];
address.addr_to_string (buf, bufsiz, 0);
char msg[2 * bufsiz];
ACE_OS::sprintf (msg, "Listening on <%s>\n", buf);
box->label (msg);
box->redraw ();
window.end ();
window.show (argc, argv);
tw.show ();
return Fl::run ();
ACE_END_TEST;
}
示例2: redraw
virtual void redraw()
{
format((char *)(b.label()));
b.redraw();
Fl_Adjuster::redraw();
}