WoopsiUI::Calendar Class Reference

#include <calendar.h>

Inheritance diagram for WoopsiUI::Calendar:
WoopsiUI::Gadget WoopsiUI::GadgetEventHandler

List of all members.

Public Member Functions

 Calendar (s16 x, s16 y, u16 width, u16 height, u8 day, u8 month, u16 year, u32 flags, FontBase *font=NULL)
virtual void handleReleaseEvent (const GadgetEventArgs &e)
virtual void draw (Rect clipRect)
virtual void setDate (u8 day, u8 month, u16 year)
const u8 getDay () const
const u8 getMonth () const
const u16 getYear () const
bool resize (u16 width, u16 height)

Protected Member Functions

virtual ~Calendar ()
virtual void buildGUI ()
virtual void populateGUI ()
 Calendar (const Calendar &calendar)

Protected Attributes

Date_date
Date_visibleDate
Button_selectedDayButton
Button_leftArrow
Button_rightArrow
Label_monthLabel

Detailed Description

Class providing a calendar/date picker. Raises an EVENT_ACTION event when a new date is clicked.


Constructor & Destructor Documentation

Calendar::Calendar ( s16  x,
s16  y,
u16  width,
u16  height,
u8  day,
u8  month,
u16  year,
u32  flags,
FontBase font = NULL 
)

Constructor.

Parameters:
x The x co-ordinate of the calendar.
y The y co-ordinate of the calendar.
width The width of the calendar.
height The height of the calendar.
day The default day to display.
month The default month to display.
year The default year to display.
flags Standard flags.
font Optional font to use for text output.
Calendar::~Calendar (  )  [protected, virtual]

Destructor.

WoopsiUI::Calendar::Calendar ( const Calendar calendar  )  [inline, protected]

Copy constructor is protected to prevent usage.


Member Function Documentation

void Calendar::buildGUI (  )  [protected, virtual]

Creates all gadgets but leaves them textless.

void Calendar::draw ( Rect  clipRect  )  [virtual]

Draw the region of the calendar within the clipping rect. Should not be called directly.

Parameters:
clipRect The clipping rect to limit drawing to.

Reimplemented from WoopsiUI::Gadget.

const u8 Calendar::getDay (  )  const

Get the day displayed in the calendar.

Returns:
The day.
const u8 Calendar::getMonth (  )  const

Get the month displayed in the calendar.

Returns:
The month.
const u16 Calendar::getYear (  )  const

Get the year displayed in the calendar.

Returns:
The year.
void Calendar::handleReleaseEvent ( const GadgetEventArgs e  )  [virtual]

Handles events raised by its sub-gadgets.

Parameters:
e Event data to process.

Reimplemented from WoopsiUI::GadgetEventHandler.

void Calendar::populateGUI (  )  [protected, virtual]

Populates the previously-created gadget layout with correct text based on current date objects.

bool Calendar::resize ( u16  width,
u16  height 
) [virtual]

Resize the calendar to the new dimensions.

Parameters:
width The new width.
height The new height.
Returns:
True if the resize was successful.

Reimplemented from WoopsiUI::Gadget.

void Calendar::setDate ( u8  day,
u8  month,
u16  year 
) [virtual]

Set the date displayed in the calendar.

Parameters:
day The new day.
month The new month.
year The new year.

Member Data Documentation

Calendar working date

Pointer to the left arrow

Pointer to the month label

Pointer to the right arrow

Pointer to the selected day button

Date displayed in the UI


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations Enumerator

Generated on Sat Oct 24 14:33:10 2009 for Woopsi by  doxygen 1.6.1