package Gtk_Calendar_Display_Options_Properties is new Generic_Internal_Discrete_Property (Gtk_Calendar_Display_Options);
package Implements_Gtk_Buildable is new Glib.Types.Implements (Gtk.Buildable.Gtk_Buildable, Gtk_Calendar_Record, Gtk_Calendar);
type Gtk_Calendar_Record is new Gtk_Widget_Record with null record;
type Gtk_Calendar is access all Gtk_Calendar_Record'Class;
type Gtk_Calendar_Detail_Func is access function (Calendar : not null access Gtk_Calendar_Record'Class; Year : Guint; Month : Guint; Day : Guint) return UTF8_String;
type Property_Gtk_Calendar_Display_Options is new Gtk_Calendar_Display_Options_Properties.Property;
type Cb_Gtk_Calendar_Void is not null access procedure (Self : access Gtk_Calendar_Record'Class);
type Cb_GObject_Void is not null access procedure (Self : access Glib.Object.GObject_Record'Class);
Show_Heading : constant Gtk_Calendar_Display_Options := 1;
Show_Day_Names : constant Gtk_Calendar_Display_Options := 2;
No_Month_Change : constant Gtk_Calendar_Display_Options := 4;
Show_Week_Numbers : constant Gtk_Calendar_Display_Options := 8;
Show_Details : constant Gtk_Calendar_Display_Options := 32;
Day_Property : constant Glib.Properties.Property_Int;
Detail_Height_Rows_Property : constant Glib.Properties.Property_Int;
Detail_Width_Chars_Property : constant Glib.Properties.Property_Int;
Month_Property : constant Glib.Properties.Property_Int;
No_Month_Change_Property : constant Glib.Properties.Property_Boolean;
Show_Day_Names_Property : constant Glib.Properties.Property_Boolean;
Show_Details_Property : constant Glib.Properties.Property_Boolean;
Show_Heading_Property : constant Glib.Properties.Property_Boolean;
Show_Week_Numbers_Property : constant Glib.Properties.Property_Boolean;
Year_Property : constant Glib.Properties.Property_Int;
Signal_Day_Selected : constant Glib.Signal_Name := "day-selected";
Signal_Day_Selected_Double_Click : constant Glib.Signal_Name := "day-selected-double-click";
Signal_Month_Changed : constant Glib.Signal_Name := "month-changed";
Signal_Next_Month : constant Glib.Signal_Name := "next-month";
Signal_Next_Year : constant Glib.Signal_Name := "next-year";
Signal_Prev_Month : constant Glib.Signal_Name := "prev-month";
Signal_Prev_Year : constant Glib.Signal_Name := "prev-year";
procedure Gtk_New
( | Calendar | : out Gtk_Calendar); |
procedure Initialize
( | Calendar | : not null access Gtk_Calendar_Record'Class); |
function Gtk_Calendar_New return Gtk_Calendar;
function Get_Type return Glib.GType;
procedure Clear_Marks
( | Calendar | : not null access Gtk_Calendar_Record); |
procedure Get_Date
( | Calendar | : not null access Gtk_Calendar_Record; |
Year | : out Guint; | |
Month | : out Guint; | |
Day | : out Guint); |
function Get_Day_Is_Marked
( | Calendar | : not null access Gtk_Calendar_Record; |
Day | : Guint) return Boolean; |
function Get_Detail_Height_Rows
( | Calendar | : not null access Gtk_Calendar_Record) return Gint; |
procedure Set_Detail_Height_Rows
( | Calendar | : not null access Gtk_Calendar_Record; |
Rows | : Gint); |
function Get_Detail_Width_Chars
( | Calendar | : not null access Gtk_Calendar_Record) return Gint; |
procedure Set_Detail_Width_Chars
( | Calendar | : not null access Gtk_Calendar_Record; |
Chars | : Gint); |
function Get_Display_Options
( | Calendar | : not null access Gtk_Calendar_Record) return Gtk_Calendar_Display_Options; |
procedure Set_Display_Options
( | Calendar | : not null access Gtk_Calendar_Record; |
Flags | : Gtk_Calendar_Display_Options); |
procedure Mark_Day
( | Calendar | : not null access Gtk_Calendar_Record; |
Day | : Guint); |
procedure Select_Day
( | Calendar | : not null access Gtk_Calendar_Record; |
Day | : Guint); |
procedure Select_Month
( | Calendar | : not null access Gtk_Calendar_Record; |
Month | : Guint; | |
Year | : Guint); |
procedure Set_Detail_Func
( | Calendar | : not null access Gtk_Calendar_Record; |
Func | : Gtk_Calendar_Detail_Func); |
procedure Unmark_Day
( | Calendar | : not null access Gtk_Calendar_Record; |
Day | : Guint); |
procedure On_Day_Selected
( | Self | : not null access Gtk_Calendar_Record; |
Call | : Cb_Gtk_Calendar_Void; | |
After | : Boolean := False); |
procedure On_Day_Selected
( | Self | : not null access Gtk_Calendar_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Day_Selected_Double_Click
( | Self | : not null access Gtk_Calendar_Record; |
Call | : Cb_Gtk_Calendar_Void; | |
After | : Boolean := False); |
procedure On_Day_Selected_Double_Click
( | Self | : not null access Gtk_Calendar_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Month_Changed
( | Self | : not null access Gtk_Calendar_Record; |
Call | : Cb_Gtk_Calendar_Void; | |
After | : Boolean := False); |
procedure On_Month_Changed
( | Self | : not null access Gtk_Calendar_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Next_Month
( | Self | : not null access Gtk_Calendar_Record; |
Call | : Cb_Gtk_Calendar_Void; | |
After | : Boolean := False); |
procedure On_Next_Month
( | Self | : not null access Gtk_Calendar_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Next_Year
( | Self | : not null access Gtk_Calendar_Record; |
Call | : Cb_Gtk_Calendar_Void; | |
After | : Boolean := False); |
procedure On_Next_Year
( | Self | : not null access Gtk_Calendar_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Prev_Month
( | Self | : not null access Gtk_Calendar_Record; |
Call | : Cb_Gtk_Calendar_Void; | |
After | : Boolean := False); |
procedure On_Prev_Month
( | Self | : not null access Gtk_Calendar_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Prev_Year
( | Self | : not null access Gtk_Calendar_Record; |
Call | : Cb_Gtk_Calendar_Void; | |
After | : Boolean := False); |
procedure On_Prev_Year
( | Self | : not null access Gtk_Calendar_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
function "+"
( | Widget | : access Gtk_Calendar_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Gtk_Buildable.To_Interface; |
function "-"
( | Interf | : Gtk.Buildable.Gtk_Buildable) return Gtk_Calendar renames Implements_Gtk_Buildable.To_Object; |
Gtk.Calendar.Gtk_Calendar is a widget that displays a Gregorian calendar, one month at a time. It can be created with Gtk.Calendar.Gtk_New.
The month and year currently displayed can be altered with Gtk.Calendar.Select_Month. The exact day can be selected from the displayed month using Gtk.Calendar.Select_Day.
To place a visual marker on a particular day, use Gtk.Calendar.Mark_Day and to remove the marker, Gtk.Calendar.Unmark_Day. Alternative, all marks can be cleared with Gtk.Calendar.Clear_Marks.
The way in which the calendar itself is displayed can be altered using Gtk.Calendar.Set_Display_Options.
The selected date can be retrieved from a Gtk.Calendar.Gtk_Calendar using Gtk.Calendar.Get_Date.
Users should be aware that, although the Gregorian calendar is the legal calendar in most countries, it was adopted progressively between 1582 and 1929. Display before these dates is likely to be historically incorrect.