gi-gtk-3.0.11: Gtk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.Calendar

Contents

Description

Calendar is a widget that displays a Gregorian calendar, one month at a time. It can be created with calendarNew.

The month and year currently displayed can be altered with calendarSelectMonth. The exact day can be selected from the displayed month using calendarSelectDay.

To place a visual marker on a particular day, use calendarMarkDay and to remove the marker, calendarUnmarkDay. Alternative, all marks can be cleared with calendarClearMarks.

The way in which the calendar itself is displayed can be altered using calendarSetDisplayOptions.

The selected date can be retrieved from a Calendar using calendarGetDate.

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.

Synopsis

Exported types

Methods

clearMarks

calendarClearMarks Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) 
=> a

calendar: a Calendar

-> m () 

Remove all visual markers.

getDate

calendarGetDate Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) 
=> a

calendar: a Calendar

-> m (Word32, Word32, Word32) 

Obtains the selected date from a Calendar.

getDayIsMarked

calendarGetDayIsMarked Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) 
=> a

calendar: a Calendar

-> Word32

day: the day number between 1 and 31.

-> m Bool

Returns: whether the day is marked.

Returns if the day of the calendar is already marked.

Since: 3.0

getDetailHeightRows

calendarGetDetailHeightRows Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) 
=> a

calendar: a Calendar.

-> m Int32

Returns: The height of detail cells, in rows.

Queries the height of detail cells, in rows. See Calendar:detail-width-chars.

Since: 2.14

getDetailWidthChars

calendarGetDetailWidthChars Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) 
=> a

calendar: a Calendar.

-> m Int32

Returns: The width of detail cells, in characters.

Queries the width of detail cells, in characters. See Calendar:detail-width-chars.

Since: 2.14

getDisplayOptions

calendarGetDisplayOptions Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) 
=> a

calendar: a Calendar

-> m [CalendarDisplayOptions]

Returns: the display options.

Returns the current display options of calendar.

Since: 2.4

markDay

data CalendarMarkDayMethodInfo Source #

Instances

((~) * signature (Word32 -> m ()), MonadIO m, IsCalendar a) => MethodInfo * CalendarMarkDayMethodInfo a signature Source # 

calendarMarkDay Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) 
=> a

calendar: a Calendar

-> Word32

day: the day number to mark between 1 and 31.

-> m () 

Places a visual marker on a particular day.

new

calendarNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Calendar

Returns: a newly Calendar widget

Creates a new calendar, with the current date being selected.

selectDay

data CalendarSelectDayMethodInfo Source #

Instances

((~) * signature (Word32 -> m ()), MonadIO m, IsCalendar a) => MethodInfo * CalendarSelectDayMethodInfo a signature Source # 

calendarSelectDay Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) 
=> a

calendar: a Calendar.

-> Word32

day: the day number between 1 and 31, or 0 to unselect the currently selected day.

-> m () 

Selects a day from the current month.

selectMonth

calendarSelectMonth Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) 
=> a

calendar: a Calendar

-> Word32

month: a month number between 0 and 11.

-> Word32

year: the year the month is in.

-> m () 

Shifts the calendar to a different month.

setDetailFunc

calendarSetDetailFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) 
=> a

calendar: a Calendar.

-> CalendarDetailFunc

func: a function providing details for each day.

-> m () 

Installs a function which provides Pango markup with detail information for each day. Examples for such details are holidays or appointments. That information is shown below each day when Calendar:show-details is set. A tooltip containing with full detail information is provided, if the entire text should not fit into the details area, or if Calendar:show-details is not set.

The size of the details area can be restricted by setting the Calendar:detail-width-chars and Calendar:detail-height-rows properties.

Since: 2.14

setDetailHeightRows

calendarSetDetailHeightRows Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) 
=> a

calendar: a Calendar.

-> Int32

rows: detail height in rows.

-> m () 

Updates the height of detail cells. See Calendar:detail-height-rows.

