Distributed under the GPL
*/
+#include <gtkmm/scrolledwindow.h>
#include <gtkmm/separator.h>
#include <msp/net/resolve.h>
#include <msp/time/units.h>
window.set_default_size(300, 200);
window.set_border_width(5);
+ Gtk::ScrolledWindow *scroll = new Gtk::ScrolledWindow;
+ window.add(*manage(scroll));
+ scroll->set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
+
train_box = new Gtk::VBox(false, 5);
- window.add(*manage(train_box));
+ scroll->add(*manage(train_box));
window.show_all();
}
Gtk::HBox *hbox = new Gtk::HBox(false, 5);
vbox->add(*manage(hbox));
- hbox->add(*manage(scl_speed = new Gtk::HScale));
+ hbox->pack_start(*manage(scl_speed = new Gtk::HScale), true, true);
scl_speed->set_digits(0);
scl_speed->set_range(0, 200);
scl_speed->set_increments(5, 5);
scl_speed->set_size_request(210, -1);
scl_speed->signal_value_changed().connect(sigc::mem_fun(this, &TrainPanel::ui_speed_changed));
- hbox->add(*manage(chk_reverse = new Gtk::CheckButton("Rev")));
+ hbox->pack_start(*manage(chk_reverse = new Gtk::CheckButton("Rev")), false, true);
chk_reverse->signal_toggled().connect(sigc::mem_fun(this, &TrainPanel::ui_reverse_changed));
Gtk::HBox *func_box = new Gtk::HBox(false, 5);