This commit is contained in:
T0b1
2023-05-31 23:14:05 +02:00
commit d4bf6731a3
14 changed files with 548 additions and 0 deletions

43
src/frontend/frontend.h Normal file
View File

@@ -0,0 +1,43 @@
#pragma once
#include <vector>
#include <string>
#include <optional>
#include <cstdint>
#include <memory>
#include "imgui.h"
#include "backend/debug_backend.h"
namespace dbgui::frontend {
struct Target {
backend::TargetState state = backend::TargetState::stopped;
std::string filename;
uint64_t id;
std::unique_ptr<backend::Backend> backend = nullptr;
};
struct Frontend {
Frontend() {
_open_popup_name_buf.resize(512);
}
void run_frame();
private:
void draw_header();
void draw_open_popup();
void draw_status();
bool _draw_second = false;
ImGuiID _dock_id = 0;
bool _draw_open_popup = false;
ImGuiID _open_popup_id = 0;
std::vector<char> _open_popup_name_buf = {};
std::optional<Target> _target = {};
};
}