WIP
This commit is contained in:
43
src/frontend/frontend.h
Normal file
43
src/frontend/frontend.h
Normal 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 = {};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user