Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

CCalendarWidget Class Reference

Scaleable calendar widget. More...

#include <CUI.h>

Inheritance diagram for CCalendarWidget::

CWidget List of all members.

Public Methods

 CCalendarWidget (int x, int y, int width, int height, int month, int year, Callback callback, void *app)
 Constructor - takes x, y, width, height, starting month and year, a callback to call when the calendar is clicked, and a pointer to the calling application. More...

 ~CCalendarWidget ()
virtual int update (CInputEvent *e)
 Update method - Recieves a CInputEvent, returns 1 if redraw is needed, 0 if not. More...

virtual void draw (CGfxScreen *S)
 Draw method - The widget should draw itslelf to the passed CGfxScreen. More...

void drawGrid (CGfxScreen *S, int x1, int y1, int x2, int y2, int rows, int cols)
 Does the actual work of drawing the calendar. More...

void setMonth (int month)
void setYear (int year)
void setDispDate (int month, int year)
 Sets the displayed date of the calendar (month and year). More...

void setSelDate (int day, int month, int year)
 Sets the selected day of the calendar. More...

void doCallback (int action)
 Calls the calendar callback function. More...


Public Attributes

int m_sel_day
int m_sel_month
int m_sel_year
int m_action
void * m_app

Detailed Description

Scaleable calendar widget.


Constructor & Destructor Documentation

CCalendarWidget::CCalendarWidget int    x,
int    y,
int    width,
int    height,
int    month,
int    year,
Callback    callback,
void *    app
 

Constructor - takes x, y, width, height, starting month and year, a callback to call when the calendar is clicked, and a pointer to the calling application.

CCalendarWidget::~CCalendarWidget  
 


Member Function Documentation

void CCalendarWidget::doCallback int    action
 

Calls the calendar callback function.

void CCalendarWidget::draw CGfxScreen   S [virtual]
 

Draw method - The widget should draw itslelf to the passed CGfxScreen.

This will be called when the screen is being redrawn. The widget should draw itself using its m_x and m_y members as a starting co-ordinate. The drawing should be all on the passed CGfxScreen or the front lcd screen with libdj.TextScreen

Reimplemented from CWidget.

void CCalendarWidget::drawGrid CGfxScreen   S,
int    x1,
int    y1,
int    x2,
int    y2,
int    rows,
int    cols
 

Does the actual work of drawing the calendar.

void CCalendarWidget::setDispDate int    month,
int    year
 

Sets the displayed date of the calendar (month and year).

void CCalendarWidget::setMonth int    month
 

void CCalendarWidget::setSelDate int    day,
int    month,
int    year
 

Sets the selected day of the calendar.

void CCalendarWidget::setYear int    year
 

int CCalendarWidget::update CInputEvent   e [virtual]
 

Update method - Recieves a CInputEvent, returns 1 if redraw is needed, 0 if not.

All keyboard and mouse (stylus) events are sent to this function. If the widget wants to trap the events, it can, and must return 1 if the screen needs to be redrawn and 0 if it does not (ie nothing happened or the action did not change the screen)

Reimplemented from CWidget.


Member Data Documentation

int CCalendarWidget::m_action
 

void* CCalendarWidget::m_app
 

int CCalendarWidget::m_sel_day
 

int CCalendarWidget::m_sel_month
 

int CCalendarWidget::m_sel_year
 


The documentation for this class was generated from the following files:
Generated on Thu Dec 6 00:14:52 2001 for Dijinni by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001