From: Mikko Rasa Date: Wed, 18 Jul 2007 09:28:11 +0000 (+0000) Subject: More code for TrainProperties X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=36beacc579d3132642ed4d98ce5a6d99842b5812;p=r2c2.git More code for TrainProperties --- diff --git a/source/engineer/trainproperties.cpp b/source/engineer/trainproperties.cpp index adb48d3..1aebea0 100644 --- a/source/engineer/trainproperties.cpp +++ b/source/engineer/trainproperties.cpp @@ -1,21 +1,26 @@ +#include #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)); } diff --git a/source/engineer/trainproperties.h b/source/engineer/trainproperties.h index de0d8a8..89b6e94 100644 --- a/source/engineer/trainproperties.h +++ b/source/engineer/trainproperties.h @@ -1,14 +1,16 @@ #ifndef TRAINPROPERTIES_H_ #define TRAINPROPERTIES_H_ +#include #include +#include 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; };