mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 05:05:19 -05:00
Abstracted FILE handle into a generic data provider class
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
#include "views/view_pattern_data.hpp"
|
||||
#include "views/view_hashes.hpp"
|
||||
|
||||
#include "providers/provider.hpp"
|
||||
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
@@ -14,13 +16,13 @@ int main() {
|
||||
|
||||
// Shared Data
|
||||
std::vector<hex::Highlight> highlights;
|
||||
FILE *file = nullptr;
|
||||
hex::prv::Provider *dataProvider = nullptr;
|
||||
|
||||
// Create views
|
||||
window.addView<hex::ViewHexEditor>(file, highlights);
|
||||
window.addView<hex::ViewHexEditor>(dataProvider, highlights);
|
||||
window.addView<hex::ViewPattern>(highlights);
|
||||
window.addView<hex::ViewPatternData>(file, highlights);
|
||||
window.addView<hex::ViewHashes>(file);
|
||||
window.addView<hex::ViewPatternData>(dataProvider, highlights);
|
||||
window.addView<hex::ViewHashes>(dataProvider);
|
||||
|
||||
window.loop();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user