1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-11-26 06:49:19 +00:00
Commit Graph

91 Commits

Author SHA1 Message Date
Andy McFadden
310ed7649b Save & restore symbols list filter options 2019-07-16 14:52:08 -07:00
Andy McFadden
b42aa80cff Set main window title 2019-07-16 14:36:09 -07:00
Andy McFadden
b93def6560 Implement debug info windows
Show analysis timers, show analyzer output, and show undo/redo
history.

With this change, all main menu items have been ported to WPF.
2019-07-15 17:18:28 -07:00
Andy McFadden
2afdaf4ad3 Implement Extension Script Info debug feature 2019-07-15 16:50:54 -07:00
Andy McFadden
ef4fe35813 Implement simple DEBUG menu items
Refresh, comment ruler toggle, keep-alive toggle.
2019-07-15 15:32:27 -07:00
Andy McFadden
8a483f06c2 Implement Toggle ASCII Chart
While I was at it, I noticed that the ASCII chart and hex dump
viewer windows were always in front of the main app window.  It looks
like child windows are always in front.  The easy fix is to not
set an owner.

This causes a new problem: the windows don't get closed automatically
when the parent window closes, and the app won't exit until all
windows are closed.  So we now explicitly close the hex dump and
ASCII chart windows when the main window is closed, and we now keep
track of all the external-file hex dump windows.  (It always sort of
bothered me that we were creating hex dump windows and not keeping
track of them.  Itch has now been scratched.)

Also, changed the ascch-mode setting to be an enum rather than an
integer.  Renamed the setting to ascch-mode1.
2019-07-14 18:12:03 -07:00
Andy McFadden
93dd5b41c6 Tweak two app setting names
The contents of cdlv-col-widths and hexd-char-conv have changed.  The
app correctly ignores things it doesn't understand when going either
forward or backward (between SourceGen and SourceGenWPF), but it's
nicer to just not have the settings get clobbered.
2019-07-14 16:28:54 -07:00
Andy McFadden
c3d03b29ad Set background color on Notes in the code list 2019-07-14 15:39:27 -07:00
Andy McFadden
131d1a7a63 Fix obscure list traversal issue
If you select a note, delete it, select some nearby lines, and hit
undo, then the next time you hit up/down arrow the list will jump
back to the first line.  The workaround for this appears to be to
set the focus on a selected ListViewItem from an obscure event.

Maybe there's a simpler way that I just missed?  This is absurd.
(Yay WPF.)
2019-07-14 15:11:27 -07:00
Andy McFadden
380c56a4ef Recalculate list indices after adding or removing lines
Minor display list bug that presented itself when a 3-line note
was deleted.
2019-07-14 14:41:46 -07:00
Andy McFadden
12874d32ba Implement three shortcut commands
Added:
  Toggle Single-BYte Format (Ctrl+B)
  Format As Word (Ctrl+W)
  Delete Note/Long Comment (Del)
