#include <msp/gltk/button.h>
+#include <msp/gltk/column.h>
#include <msp/gltk/label.h>
-#include <msp/gltk/mixedrows.h>
+#include <msp/gltk/row.h>
#include "libr2c2/track.h"
#include "libr2c2/tracktype.h"
#include "selection.h"
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)
{