Rearrange code and cleanup

This commit is contained in:
2025-12-30 01:19:50 +00:00
parent 04179d1a4e
commit 235eafb01c
51 changed files with 2608 additions and 2646 deletions

View File

@@ -0,0 +1,20 @@
#ifndef BOXES_DIAGNOSTICS_H
#define BOXES_DIAGNOSTICS_H
#include "editor/decl.h"
#include "io/ui.h"
#include "pch.h"
#include "utils/utils.h"
struct DiagnosticBox {
std::vector<VWarn> warnings;
std::vector<ScreenCell> cells;
uint32_t box_width;
uint32_t box_height;
void clear();
void render_first();
void render(Coord pos);
};
#endif

26
include/boxes/hover.h Normal file
View File

@@ -0,0 +1,26 @@
#ifndef BOXES_HOVER_H
#define BOXES_HOVER_H
#include "editor/decl.h"
#include "io/ui.h"
#include "pch.h"
#include "ts/decl.h"
#include "utils/utils.h"
struct HoverBox {
std::string text;
std::atomic<bool> is_markup;
uint32_t scroll_;
std::vector<ScreenCell> cells;
uint32_t box_width;
uint32_t box_height;
std::vector<Highlight> highlights;
std::vector<Span> hover_spans;
void clear();
void scroll(int32_t number);
void render_first(bool scroll = false);
void render(Coord pos);
};
#endif