1 #ifndef TRACKPROPERTIES_H_
2 #define TRACKPROPERTIES_H_
4 #include <msp/gltk/dialog.h>
5 #include <msp/gltk/entry.h>
6 #include "libr2c2/beamgate.h"
7 #include "libr2c2/signal.h"
8 #include "libr2c2/terrain.h"
9 #include "libr2c2/track.h"
13 class ObjectProperties: public Msp::GLtk::Dialog
21 virtual ~Properties() { }
23 virtual void apply() = 0;
26 class TurnoutProperties: public Properties
30 Msp::GLtk::Entry *ent_address;
33 TurnoutProperties(ObjectProperties &, R2C2::Track &);
38 class TrackCircuitProperties: public Properties
41 std::set<R2C2::Track *> tracks;
42 Msp::GLtk::Entry *ent_address;
45 TrackCircuitProperties(ObjectProperties &, const std::set<R2C2::Track *> &);
50 class SignalProperties: public Properties
54 Msp::GLtk::Entry *ent_address;
57 SignalProperties(ObjectProperties &, R2C2::Signal &);
62 class BeamGateProperties: public Properties
66 Msp::GLtk::Entry *ent_address;
69 BeamGateProperties(ObjectProperties &, R2C2::BeamGate &);
74 class TerrainProperties: public Properties
77 R2C2::Terrain &terrain;
78 Msp::GLtk::Entry *ent_width;
79 Msp::GLtk::Entry *ent_height;
82 TerrainProperties(ObjectProperties &, R2C2::Terrain &);
87 Properties *properties;
88 Msp::GLtk::Widget *prev_widget;
91 ObjectProperties(const Selection &);
94 Msp::GLtk::Entry *add_property(const std::string &, const std::string &, unsigned = 0);
96 virtual void on_response(int);