ImHex/include/views/view_tools.hpp

51 lines
1.1 KiB
C++
Raw Normal View History

2020-11-14 23:46:38 +00:00
#pragma once
#include <hex.hpp>
#include "imgui.h"
#include "views/view.hpp"
#include "helpers/math_evaluator.hpp"
2020-11-14 23:46:38 +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:
ViewTools(hex::prv::Provider* &provider);
2020-11-14 23:46:38 +00:00
~ViewTools() override;
void createView() override;
void createMenu() override;
private:
hex::prv::Provider* &m_dataProvider;
2020-11-14 23:46:38 +00:00
char *m_mangledBuffer = nullptr;
std::string m_demangledName;
2020-11-15 01:50:56 +00:00
bool m_asciiTableShowOctal = false;
char *m_regexInput = nullptr;
char *m_regexPattern = nullptr;
char *m_replacePattern = nullptr;
std::string m_regexOutput;
std::array<float, 4> m_pickedColor;
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();
void drawRegexReplacer();
void drawColorPicker();
void drawMathEvaluator();
2020-11-14 23:46:38 +00:00
};
}