AuroraRuntime/Include/Aurora/Console/ConsoleTTY/IConsoleTTY.hpp

96 lines
3.5 KiB
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: IConsoleTTY.hpp
Date: 2022-5-11
Author: Reece
***/
#pragma once
namespace Aurora::Console::ConsoleTTY
{
struct ITTYConsole
{
/**
* @brief Hijacks std loggers, leaving only raw nonblocking ConsoleStd non-block write the only available API to the user.
*/
virtual bool Start() = 0;
/**
* @brief Disables console TTY, returning back to ConsoleStd
*/
virtual void End() = 0;
/**
* @brief Is line buffered by AuConsole::Command or are we consuming by character in real time?
* @return false when in externally buffered mode. this may be because you're attempting one way TTY over PIPE STDIO
*/
virtual bool NoncanonicalMode() = 0;
virtual void BufferMessage(const ConsoleMessage &msg) = 0;
virtual AuString GetHeader() = 0;
virtual AuString GetSubHeader() = 0;
virtual AuString SetHeader(const AuString &newValue) = 0;
virtual AuString SetSubHeader(const AuString &newValue) = 0;
virtual AuString GetHeaderBorderTitle() = 0;
virtual AuString GetLogBoxBorderTitle() = 0;
virtual AuString SetHeaderBorderTitle(const AuString &newValue) = 0;
virtual AuString SetLogBoxBorderTitle(const AuString &newValue) = 0;
virtual ETTYAlign GetTitleAlignment() = 0;
virtual ETTYAlign GetHeaderAlignment() = 0;
virtual ETTYAlign SetTitleAlignment(ETTYAlign newValue) = 0;
virtual ETTYAlign SetLogBoxTitleAlignment(ETTYAlign newValue) = 0;
virtual ETTYAlign GetSubheaderAlignment() = 0;
virtual ETTYAlign GetLogBoxTitleAlignment() = 0;
virtual ETTYAlign SetHeaderAlignment(ETTYAlign newValue) = 0;
virtual ETTYAlign SetSubheaderAlignment(ETTYAlign newValue) = 0;
virtual bool SetTopBorder(bool newValue) = 0;
virtual bool SetLeftBorder(bool newValue) = 0;
virtual bool SetRightBorder(bool newValue) = 0;
virtual bool GetTopBorder() = 0;
virtual bool GetLeftBorder() = 0;
virtual bool GetRightBorder() = 0;
virtual bool GetBottomBorder() = 0;
virtual bool GetBannerFootBorder() = 0;
virtual AuUInt8 SetPaddingHeadOfLog(AuUInt8 newValue) = 0;
virtual AuUInt8 SetPaddingTopOfLog(AuUInt8 newValue) = 0;
virtual AuUInt8 SetPaddingLeftOfLog(AuUInt8 newValue) = 0;
virtual AuUInt8 SetPaddingRightOfLog(AuUInt8 newValue) = 0;
virtual AuUInt8 SetPaddingLeftOfInput(AuUInt8 newValue) = 0;
virtual AuUInt8 SetPaddingTopOfInput(AuUInt8 newValue) = 0;
virtual AuUInt8 SetPaddingTopOfHint(AuUInt8 newValue) = 0;
virtual AuUInt8 SetPaddingTopOfHeader(AuUInt8 newValue) = 0;
virtual AuUInt8 SetPaddingMidOfHeader(AuUInt8 newValue) = 0;
virtual AuUInt8 SetPaddingBottomOfSubheader(AuUInt8 newValue) = 0;
virtual AuUInt8 GetPaddingHeadOfLog() = 0;
virtual AuUInt8 GetPaddingTopOfLog() = 0;
virtual AuUInt8 GetPaddingLeftOfLog() = 0;
virtual AuUInt8 GetPaddingRightOfLog() = 0;
virtual AuUInt8 GetPaddingLeftOfInput() = 0;
virtual AuUInt8 GetPaddingTopOfInput() = 0;
virtual AuUInt8 GetPaddingTopOfHint() = 0;
virtual AuUInt8 GetPaddingTopOfHeader() = 0;
virtual AuUInt8 GetPaddingMidOfHeader() = 0;
virtual AuUInt8 GetPaddingBottomOfSubheader() = 0;
};
AUKN_SYM AuSPtr<ITTYConsole> GetTTYConsole();
}