# FlightMonitor/utils/gui_utils.py """ Utility constants and functions for GUI interactions. This module should not import from gui or controller packages to avoid cycles. """ from typing import Dict, Any # Importa i tipi necessari # --- GUI Status Levels --- # Define GUI status levels used for updating the status semaphore and message. # These constants are shared between the controller and the main window. GUI_STATUS_OK: str = "OK" GUI_STATUS_WARNING: str = "WARNING" GUI_STATUS_ERROR: str = "ERROR" GUI_STATUS_FETCHING: str = "FETCHING" GUI_STATUS_UNKNOWN: str = "UNKNOWN" GUI_STATUS_PERMANENT_FAILURE: str = "PERMANENT_FAILURE" # Define default colors for GUI status levels. # These should be valid Tkinter color names or hex codes. GUI_STATUS_COLORS_DEFAULT: Dict[str, str] = { GUI_STATUS_OK: "green3", GUI_STATUS_WARNING: "gold", GUI_STATUS_ERROR: "red2", GUI_STATUS_UNKNOWN: "gray70", GUI_STATUS_FETCHING: "sky blue", GUI_STATUS_PERMANENT_FAILURE: "red4", # Use a darker red for permanent failure } # You could add other GUI-related utility functions or constants here in the future. # Example: Function to format coordinates for display, etc.