1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-31 07:29:00 +00:00
Commit Graph

26 Commits

Author SHA1 Message Date
Andy McFadden
b4213de4c0 Add "Go to Last Change" feature
Jumps to the first offset associated with the change at the top of
the Undo stack.  We generally jump to the code/data offset, not the
specific line affected.  It's possible to do better (and we do, for
Notes), but probably not worthwhile.
2019-11-01 19:11:48 -07:00
Andy McFadden
2ddd3b400d Workaround for GridSplitter lockup
As noted in issue #52, the side panels can't be resized once the
ListView gets focus.  The root of the problem is a workaround for a
selection problem that involves catching the Item Container
Generator's Status Changed event, and setting an item's focus.  It
appears that changing the size of the ListView causes the
StatusChanged event to fire, which cause the handler to grab the
focus, which causes the splitters to stop moving after one step.

This change adds a workaround that prevents the original workaround
from doing anything while a splitter is in the process of being
dragged.  It doesn't solve all problems -- you can't move the
splitters more than one step with the keyboard -- but it allows them
to be dragged around with the mouse.

There's got to be a better way to deal with this.
2019-11-01 11:14:49 -07:00
Andy McFadden
f61f1022e1 Collapse the "offset" line in the info window for non-DEBUG 2019-10-30 14:30:03 -07:00
Andy McFadden
d99eec0d4f Open damaged projects in read-only mode
If we detect a problem that requires intervention during loading,
e.g. we find unknown elements because we're loading a file created
by a newer version, default to read-only mode.

Read only mode (1) refuses to apply changes, (2) refuses to add
changes to the undo/redo list, and (3) disables Save/SaveAs.  The
mode is indicated in the title bar.

Also, flipped the order of items in the title bar so that "6502bench
SourceGen" comes last.  This allows you to read the project name in
short window title snippets.  (Visual Studio, Notepad, and others
do it this way as well.)
2019-10-26 13:20:54 -07:00
Andy McFadden
8505a5cdd4 Add an Applesoft to HTML converter
This is not an official thing, so I'm hiding it in the DEBUG menu
for now.
2019-10-23 17:49:59 -07:00
Andy McFadden
4c43b4063a Tweaks 2019-10-22 22:23:22 -07:00
Andy McFadden
630f7f0f87 Improve the "info" panel
Not a huge improvement, but things are slightly more organized, and
there's a splash of color in the form of a border around the text
describing the format of code and data lines.

Added an "IsConstant" property to Symbol.
2019-10-22 21:27:49 -07:00
Andy McFadden
7bbccaf71f Minor tweaks
Mark the "info" window as read-only.

When the project closes, clear the contents of the Symbols and
Notes windows.

Clarify some Apple II I/O definitions.
2019-10-21 17:43:40 -07:00
Andy McFadden
bcac8bc6a0 Add instruction chart
This adds a window that displays all of the instructions for a
given CPU in a summary grid.  Undocumented instructions are
included, but shown in grey italics.

Also, tweaked AppSettings to not mark itself as dirty if a "set"
operation doesn't actually change anything.
2019-10-21 15:15:09 -07:00
Andy McFadden
a4f1de1238 Add message list, part 2 (of 2)
Implemented show/hide mechanic, using a button on the right side of
the status bar to show status and to trigger un-hide.

Also, show I/O direction in project symbols editor list.
2019-10-20 18:02:23 -07:00
Andy McFadden
81dbab04ba Add message list, part 1
This converts the "problem list viewer" tool to a grid that appears
below the code list view when non-empty.  Not all messages are
problems, so it's being renamed to "message list".
2019-10-20 14:40:32 -07:00
Andy McFadden
3cc6f32c6f Put some stuff in a "Navigate" menu
Created a Navigate menu, and put the menu items for Find and Go To
in it.  Added menu items for nav-forward and nav-backward, which
until now were only available as toolbar buttons.
2019-10-19 17:46:40 -07:00
Andy McFadden
c8dfa94ce2 Change find-previous hotkey to Shift+F3
The range-select behavior that was giving us problems can be worked
around by switching the control to single-select mode when changing
the selection.
2019-10-17 12:51:45 -07:00
Andy McFadden
df2f3803f4 SourceGen After Dark
Most of SourceGen uses standard WPF controls, which get their default
style from the system theme.  The main disassembly list uses a
custom style, and always looks like the Windows default theme.

Some people greatly prefer white text on a black background, so we
now provide a way to get that.  This also requires muting the colors
used for Notes, since those were chosen to contrast with black text.

