// ui.h - file browser, sidebar controls, and PNG export
#ifndef UI_H
#define UI_H

#include "spectrogram_types.h"

// --- File browser ---
void ScanDirectory(const char* path);
void FreeBrowserFiles(void);
void DrawFileBrowser(void);

// --- Menubar ---
void DrawMenubar(void);
// True when the cursor is over the menubar or an open dropdown, so the
// spectrogram doesn't also act on a click meant for a menu.
bool MenubarCapturesMouse(void);

// --- Sidebar ---
void DrawSidebar(void);
// True when the cursor is over the icon rail or one of its popout panels.
bool SidebarCapturesMouse(void);
// Rail popouts, drawn late so they float above the spectrogram and scope.
void DrawSidebarPopouts(void);

// --- PNG export ---
void ExportPNG(const SpectrogramApp* spa, const char* dirPath);

// --- About / help dialog ---
void DrawAboutDialog(void);

// --- Auto-crop notice splash ---
// Shown right after ApplyAutoCrop changed the view; OK keeps the crop,
// Uncrop restores the full freq + time view.
void DrawAutocropNotice(void);

#endif // UI_H
