+#include <msp/gltk/button.h>
#include "trainproperties.h"
using namespace Msp;
+using namespace Marklin;
TrainProperties::TrainProperties(GLtk::Resources &r, Train &t):
Panel(r),
train(t)
{
- set_size(200, 50);
+ set_size(200, 75);
add(*(ent_name=new GLtk::Entry(res, train.get_name())));
- ent_name->set_geometry(
+ ent_name->set_geometry(GLtk::Geometry(5, geom.h-25, geom.w-10, 20));
+
+ add(*(ent_name=new GLtk::Entry(res, train.get_name())));
+ ent_name->set_geometry(GLtk::Geometry(5, geom.h-50, geom.w-10, 20));
GLtk::Button *btn;
add(*(btn=new GLtk::Button(res, "OK")));
- btn->set_geometry(geom.width-45, 5, 40, 25);
+ btn->set_geometry(GLtk::Geometry(geom.w-45, 5, 40, 25));
add(*(btn=new GLtk::Button(res, "Cncl")));
- btn->set_geometry(geom.width-45, 5, 40, 25);
+ btn->set_geometry(GLtk::Geometry(geom.w-90, 5, 40, 25));
}
#ifndef TRAINPROPERTIES_H_
#define TRAINPROPERTIES_H_
+#include <msp/gltk/entry.h>
#include <msp/gltk/panel.h>
+#include <libmarklin/train.h>
class TrainProperties: public Msp::GLtk::Panel
{
public:
- TrainProperties(Msp::GLtk::Resources &, Train &);
+ TrainProperties(Msp::GLtk::Resources &, Marklin::Train &);
private:
- Train &train;
+ Marklin::Train &train;
Msp::GLtk::Entry *ent_id;
Msp::GLtk::Entry *ent_name;
};