#pragma once #include #include #define GLFW_INCLUDE_NONE // Don't include OpenGL headers (GLAD provides them) #include namespace secondvoice { struct TranslationMessage { std::string chinese; std::string french; }; class TranslationUI { public: TranslationUI(int width, int height); ~TranslationUI(); bool initialize(); void render(); bool shouldClose() const; void addTranslation(const std::string& chinese, const std::string& french); bool isStopRequested() const { return stop_requested_; } void resetStopRequest() { stop_requested_ = false; } void setRecordingDuration(int seconds) { recording_duration_ = seconds; } void setProcessingStatus(const std::string& status) { processing_status_ = status; } private: void renderTranslations(); void renderControls(); void renderStatus(); int width_; int height_; GLFWwindow* window_ = nullptr; std::vector messages_; bool stop_requested_ = false; bool auto_scroll_ = true; int recording_duration_ = 0; std::string processing_status_; }; } // namespace secondvoice