1
0
mirror of synced 2024-11-12 02:00:52 +01:00
Commit Graph

379 Commits

Author SHA1 Message Date
WerWolv
6fd3fa77ed impr: Don't scroll hex editor view when jumping to a region that's on-screen already
Fixes #1743
2024-06-07 19:29:55 +02:00
WerWolv
de8465a8f4 feat: Added limited support for the process memory provider to macOS 2024-06-07 19:17:14 +02:00
WerWolv
a5c250c811 fix: Byte type annotations not being reset correctly 2024-05-30 16:57:28 +02:00
WerWolv
71c1bcde0d feat: Added option to specify max file size to load into memory 2024-05-19 15:10:22 +02:00
WerWolv
563bf78f03 impr: Allow providers to be closed quicker after being opened 2024-05-17 21:56:43 +02:00
WerWolv
add94c5926 fix: Loading of custom data processor nodes 2024-05-12 23:19:39 +02:00
SparkyTD
973af4650c
impr: Convert all hex editor popups to floating, movable windows (#1658)
### Problem description
In previous versions of ImHex, all tool windows were implemented as
static popups fixed in the upper left position of the hex view. This PR
refactors all tool popups to use floating windows that can be dragged
around by the user, or closed with a dedicated close button on the title
bar. These popup also support a stylable transparency when the user is
not hovering their mouse over the window.

### Implementation description
I rewrote the logic in `ViewHexEditor::drawPopup()` to use a custom
`ImGuiExt::BeginHoveringPopup` function for rendering the popup windows.
This new function is an almost exact replica of the built-in
`ImGui::BeginPopupModal`, except it does also displays the default
window title bar with a close button.

A second custom function, `ImGuiExt::PopupTitleBarButton` was also added
for rendering small icon-based buttons into the title bar of the parent
popup window. This new function was used to implement an optional
"Pinning" feature that individual popup implementations can specify. If
a window is pinned, it won't close automatically when its main action is
executed. For example, the "Select" button on the Select dialog will
close the popup by default, unless the window is pinned.

### Screenshots
Popup dialogs before:

![image](https://github.com/WerWolv/ImHex/assets/45818400/7c253181-8284-4076-a066-089403554f0f)

Popup dialogs after:


https://github.com/WerWolv/ImHex/assets/45818400/99d1a628-8ac1-40ac-9146-9062091bb0db



### Additional things
- When the user stops hovering their mouse over a popup window, it
becomes semi-transparent, making it easier to see the content behind it
- This PR also introduces the `styles.imhex.popup-alpha` style, making
the transparency effect configurable, including the ability to disable
the effect completely by setting `popup-alpha` to `1.0`.
- Fixed a bug that caused some popup windows to ignore the Enter and the
KeypadEnter keys. With this PR, all tool windows will execute their main
action when the user presses either one of the two Enter keys, and will
also close automatically unless the window is pinned.

### Possible changes and improvements
- Should the transparency effect be disabled if a window is pinned?
- Should the transparency factor be modifiable on the Settings/Interface
page?
- A keyboard shortcut could be added for quickly pinning / unpinning the
current window.
- Can the pin icon stay on the left, or should it be moved next to the
close button, with a similar circular background?

---------

Co-authored-by: WerWolv <werwolv98@gmail.com>
2024-05-10 21:21:19 +02:00
WerWolv
978fa17932 impr: Make accept pattern popup open faster and close correctly 2024-05-08 23:54:09 +02:00
SparkyTD
adbcc48de7
fix: Multiple file reload popups stacking on top of each other (#1654)
<!--
Please provide as much information as possible about what your PR aims
to do.
PRs with no description will most likely be closed until more
information is provided.
If you're planing on changing fundamental behaviour or add big new
features, please open a GitHub Issue first before starting to work on
it.
If it's not something big and you still want to contact us about it,
feel free to do so !
-->

### Problem description
This PR aims to address #1645 that caused the built in file provider's
change monitor to trigger the notification popup dialog multiple times
in a row after multiple external file changes.

### Implementation description
I added an additional boolean field
`m_changeEventAcknowledgementPending` that tracks whether there are any
pending or unacknowledged change notification dialogs to prevent further
dialogs from being opened. The flag is only reset to its initial value
once the user has acknowledged the first `PopupQuestion` dialog.

Since the file is reloaded only after the user clicks 'Yes', it is
unnecessary to ensure that only the latest popup is acknowledged.
2024-05-07 23:43:20 +02:00
WerWolv
1df0eea6c6 impr: Added support for SVG loading, improved texture loading API 2024-05-01 20:36:10 +02:00
WerWolv
fd61e757f0 impr: Make unsaved changes popup behave more like in other applications 2024-04-23 21:02:16 +02:00
WerWolv
e9ebfe36b0 build: Updated ImGui to v1.90.5 2024-04-12 22:56:10 +02:00
WerWolv
5d08499d20 impr: Use sidebar for settings categories instead of tabs 2024-04-10 19:55:37 +02:00
WerWolv
f084bc4147 fix: View registers causing crashes when being deleted 2024-03-28 22:21:00 +01:00
WerWolv
c8ca84ede9 fix: Prevent view providers from pointing to themselves and being saved as recent provider
#1607
2024-03-22 00:16:28 +01:00
WerWolv
d36bd253e8 feat: Allow shift-selecting multiple find view occurrences 2024-03-21 23:50:13 +01:00
Nobutaka Mantani
05ffcab911
build: Added support patches for FreeBSD (#1584)
This pull request fixes build on FreeBSD. The changes are conditioned
with `#if defined(__FreeBSD__)` preprocessor macro and they should not
affect build for other operating systems.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
Co-authored-by: iTrooz <hey@itrooz.fr>
2024-03-21 21:31:17 +01:00
paxcut
3b3701135f
impr: Various fixes and an enhancement for the pattern editor (#1528)
Fixed console error messages using doc comment syntax highlights. Fixed
results of find not updating when march case was toggled. Fixed syntax
highlights of nested ifdefs. Fixed editor cursor blinks if OS focus goes
to another window. Fixed Highlights of "\\\"" was incorrectly handled.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-03-21 12:58:20 +00:00
WerWolv
31c93c8c5c impr: Properly clear pattern editor when closing last provider 2024-03-15 21:07:21 +01:00
WerWolv
0f4504476a fix: File changed popup showing up when saving memory mapped file 2024-03-15 17:57:12 +01:00
WerWolv
c2aafb14c2 fix: View provider not saving top-level data to project file 2024-03-10 15:32:01 +01:00
WerWolv
d4d1acb555 feat: Added --verbose command line option to enable debug logs 2024-03-10 15:22:14 +01:00
WerWolv
d1a59f8c1b fix: View provider not correctly saving its state to a project file 2024-03-10 15:17:15 +01:00
WerWolv
45a3bdffe0 impr: Load small files into memory, open larger files as read-only by default
#841, #1585
2024-03-10 14:31:39 +01:00
WerWolv
8e94acc98f fix: Compile error 2024-03-01 18:37:28 +01:00
iTrooz
97f5175c84
impr: Better recovery from exceptions thrown in main thread (#1577)
This PR improves many things which can be seen by the commit name, but
the most important thing is the addition of a popup telling the user
when an exception is thrown


![image](https://github.com/WerWolv/ImHex/assets/42669835/db796416-9cce-4aa5-ad60-c22f05b5fc73)
2024-03-01 18:21:15 +01:00
Justus Garbe
9e8c780d66
fix: Use explicit string argument according to -Wformat-security on clang (#1572) 2024-02-27 19:07:44 +01:00
WerWolv
77550d902c feat: Added option to disable annotations in byte type graph 2024-02-26 21:41:43 +01:00
WerWolv
41935781fb fix: Build error due to use of localized strings 2024-02-26 21:13:57 +01:00
iTrooz
47362559ef
tests: Add infrastructure for testing plugins (#1538)
This PR adds a test architecture to be able to test plugins

Main infrastructure done by @WerWolv

---------

Co-authored-by: WerWolv <werwolv98@gmail.com>
2024-02-26 20:51:08 +01:00
WerWolv
6e32f03a6b feat: Added plain text and similar bytes regions to byte types diagram 2024-02-26 20:49:35 +01:00
WerWolv
ea601a7d03 feat: Added option to highlight pattern parents in the hex editor when hovering 2024-02-25 14:30:56 +01:00
WerWolv
58ad9f2ca8 impr: Small code layout improvements for diagrams 2024-02-25 11:20:04 +01:00
WerWolv
859574c014 impr: .0f -> .0F 2024-02-24 23:34:29 +01:00
WerWolv
00b3d7809c fix: Various issues with the digram and layered distribution diagrams 2024-02-24 23:23:53 +01:00
WerWolv
2f7b949bd1 impr: Split out digram and layered distribution in their own section 2024-02-24 18:54:35 +01:00
WerWolv
4100e48fe2 impr: Render digram and layered distribution to texture to improve frame rate 2024-02-24 18:07:20 +01:00
WerWolv
9d02379583 impr: Don't allow opening the same file twice
Fixes #1569
2024-02-24 12:06:06 +01:00
WerWolv
d19d62b1fc impr: Remember find popup input per provider
Closes #1567
2024-02-23 18:31:58 +01:00
WerWolv
56e7c15064 impr: Refactor and modularize data information view 2024-02-21 00:06:52 +01:00
WerWolv
9f2f01c17d fix: Modification highlighting not working correctly when provider data was moved 2024-02-15 22:09:37 +01:00
WerWolv
12ba05385b fix: Saving not removing red highlighting 2024-02-15 21:54:41 +01:00
WerWolv
2f88994c37 fix: Data inspector not updating correctly when data has changed
Fixes #1545
2024-02-15 13:01:34 +01:00
WerWolv
2fd81c7ffd impr: Better UI for the main about screen page 2024-02-11 00:35:10 +01:00
Nik
bcbcb1f23c
impr: Various web build improvements, API cleanup (#1541) 2024-02-10 23:31:05 +01:00
Nik
5e5714baeb
patterns: Merged in new pattern language refactor (#1533) 2024-02-04 14:03:42 +01:00
WerWolv
7709f4e307 feat: Allow setting language through the command line 2024-02-01 10:58:45 +01:00
Nik
339541a56f
impr: Restructure various components much better (#1520) 2024-01-28 22:14:59 +01:00
paxcut
1957d6f432 feat: Added find-replace to pattern editor (#1465) 2024-01-27 14:52:20 +01:00
PerikiyoXD
11f75f72ee
feat: Add search options for string encoding and endianness (#1490)
Added search options for string encoding (UTF-8, UTF-16, UTF-32) and
endianness (Little, Big) in the hex editor. This enhancement allows
users to customize the search process based on different string
encodings and byte orders.

Affected files:
- `plugins/builtin/romfs/lang/de_DE.json`
- `plugins/builtin/romfs/lang/en_US.json`
- `plugins/builtin/romfs/lang/es_ES.json`
- `plugins/builtin/romfs/lang/it_IT.json`
- `plugins/builtin/romfs/lang/ja_JP.json`
- `plugins/builtin/romfs/lang/ko_KR.json`
- `plugins/builtin/romfs/lang/pt_BR.json`
- `plugins/builtin/romfs/lang/zh_CN.json`
- `plugins/builtin/romfs/lang/zh_TW.json`
- `plugins/builtin/source/content/views/view_hex_editor.cpp`

Resolves: #1325

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-01-27 14:13:41 +01:00