Since: 2.14

setDetailWidthChars

calendarSetDetailWidthChars Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) 
=> a

calendar: a Calendar.

-> Int32

chars: detail width in characters.

-> m () 

Updates the width of detail cells. See Calendar:detail-width-chars.

Since: 2.14

setDisplayOptions

calendarSetDisplayOptions Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) 
=> a

calendar: a Calendar

-> [CalendarDisplayOptions]

flags: the display options to set

-> m () 

Sets display options (whether to display the heading and the month headings).

Since: 2.4

unmarkDay

data CalendarUnmarkDayMethodInfo Source #

Instances

((~) * signature (Word32 -> m ()), MonadIO m, IsCalendar a) => MethodInfo * CalendarUnmarkDayMethodInfo a signature Source # 

calendarUnmarkDay Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) 
=> a

calendar: a Calendar.

-> Word32

day: the day number to unmark between 1 and 31.

-> m () 

Removes the visual marker from a particular day.

Properties

day

data CalendarDayPropertyInfo Source #

Instances

AttrInfo CalendarDayPropertyInfo Source # 
type AttrOrigin CalendarDayPropertyInfo Source # 
type AttrLabel CalendarDayPropertyInfo Source # 
type AttrGetType CalendarDayPropertyInfo Source # 
type AttrBaseTypeConstraint CalendarDayPropertyInfo Source # 
type AttrSetTypeConstraint CalendarDayPropertyInfo Source # 
type AttrAllowedOps CalendarDayPropertyInfo Source # 

setCalendarDay :: (MonadIO m, IsCalendar o) => o -> Int32 -> m () Source #

detailHeightRows

data CalendarDetailHeightRowsPropertyInfo Source #

Instances

AttrInfo CalendarDetailHeightRowsPropertyInfo Source # 
type AttrOrigin CalendarDetailHeightRowsPropertyInfo Source # 
type AttrLabel CalendarDetailHeightRowsPropertyInfo Source # 
type AttrGetType CalendarDetailHeightRowsPropertyInfo Source # 
type AttrBaseTypeConstraint CalendarDetailHeightRowsPropertyInfo Source # 
type AttrSetTypeConstraint CalendarDetailHeightRowsPropertyInfo Source # 
type AttrAllowedOps CalendarDetailHeightRowsPropertyInfo Source # 

detailWidthChars

data CalendarDetailWidthCharsPropertyInfo Source #

Instances

AttrInfo CalendarDetailWidthCharsPropertyInfo Source # 
type AttrOrigin CalendarDetailWidthCharsPropertyInfo Source # 
type AttrLabel CalendarDetailWidthCharsPropertyInfo Source # 
type AttrGetType CalendarDetailWidthCharsPropertyInfo Source # 
type AttrBaseTypeConstraint CalendarDetailWidthCharsPropertyInfo Source # 
type AttrSetTypeConstraint CalendarDetailWidthCharsPropertyInfo Source # 
type AttrAllowedOps CalendarDetailWidthCharsPropertyInfo Source # 

month

data CalendarMonthPropertyInfo Source #

Instances

AttrInfo CalendarMonthPropertyInfo Source # 
type AttrOrigin CalendarMonthPropertyInfo Source # 
type AttrLabel CalendarMonthPropertyInfo Source # 
type AttrGetType CalendarMonthPropertyInfo Source # 
type AttrBaseTypeConstraint CalendarMonthPropertyInfo Source # 
type AttrSetTypeConstraint CalendarMonthPropertyInfo Source # 
type AttrAllowedOps CalendarMonthPropertyInfo Source # 

setCalendarMonth :: (MonadIO m, IsCalendar o) => o -> Int32 -> m () Source #

noMonthChange

data CalendarNoMonthChangePropertyInfo Source #

Instances

