mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-24 11:11:02 -07:00
Add the boilerplate for the exerciser.
This commit is contained in:
@@ -510,6 +510,8 @@ plugin(
|
||||
"./controlpanelview.h",
|
||||
"./datastore.cc",
|
||||
"./datastore.h",
|
||||
"./exerciserview.cc",
|
||||
"./exerciserview.h",
|
||||
"./diskprovider.cc",
|
||||
"./diskprovider.h",
|
||||
"./fluxengine.cc",
|
||||
|
||||
25
src/gui2/exerciserview.cc
Normal file
25
src/gui2/exerciserview.cc
Normal file
@@ -0,0 +1,25 @@
|
||||
#include <hex/api/content_registry/user_interface.hpp>
|
||||
#include <hex/api/theme_manager.hpp>
|
||||
#include <hex/helpers/logger.hpp>
|
||||
#include <fonts/vscode_icons.hpp>
|
||||
#include <fonts/tabler_icons.hpp>
|
||||
#include <fmt/format.h>
|
||||
#include "lib/core/globals.h"
|
||||
#include "lib/config/config.h"
|
||||
#include "lib/data/disk.h"
|
||||
#include "lib/data/sector.h"
|
||||
#include "lib/config/proto.h"
|
||||
#include "globals.h"
|
||||
#include "exerciserview.h"
|
||||
#include "datastore.h"
|
||||
#include "utils.h"
|
||||
#include <implot.h>
|
||||
#include <implot_internal.h>
|
||||
|
||||
using namespace hex;
|
||||
|
||||
ExerciserView::ExerciserView(): View::Modal("fluxengine.view.exerciser.name", ICON_VS_DEBUG) {}
|
||||
|
||||
void ExerciserView::drawContent()
|
||||
{
|
||||
}
|
||||
22
src/gui2/exerciserview.h
Normal file
22
src/gui2/exerciserview.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex/ui/view.hpp>
|
||||
|
||||
class ExerciserView : public hex::View::Modal
|
||||
{
|
||||
public:
|
||||
ExerciserView();
|
||||
~ExerciserView() override = default;
|
||||
|
||||
void drawContent() override;
|
||||
|
||||
[[nodiscard]] bool shouldDraw() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
[[nodiscard]] bool hasViewMenuItemEntry() const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "controlpanelview.h"
|
||||
#include "logview.h"
|
||||
#include "visualiserview.h"
|
||||
#include "exerciserview.h"
|
||||
#include "diskprovider.h"
|
||||
#include "datastore.h"
|
||||
|
||||
@@ -65,6 +66,18 @@ IMHEX_PLUGIN_SETUP("FluxEngine", "David Given", "FluxEngine integration")
|
||||
hex::WorkspaceManager::switchWorkspace(currentWorkspaceName);
|
||||
});
|
||||
|
||||
hex::ContentRegistry::UserInterface::addMenuItem(
|
||||
{"hex.builtin.menu.extras", "fluxengine.menu.tools.exerciser"},
|
||||
ICON_TA_TOOLS,
|
||||
2500,
|
||||
hex::Shortcut::None,
|
||||
[]
|
||||
{
|
||||
hex::ContentRegistry::Views::getViewByName(
|
||||
"fluxengine.view.exerciser.name")
|
||||
->getWindowOpenState() = true;
|
||||
});
|
||||
|
||||
hex::ContentRegistry::Provider::add<DiskProvider>();
|
||||
|
||||
hex::ContentRegistry::Views::add<ConfigView>();
|
||||
@@ -74,6 +87,7 @@ IMHEX_PLUGIN_SETUP("FluxEngine", "David Given", "FluxEngine integration")
|
||||
hex::ContentRegistry::Views::add<PhysicalView>();
|
||||
hex::ContentRegistry::Views::add<SummaryView>();
|
||||
hex::ContentRegistry::Views::add<VisualiserView>();
|
||||
hex::ContentRegistry::Views::add<ExerciserView>();
|
||||
|
||||
Datastore::init();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user