This is a widget to create a monthly calendar view. It defaults to showing the current date, but you can set any date. It provides methods to navigate by day, week and month, and it is touch ready.
There is an interface to respond to calendar date selections. You can implement the interface CalendarListener, which has a virtual method calendarDateSelected(time_t selectedDate). When a date is selected, the interface method is called with the selected date.
You can configure the colours and fonts.

Usage:
Calendar* calendar = new Calendar(0, 0, 240, 240, NULL);
void CalendarScreen::keyPressEvent(int keyCode, int nativeCode)
{
switch(keyCode) {
case MAK_SOFTLEFT:
calendarDateSelected(calendar->getSelectedDate());
break;
case MAK_SOFTRIGHT:
APPCONTROLLER->back();
break;
case MAK_UP:
calendar->selectPreviousWeek();
break;
case MAK_DOWN:
calendar->selectNextWeek();
break;
case MAK_LEFT:
calendar->selectPreviousDay();
break;
case MAK_RIGHT:
calendar->selectNextDay();
break;
}
}
| Attachment | Size |
|---|---|
| Calender.zip | 4.76 KB |