本文整理汇总了C++中Fl_Double_Window::resizable方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Double_Window::resizable方法的具体用法?C++ Fl_Double_Window::resizable怎么用?C++ Fl_Double_Window::resizable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Double_Window
的用法示例。
在下文中一共展示了Fl_Double_Window::resizable方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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());
}
示例3: 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;
}
示例4: 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();
}
示例5: 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() );
}
示例6: 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() );
}
示例7: Fl_Scroll
ModelerUserInterface::ModelerUserInterface() {
// Make this instance the current one
instance = this;
// Initialize pointers to NULL
m_nativeChooser = NULL;
model = NULL;
currentGroup = NULL;
// 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;
// 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 = "CSEP457 Modeler";
const char* title = "CSEP557 Modeler";
{ 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 = -25, controlSpace = 0;
{ Fl_Tile* o = m_controlSplitPane = new Fl_Tile(0, 50 + tabSpace, 250, 575 - tabSpace);
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
leftPane->end();
} // left pane
{ // TODO: remove this extra brace!
{ Fl_Group* o = m_viewPane = new Fl_Group(250, 25, 550, 600);
o->box(FL_NO_BOX);
o->color(FL_BACKGROUND_COLOR);
m_modelerView = new ModelerView(250, 25, 550, 600, "");
w->resizable(m_modelerView);
o->end();
Fl_Group::current()->resizable(o);
}
}
o->end();
}
}
示例8: main
int main( int argc, char **argv )
{
//FL_NORMAL_SIZE = 12;
Fl_Double_Window *win = new Fl_Double_Window( 500, 460, "Flu_Tree_Browser_Try" );
tree = new Flu_Tree_Browser( 200, 0, 300, 460 );
tree->box( FL_DOWN_BOX );
tree->allow_dnd( true );
//tree->when( FL_WHEN_RELEASE );
tree->callback( tree_callback );
//tree->color( FL_GRAY );
Fl_Group *g = new Fl_Group( 0, 0, 200, 460 );
g->resizable( NULL );
showConnectors = new Fl_Check_Button( 10, 10, 140, 20, "Show Connectors" );
showConnectors->value( tree->show_connectors() );
showConnectors->callback( callback, 0 );
showRoot = new Fl_Check_Button( 10, 30, 100, 20, "Show Root" );
showRoot->value( tree->show_root() );
showRoot->callback( callback, 0 );
rootAlwaysOpen = new Fl_Check_Button( 10, 50, 140, 20, "Root Always Open" );
rootAlwaysOpen->value( tree->get_root()->always_open() );
rootAlwaysOpen->callback( callback, 0 );
showLeaves = new Fl_Check_Button( 10, 70, 110, 20, "Show Leaves" );
showLeaves->value( tree->show_leaves() );
showLeaves->callback( callback, 0 );
showBranches = new Fl_Check_Button( 10, 90, 120, 20, "Show Branches" );
showBranches->value( tree->show_branches() );
showBranches->callback( callback, 0 );
openOnSelect = new Fl_Check_Button( 10, 110, 130, 20, "Open On Select" );
openOnSelect->value( tree->open_on_select() );
openOnSelect->callback( callback, 0 );
active = new Fl_Check_Button( 10, 130, 100, 20, "Active" );
active->value( tree->active() );
active->callback( callback, 0 );
animate = new Fl_Check_Button( 10, 150, 100, 20, "Animate" );
animate->value( tree->animate() );
animate->callback( callback, 0 );
collapseTime = new Fl_Float_Input( 55, 170, 50, 20, "Time" );
{
char buf[32]; sprintf( buf, "%.2f", tree->collapse_time() );
collapseTime->value( buf );
}
collapseTime->callback( callback, 0 );
collapseTime->deactivate();
frameRate = new Fl_Float_Input( 140, 170, 50, 20, "FPS" );
{
char buf[32]; sprintf( buf, "%.2f", tree->frame_rate() );
frameRate->value( buf );
}
frameRate->callback( callback, 0 );
frameRate->deactivate();
shaded = new Fl_Check_Button( 10, 190, 130, 20, "Shaded Entries" );
shaded->value( 0 );
shaded->callback( callback, 0 );
shadedEvenColor = new Fl_Button( 70, 210, 20, 20, "Even" );
shadedEvenColor->align( FL_ALIGN_LEFT );
shadedEvenColor->color( FL_LIGHT2 );
shadedEvenColor->callback( shadedColorCB );
shadedEvenColor->deactivate();
shadedOddColor = new Fl_Button( 150, 210, 20, 20, "Odd" );
shadedOddColor->align( FL_ALIGN_LEFT );
shadedOddColor->color( FL_WHITE );
shadedOddColor->callback( shadedColorCB );
shadedOddColor->deactivate();
selectionMode = new Fl_Choice( 110, 235, 85, 25, "Selection Mode" );
selectionMode->add( "NO_SELECT" );
selectionMode->add( "SINGLE_SELECT" );
selectionMode->add( "MULTI_SELECT" );
selectionMode->value( 2 );
selectionMode->callback( mode_callback, 0 );
selectionDragMode = new Fl_Choice( 110, 265, 85, 25, "Selection Drag" );
selectionDragMode->add( "DRAG_IGNORE" );
selectionDragMode->add( "DRAG_TO_SELECT" );
if( tree->have_dnd() )
selectionDragMode->add( "DRAG_TO_MOVE" );
selectionDragMode->value( 1 );
selectionDragMode->callback( mode_callback, 0 );
insertionMode = new Fl_Choice( 110, 295, 85, 25, "Insertion Mode" );
insertionMode->add( "INSERT_FRONT" );
insertionMode->add( "INSERT_BACK" );
insertionMode->add( "INSERT_SORTED" );
insertionMode->add( "INSERT_SORTED_REVERSE" );
insertionMode->value( 2 );
//.........这里部分代码省略.........
示例9: 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();
}
示例10: make_window
Fl_Double_Window* IntersectionInterface::make_window() {
Fl_Double_Window* w;
{ Fl_Double_Window* o = m_intersectionWindow = new Fl_Double_Window(420, 265, "Intersection UI");
w = o;
o->user_data((void*)(this));
{ Fl_Group* o = new Fl_Group(5, 25, 145, 30);
o->end();
}
{ Fl_Choice* o = m_iShapeType = new Fl_Choice(5, 25, 145, 30, "Object type");
o->down_box(FL_BORDER_BOX);
o->align(FL_ALIGN_TOP_LEFT);
o->menu(menu_m_iShapeType);
}
{ Fl_Value_Slider* o = m_dXAt = new Fl_Value_Slider(5, 75, 200, 25, "At x pos");
o->type(5);
o->minimum(-1.5);
o->maximum(1.5);
o->callback((Fl_Callback*)cb_m_dXAt);
o->align(FL_ALIGN_TOP_LEFT);
}
{ Fl_Value_Slider* o = m_dYAt = new Fl_Value_Slider(5, 115, 200, 25, "At y pos");
o->type(5);
o->minimum(-1.5);
o->maximum(1.5);
o->callback((Fl_Callback*)cb_m_dYAt);
o->align(FL_ALIGN_TOP_LEFT);
}
{ Fl_Value_Slider* o = m_dZAt = new Fl_Value_Slider(5, 155, 200, 25, "At z pos");
o->type(5);
o->minimum(-1.5);
o->maximum(1.5);
o->callback((Fl_Callback*)cb_m_dZAt);
o->align(FL_ALIGN_TOP_LEFT);
}
{ Fl_Value_Slider* o = m_dTheta = new Fl_Value_Slider(5, 195, 200, 25, "Vec theta");
o->type(5);
o->maximum(360);
o->step(1);
o->callback((Fl_Callback*)cb_m_dTheta);
o->align(FL_ALIGN_TOP_LEFT);
}
{ Fl_Value_Slider* o = m_dPhi = new Fl_Value_Slider(5, 235, 200, 25, "Vec phi");
o->type(5);
o->minimum(-90);
o->maximum(90);
o->step(1);
o->value(45);
o->callback((Fl_Callback*)cb_m_dPhi);
o->align(FL_ALIGN_TOP_LEFT);
}
{ Fl_Button* o = new Fl_Button(330, 25, 85, 25, "Write test");
o->callback((Fl_Callback*)cb_Write);
}
{ Fl_Value_Slider* o = m_dXRot = new Fl_Value_Slider(215, 75, 200, 25, "View rotation");
o->type(5);
o->maximum(360);
o->step(1);
o->callback((Fl_Callback*)cb_m_dXRot);
o->align(FL_ALIGN_TOP_LEFT);
}
{ Fl_Value_Slider* o = m_dYRot = new Fl_Value_Slider(215, 115, 200, 25, "View height");
o->type(5);
o->minimum(-90);
o->maximum(90);
o->step(1);
o->callback((Fl_Callback*)cb_m_dYRot);
o->align(FL_ALIGN_TOP_LEFT);
}
{ Fl_Check_Button* o = m_bGrid = new Fl_Check_Button(215, 155, 25, 25, "Show grid");
o->down_box(FL_DOWN_BOX);
o->value(1);
o->callback((Fl_Callback*)cb_m_bGrid);
}
{ Fl_Check_Button* o = m_bRay = new Fl_Check_Button(215, 195, 25, 25, "Show ray");
o->down_box(FL_DOWN_BOX);
o->value(1);
o->callback((Fl_Callback*)cb_m_bRay);
}
{ Fl_Check_Button* o = m_bRayShadow = new Fl_Check_Button(215, 235, 25, 25, "Show ray shadow");
o->down_box(FL_DOWN_BOX);
o->value(1);
o->callback((Fl_Callback*)cb_m_bRayShadow);
}
m_iSeed = new Fl_Value_Input(240, 30, 85, 20, "Seed");
o->end();
o->resizable(o);
}
return w;
}
示例11: 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!
//.........这里部分代码省略.........