Tuesday, December 11, 2012

Initial GUI Design Plan

A plan is needed for what form the GUI will take for the program initially, especially considering that only the translator and parser are implemented (and only for a limited number of BASIC commands).  The basic GUI will consist of a menu bar, tool bar, status bar and the main editing window.

This menu bar will probably only consist of the File, Edit and Help menus to start.  The File menu will start with New, Open, Save, Save As, and Quit entries.  The Edit menu will start with Copy, Cut, and Paste entries.  The Help menu will have About and About Qt entries (the about Qt is customary for Qt applications and shows information about the version of Qt used to build the program).  The initial tool bar will have buttons for items in the File and Edit menus.

Most of the effort for this initial GUI will be in the main editing window and getting it to work for the requirements needed for the interactive nature of the interactive compiler.  Namely, the code will need to catch when the enter key is hit so that the current line can be read from the editing box, compiled (translated and encoded) and stored in internal memory.  Eventually the line will need to be recreated from the internal representation back to the original text (or close to it).

Since only the translator is currently implemented, each line entered into the editing window will be translated to the RPN (reverse polish notation) list.  The tokens of the  RPN list will be converted to text (as now by the test code) and displayed in a special area in the GUI known as a dock widget.  A dock widget can be moved and docked to any side of the main editing window, and can also be undocked from the application window.  This dock widget will use to validate correct operation of the program.

No comments:

Post a Comment

All comments and feedback welcomed, whether positive or negative.
(Anonymous comments are allowed, but comments with URL links or unrelated comments will be removed.)