本文整理汇总了C++中Fl_Tabs::callback方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Tabs::callback方法的具体用法?C++ Fl_Tabs::callback怎么用?C++ Fl_Tabs::callback使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Tabs
的用法示例。
在下文中一共展示了Fl_Tabs::callback方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Fl_Tile
ModelerUserInterface::ModelerUserInterface() {
// Make this instance the current one
instance = this;
// Initialize pointers to NULL
m_nativeChooser = NULL;
model = NULL;
currentGroup = NULL;
renderGroup = NULL;
defaultCam = NULL;
ps = NULL;
movieWidth = 720;
movieHeight = 480;
// Set appearance to GTK+ for a nice look
Fl::scheme("gtk+");
// Set the animation speed to 24 frames/second
framesPerSecond = 24;
// We're not animating yet.
animating = false;
simulating = false;
rendering = false;
drawing = false;
// Set the color scheme
Fl::set_color(FL_BACKGROUND_COLOR, 240, 240, 240);
Fl::set_color(FL_BACKGROUND2_COLOR, 255, 255, 255);
Fl::set_color(FL_FOREGROUND_COLOR, 0, 0, 0);
Fl::set_color(FL_INACTIVE_COLOR, 128, 128, 128);
Fl::set_color(FL_SELECTION_COLOR, 51, 153, 255);
// Create all of the UI elements
// (autogenerated by FLUID, the FLTK UI Designer)
Fl_Double_Window* w;
const char* title = "Animator";
{ Fl_Double_Window* o = m_controlsWindow = new Fl_Double_Window(800, 625, title);
w = o;
o->callback((Fl_Callback*)cb_m_controlsWindow, (void*)(this));
o->when(FL_WHEN_NEVER);
{ Fl_Menu_Bar* o = m_controlsMenuBar = new Fl_Menu_Bar(0, 0, 800, 25);
o->menu(menu_m_controlsMenuBar);
}
// Contains the controls on the left
{ leftPane = new Fl_Group(0, 25, 250, 600);
int tabSpace = 0, controlSpace = 0;
int controlTop = 25 + 600 - controlSpace;
// Modeler and Curves tabs
{ Fl_Tabs* t = new Fl_Tabs(0, 25, 250, 600 - controlSpace);
// Make the tab area stretch.
leftPane->resizable(t);
t->when(FL_WHEN_CHANGED);
t->callback((Fl_Callback*)TabsCallback, this);
// Curves tab
{ Fl_Group* o = new Fl_Group(0, 50, 250, 575 - controlSpace, "Curves");
o->box(FL_FLAT_BOX);
o->color(FL_BACKGROUND_COLOR);
{ Fl_Tree* o = curvesTree = new Fl_Tree(0, 50, 250, 575 - controlSpace);
o->when(FL_WHEN_CHANGED);
o->callback((Fl_Callback*)CurveTreeCallback);
o->marginleft(-5);
o->end();
}
o->end();
}
// Modeler tab
{ Fl_Tile* o = m_controlSplitPane =
new Fl_Tile(0, 50 + tabSpace, 250, 575 + tabSpace - controlSpace, "Modeler");
// Make only the content area of the tabs resize.
t->resizable(o);
o->box(FL_FLAT_BOX);
{ Fl_Tree* o = m_controlsTree = new Fl_Tree(0, 50 + tabSpace, 250, 100);
o->when(FL_WHEN_CHANGED);
o->callback((Fl_Callback*)TreeCallback);
o->marginleft(-5);
o->end();
}
{ Fl_Scroll* o = m_controlsScroll =
new Fl_Scroll(0, 150 + tabSpace, 250, 475 - tabSpace - controlSpace);
o->type(Fl_Scroll::VERTICAL);
o->when(FL_WHEN_CHANGED);
{ Fl_Pack* o = m_controlsPack =
new Fl_Pack(10, 150 + tabSpace, 215, 475 - tabSpace - controlSpace);
Fl_Group::current()->resizable(o);
o->spacing(2);
o->end();
}
o->end();
}
o->end();
} // end Modeler group/tab
t->end();
} // end tabs
leftPane->end();
} // left pane
{ // TODO: remove this extra brace!
//.........这里部分代码省略.........