2 #include "elevatorgui.hpp"
4 static ElevatorGUI *thegui = NULL;
6 int main (int argc, char *argv[])
11 //#define USE_STATIC_FLOORS 1
12 #ifndef USE_STATIC_FLOORS
15 std::cout << "Enter the number of floors to use [2-10]: ";
18 if (floors < 2 || floors > 10)
20 std::cout << "You entered: " << floors
21 << " which is outside the acceptable range." << std::endl;
22 std::cout << "Please try again..." << std::endl << std::endl;
26 // Good input, leave now
33 std::cout << "Enter the number of elevators to use [1-5]: ";
34 std::cin >> elevators;
36 if (elevators < 1 || elevators > 5)
38 std::cout << "You entered: " << elevators
39 << " which is outside the acceptable range." << std::endl;
40 std::cout << "Please try again..." << std::endl << std::endl;
44 // Good input, leave now
51 Gtk::Main app(argc, argv);
54 ElevatorGUI eg(floors, elevators);
67 void gui_update_position_label (int elevator, float new_position, Direction direction)
69 thegui->gui_update_position_label (elevator, new_position, direction);
72 void gui_unpress_call_button (int floor, Direction direction)
74 thegui->gui_unpress_call_button (floor, direction);
77 void gui_unpress_request_button (int elevator, int floor)
79 thegui->gui_unpress_request_button (elevator, floor);
82 void gui_open_door (int elevator, int floor)
84 thegui->gui_open_door (elevator, floor);
87 void gui_close_door (int elevator, int floor)
89 thegui->gui_close_door (elevator, floor);
92 /* vim: set ts=4 sts=4 sw=4 noet tw=112: */