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.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/IOManager.cpp (limited to 'src/IOManager.cpp') diff --git a/src/IOManager.cpp b/src/IOManager.cpp new file mode 100644 index 0000000..c5363af --- /dev/null +++ b/src/IOManager.cpp @@ -0,0 +1,22 @@ +#include "IOManager.hpp" +#include "inputManager.hpp" +#include "log.hpp" + +CIOManager::CIOManager() { + log(LOG, "IOManager: initialized"); +} + +CIOManager::~CIOManager() { + m_vIO.clear(); + log(SYS, "IOManager: bye"); +} + +const std::vector &CIOManager::getIO() const { + return m_vIO; +} + +void CIOManager::addLog(const SLog &log) { + m_vIO.push_back({.msg = std::nullopt, .log = log}); + if (g_pInputManager) + g_pInputManager->updateIO(); +} -- cgit v1.2.3