Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Public Member Functions | Static Protected Attributes
Xfc::Gtk::Calendar Class Reference

A GtkCalendar C++ wrapper class. More...

#include <xfc/gtk/calendar.hh>

Inheritance diagram for Xfc::Gtk::Calendar:
Xfc::Gtk::Widget Xfc::Gtk::Object Xfc::Atk::Implementor Xfc::G::Object Xfc::G::TypeInterface Xfc::G::TypeInstance Xfc::G::TypeInstance Xfc::Trackable Xfc::Trackable

List of all members.

Public Member Functions

Static Protected Attributes

Constructors


Detailed Description

A GtkCalendar C++ wrapper class.

Calendar is a widget that displays a calendar, one month at a time. The month and year currently displayed can be altered with select_month(). The exact day can be selected from the displayed month using select_day(). To place a visual marker on a particular day, use mark_day() and to remove the marker, unmark_day(). Alternative, all marks can be cleared with clear_marks(). The way in which the calendar itself is displayed can be altered using display_options(). The selected date can be retrieved from a Calendar using get_date(). If performing many 'mark' operations, the calendar can be frozen to prevent flicker, with freeze(), and 'thawed' again using thaw().


Constructor & Destructor Documentation

Xfc::Gtk::Calendar::Calendar ( GtkCalendar *  calendar,
bool  owns_reference = false 
) [explicit, protected]

Construct a new Calendar from an existing GtkCalendar.

Parameters:
calendarA pointer to a GtkCalendar.
owns_referenceSet false if the initial reference count is floating, set true if it's not.

The calendar can be a newly created GtkCalendar or an existing GtkCalendar. (see G::Object::Object).

Xfc::Gtk::Calendar::Calendar ( CalendarDisplayOptionsField  flags) [explicit]

Construct a new calendar, with the specified display options and current date selected.

Parameters:
flagsOne or more values from the Gtk::CalendarDisplayOptions enum OR'd together.

This is a convenience constructor that lets you specifiy the display options.


Member Function Documentation

void Xfc::Gtk::Calendar::get_date ( int *  year,
int *  month,
int *  day 
) const

Obtains the selected date from a Calendar.

Parameters:
yearLocation to store the year number.
monthLocation to store the month number.
dayLocation to store the day number.

Obtains the current display options of the calendar.

Returns:
The Gtk::CalendarDisplayOptions.
bool Xfc::Gtk::Calendar::mark_day ( int  day)

Places a visual marker on a particular day.

Parameters:
dayThe day number to mark between 1 and 31.
Returns:
Always true.
void Xfc::Gtk::Calendar::select_day ( int  day)

Selects a day from the current month.

Parameters:
dayThe day number between 1 and 31, or 0 to unselect the currently selected day.
bool Xfc::Gtk::Calendar::select_month ( int  month,
int  year 
)

Shifts the calendar to a different month.

Parameters:
monthA month number between 0 and 11.
yearThe year the month is in.
Returns:
Always true.

Sets the display options (whether to display the year and month headings).

Parameters:
flagsOne or more values from the Gtk::CalendarDisplayOptions enum OR'd together.
bool Xfc::Gtk::Calendar::unmark_day ( int  day)

Removes the visual marker from a particular day.

Parameters:
dayThe day number to unmark between 1 and 31.
Returns:
true.

Member Data Documentation

Day selected double click signal (see signal_day_selected_double_click()).

Calls a slot with the signature:

< void function();
<

Day selected signal (see signal_day_selected()).

Calls a slot with the signature:

< void function();
<

Month changed signal (see signal_month_changed()).

Calls a slot with the signature:

< void function();
<

Next month signal (see signal_next_month()).

Calls a slot with the signature:

< void function();
<

Next year signal (see signal_next_year()).

Calls a slot with the signature:

< void function();
<

Prev month signal (see signal_prev_month()).

Calls a slot with the signature:

< void function();
<

Prev year signal (see signal_prev_year()).

Calls a slot with the signature:

< void function();
<

The documentation for this class was generated from the following file:
Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC