E P I S O D E B R O W S E R d o c u m e n t a t i o n Introduction ~~~~~~~~~~~~ Episode Browser is a simple graphical program that offers an interface to episodes of TV series stored on the local hard drive. It offers ways of keeping track of watched and unwatched episodes, as well as fetching episode information from the internet. In its current form, it is designed specifically for Detective Conan. Implementation ~~~~~~~~~~~~~~ Episode Browser is implemented in C++ using the Win32 API (see the c folder). The source code is spread across a number of files: >> Frontend << main.cpp Entry point and initialization. Contains the main event handler. listview.cpp,h Defines the shared aspects of the two list views. episodelistview.cpp,h Defines the interface to the episode list view. datalistview.cpp,h Defines the interface to the data list view. layout.cpp,h Handles the placement of child windows. resource.rc Defines menu and dialog window resources. resource.h Defines identifiers and macros for resources. >> Backend << ext.cpp,h Interacts with the external world (to open an episode). data.cpp,h Defines the underlying data representation, as well as functions to retrieve data from Detective Conan World. >> Miscellanea << win.cpp,h Helpers for interacting with the Win32 API. util.h Utility functions. test.cpp,h Simple test framework (work in progress). debug.cpp,h Helpers for debugging. Building ~~~~~~~~ Episode Browser is built with GNU Make. For the build process, the following additional programs are required: - GCC/G++ - Perl To build b/EpisodeBrowser.exe, issue `make' in the root directory of the project. Hacking ~~~~~~~ The Episode Browser source code uses a limited form of Hungarian notation. In summary, Hungarian notation is used only for - traditional Win32 names such as uMsg, lParam, hWnd, - variables of Windows-specific types, like hfNormal (HFONT), - arrays, such as vTipCtx (read as: context tip vector), - booleans, such as bActive, bViewWatched, - counts, such as cb (byte count), cch (character count), and - type disambiguation. For an example of the last point, imagine you have an integer named `rating', which you want to convert to a string. What should the string be called? The simple answer is `sRating'. In addition, global variables are prefixed with g_ and non-public member variables are prefixed with m_. A special note on the meaning of cb and cch: these prefixes are used to designate size. For strings, this means the total size, including space for the terminating NUL character. To designate string length without NUL, `len' is used. While specific Hungarian prefixes are unnecessary for most variables, "natural" word order should be avoided. In other words, lenString is preferred over stringLen, because it mirrors vString.