Commit Graph

48 Commits

Author SHA1 Message Date
Benjamin Popp
a278d91f9f Add 'matchExactCase' parameter for ViewPort.Find 2021-06-21 22:20:12 -05:00
Benjamin Popp
ef9e6d8842 Add boilerplate to connect view to diff commands in the viewport 2021-06-05 21:53:42 -05:00
Benjamin Popp
49de6fbf9f progress with Diff 2021-06-01 20:52:39 -05:00
Benjamin Popp
f3c93c0257 Get the diff tab's name right 2021-06-01 20:24:54 -05:00
Benjamin Popp
fb3d36e052 Modify the goto logic for search results so that we scroll the correct amount 2021-05-15 21:28:04 -05:00
Benjamin Popp
e0b0233e8c Add new util method: ToolTray.SelectedTool.set 2021-05-01 20:55:44 -05:00
Benjamin Popp
425db5778d Add basic diff functionality
The current implementation of Diff just compares the file with the original version of it, and then highlights the bytes that have been changed since last save. Nothing fancy, but it should allow us to test the current thumb routines.
2021-03-21 20:21:21 -05:00
Benjamin Popp
36bf79e91b Add ability for to import content to the current tab.
Planned uses:
* Import an ips/ups into a ViewPort
* Import a .hma paste script into a ViewPort
* Import an image into the image editor
2021-02-18 21:25:47 -06:00
Benjamin Popp
73ba6e79c6 Allow Combined Search Results
When multiple results are close together, allow them to be combined into a single result within the new tab. This makes the overall result shorter, and makes it easier to see when 2 pieces of data are near each other.
2021-02-13 23:22:01 -06:00
Benjamin Popp
7c1f52ecee Make the Anchor visible from anywhere in the run 2021-02-13 20:15:01 -06:00
Benjamin Popp
e0e0ec23c8 Add "Export Backup" button 2020-11-28 22:53:09 -06:00
Benjamin Popp
6bcea4f86f Update search results when switching tabs 2020-10-06 10:37:59 -05:00
Benjamin Popp
2cfa231188 Goto shouldn't work for search results tab 2020-10-01 12:56:50 -05:00
Benjamin Popp
b921082a0b Don't call CascadeScripts for derived ViewPorts
If this ViewPort is based on the same model as another ViewPort, we don't need to call CascadeScripts. This significantly increases search speed.
2020-07-04 23:33:34 -05:00
Benjamin Popp
34e69fe5a7 Splitting Paste work
The idea here is that we still want to do work on the UI thread (because we're doing a bunch of command and collection notifications, which can't cleanly be done from a background thread). So we break the long "paste" operations into chunks, and allow UI updates between.
2020-06-26 22:09:03 -05:00
Benjamin Popp
9bfcdacb8a Introduce Row Width controls
Add 3 new properties to the ViewModel:
* Auto Adjust Data Width, which allows the selection to adjust the width after a goto based on the width of the target data.
* Allow Multiple Elements per Line, which allows the selection to adjust the width in multiples of the desired width, to better utilize the availabe space.
* Stretch Data, which signals the view that it should make cells wider if possible, up to twice their normal width.

All 3 of these preference are stored at the Editor level.

Add default styles for Toggle Buttons, Expanders, and Tooltips, since all 3 of those are now needed.
2020-06-03 07:49:58 -05:00
Benjamin Popp
8370d27191 Add support for deep copy
Most of this is boilerplate. The actual implementation change is in ArrayRunElementSegment.ToText. Converting a pointer element segment to text can now optionally collect the *content* of that pointer, instead of the pointer itself.

The second test is to fix a bug in plm AppendTo.
2020-05-12 16:26:32 -05:00
Benjamin Popp
65147382dd Add 'Select All' support
User request: Fred40
2020-04-26 13:52:46 -05:00
Benjamin Popp
b55937259d Don't deselect the Code/Raw tool automatically
Selecting a sprite or string or something _should_ deselect most tools to change the tool to whatever the most useful option is automatically. But don't deselect the Raw tool, because that's useful in all situations.
2020-04-06 07:52:58 -05:00
Benjamin Popp
dcc1cc49c8 Initial introduction of Sprite Tool model/ViewModel 2020-03-22 20:09:44 -05:00
Benjamin Popp
a6bbbe48ee Auto Format
also remove a redundant cast
2020-02-17 21:59:24 -06:00
Benjamin Popp
57aef9a826 Hover over tab for full name
For search tabs, it'll now only show the first few characters of the search in the tab, and the hover will show you the full search term.
2020-02-10 22:39:24 -06:00
Benjamin Popp
f7224514e3 Animate Vertical Scrolling
* Add `AnimateScroll` property to `EditorViewModel` so the user can toggle this feature. Show it in the menu.
* Add `PreviewScrollChanged` event to `IViewPort` so the ViewPort can notify that a scroll is about to start.
* Notify more carefully on ScrollValue changes in ScrollRegion so that we don't get weird false vertical scrolls during user-initiated horizontal scrolls.
* Notify HexContent that the ViewPort content has changed when the Headers change, to properly update the blinky cursor.
* Do most of the animation work in the TabView. Add some extra UI elements around the HexContent/Header so we can render a copy of it right before scrolling, so that you can see the extra content that's being scrolled offscreen.
2020-01-14 13:06:16 -06:00
haven1433
602bf280ba Refresh a tab when it switches in 2019-12-26 10:34:44 -06:00
Benjamin Popp
71337970dc Show selected raw bytes in the bottom bar
A common feature request is to see the raw hex of data that is formatted, either to better understand what the editor is doing or because the user does not trust that the format is correct. Besides putting this in the raw tool, there's also room for it in the status bar. Added it in so the raw bytes are easily visible / copyable.
2019-11-30 15:18:16 -06:00
Benjamin Popp
e4156c418d Better change tracking implementation & UI
change tracking was previously done in the model, but exposed in the ViewModel via a data format. The problem with this is that it meant that all changed formats were wrapped in a new format, which would require a lot of work to fully validate.

