Next: , Previous: Package_Gtk.Button_Box, Up: Top



Package Gtk.Calendar

Gtk_Calendar is a widget that displays a calendar, one month at a time. It can be created with Gtk_New.

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 Display_Options.

The selected date can be retrieved from a Gtk_Calendar using Get_Date.

If performing many 'mark' operations, the calendar can be frozen to prevent flicker, using Freeze, and 'thawed' again using Thaw.

Widget Hierarchy
     GObject                       (see Package_Glib.Object)
     Gtk_Object                    (see Package_Gtk.Object)
        \___ Gtk_Widget            (see Package_Gtk.Widget)
           \___ Gtk_Calendar       (see Package_Gtk.Calendar)
     

Signals

Types

type Gtk_Calendar_Display_Options is private;




Subprograms
function "and" (Left, Right : Gtk_Calendar_Display_Options) return Gtk_Calendar_Display_Options;

procedure Gtk_New (Widget : out Gtk_Calendar);
Create a new Calendar that points to the current date.

function Get_Type return Gtk.Gtk_Type;
Return the internal value associated with a Gtk_Calendar.

function Select_Month (Calendar : access Gtk_Calendar_Record; Month : Guint; Year : Guint) return Boolean;
Shift the calendar to a different month/year.
Return True if sucessful.

procedure Select_Day (Calendar : access Gtk_Calendar_Record; Day : Guint);
Select a day from the current month.
Only one day can be selected at a time.

function Mark_Day (Calendar : access Gtk_Calendar_Record; Day : Guint) return Boolean;
Set a specified Day as marked in the Calendar.
This is shown visually as a painted box around the Day. Note that several days can be marked. Return True if successful.

function Unmark_Day (Calendar : access Gtk_Calendar_Record; Day : Guint) return Boolean;
Undo the marking of Day.
Return True if sucessful.

procedure Clear_Marks (Calendar : access Gtk_Calendar_Record);
Clear all the marks set by Mark_Day.

procedure Display_Options (Calendar : access Gtk_Calendar_Record; Flags : Gtk_Calendar_Display_Options);
Change the display options.
See individual Display_Option flags for more details.

procedure Get_Date (Calendar : access Gtk_Calendar_Record; Year : out Guint; Month : out Guint; Day : out Guint);
Return the date currently selected.

procedure Freeze (Calendar : access Gtk_Calendar_Record);
Lock the display of the calendar until it is thawed.

procedure Thaw (Calendar : access Gtk_Calendar_Record);
Defrost a calendar.
All the changes made since the last Freeze are displayed.