[Contents] [Back] [Prev] [Up] [Next] [Forward]

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

- Gtk.Calendar Widget Hierarchy
- Gtk.Calendar Signals
- Gtk.Calendar Types
- Gtk.Calendar Subprograms

## Widget Hierarchy

    Gtk_Object                    (see section Package Gtk.Object)
       \___ Gtk_Widget            (see section Package Gtk.Widget)
          \___ Gtk_Calendar       (see section Package Gtk.Calendar)

## Signals

- "month_changed" procedure Handler (Calendar : access Gtk_Calendar_Record'Class);
  Emitted when the user clicks a button to change the selected month on a calendar.

## 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              : in     Guint;
       Year               : in     Guint)
       return Boolean;
| Shift the calendar to a different month/year. Return True if sucessful.
    procedure Select_Day
      (Calendar           : access Gtk_Calendar_Record;
       Day                : in     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                : in     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                : in     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              : in     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.

[Contents] [Back] [Prev] [Up] [Next] [Forward]