This does not affect anything other than the ListView used for
code, because everything else can be set through the Windows
"personalization" interface.  We might want to change the way the
Notes window looks though, to avoid having glowing bookmarks on
the side.
2019-10-12 17:23:32 -07:00
Andy McFadden
3a67c14247 Add "find previous"
The Find box now has forward/backward radio buttons.  Find Next
searches forward, and Find Previous searches backward, regardless
of the direction of the initial search.

The standard key sequence for "find previous" is Shift+F3.  The WPF
ListView has some weird logic that does something like: if you hit
a key, and the selection changes, and the shift key was held down,
then you must have meant to select a range.  So Shift+F3 often (but
not always) selects a range.  I think this might be fixable if I can
figure out how ListView keeps track of the current keyboard
navigation position (which is not the same as the selection).  For
now I'm working around the problem by using Ctrl+F3 to search.
Yay WPF.
2019-10-09 17:47:07 -07:00
Andy McFadden
e1a9100a8f Fully style the code list view
We were changing the control template for lines with long comments
and notes, matching the default Win10 style.  This got ugly when a
non-default theme was being used, particularly "dark" themes,
because the long-comment lines looked significantly different from
everything else.

We now fully specify the style for the ListView and ListViewItems,
which means everybody's main window now looks like the default Win10
style.  Which is unfortunate, but significantly easier than creating
a full set of theme-specific styles.

We now specify black text for highlighted address/label fields,
because they otherwise become illegible when we apply our background
highlight color.  In the Notes window, we set the background of
un-highlighted entries to white, so that we can always read it with
black text.

Addresses issue #50.
2019-10-09 11:50:33 -07:00
Andy McFadden
14150af004 Allow explicit widths in project/platform symbols, part 2
Added a Width column to the list in the project symbol editor.

Changed the local variable table editor and the project symbol editor
to use DataGrid instead of ListView.  This gets us easy sorting on
arbitrary columns.  The previous code was reloading the display list
after every change; now we just add/edit/remove individual items,
which helps keep the list position and selection stable.
2019-10-01 19:11:54 -07:00
Andy McFadden
41cd30a8c6 Add Problem List Viewer to debug menu
The analyzer sometimes runs into things that don't seem right, like
hidden labels or references to non-existent symbols, but has no way
to report them.  This adds a problem viewer.

I'm not quite ready to turn this into a real feature, so for now it's
a free-floating window accessed from the debug menu.

Also, updated some documentation.
2019-09-21 13:43:01 -07:00
Andy McFadden
6df874c559 Minor changes to local variable tables
Split "edit local variable table" into "create" and "edit prior".
The motivation is to allow the user to make changes to the most
recently defined table without having to go search for it.  Having
table creation be an explicit action, rather than something that
just happens if you edit a table that isn't there, feels reasonable.

Show table offset in LV table edit dialog, so if you really want
to go find it there's a (clumsy) way to do so.

Increased the maximum width of a variable from 4 to 8.  (This is
entirely arbitrary.)
2019-09-19 16:37:59 -07:00
Andy McFadden
6f81d748ee Rename FormatSplitAddress to FormatAddressTable
Updated menus and docs to match.
2019-09-15 13:37:38 -07:00
Andy McFadden
e5104dc2e7 Add first pass at source export dialog
Ported the column width stuff from EditAppSettings, which it turns
out can be simplified slightly.

Moved the clipboard copy code out into its own class.

Disabled "File > Print", which has never done anything and isn't
likely to do anything in the near future.

Also, added a note to 2019-local-variables about a test case it
should probably have.
2019-09-10 17:43:31 -07:00
Andy McFadden
54e7f68490 Make modified flags stand out
This changes the color of the status flags on lines where the flags
have been overridden.
2019-09-02 15:18:55 -07:00
Andy McFadden
5fe032c93a Rough layout of local variable tables
Create the XAML and some skeletal classes.
2019-08-25 14:14:44 -07:00
Andy McFadden
4f74430757 Minor fixes
- Updated the tutorial to track changes to WPF, and to clarify
  existing content.
- Fixed Ctrl+H Ctrl+C, which was getting masked by the Copy command
  handler.
- Fixed initial selection of address in Set Address.
2019-07-21 15:24:39 -07:00
Andy McFadden
02f6e884d7 Fix startup issues
- MakeDist now copies CommonWPF.dll.
- Spent a bunch of time tracking down a null-pointer deref that only
  happened when you didn't start with a config file.  Fixed.
- The NPE was causing the program to exit without any sort of useful
  diagnostic, so I added an uncaught exception handler that writes
  the crash to a text file in the current directory.
- Added a trace listener definition to App.config that writes log
  messages to a file, but it can't generally be enabled at runtime
  because you can't write files from inside the sandbox.  So it's
  there but commented out.
- Made the initial size of the main window a little wider.
2019-07-20 17:36:12 -07:00
Andy McFadden
c64f72d147 Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00