add try_engine

This commit is contained in:
chatlanin
2023-03-02 15:25:58 +03:00
parent 5a829fad05
commit f81f4e5e78
54 changed files with 129 additions and 1905 deletions

View File

@@ -0,0 +1,42 @@
#pragma once
#include <vector>
#include "navigation/navigation.hpp"
#include "history/history.hpp"
#include "preview/preview.hpp"
namespace rrr
{
enum class TYPE_WIN
{
HISTORY, NAVIGATION, PREVIEW
};
using files = std::vector<file>;
class content
{
public:
content() = default;
~content() = default;
public:
void set_pwd(std::filesystem::path);
void fill();
files* get(TYPE_WIN);
private:
content_type::navigation nav;
content_type::history his;
content_type::preview prev;
// текущая виртуальная дирректория расположения пользователя,
// она может отличается от его расположения в терминале по факту
std::filesystem::path PWD;
// чтобы не устанавливалась стрелка изначально
// полезно при первом открытии окна prev
int cursor_position = 0;
};
}