©2005 Jim E. Brooks http://www.jimbrooks.org/hypersrc/
See also pypersrc implementation.
See also pypersrc implementation.
Shall be implemented mostly in Python using (hopefully) the Tkinter GUI toolkit. C++ shall be used for performance and to overcome any Python deficiencies.
Shall be decoupled from the presentation and be GUI-neutral as much as practical. A concern is if Tkinter has deficiencies that necessitate switching to PyGtk. An option may be to execute pypersrc as a UNIX filter and output HTML per a cmd-line arg rather than running in GUI mode.
This can save time by skipping re-gathering and re-tagging. The user can click Refresh if the source directory was changed since the last save (re-gather will be redone but most tagging will be skipped).
Marked blocks shall be shown in a highlight color and anchored to contexts (a few lines of surrounding code rather just line numbers).
The idea is to avoid even trying to jump around from one tag to another: all of the code is there in one window.
Show something similar to a results widget that lists all the configuration variables as hyperlinks. The hyperlinks, when clicked, opens an entry widget (perhaps the Command entry can be reused for this and given a special color and its label changes from "Command" to "Edit [var]").
The user can mark tags which appear in a "working set" list. This lets the user to browse a few functions that are of interest.
Perhaps instead provide a per-file tags list widget. Tags list widget has been replaced by Tk underlined hyperlinks.
In pypersrc, the top text widget is the primary one. Clicking a hyperlink always loads the aux one. The user will learn to expect this behavior. hypersrc's duality of text widgets, ie, ability to hyperjump from one to the other, v.v, became confusing and you could easily lose the spot you were browsing.
The dialog can select an entire directory. Supporting this means the data structures must be more flexible than those in CHypersrc.
For example:
class MyClass { void Init( void ); <-- if this is clicked... }; void MyClass::Init( void ) ...then this should be selected { } void Init( void ) ...but not this one { }
class MyClass: __init__(self): self.ProcessArgs() # hyperlink to ProcessArgs of this class only
This will require following the syntax that leads to the method, ie, understanding object reference/pointer variables, eg: pObj->Func() or worse p1->p2->m3.Func().
A Tk text widget or text entry will receive commands from the user. The output may contain HTML-like results (clickable tags).
For example, if this command is given...
find tag *Init*
...then all tags that containing Init will be shown in a text widget using Tk underlined hyperlinks (as the main text widget currently does).
Tentative list of commands:
h [help] b [browse] <file or dir> f [find] <text> ft [find tag] <tag>
The cmd-line interface shall have a history buffer. When Pg Up is pressed, the previous page is shown, including the command that was given and its results.
Shall maintain different viewing contexts and offer the user to ability to flip back and forth (similar to browsing web pages).
Shall maintain project states which can be saved and reloaded. Shall cope with project source files being changed while the program wasn't running.
Show source file in digested forms inside text widget:
Ignore local vars, comments, etc: show just function calls. Calls which are conditional are shown with a '?' prefix.
Show only names of function definitions.
Show mostly comments, no code.
Show objects created within a function (???).
status [mem] = false; foo( result [local] );
(2005/01/17)
The prototype originally had a simple flipping between two states of
text widget #2 when F12 was pressed. It was replaced by a history list
(of the results of commands the user gave) that could be cycled by
pressing F11 and F12. The history list was a bad GUI design and using
it became confusing. For a time, the history list mixed source files and
results which in itself was confusing. When a new set of results was produced,
it was appended to the list, but if I cycled towards the middle of the history list,
then entered a new command, the new results, since it was appended,
was far away from the middle of the history list I was viewing.
In short, cycling became too confusing and disorienting.
I decided to discard the mechanism for cylcling thru the history list and replace it by _showing_ the entire history list in text widget #2 in a way that is similar to emacs's *Buffer List*. This causes no confusion. The most recent set of results are shown at the top of the text widget.
Last modified: Sat May 7 22:28:53 EDT 2005