mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 13:05:25 -05:00
impr: Make Hex Editor view always be focused by default
This commit is contained in:
@@ -16,6 +16,33 @@ namespace hex::plugin::builtin {
|
||||
return ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse;
|
||||
}
|
||||
|
||||
bool shouldDefaultFocus() const override { return true; }
|
||||
|
||||
bool isSelectionValid() const {
|
||||
return m_hexEditor.isSelectionValid();
|
||||
}
|
||||
|
||||
Region getSelection() const {
|
||||
return m_hexEditor.getSelection();
|
||||
}
|
||||
|
||||
void setSelection(const Region ®ion) {
|
||||
m_hexEditor.setSelection(region);
|
||||
}
|
||||
|
||||
void setSelection(u64 start, u64 end) {
|
||||
m_hexEditor.setSelection(start, end);
|
||||
}
|
||||
|
||||
void jumpToSelection() {
|
||||
m_hexEditor.jumpToSelection();
|
||||
}
|
||||
|
||||
void jumpIfOffScreen() {
|
||||
m_hexEditor.jumpIfOffScreen();
|
||||
}
|
||||
|
||||
public:
|
||||
class Popup {
|
||||
public:
|
||||
virtual ~Popup() = default;
|
||||
@@ -52,30 +79,6 @@ namespace hex::plugin::builtin {
|
||||
m_currPopup.reset();
|
||||
}
|
||||
|
||||
bool isSelectionValid() const {
|
||||
return m_hexEditor.isSelectionValid();
|
||||
}
|
||||
|
||||
Region getSelection() const {
|
||||
return m_hexEditor.getSelection();
|
||||
}
|
||||
|
||||
void setSelection(const Region ®ion) {
|
||||
m_hexEditor.setSelection(region);
|
||||
}
|
||||
|
||||
void setSelection(u64 start, u64 end) {
|
||||
m_hexEditor.setSelection(start, end);
|
||||
}
|
||||
|
||||
void jumpToSelection() {
|
||||
m_hexEditor.jumpToSelection();
|
||||
}
|
||||
|
||||
void jumpIfOffScreen() {
|
||||
m_hexEditor.jumpIfOffScreen();
|
||||
}
|
||||
|
||||
private:
|
||||
void drawPopup();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user