From eff21ee2ce1fdb4328d71d801352ec25f4e457ff Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Wed, 2 Apr 2025 18:49:15 +0800 Subject: feat: ftxui (#17) * ready for merge rm sum random ocmments first and https://github.com/ArthurSonzogni/FTXUI/issues/1024 but still, ready for merge since we can't do anything on our end * style: clang-tidy * ci * ci * style: clang-tidy * fix * fix: scroll https://github.com/ArthurSonzogni/git-tui/blob/master/src/scroller.cpp * focus * update todo * style: clang-format * update todo * sticky scroll * update todxo * smol fix need event to update screen. so we just give event when IO updates * style: clang-format --------- Co-authored-by: github-actions[bot] --- src/IOManager.hpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/IOManager.hpp (limited to 'src/IOManager.hpp') diff --git a/src/IOManager.hpp b/src/IOManager.hpp new file mode 100644 index 0000000..ba741ff --- /dev/null +++ b/src/IOManager.hpp @@ -0,0 +1,30 @@ +#pragma once + +#include "chatManager.hpp" +#include "format.hpp" +#include + +class CIOManager { + public: + CIOManager(); + ~CIOManager(); + + struct SLog { + eFormatType type; + std::string log; + }; + struct SIO { + // cannot have both at once + std::optional msg; + std::optional log; + }; + + const std::vector &getIO() const; + void addLog(const SLog &log); + + private: + std::vector m_vIO; + + friend class CChatManager; +}; +inline std::unique_ptr g_pIOManager; -- cgit v1.2.3