, timer_()
/* GUI Elements */
- , table_(floors+1, elevators+3)
+ , table_(floors+1, elevators+2)
, button_playpause_(Gtk::Stock::MEDIA_PLAY)
, button_stop_(Gtk::Stock::STOP)
, button_quit_(Gtk::Stock::QUIT)
int i, j, e, f, e_num, f_num, f_attach;
std::ostringstream str;
+ /* Set Table Spacing / Window Border Size */
+ table_.set_col_spacings (8);
+ table_.set_row_spacings (8);
+ set_border_width (10);
+
/* Fill in all of the ElevatorDoors and CallButtons */
for (f_attach=0, f=floors-1; f>=0; --f, ++f_attach)
{
call_buttons_.push_back (callbutton);
box->pack_start (*callbutton);
}
+ else // we are on the top floor, create a dummy label
+ {
+ Gtk::Label *label = new Gtk::Label ("");
+ box->pack_start (*label);
+ }
/* Only create the DOWN CallButton if we are not on the bottom floor */
if (f != 0)
call_buttons_.push_back (callbutton);
box->pack_end (*callbutton);
}
+ else // we are on the bottom floor, create a dummy label
+ {
+ Gtk::Label *label = new Gtk::Label ("");
+ box->pack_end (*label);
+ }
for (e=0; e<elevators; ++e) // run left-to-right
{