Wt: Wt::Ext::Calendar Class Reference

Wt 3.3.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions
Wt::Ext::Calendar Class Reference
Ext widgets (Wt::Ext, deprecated)

A calendar. More...

`#include <Wt/Ext/Calendar>`

Inheritance diagram for Wt::Ext::Calendar:
[legend]

List of all members.

## Public Member Functions
| Calendar (bool i18n=false, WContainerWidget *parent=0)
| Create a new calendar.
void | select (const WDate &date)
| Select a date.
const std::set< WDate > & | selection () const
| Get the current selection.
Signal< void > & | selectionChanged ()
| Signal emitted when the user changes the selection.
Signal< void > & | selected ()
| Signal emitted when the user has selected a date.

## Detailed Description

A calendar.

The calendar provides navigation by month and year, and indicates the current day.

The calendar only allows selection of a single day, and you may listen for when the user selects a new date using the selected() signal.

The API is a subset of the WCalendar API:

- limited to single selection mode: no setMultipleSelection(bool), select(const std::set<WDate>&) methods;
- no support for programmatory navigation: no browseToNextMonth() , browseTo(), etc... methods
- no support for getting information on what is currently displayed: no currentMonth() and currentYear() methods.

Here is a snapshot taken on 01/09/2007 (shown as today), and 12/09/2007 currently selected.

Calendar

## Constructor & Destructor Documentation

Wt::Ext::Calendar::Calendar | ( | bool | i18n = `false`,
|  | WContainerWidget * | parent = `0`
| ) |  |

Create a new calendar.

Constructs a new calendar, with optional support for internationalization. The calendar shows the current day, and has an empty selection.

## Member Function Documentation

void Wt::Ext::Calendar::select | ( | const WDate & | date | ) |

Select a date.

Select one date.

Signal<void>& Wt::Ext::Calendar::selected | ( |  | ) |

Signal emitted when the user has selected a date.

This signal indicates that the user has selected a new date, which is only available when in single selection mode.

const std::set<WDate>& Wt::Ext::Calendar::selection | ( |  | ) | const

Get the current selection.

Returns the set of dates currently selected. This set contains 0 or 1 dates.

Signal<void>& Wt::Ext::Calendar::selectionChanged | ( |  | ) |

Signal emitted when the user changes the selection.

Emitted after the user has changed the current selection, before the selected() signal is emitted.

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator