diff options
Diffstat (limited to 'src/interfaces')
| -rw-r--r-- | src/interfaces/component.hpp | 12 | ||||
| -rw-r--r-- | src/interfaces/statusline.hpp | 8 | 
2 files changed, 18 insertions, 2 deletions
| diff --git a/src/interfaces/component.hpp b/src/interfaces/component.hpp index 7e1b132..2f62c95 100644 --- a/src/interfaces/component.hpp +++ b/src/interfaces/component.hpp @@ -2,13 +2,23 @@  #include "interfaces/matrix.hpp" +#include "engine/data/style.hpp" +  #include <memory> +#include <optional> + +class ComponentElement +{ +public: +	char value{}; +	Style style{}; +};  // NOLINTNEXTLINE(cppcoreguidelines-special-member-functions)  class IComponent  {  public: -	using ComponentMatrix = IMatrix<char>; +	using ComponentMatrix = IMatrix<ComponentElement>;  	virtual ~IComponent() = default; diff --git a/src/interfaces/statusline.hpp b/src/interfaces/statusline.hpp index ae25fd9..0634d2e 100644 --- a/src/interfaces/statusline.hpp +++ b/src/interfaces/statusline.hpp @@ -3,9 +3,12 @@  #include "interfaces/component.hpp"  #include "engine/data/bounds.hpp" +#include "engine/data/style.hpp"  #include <yacppdic/factory.hpp> +#include <memory> +#include <optional>  #include <string_view>  enum StatusLineSection @@ -25,13 +28,16 @@ class IStatusLine : public IComponent  {  public:  	// NOLINTNEXTLINE(google-default-arguments) -	virtual void set_status( +	virtual void set_section_status(  		StatusLineSection section,  		const std::string_view &status,  		int32_t start = 1) noexcept = 0;  	virtual void  	set_section_length(StatusLineSection section, int32_t length) noexcept = 0; + +	virtual void +	set_section_style(StatusLineSection section, const Style &style) noexcept = 0;  };  using IStatusLineFactory = | 