AttrInfo CalendarNoMonthChangePropertyInfo Source # 
type AttrOrigin CalendarNoMonthChangePropertyInfo Source # 
type AttrLabel CalendarNoMonthChangePropertyInfo Source # 
type AttrGetType CalendarNoMonthChangePropertyInfo Source # 
type AttrBaseTypeConstraint CalendarNoMonthChangePropertyInfo Source # 
type AttrSetTypeConstraint CalendarNoMonthChangePropertyInfo Source # 
type AttrAllowedOps CalendarNoMonthChangePropertyInfo Source # 

showDayNames

data CalendarShowDayNamesPropertyInfo Source #

Instances

AttrInfo CalendarShowDayNamesPropertyInfo Source # 
type AttrOrigin CalendarShowDayNamesPropertyInfo Source # 
type AttrLabel CalendarShowDayNamesPropertyInfo Source # 
type AttrGetType CalendarShowDayNamesPropertyInfo Source # 
type AttrBaseTypeConstraint CalendarShowDayNamesPropertyInfo Source # 
type AttrSetTypeConstraint CalendarShowDayNamesPropertyInfo Source # 
type AttrAllowedOps CalendarShowDayNamesPropertyInfo Source # 

showDetails

data CalendarShowDetailsPropertyInfo Source #

Instances

AttrInfo CalendarShowDetailsPropertyInfo Source # 
type AttrOrigin CalendarShowDetailsPropertyInfo Source # 
type AttrLabel CalendarShowDetailsPropertyInfo Source # 
type AttrGetType CalendarShowDetailsPropertyInfo Source # 
type AttrBaseTypeConstraint CalendarShowDetailsPropertyInfo Source # 
type AttrSetTypeConstraint CalendarShowDetailsPropertyInfo Source # 
type AttrAllowedOps CalendarShowDetailsPropertyInfo Source # 

showHeading

data CalendarShowHeadingPropertyInfo Source #

Instances

AttrInfo CalendarShowHeadingPropertyInfo Source # 
type AttrOrigin CalendarShowHeadingPropertyInfo Source # 
type AttrLabel CalendarShowHeadingPropertyInfo Source # 
type AttrGetType CalendarShowHeadingPropertyInfo Source # 
type AttrBaseTypeConstraint CalendarShowHeadingPropertyInfo Source # 
type AttrSetTypeConstraint CalendarShowHeadingPropertyInfo Source # 
type AttrAllowedOps CalendarShowHeadingPropertyInfo Source # 

showWeekNumbers

data CalendarShowWeekNumbersPropertyInfo Source #

Instances

AttrInfo CalendarShowWeekNumbersPropertyInfo Source # 
type AttrOrigin CalendarShowWeekNumbersPropertyInfo Source # 
type AttrLabel CalendarShowWeekNumbersPropertyInfo Source # 
type AttrGetType CalendarShowWeekNumbersPropertyInfo Source # 
type AttrBaseTypeConstraint CalendarShowWeekNumbersPropertyInfo Source # 
type AttrSetTypeConstraint CalendarShowWeekNumbersPropertyInfo Source # 
type AttrAllowedOps CalendarShowWeekNumbersPropertyInfo Source # 

year

data CalendarYearPropertyInfo Source #

Instances

AttrInfo CalendarYearPropertyInfo Source # 
type AttrOrigin CalendarYearPropertyInfo Source # 
type AttrLabel CalendarYearPropertyInfo Source # 
type AttrGetType CalendarYearPropertyInfo Source # 
type AttrBaseTypeConstraint CalendarYearPropertyInfo Source # 
type AttrSetTypeConstraint CalendarYearPropertyInfo Source # 
type AttrAllowedOps CalendarYearPropertyInfo Source # 

setCalendarYear :: (MonadIO m, IsCalendar o) => o -> Int32 -> m () Source #

Signals

daySelected

daySelectedDoubleClick

monthChanged

nextMonth

nextYear

prevMonth

prevYear