// // CSE143, Summer 2001 // Homework 5 // Air Traffic Control Starter Code // ATCUI.h // #ifndef ATCUI_H #define ATCUI_H #include "GP142display.h" #include "GP142.h" class Simulator; const int FILL = 0; // Menu buttons: // Top-left coordinates of button palette const int MENU_TOP = (GP142_YMAX - 5); const int MENU_LEFT = (-GP142_XMAX + 5); // Height and width of buttons in pixels const int BUTTON_HEIGHT = 25; const int BUTTON_WIDTH = 110; // Number of buttons const int NUM_BUTTONS = 4; // Mouse click in some button const int BUTTON_CLICK = 1; // Mouse click elsewhere const int OTHER_CLICK = 0; class ATCUI{ public: ATCUI(); ATCUI(Simulator *aSim, GP142Display *aDisplay); void draw(); //Refreshes the user interface on the display void handle_mouse_click(int mouse_x, int mouse_y); private: void drawButtons(); void handle_button(int,int); //processes clicks on the menu void handleScreenClick(int,int); //processes all other clicks in the app window Simulator *theSim; GP142Display *display; }; #endif