2019-07-14 13:50:15 -07:00
Andy McFadden
2dd21d433d Implement Edit Project Symbol 2019-07-14 13:18:10 -07:00
Andy McFadden
f8b1fa3d66 Implement Edit Note 2019-07-13 17:04:47 -07:00
Andy McFadden
e49ee6f20b Finish split-address table formatter
A lot of things react to other things in this dialog.  I think I
got everything behaving correctly.
2019-07-13 15:55:32 -07:00
Andy McFadden
c6b63afb3e Layout and basic integration of Format Split Address Table 2019-07-13 13:31:51 -07:00
Andy McFadden
0d75282756 Minor tweaks 2019-07-13 11:29:05 -07:00
Andy McFadden
ea3108c564 Implement Tools > Hex Dump 2019-07-12 17:46:37 -07:00
Andy McFadden
acfbfcb642 Implement Show Hex Dump
Because of the way data virtualization works (or doesn't) in WPF,
this was a whole lot different from WinForms.  What I'm doing is
pretty simple, so I avoided the complexity (and quirks) inherent
to more complete data virtualization solutions.  (All I really want
is to not render the entire thing up front.)
2019-07-12 17:08:54 -07:00
Andy McFadden
b1f84864d6 Implement Edit Comment
I still don't know why Windows wants to refer to semicolon as
"Oem1".  Happily it's possible to override the tip string.
2019-07-11 15:55:43 -07:00
Andy McFadden
e97672697c Finish Edit Data Operand dialog
I looked at doing this in full WPF fashion, binding context object
properties to radio button IsChecked properties, but there's a lot
of conditional logic behind the scenes.  I also wanted to do the
various formatted strings with a StringFormat binding, but that only
takes one argument, and some of them need two.

On the plus side, the format strings are now in Window.Resources,
rather than the global string table or the buttons themselves.
(The latter always felt a little sleazy, but it seemed like the
least annoying way to do it in WinForms.)
2019-07-11 13:56:16 -07:00
Andy McFadden
2f82ff5b46 Implement copy-to-clipboard
Also, add keyboard shortcuts to toolbar tooltips.  This is particularly
useful for navigate forward/backward, as those aren't part of the
menu structure, and have two keyboard shortcuts apiece.
2019-07-11 11:36:07 -07:00
Andy McFadden
05d61cfebd Tweak EditInstructionOperand dialog
Don't need both Checked and Unchecked events for radio buttons.  If
you act on both you end up doing everything 2x whenever the
selection changes.
2019-07-10 12:57:18 -07:00
Andy McFadden
300b2a4bca Initial layout of Edit Data Operand dialog 2019-07-08 17:02:25 -07:00
Andy McFadden
d2fe11e82c Implement Edit Instruction Operand
I'm planning to rework the dialog, so I didn't bother WPFing it up.

Also, explicitly recreate the contents of the Symbols window when
applying changes.  This used to happen implicitly via
SymbolTableSubset and the "change serial" in SymbolTable, but that
approach doesn't make sense for a DataGrid.
2019-07-08 15:40:30 -07:00
Andy McFadden
ed4fb0dd66 Fix Edit Label tweak
The change in 779566 missed a step, so the TextChanged method wasn't
getting called.  (When you bind TextBox Text to a string property, the
TextChanged events stop firing.  You need to react to the property
"set" call instead.)

Also, enable UseKeepAliveHack.  I have no reason to believe switching
to WPF will make remoting less flaky.
2019-07-08 13:43:10 -07:00
Andy McFadden
0c5ae78eaf Implement Toggle Data Scan
Had to fiddle with the menu item IsCheckable stuff for a bit, but I
think the approach is reasonable.
2019-07-07 17:17:48 -07:00
Andy McFadden
99b484df4c Implement long-comment editing
We can now Edit Long Comment and Edit Header Comment.

Changing the number of lines in a long comment exposed a bug in the
display list update.  Fixed.

Running the WinForms version trashed the column widths, which exposed
the fact that the default column widths were set too narrow.  Fixed.

On an unrelated note, hitting undo/redo quickly will sometimes leave
you scrolled to the bottom of the code list.  Some sort of command-
handling race in the WPF framework?  (Not fixed.)
2019-07-07 16:18:46 -07:00
Andy McFadden
1685e37c02 Implement "go to" feature 2019-07-07 14:30:38 -07:00
Andy McFadden
779566c236 Implement Find / Find Next
Also, tweaked Edit Label a bit.  I figured out how to make the
TextBox SelectAll+Focus work when the text is bound to a property.
2019-07-07 13:34:47 -07:00
Andy McFadden
741f7ef46a Implement Edit Label
The dialog is pretty straightforward.  This is the first editor that
can cause a partial update -- if you edit a label, only the lines
that refer to that label are regenerated -- so I added the code for
partial display list updates as well.

Also, while working on this I noticed that long comments were getting
ellipsized at a bad place.  The column width for the semi-hidden
column used for notes and long comments wasn't getting set.  After
fiddling with it a bit I determined that it really needed to be set to
the sum of the widths of the rightmost four columns, and updated
whenever column sizes change.  This was easier to do than I expected.
I may actually be getting the hang of WPF.
2019-07-06 17:24:42 -07:00
Andy McFadden
33c4b86b44 Implement "about" dialog 2019-07-06 15:51:57 -07:00
Andy McFadden
83fe70535b Port source generation test harness
I haven't figured out how to make the AppendText(text, color) extension
work right with the WPF version of RichTextBox, but I was able to work
around the issue, and it's not really worth sinking time into.
2019-07-06 14:20:51 -07:00
Andy McFadden
9aa8b5c9a7 Minor documentation updates
Also, placate consistency hobgoblins.
2019-07-06 10:58:24 -07:00
Andy McFadden
8d78ce028a Implement remaining properties tabs ("Symbol Files", "Extension Scripts")
Simple ListBox controls with strings.
2019-07-05 16:20:31 -07:00
Andy McFadden
9c6920ae68 Be a bit more WPF-ish on the OK button management 2019-07-05 15:05:42 -07:00
Andy McFadden
3cc4307484 Implement second project properties tab ("Project Symbols")
Implemented the symbol list, and the Edit Symbol dialog.
2019-07-05 14:53:45 -07:00
Andy McFadden
a23b048cb4 Implement first project properties tab ("General")
Also, added some whitespace to the layout.

Also, removed some redundant fields from the app settings editor.
2019-07-03 14:27:54 -07:00
Andy McFadden
758d95e331 Rough project properties layout 2019-07-01 14:07:30 -07:00
Andy McFadden
f4cb5cd8b8 Implement fourth settings tab ("Pseudo-Op")
Largely unchanged from WinForms version.  Creating and binding
properties for every field seemed tedious.
2019-06-30 13:54:50 -07:00
Andy McFadden
d65acc2121 Implement third settings tab ("Display Format") 2019-06-30 13:25:04 -07:00
Andy McFadden
8907197d58 Clean up clipboard format combo box
The order of items in XAML was tied to enum values, which isn't
great.  Since the value gets stored in the settings file, we want
the values to come from the code-behind.  So now we provide an
ItemsSource for the combo box from the code-behind instead of
defining the items in XAML.
2019-06-28 15:39:35 -07:00
Andy McFadden
7e0faf2800 Rework column width input
Took another swing at doing things WPF-style.  Ended up with TextBox
objects backed by integer fields, which worked pretty well but
didn't get the min/max values.  Set up validation instead, once I
figured out how to make it update in real time.
2019-06-28 15:17:48 -07:00
Andy McFadden
5beae8f926 Implement second settings tab ("Asm Config")
Relatively straightforward, thanks to the way WPF ComboBoxes work.
Spent some time fiddling with the column width text boxes, but
ended up with essentially the WinForms approach.
2019-06-27 15:15:58 -07:00
Andy McFadden
c13daa7085 Implemented the first ("Code View") tab of settings
Notable items include the column show/hide buttons, which were
straightforward except for the "determine the default width" part,
and the font picker, which is no longer a standard dialog.  The
latter was complicated by the absence of a good way to detect
whether a font is mono-spaced or not without calling back into code
meant for WinForms font manipulation (with a dash of PInvoke).
Yay WPF.

Also, enabled character ellipsis for code list items.
2019-06-26 17:11:58 -07:00
Andy McFadden
0a96e014e2 Layout for app settings
Multi-tab dialog with tons of controls.

Also, fixed WorkProgress owner, and removed debug delay from source
gen dialog.
2019-06-24 17:32:53 -07:00
Andy McFadden
8d8112f5c9 Finish generate/assemble dialog
Added the progress dialog as a relatively generic thing (it was
implemented as a pair of dialogs in the WinForms version, for no
very good reason).  Generation and assembler execution works.
2019-06-24 14:41:08 -07:00
Andy McFadden
985eba804b First pass at Generate & Assemble dialog
Got the basic parts laid out and working, but it depends on the
progress dialogs to do actual work.
2019-06-23 17:24:51 -07:00
Andy McFadden
b91124999a Implement "new project"
WPF TreeViews are much different from WinForms.  Unexpectedly, they're
actually simpler and easier to work with.
2019-06-22 17:38:07 -07:00
Andy McFadden
6b29ce98f9 Implement "recents" feature
Add the list of recent projects to File > Recent Projects when the
sub-menu opens.  Make the buttons on the launch panel work correctly.
2019-06-22 14:41:09 -07:00
Andy McFadden
7d2fe51b41 Implement File > Exit 2019-06-22 13:20:31 -07:00