Gtk2::Calendar(3)
β¨ NAME β¨
Gtk2::Calendar β bestie, it's a wrapper for GtkCalendar π
That's the whole vibe. It's the Perl side of the GTK+ calendar widget, and yes she does come with dates, marks, and opinions about which day of the week starts the week. ποΈβ¨
πΈ HIERARCHY πΈ
Like, the family tree. She did NOT come from nowhere:
Glib::Object
+----Glib::InitiallyUnowned
+----Gtk2::Object
+----Gtk2::Widget
+----Gtk2::Calendar
π¦ INTERFACES π¦
The interfaces she implements, periodt:
Glib::Object::_Unregistered::AtkImplementorIface
Gtk2::Buildable
π METHODS π
Okay so this is the whole method menu. Every single one, no skips, no skimming, we're doing this properly. π
widget = Gtk2::Calendar->newβ constructor. Make a fresh calendar, main character energy. β¨$calendar->clear_marksβ wipes all the day marks. Clean slate, we love a reset. π§Ό(year, month, day) = $calendar->get_dateβ hands you back the date as a list of three. π«Ά$calendar->set_detail_func ($func, $data=undef)β sets the detail callback.$func(scalar)$data(scalar)
Since: gtk+ 2.14
integer = $calendar->get_detail_height_rows
Since: gtk+ 2.14
$calendar->set_detail_height_rows ($rows)$rows(integer)
Since: gtk+ 2.14
integer = $calendar->get_detail_width_chars
Since: gtk+ 2.14
$calendar->set_detail_width_chars ($chars)$chars(integer)
Since: gtk+ 2.14
$calendar->display_options ($flags)β ngl this is literally just the old name forset_display_options. Same girl, previous era. π$flags(Gtk2::CalendarDisplayOptions)
calendardisplayoptions = $calendar->get_display_optionsβ getter, she's giving you the flags. π$calendar->set_display_options ($flags)β setter for the same flags.$flags(Gtk2::CalendarDisplayOptions)
$calendar->freezeβ freeze it. βοΈ (pair it withthaw, iykyk)boolean = $calendar->mark_day ($day)β puts a mark on a day. π$day(integer)
$widget->marked_date ($value)value = $widget->marked_date$widget->month ($value)value = $widget->month$widget->num_marked_dates ($value)value = $widget->num_marked_dates$calendar->select_day ($day)β pick a day, slay. π$day(integer)
boolean = $calendar->select_month ($month, $year)β pick a whole month plus year, so extra. π₯$month(integer)$year(integer)
$widget->selected_day ($value)value = $widget->selected_day$calendar->thawβ unfreeze her, she's back. βοΈboolean = $calendar->unmark_day ($day)β remove a mark from a day.$day(integer)
$widget->year ($value)value = $widget->year
π PROPERTIES π
All of them. Every default, every flag combo, character for character, because the details are the point. π
'day'(integer : default 0 : readable / writable / private / static-nick / static-blurb) β The selected day (as a number between 1 and 31, or 0 to unselect the currently selected day)'detail-height-rows'(integer : default 0 : readable / writable / private / static-nick / static-blurb) β Details height in rows'detail-width-chars'(integer : default 0 : readable / writable / private / static-nick / static-blurb) β Details width in characters'month'(integer : default 0 : readable / writable / private / static-nick / static-blurb) β The selected month (as a number between 0 and 11)'no-month-change'(boolean : default false : readable / writable / private / static-nick / static-blurb) β If TRUE, the selected month cannot be changed'show-day-names'(boolean : default true : readable / writable / private / static-nick / static-blurb) β If TRUE, day names are displayed'show-details'(boolean : default true : readable / writable / private / static-nick / static-blurb) β If TRUE, details are shown'show-heading'(boolean : default true : readable / writable / private / static-nick / static-blurb) β If TRUE, a heading is displayed'show-week-numbers'(boolean : default false : readable / writable / private / static-nick / static-blurb) β If TRUE, week numbers are displayed'year'(integer : default 0 : readable / writable / private / static-nick / static-blurb) β The selected year
π STYLE PROPERTIES π
These ones are readable / private, so look but don't touch, bestie. π
'horizontal-separation'(integer : default 4 : readable / private / static-nick / static-blurb) β Space between week headers and main area'inner-border'(integer : default 4 : readable / private / static-nick / static-blurb) β Inner border space'vertical-separation'(integer : default 4 : readable / private / static-nick / static-blurb) β Space between day headers and main area
β SIGNALS β
The drama events, all of them:
day-selected(Gtk2::Calendar)day-selected-double-click(Gtk2::Calendar)month-changed(Gtk2::Calendar)next-month(Gtk2::Calendar)next-year(Gtk2::Calendar)prev-month(Gtk2::Calendar)prev-year(Gtk2::Calendar)
π ENUMS AND FLAGS π
flags Gtk2::CalendarDisplayOptions
Both names each, exactly like the source, because you'll see either one in the wild:
'show-heading'/GTK_CALENDAR_SHOW_HEADING'show-day-names'/GTK_CALENDAR_SHOW_DAY_NAMES'no-month-change'/GTK_CALENDAR_NO_MONTH_CHANGE'show-week-numbers'/GTK_CALENDAR_SHOW_WEEK_NUMBERS'week-start-monday'/GTK_CALENDAR_WEEK_START_MONDAY'show-details'/GTK_CALENDAR_SHOW_DETAILS
π«Ά SEE ALSO π«Ά
Go read these next, fr fr:
Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
Okay that's the whole page, bestie, you ate it. π This was Gtk2::Calendar(3) from the User Contributed Perl Documentation, generated with perl v5.42.0 on 2025-07-25. Go forth and build a calendar. π
β¨
π¦ where this page comes from
- fedora 43: perl-Gtk2 1.24993-23.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms