-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.h
More file actions
33 lines (26 loc) · 1.26 KB
/
ui.h
File metadata and controls
33 lines (26 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#define IMGUI_DEFINE_MATH_OPERATORS
#include <atomic>
#include <functional>
#include <string>
#include <vector>
#include "ImGuiFileDialog.h"
#include "backends/imgui_impl_glfw.h"
#include "backends/imgui_impl_opengl3.h"
#include "imgui.h"
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
#include <glad/glad.h>
namespace entropy {
struct AppState; // Forward declare
struct UiState; // Forward declare
void renderAboutWindow(UiState &uiState);
void renderHelpWindow(UiState &uiState);
void renderHexViewWindow(UiState &uiState, const AppState &appState);
void renderSearchWindow(UiState &uiState, AppState &appState, std::function<void(size_t)> loadHexData);
void handleFileDialogs(UiState &uiState, AppState &appState, IGFD::FileDialogConfig &config, std::function<void(size_t)> loadHexData);
void renderVisualization(ImDrawList *draw_list, GLuint tex, const std::vector<uint8_t> &block_buffer, float zoom, ImVec2 pan_offset,
size_t current_block, size_t block_size, size_t block_width, size_t block_height, UiState &uiState,
std::function<void(size_t)> loadHexData);
void upload_block(GLuint tex, const std::vector<uint8_t> &raw, size_t block_width, size_t block_height, const AppState &appState);
} // namespace entropy