This PR add a new GUI for dfa's/ndfa's utilizing the Racket GUI Framework. The main reasons for this conversion is to allow for a more interactive experience for the user. By using the GUI framework we get the ability to have real time scrolling on scrollbars, resizable windows and fast rendering.
Things that still need hooked up (the below will be completed soon and added to this PR)
[x] Menu bar items
[x] Graphviz
[x] Gencode
[ ] Other machine types (tm, pda, ect...)
What didnt change/ really minor changes
the below files were copied over from the old GUI
1) inv.rkt
2) draw.rkt
3) everything in structs folder (excluding world.rkt)
4) checkMachine.rkt
5) Globals
What files to look at
All.. but mainly:
gui.rkt
run.rkt
world.rkt
Things to look for when reviewing
Use of racket library functions (we don't want to reinvent the wheel)
Well documented code
valid use of macros (We cont want a macro when a function will do)
clean use of mutation (Mutation is handled in isolation to allow for easy debugging)
only rendering the GUI when needed
Unit tests are supplied where deemed necessary
Coding Goals/ things to look out for
One of the main goals was to centralize all events in a single event handler. This allows for future additions to be be added in a shorter time.
It is also important to note that the GUI uses a decent amount of mutation, this is needed to allow for real time updates.
The GUI framework is quite imperative and OO, I tried to only use an imperative approach for control flow
The world struct was converted to a racket object to be inline with how the racket GUI framework works
This does not include large rewrites of legacy code.. If something was a simple change then I changed it otherwise I left it alone
Where possible I tried to remove the dependency of the globals.rkt file
How to test/use
1) checkout this branch new-gui
a) use the new FSM function sm-visualize-new (works the same as sm-visualize but only for dfa/ndfa)
b) in test/GUI/run.rkt use function parse-input For EX: (parse-input a*)
Overview
This PR add a new GUI for
dfa's/ndfa's
utilizing the Racket GUI Framework. The main reasons for this conversion is to allow for a more interactive experience for the user. By using the GUI framework we get the ability to have real time scrolling on scrollbars, resizable windows and fast rendering.Things that still need hooked up (the below will be completed soon and added to this PR)
What didnt change/ really minor changes
the below files were copied over from the old GUI 1) inv.rkt 2) draw.rkt 3) everything in structs folder (excluding world.rkt) 4) checkMachine.rkt 5) Globals
What files to look at
All.. but mainly:
Things to look for when reviewing
Coding Goals/ things to look out for
globals.rkt
fileHow to test/use
1) checkout this branch
new-gui
a) use the new FSM functionsm-visualize-new
(works the same assm-visualize
but only for dfa/ndfa) b) intest/GUI/run.rkt
use functionparse-input
For EX:(parse-input a*)
Reviewers
@morazanm - required @felixisa - optional @josdes - optional @brownlantern - optional