mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
Reorganized source code into files named in the fashion of imhex and split large functions into smaller ones. Moved all function definitions out of the header except for one-liners. All variable types were switched to use imHex standard (u8,...) and removed duplicated functions that were needed when the text editor was isolated. Minor improvements to find/replace while making sure they still worked with utf-8 chars.
39 lines
866 B
C++
39 lines
866 B
C++
#pragma once
|
|
|
|
#include <hex/ui/view.hpp>
|
|
|
|
#include <ui/text_editor.hpp>
|
|
|
|
#include <list>
|
|
|
|
namespace hex::plugin::builtin {
|
|
|
|
class ViewBookmarks : public View::Window {
|
|
public:
|
|
ViewBookmarks();
|
|
~ViewBookmarks() override;
|
|
|
|
void drawContent() override;
|
|
|
|
private:
|
|
struct Bookmark {
|
|
ImHexApi::Bookmarks::Entry entry;
|
|
bool highlightVisible;
|
|
};
|
|
|
|
private:
|
|
void drawDropTarget(std::list<Bookmark>::iterator it, float height);
|
|
|
|
bool importBookmarks(hex::prv::Provider *provider, const nlohmann::json &json);
|
|
bool exportBookmarks(hex::prv::Provider *provider, nlohmann::json &json);
|
|
|
|
void registerMenuItems();
|
|
|
|
private:
|
|
std::string m_currFilter;
|
|
|
|
PerProvider<std::list<Bookmark>> m_bookmarks;
|
|
PerProvider<u64> m_currBookmarkId;
|
|
};
|
|
|
|
} |