Files
imhex/plugins/builtin/include/content/views/view_bookmarks.hpp
paxcut 50f1fe2b2d improv: moved text editor to the ui plugin. (#2397)
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.
2025-08-10 14:35:21 -07:00

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;
};
}