Welcome to the source code documentation of LearnWords. For a free project it's important to have its source well documented. Here's a short documentation of the structure of the program. You can follow the links below or browse the source code files starting at the filelist.
The main gui
When you start the program the main function creates a top window. The top window consists of a menubar and a notebook containing dictionaries and mini dictionaries.
The menubar consists of three menus. The File menu, the Dictionary menu and the Mini dictionary menu.
The File menu
The dictionary file
The program reads the dictionaries via dict_get_words(). The file has the following format: it has a line for each word pair and the words are seperated by a separator string. Here's an example:
cat -> Katze (e)
dog -> Hund (r)
Here the separator string is " -> ", so it has spaces on the two sides of the arrow.
The mini dictionary file
The mini dictionary file has the following format: it is encoded in UTF8. It has one line for each word/word pair. The line's syntax is: <letter> `,' `"' <word> `"' [ `,' `"' <word> `"' ]. The letter can be one of `n', `a', `d' and `k'. A word can be a list of characters not containing line break and escaping `"' and `\' via a `\' (so you should write `\\' instead of `\' and `\"' instead of `"').
The meaning of the first letter and the number of words after it: