type Gtk_Calendar_Record is new Gtk.Widget.Gtk_Widget_Record with private;
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;
Show_Day_Names : constant Gtk_Calendar_Display_Options;
No_Month_Change : constant Gtk_Calendar_Display_Options;
Show_Week_Numbers : constant Gtk_Calendar_Display_Options;
Week_Start_Monday : constant Gtk_Calendar_Display_Options;
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
( | Widget | : out Gtk_Calendar); |
procedure Initialize
( | Widget | : access Gtk_Calendar_Record'Class); |
function Get_Type return Gtk.Gtk_Type;
function Select_Month
( | Calendar | : access Gtk_Calendar_Record; |
Month | : Guint; | |
Year | : Guint) return Boolean; |
procedure Select_Day
( | Calendar | : access Gtk_Calendar_Record; |
Day | : Guint); |
function Mark_Day
( | Calendar | : access Gtk_Calendar_Record; |
Day | : Guint) return Boolean; |
function Unmark_Day
( | Calendar | : access Gtk_Calendar_Record; |
Day | : Guint) return Boolean; |
procedure Clear_Marks
( | Calendar | : access Gtk_Calendar_Record); |
procedure Get_Date
( | Calendar | : access Gtk_Calendar_Record; |
Year | : out Guint; | |
Month | : out Guint; | |
Day | : out Guint); |
procedure Set_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; |
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); |
procedure Set_Detail_Func
( | Calendar | : access Gtk_Calendar_Record; |
Func | : Gtk_Calendar_Detail_Func; | |
Data | : System.Address; | |
Destroy | : G_Destroy_Notify_Address); |
procedure Display_Options
( | Calendar | : access Gtk_Calendar_Record; |
Flags | : Gtk_Calendar_Display_Options); |
procedure Freeze
( | Calendar | : access Gtk_Calendar_Record); |
procedure Thaw
( | Calendar | : access Gtk_Calendar_Record); |
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.
Binding from C File version 2.14
<testgtk>create_calendar.adb</testgtk>