diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2008-12-21 15:38:52 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2008-12-21 15:38:52 +0000 |
| commit | 1b788c8c14c1f3df8d51bc5af2f33585a861566d (patch) | |
| tree | 5f572e57f9422fb59fd87e5a6d73cc5ed0e6caf2 /test | |
| parent | 4495388e8deffa5df3ba6d6d267dbce24325dbfd (diff) | |
Coordinate transformations in test programs to avoid using the old
Fl_Group::forms_end() method, because this _may_ be removed later.
Replaced forms_end() with end().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6598 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test')
| -rw-r--r-- | test/demo.cxx | 30 | ||||
| -rw-r--r-- | test/label.cxx | 30 | ||||
| -rw-r--r-- | test/output.cxx | 10 |
3 files changed, 35 insertions, 35 deletions
diff --git a/test/demo.cxx b/test/demo.cxx index c8df2ed7f..7f183e095 100644 --- a/test/demo.cxx +++ b/test/demo.cxx @@ -62,16 +62,16 @@ Fl_Button *but[9]; void create_the_forms() { Fl_Widget *obj; form = new Fl_Window(350, 440); - obj = new Fl_Box(FL_FRAME_BOX,10,385,330,40,"FLTK Demonstration"); + obj = new Fl_Box(FL_FRAME_BOX,10,15,330,40,"FLTK Demonstration"); obj->color(FL_GRAY-4); obj->labelsize(24); obj->labelfont(FL_BOLD); obj->labeltype(FL_ENGRAVED_LABEL); - obj = new Fl_Box(FL_FRAME_BOX,10,45,330,330,0); + obj = new Fl_Box(FL_FRAME_BOX,10,65,330,330,0); obj->color(FL_GRAY-8); - obj = new Fl_Button(280,10,60,25,"Exit"); + obj = new Fl_Button(280,405,60,25,"Exit"); obj->callback(doexit); - Fl_Choice *choice = new Fl_Choice(75, 10, 100, 25, "Scheme:"); + Fl_Choice *choice = new Fl_Choice(75, 405, 100, 25, "Scheme:"); choice->labelfont(FL_HELVETICA_BOLD); choice->add("none"); choice->add("gtk+"); @@ -81,22 +81,22 @@ void create_the_forms() { if (!Fl::scheme()) choice->value(0); else if (!strcmp(Fl::scheme(), "gtk+")) choice->value(1); else choice->value(2); - obj = new Fl_Button(10,45,330,380); obj->type(FL_HIDDEN_BUTTON); + obj = new Fl_Button(10,15,330,380); obj->type(FL_HIDDEN_BUTTON); obj->callback(doback); - obj = but[0] = new Fl_Button(30,265,90,90); - obj = but[1] = new Fl_Button(130,265,90,90); - obj = but[2] = new Fl_Button(230,265,90,90); - obj = but[5] = new Fl_Button(230,165,90,90); - obj = but[4] = new Fl_Button(130,165,90,90); - obj = but[3] = new Fl_Button(30,165,90,90); - obj = but[6] = new Fl_Button(30,65,90,90); - obj = but[7] = new Fl_Button(130,65,90,90); - obj = but[8] = new Fl_Button(230,65,90,90); + obj = but[0] = new Fl_Button( 30, 85,90,90); + obj = but[1] = new Fl_Button(130, 85,90,90); + obj = but[2] = new Fl_Button(230, 85,90,90); + obj = but[3] = new Fl_Button( 30,185,90,90); + obj = but[4] = new Fl_Button(130,185,90,90); + obj = but[5] = new Fl_Button(230,185,90,90); + obj = but[6] = new Fl_Button( 30,285,90,90); + obj = but[7] = new Fl_Button(130,285,90,90); + obj = but[8] = new Fl_Button(230,285,90,90); for (int i=0; i<9; i++) { but[i]->align(FL_ALIGN_WRAP); but[i]->callback(dobut, i); } - form->forms_end(); + form->end(); } /* Maintaining and building up the menus. */ diff --git a/test/label.cxx b/test/label.cxx index b86900dc6..7e55211cc 100644 --- a/test/label.cxx +++ b/test/label.cxx @@ -109,50 +109,50 @@ Fl_Menu_Item choices[] = { int main(int argc, char **argv) { window = new Fl_Double_Window(400,400); - input = new Fl_Input(50,0,350,25); + input = new Fl_Input(50,375,350,25); input->static_value("The quick brown fox jumped over the lazy dog."); input->when(FL_WHEN_CHANGED); input->callback(input_cb); - sizes= new Fl_Hor_Value_Slider(50,25,350,25,"Size:"); + sizes= new Fl_Hor_Value_Slider(50,350,350,25,"Size:"); sizes->align(FL_ALIGN_LEFT); sizes->bounds(1,64); sizes->step(1); sizes->value(14); sizes->callback(size_cb); - fonts=new Fl_Hor_Value_Slider(50,50,350,25,"Font:"); + fonts=new Fl_Hor_Value_Slider(50,325,350,25,"Font:"); fonts->align(FL_ALIGN_LEFT); fonts->bounds(0,15); fonts->step(1); fonts->value(0); fonts->callback(font_cb); - Fl_Group *g = new Fl_Group(0,0,0,0); - leftb = new Fl_Toggle_Button(50,75,50,25,"left"); + Fl_Group *g = new Fl_Group(50,300,350,25); + leftb = new Fl_Toggle_Button(50,300,50,25,"left"); leftb->callback(button_cb); - rightb = new Fl_Toggle_Button(100,75,50,25,"right"); + rightb = new Fl_Toggle_Button(100,300,50,25,"right"); rightb->callback(button_cb); - topb = new Fl_Toggle_Button(150,75,50,25,"top"); + topb = new Fl_Toggle_Button(150,300,50,25,"top"); topb->callback(button_cb); - bottomb = new Fl_Toggle_Button(200,75,50,25,"bottom"); + bottomb = new Fl_Toggle_Button(200,300,50,25,"bottom"); bottomb->callback(button_cb); - insideb = new Fl_Toggle_Button(250,75,50,25,"inside"); + insideb = new Fl_Toggle_Button(250,300,50,25,"inside"); insideb->callback(button_cb); - wrapb = new Fl_Toggle_Button(300,75,50,25,"wrap"); + wrapb = new Fl_Toggle_Button(300,300,50,25,"wrap"); wrapb->callback(button_cb); - clipb = new Fl_Toggle_Button(350,75,50,25,"clip"); + clipb = new Fl_Toggle_Button(350,300,50,25,"clip"); clipb->callback(button_cb); g->resizable(insideb); - g->forms_end(); + g->end(); - Fl_Choice *c = new Fl_Choice(50,100,200,25); + Fl_Choice *c = new Fl_Choice(50,275,200,25); c->menu(choices); - text= new Fl_Box(FL_FRAME_BOX,100,225,200,100,input->value()); + text= new Fl_Box(FL_FRAME_BOX,100,75,200,100,input->value()); text->align(FL_ALIGN_CENTER); window->resizable(text); - window->forms_end(); + window->end(); window->show(argc,argv); return Fl::run(); } diff --git a/test/output.cxx b/test/output.cxx index 7928a69fe..ac0996d01 100644 --- a/test/output.cxx +++ b/test/output.cxx @@ -65,19 +65,19 @@ void input_cb(Fl_Widget *,void *) { int main(int argc, char **argv) { window = new Fl_Window(400,400); - input = new Fl_Input(50,0,350,25); + input = new Fl_Input(50,375,350,25); input->static_value("The quick brown fox\njumped over\nthe lazy dog."); input->when(FL_WHEN_CHANGED); input->callback(input_cb); - sizes = new Fl_Hor_Value_Slider(50,25,350,25,"Size"); + sizes = new Fl_Hor_Value_Slider(50,350,350,25,"Size"); sizes->align(FL_ALIGN_LEFT); sizes->bounds(1,64); sizes->step(1); sizes->value(14); sizes->callback(size_cb); - fonts = new Fl_Hor_Value_Slider(50,50,350,25,"Font"); + fonts = new Fl_Hor_Value_Slider(50,325,350,25,"Font"); fonts->align(FL_ALIGN_LEFT); fonts->bounds(0,15); fonts->step(1); @@ -90,12 +90,12 @@ int main(int argc, char **argv) { text2->tooltip("This is an Fl_Multiline_Output widget."); window->resizable(text2); - text = new Fl_Output(100,280,200,30,"Fl_Output"); + text = new Fl_Output(100,90,200,30,"Fl_Output"); text->value(input->value()); text->align(FL_ALIGN_BOTTOM); text->tooltip("This is an Fl_Output widget."); - window->forms_end(); + window->end(); window->show(argc,argv); return Fl::run(); } |
