2020-11-14 23:46:38 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <hex.hpp>
|
|
|
|
|
|
|
|
#include "imgui.h"
|
|
|
|
#include "views/view.hpp"
|
2020-11-28 20:55:52 +00:00
|
|
|
#include "helpers/math_evaluator.hpp"
|
2020-11-14 23:46:38 +00:00
|
|
|
|
2020-11-15 20:31:04 +00:00
|
|
|
#include <array>
|
|
|
|
#include <string>
|
2020-11-14 23:46:38 +00:00
|
|
|
|
|
|
|
namespace hex {
|
|
|
|
|
|
|
|
namespace prv { class Provider; }
|
|
|
|
|
|
|
|
class ViewTools : public View {
|
|
|
|
public:
|
2020-11-30 20:45:48 +00:00
|
|
|
ViewTools(hex::prv::Provider* &provider);
|
2020-11-14 23:46:38 +00:00
|
|
|
~ViewTools() override;
|
|
|
|
|
|
|
|
void createView() override;
|
|
|
|
void createMenu() override;
|
|
|
|
|
|
|
|
private:
|
2020-11-30 20:45:48 +00:00
|
|
|
hex::prv::Provider* &m_dataProvider;
|
|
|
|
|
2020-11-14 23:46:38 +00:00
|
|
|
char *m_mangledBuffer = nullptr;
|
2020-11-24 01:59:49 +00:00
|
|
|
std::string m_demangledName;
|
2020-11-15 01:50:56 +00:00
|
|
|
|
|
|
|
bool m_asciiTableShowOctal = false;
|
|
|
|
|
2020-11-15 20:31:04 +00:00
|
|
|
char *m_regexInput = nullptr;
|
|
|
|
char *m_regexPattern = nullptr;
|
|
|
|
char *m_replacePattern = nullptr;
|
|
|
|
std::string m_regexOutput;
|
|
|
|
|
|
|
|
std::array<float, 4> m_pickedColor;
|
|
|
|
|
2020-11-28 20:55:52 +00:00
|
|
|
MathEvaluator m_mathEvaluator;
|
|
|
|
std::vector<long double> m_mathHistory;
|
|
|
|
std::string m_lastMathError;
|
|
|
|
char *m_mathInput = nullptr;
|
|
|
|
|
2020-11-15 01:50:56 +00:00
|
|
|
void drawDemangler();
|
|
|
|
void drawASCIITable();
|
2020-11-15 20:31:04 +00:00
|
|
|
void drawRegexReplacer();
|
|
|
|
void drawColorPicker();
|
2020-11-28 20:55:52 +00:00
|
|
|
void drawMathEvaluator();
|
2020-11-14 23:46:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|