impr: Clean up old layout stuff

This commit is contained in:
WerWolv
2023-05-11 23:21:52 +02:00
parent 0b21e30e44
commit 0649e0dcd3
8 changed files with 18 additions and 73 deletions

View File

@@ -493,14 +493,8 @@ namespace hex {
using DrawCallback = std::function<void()>;
using MenuCallback = std::function<void()>;
using EnabledCallback = std::function<bool()>;
using LayoutFunction = std::function<void(u32)>;
using ClickCallback = std::function<void()>;
struct Layout {
std::string unlocalizedName;
LayoutFunction callback;
};
struct MainMenuItem {
std::string unlocalizedName;
};
@@ -535,8 +529,6 @@ namespace hex {
std::vector<impl::SidebarItem> &getSidebarItems();
std::vector<impl::TitleBarButton> &getTitleBarButtons();
std::vector<impl::Layout> &getLayouts();
}
/**
@@ -608,14 +600,6 @@ namespace hex {
*/
void addTitleBarButton(const std::string &icon, const std::string &unlocalizedTooltip, const impl::ClickCallback &function);
/**
* @brief Adds a new layout definition to the Layout menu
* @param unlocalizedName The unlocalized name of the layout
* @param function The function to call to setup the layout
*/
void addLayout(const std::string &unlocalizedName, const impl::LayoutFunction &function);
}
/* Provider Registry. Allows adding new data providers to be created from the UI */

View File

@@ -26,6 +26,7 @@ namespace hex {
static void process();
static void reload();
static void reset();
private:
LayoutManager() = default;