X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdesigner%2Ftrackproperties.cpp;h=c95ad02887f24d3bd99868aa7a6a6a83afe73253;hb=05b95b6b6b095821f1e79dabed802b853c296c9d;hp=b85a99ae76e6459247f2f2719a0c17e287c0802d;hpb=d32eab21ebacb78500dc46af5b5a6354a9a37fe2;p=r2c2.git diff --git a/source/designer/trackproperties.cpp b/source/designer/trackproperties.cpp index b85a99a..c95ad02 100644 --- a/source/designer/trackproperties.cpp +++ b/source/designer/trackproperties.cpp @@ -1,6 +1,7 @@ #include +#include #include -#include +#include #include "libr2c2/track.h" #include "libr2c2/tracktype.h" #include "selection.h" @@ -13,35 +14,40 @@ using namespace R2C2; TrackProperties::TrackProperties(const Selection &s): selection(s) { - GLtk::MixedRows *rows = new GLtk::MixedRows; - set_layout(rows); + set_layout(new GLtk::Layout); + GLtk::Column col(*layout); GLtk::Label *lbl1, *lbl2; add(*(lbl1 = new GLtk::Label("Track properties"))); - layout->set_expand(*lbl1, true, false); lbl1->set_style("title"); - rows->start_row(); - add(*(lbl1 = new GLtk::Label("Turnout ID"))); - add(*(ent_turnout_id = new GLtk::Entry)); - ent_turnout_id->set_edit_size(5, 1); + { + GLtk::Row row(*layout); + add(*(lbl1 = new GLtk::Label("Turnout ID"))); + add(*(ent_turnout_id = new GLtk::Entry)); + ent_turnout_id->set_edit_size(5, 1); + } - rows->start_row(); - add(*(lbl2 = new GLtk::Label("Sensor ID"))); - rows->add_constraint(*lbl1, GLtk::Layout::COPY_WIDTH, *lbl2); - add(*(ent_sensor_id = new GLtk::Entry)); - ent_sensor_id->set_edit_size(5, 1); + { + GLtk::Row row(*layout); + add(*(lbl2 = new GLtk::Label("Sensor ID"))); + layout->add_constraint(*lbl1, GLtk::Layout::COPY_WIDTH, *lbl2); + add(*(ent_sensor_id = new GLtk::Entry)); + ent_sensor_id->set_edit_size(5, 1); + } GLtk::Button *btn; - rows->start_row(); - rows->split_columns(); - add_button(*(btn = new GLtk::Button("Cncl")), 0); - btn->set_style("red"); + { + GLtk::Row row(*layout); + row.split(); + add_button(*(btn = new GLtk::Button("Cncl")), 0); + btn->set_style("red"); - add_button(*(btn = new GLtk::Button("OK")), 1); - btn->set_style("green"); + add_button(*(btn = new GLtk::Button("OK")), 1); + btn->set_style("green"); + } if(selection.size()==1) {