#include <msp/core/maputils.h>
#include <msp/core/raii.h>
+#include <msp/gltk/part.h>
#include <msp/gltk/stack.h>
#include <msp/strings/format.h>
#include "libr2c2/aicontrol.h"
train.signal_ai_event.connect(sigc::mem_fun(this, &TrainDialog::ai_event));
}
+void TrainDialog::autosize_special(const GLtk::Part &part, GLtk::Geometry &ageom) const
+{
+ GLtk::Dialog::autosize_special(part, ageom);
+
+ if(part.get_name()=="children")
+ {
+ GLtk::Geometry egeom;
+ pnl_expander->autosize(egeom);
+ const GLtk::Sides &margin = layout->get_margin();
+ ageom.w = max(ageom.w, margin.left+margin.right+egeom.w);
+ }
+}
+
void TrainDialog::ai_event(TrainAI &, const TrainAI::Message &msg)
{
if(msg.type=="status-changed")
TrainDialog(Engineer &, R2C2::Train &);
private:
+ virtual void autosize_special(const Msp::GLtk::Part &, Msp::GLtk::Geometry &) const;
+
void ai_event(R2C2::TrainAI &, const R2C2::TrainAI::Message &);
void update_speed_display(float);
void ui_speed_changed(double);