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. 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 << win32.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 ~~~~~~~~ To build Episode Browser, the following programs are required: - GCC or Visual Studio (2019) - GNU make - CMake Furthermore, the following dependencies are required: - libxml2 (included with MSYS GCC, downloaded separately for MSVC) You may need to manually provide library and header file directories in c/CMakeLists.txt. Episode Browse may be built by issuing `make' from the root directory. The build process is controlled by a few environment variables: - SYSTEM = vs2019 (default) or mingw - VS_CONFIG = Debug (default) or Release - VS_TOOLSET = v142 (default), v141_xp (for Windows XP support) - VS_PLATFORM = x64 (default) or Win32 (32-bit x86) 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. Hungarian notation should not be used for type names.