The new implementation is still in the model, but exposed in the ViewModel through a new property on the HexElement. The data formats are unchanged.
2019-11-06 12:36:26 -06:00
Benjamin Popp
9d0ff53376 Reset Alignment
`Goto -> table` will currently adjust the data alignment to make the table rows line up in a useful way. However, getting the alignment back to normal after that requires doing another goto, which isn't intuitive.

make it possible to reset the alignment to default via a button.
2019-10-08 10:44:35 -05:00
Benjamin Popp
488218cc07 Verify MatchedWords have the expected value. 2019-06-29 22:35:41 -05:00
Benjamin Popp
43526f1357 Fix visibility bug in SearchResults
Search Results headers were getting truncated because of the new logic to draw most data formats extremely quickly. Switching it to use a different data format that doesn't get the fast-draw treatment, so that it still looks correct.
2019-06-24 21:34:25 -05:00
Benjamin Popp
bf151b2ab6 Adding Code Tool
Doesn't fully work yet, but the bones are there.
2019-06-15 17:36:54 -05:00
Benjamin Popp
d31ba98efe Bug Fixes
* Don't offer table tool in context menu of loose text
* Yield buttons for IContextItems with commands
* Ctrl+Click on pointer out of range returns an error
* Auto-moving a parent table that's being extended notifies about the move.
2019-05-12 13:30:13 -05:00
Benjamin Popp
9766834507 Create ViewModel/Visitors subfolder
we have 5 of these now and will probably make more. They deserve their own folder.
2019-05-11 21:42:19 -05:00
Benjamin Popp
b17e8c77df Refactor: Move Context Menu logic to ViewModel
these operations were previously in the view. They didn't belong there. There is now a simple helper object (IContextItem) that is used to transfer info from the ViewModel to the View, so the View can build up the menu based on directions from the ViewModel. This should make further ContextMenu extending easier, and now possible to test.
2019-05-11 21:35:26 -05:00
haven1433
9f9a0f8409 Single Search Result Selection Fix
single find result selects full result
2019-05-04 09:05:09 -05:00
Benjamin Popp
ebc9d1f33d first part of autocomplete is in
mostly the tests
need to make the pointers actually fill the model
need to make the UI still
need to handle enums still
2019-04-29 16:32:14 -05:00
Benjamin Popp
47e75f3b1a find is much smarter now 2019-04-23 21:20:00 -05:00
Benjamin Popp
033232d514 moved some ViewModel code to the model:
model should be able to create new text runs given possible start
  locations.
ToolTray should be able to expose errors
PCSTool should be able to expose errors
PCSTool should give messages when the address is incorrect.
PCSTool needs a button to say "dude, this address has text"
Make the ViewModel code that searches for starting text locations in
  a span public and static so that the PCSTool can reuse it.
2019-04-21 21:42:45 -05:00
Benjamin Popp
82e2d3cb73 fix button X on tab -> was too small
array format element defaults to single byte '.'
update table headers as format updates
update table tool as format updates
2019-04-18 15:47:38 -05:00
Benjamin Popp
c0e2981414 Search Results includes notice of what file the results come from. 2019-04-16 08:55:54 -05:00
Benjamin Popp
a4612d58e9 handle resizing between tabs better 2019-04-15 12:50:04 -05:00
Benjamin Popp
6715550408 fix alignment when following search results back to a table in the main view.
Problem was that if the table was made fullscreen, the "goto" would often
bring you to before the table starts... so the auto-width wouldn't work.
2019-04-15 11:14:05 -05:00
Benjamin Popp
6cde3cf1b0 started looking into issue where jumping from search to content
sometimes doesn't align tables correctly
2019-04-15 07:09:19 -05:00
Benjamin Popp
8ee6e55341 tools are now disabled for search results tabs
tools menu now works for any tab, not just the first opened.
2019-04-10 21:16:39 -05:00
Benjamin Popp
56a0169597 - added right-click menu item to open table tool
- moved tools from the right side to the left side
- tool title is now part of the tool instead of part of the tools children
- tool has previous / next buttons
- fixed weird visual back/forth with the row of column headers not
   knowing how tall to be
- buttons know how to look disabled now
-
2019-03-26 21:34:04 -05:00
Benjamin Popp
ecb810aa2e adding column headers 2019-03-19 21:17:58 -05:00
Benjamin Popp
3822b8b543 search results select the full length of the search string
instead of just the first byte

when following a search result, move selection to the result
2019-02-09 20:51:36 -06:00
Benjamin Popp
3d8f9cd1cc right click -> escape, should close context menu 2019-02-06 21:27:32 -06:00
Benjamin Popp
0c8633da52 rename folders / files / projects from Gen3Hex to HexManiac 2019-02-05 20:58:49 -06:00