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