/// UI which the mouse is currently hovering over, which may be any AppWindow. UserInterface * HoverUI() { AppWindow * hoverWindow = WindowMan.HoverWindow(); if (!hoverWindow) return NULL; return hoverWindow->GetUI(); }
UserInterface * MainUI() { AppWindow * mainWindow = MainWindow(); if (!mainWindow) { LogMain("MainUI(): No main AppWindow!", WARNING); return NULL; } return mainWindow->GetUI(); }
/// Fetches active/current UI, taking into consideration active AppWindow. UserInterface * ActiveUI() { AppWindow * activeWindow = WindowMan.GetCurrentlyActiveWindow(); if (!activeWindow) { LogMain("ActiveUI(): No active AppWindow!", WARNING); return NULL; } return activeWindow->GetUI(); }
/// Fetches either the Global or Active UI, taking into consideration both active AppWindow and if there exist any valid content in the Global UI. UserInterface * RelevantUI() { AppWindow * window = WindowMan.GetCurrentlyActiveWindow(); if (!window) return NULL; UserInterface * globalUI = window->GetGlobalUI(); if (globalUI && globalUI->HasActivatableElement()) return globalUI; return window->GetUI(); }