package Implements_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 : access Gtk_Calendar_Record'Class; Year : Guint; Month : Guint; Day : Guint; User_Data : System.Address) return String;
Show_Heading : constant Gtk_Calendar_Display_Options := 2 ** 0;
Show_Day_Names : constant Gtk_Calendar_Display_Options := 2 ** 1;
No_Month_Change : constant Gtk_Calendar_Display_Options := 2 ** 2;
Show_Week_Numbers : constant Gtk_Calendar_Display_Options := 2 ** 3;
Week_Start_Monday : constant Gtk_Calendar_Display_Options := 2 ** 4;
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 | : access Gtk_Calendar_Record'Class); |
function Get_Type return Glib.GType;
procedure Clear_Marks
( | Calendar | : access Gtk_Calendar_Record); |
procedure Display_Options
( | Calendar | : access Gtk_Calendar_Record; |
Flags | : Gtk_Calendar_Display_Options); |
function Get_Display_Options
( | Calendar | : access Gtk_Calendar_Record) return Gtk_Calendar_Display_Options; |
procedure Set_Display_Options
( | Calendar | : access Gtk_Calendar_Record; |
Flags | : Gtk_Calendar_Display_Options); |
procedure Freeze
( | Calendar | : access Gtk_Calendar_Record); |
procedure Get_Date
( | Calendar | : access Gtk_Calendar_Record; |
Year | : out Guint; | |
Month | : out Guint; | |
Day | : out Guint); |
function Get_Detail_Height_Rows
( | Calendar | : access Gtk_Calendar_Record) return Gint; |
procedure Set_Detail_Height_Rows
( | Calendar | : access Gtk_Calendar_Record; |
Rows | : Gint); |
function Get_Detail_Width_Chars
( | Calendar | : access Gtk_Calendar_Record) return Gint; |
procedure Set_Detail_Width_Chars
( | Calendar | : access Gtk_Calendar_Record; |
Chars | : Gint); |
function Mark_Day
( | Calendar | : access Gtk_Calendar_Record; |
Day | : Guint) return Boolean; |
procedure Select_Day
( | Calendar | : access Gtk_Calendar_Record; |
Day | : Guint); |
function Select_Month
( | Calendar | : access Gtk_Calendar_Record; |
Month | : Guint; | |
Year | : Guint) return Boolean; |
procedure Set_Detail_Func
( | Calendar | : access Gtk_Calendar_Record; |
Func | : Gtk_Calendar_Detail_Func; | |
Data | : System.Address; | |
Destroy | : Glib.G_Destroy_Notify_Address); |
procedure Thaw
( | Calendar | : access Gtk_Calendar_Record); |
function Unmark_Day
( | Calendar | : access Gtk_Calendar_Record; |
Day | : Guint) return Boolean; |
function "+"
( | Widget | : access Gtk_Calendar_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Buildable.To_Interface; |
function "-"
( | Interf | : Gtk.Buildable.Gtk_Buildable) return Gtk_Calendar renames Implements_Buildable.To_Object; |
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.