logo top
Main Page   Widgets   Namespaces   Book  

Gtk::Calendar Class Reference
[Widgets]

Inheritance diagram for Gtk::Calendar:

List of all members.


Detailed Description

Display a calendar and/or allow the user to select a date.

This 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().

The way in which the calendar itself is displayed can be altered using set_display_options().

The selected date can be retrieved from a GtkCalendar using get_date().

If performing many 'mark' operations, the calendar can be frozen to prevent flicker, using freeze(), and 'thawed' again using thaw().

The Calendar widget looks like this:

calendar1.png

Public Member Functions

 Calendar ()
void clear_marks ()
 Remove all visual markers.
void display_options (CalendarDisplayOptions flags)
 Sets display options (whether to display the heading and the month headings).
void freeze ()
 Does nothing.
void get_date (Glib::Date& date) const
 Get the date as Glib::Date.
void get_date (guint& year, guint& month, guint& day) const
 Obtains the selected date from a Gtk::Calendar.
CalendarDisplayOptions get_display_options () const
 Return value: the display options.
const GtkCalendar* gobj () const
 Provides access to the underlying C GtkObject.
GtkCalendar* gobj ()
 Provides access to the underlying C GtkObject.
int mark_day (guint day)
 Places a visual marker on a particular day.
void select_day (guint day)
 Selects a day from the current month.
int select_month (guint month, guint year)
 Shifts the calendar to a different month.
void set_display_options (CalendarDisplayOptions flags)
 Sets display options (whether to display the heading and the month headings).
Glib::SignalProxy0<void> signal_day_selected ()
Glib::SignalProxy0<void> signal_day_selected_double_click ()
Glib::SignalProxy0<void> signal_month_changed ()
Glib::SignalProxy0<void> signal_next_month ()
Glib::SignalProxy0<void> signal_next_year ()
Glib::SignalProxy0<void> signal_prev_month ()
Glib::SignalProxy0<void> signal_prev_year ()
void thaw ()
 Does nothing.
int unmark_day (guint day)
 Removes the visual marker from a particular day.
virtual ~Calendar ()

Protected Member Functions

virtual void on_day_selected ()
virtual void on_day_selected_double_click ()
virtual void on_month_changed ()
virtual void on_next_month ()
virtual void on_next_year ()
virtual void on_prev_month ()
virtual void on_prev_year ()

Related Functions

(Note that these are not member functions.)

Gtk::Calendarwrap (GtkCalendar* object, bool take_copy=false)
 A Glib::wrap() method for this object.

Constructor & Destructor Documentation

virtual Gtk::Calendar::~Calendar (  )  [virtual]

Gtk::Calendar::Calendar (  ) 


Member Function Documentation

void Gtk::Calendar::clear_marks (  ) 

Remove all visual markers.

void Gtk::Calendar::display_options ( CalendarDisplayOptions  flags  ) 

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

Deprecated: 2.4: Use set_display_options() instead

Parameters:
flags The display options to set.

void Gtk::Calendar::freeze (  ) 

Does nothing.

Previously locked the display of the calendar until it was thawed with thaw().

Deprecated: 2.8:

void Gtk::Calendar::get_date ( Glib::Date &  date  )  const

Get the date as Glib::Date.

Parameters:
date Referenz to set the date

void Gtk::Calendar::get_date ( guint &  year,
guint &  month,
guint &  day 
) const

Obtains the selected date from a Gtk::Calendar.

Parameters:
year Location to store the year number, or 0.
month Location to store the month number (between 0 and 11), or 0.
day Location to store the day number (between 1 and 31), or 0.

CalendarDisplayOptions Gtk::Calendar::get_display_options (  )  const

Return value: the display options.

Returns:
The display options.
Since gtkmm 2.4:

const GtkCalendar* Gtk::Calendar::gobj (  )  const [inline]

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Widget.

GtkCalendar* Gtk::Calendar::gobj (  )  [inline]

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Widget.

int Gtk::Calendar::mark_day ( guint  day  ) 

Places a visual marker on a particular day.

Parameters:
day The day number to mark between 1 and 31.
Returns:
true, always.

virtual void Gtk::Calendar::on_day_selected (  )  [protected, virtual]

virtual void Gtk::Calendar::on_day_selected_double_click (  )  [protected, virtual]

virtual void Gtk::Calendar::on_month_changed (  )  [protected, virtual]

virtual void Gtk::Calendar::on_next_month (  )  [protected, virtual]

virtual void Gtk::Calendar::on_next_year (  )  [protected, virtual]

virtual void Gtk::Calendar::on_prev_month (  )  [protected, virtual]

virtual void Gtk::Calendar::on_prev_year (  )  [protected, virtual]

void Gtk::Calendar::select_day ( guint  day  ) 

Selects a day from the current month.

Parameters:
day The day number between 1 and 31, or 0 to unselect the currently selected day.

int Gtk::Calendar::select_month ( guint  month,
guint  year 
)

Shifts the calendar to a different month.

Parameters:
month A month number between 0 and 11.
year The year the month is in.
Returns:
true, always.

void Gtk::Calendar::set_display_options ( CalendarDisplayOptions  flags  ) 

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

Since gtkmm 2.4:
Parameters:
flags The display options to set.

Glib::SignalProxy0< void > Gtk::Calendar::signal_day_selected (  ) 

Prototype:
void on_my_day_selected()

Glib::SignalProxy0< void > Gtk::Calendar::signal_day_selected_double_click (  ) 

Prototype:
void on_my_day_selected_double_click()

Glib::SignalProxy0< void > Gtk::Calendar::signal_month_changed (  ) 

Prototype:
void on_my_month_changed()

Glib::SignalProxy0< void > Gtk::Calendar::signal_next_month (  ) 

Prototype:
void on_my_next_month()

Glib::SignalProxy0< void > Gtk::Calendar::signal_next_year (  ) 

Prototype:
void on_my_next_year()

Glib::SignalProxy0< void > Gtk::Calendar::signal_prev_month (  ) 

Prototype:
void on_my_prev_month()

Glib::SignalProxy0< void > Gtk::Calendar::signal_prev_year (  ) 

Prototype:
void on_my_prev_year()

void Gtk::Calendar::thaw (  ) 

Does nothing.

Previously defrosted a calendar; all the changes made since the last freeze() were displayed.

Deprecated: 2.8:

int Gtk::Calendar::unmark_day ( guint  day  ) 

Removes the visual marker from a particular day.

Parameters:
day The day number to unmark between 1 and 31.
Returns:
true, always.


Friends And Related Function Documentation

Gtk::Calendar* wrap ( GtkCalendar *  object,
bool  take_copy = false 
) [related]

A Glib::wrap() method for this object.

Parameters:
object The C instance.
take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.


The documentation for this class was generated from the following file:

Generated for gtkmm 2.4 by Doxygen 1.5.6 © 1997-2001