Here is a calendar component I’ve created in a rush for my needs.
It was successfully compiled using GCC for MinGW v.4.2.1 (WindowsXP) and Code::Blocks as the IDE. But I didn’t supply a project file, just source codes.
I have several notes for it. Please, read them carefully.
I use STL containers instead of JUCE ones for several reasons. The main reason is STL containers are more effective and convenient to use in the context of the component’s design.
I use time related classes from the Poco library instead of JUCE’s ones for several reasons. First, JUCE’s Time and RelativeTime classes have bugs that prevent me from using those JUCE’s classes. Second, Poco’s time related classes have a wider minimum and maximum range for a year value (from 0 to 9999 against JUCE’s 1970 - 2037). Third, Poco’s classes are faster and more reliable then that of JUCE’s (no offence meant, Julian :)).
A note to build: monolyticDateTime.cxx and monolyticDateTime.hxx files MUST be in the same directory as CalendarComponent source files. I’ve created that files from several Poco’s separate source files by merging them into the monolithic independent files that can be easily included in any C++ source code to bring a powerful date-time manipulations into your application. See monolyticDateTime.hxx header file to find out classes that it contains. See Poco’s library documentation on how to use them. [color=red]DO NOT INCLUDE[/color] monolyticDateTime.cxx source file into your project to build beacause it is already included in the CalendarComponent.cpp source file for you. Just include CalendarComponent.cpp into your project and you’re done. If you are going to use monolyticDateTime.hxx separately, please note, it is advisable to include it before any other header files to prevent unexpected compiler errors when compiling a GUI application (under Windows).
Please note, this is the first draft version of the component I present to those who needs a simple, powerful and elegant calendar component in JUCE. My code is not perfect and clean but it’s functional. Please, post here any comments and questions concerning the component. Your advice, remarks and criticism are welcome.
See the demo application (for Windows) to experience the calendar component.
Here are a few screen shots of the demo application to tease you