gtk3-0.15.10: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.Misc.Calendar

Contents

- Detail
- Class Hierarchy
- Types
- Constructors
- Methods
- Attributes
- Signals

Description

Displays a calendar and allows the user to select a date

Synopsis

- data Calendar
- class WidgetClass o => CalendarClass o
- castToCalendar :: GObjectClass obj => obj -> Calendar
- gTypeCalendar :: GType
- toCalendar :: CalendarClass o => o -> Calendar
- data CalendarDisplayOptions
  - = CalendarShowHeading
  - | CalendarShowDayNames
  - | CalendarNoMonthChange
  - | CalendarShowWeekNumbers
  - | CalendarShowDetails
- calendarNew :: IO Calendar
- calendarSelectMonth :: CalendarClass self => self -> Int -> Int -> IO ()
- calendarSelectDay :: CalendarClass self => self -> Int -> IO ()
- calendarMarkDay :: CalendarClass self => self -> Int -> IO ()
- calendarUnmarkDay :: CalendarClass self => self -> Int -> IO ()
- calendarClearMarks :: CalendarClass self => self -> IO ()
- calendarSetDisplayOptions :: CalendarClass self => self -> [CalendarDisplayOptions] -> IO ()
- calendarGetDisplayOptions :: CalendarClass self => self -> IO [CalendarDisplayOptions]
- calendarGetDate :: CalendarClass self => self -> IO (Int, Int, Int)
- calendarYear :: CalendarClass self => Attr self Int
- calendarMonth :: CalendarClass self => Attr self Int
- calendarDay :: CalendarClass self => Attr self Int
- calendarShowHeading :: CalendarClass self => Attr self Bool
- calendarShowDayNames :: CalendarClass self => Attr self Bool
- calendarNoMonthChange :: CalendarClass self => Attr self Bool
- calendarShowWeekNumbers :: CalendarClass self => Attr self Bool
- onDaySelected :: CalendarClass self => self -> IO () -> IO (ConnectId self)
- afterDaySelected :: CalendarClass self => self -> IO () -> IO (ConnectId self)
- onDaySelectedDoubleClick :: CalendarClass self => self -> IO () -> IO (ConnectId self)
- afterDaySelectedDoubleClick :: CalendarClass self => self -> IO () -> IO (ConnectId self)
- onMonthChanged :: CalendarClass self => self -> IO () -> IO (ConnectId self)
- afterMonthChanged :: CalendarClass self => self -> IO () -> IO (ConnectId self)
- onNextMonth :: CalendarClass self => self -> IO () -> IO (ConnectId self)
- afterNextMonth :: CalendarClass self => self -> IO () -> IO (ConnectId self)
- onNextYear :: CalendarClass self => self -> IO () -> IO (ConnectId self)
- afterNextYear :: CalendarClass self => self -> IO () -> IO (ConnectId self)
- onPrevMonth :: CalendarClass self => self -> IO () -> IO (ConnectId self)
- afterPrevMonth :: CalendarClass self => self -> IO () -> IO (ConnectId self)
- onPrevYear :: CalendarClass self => self -> IO () -> IO (ConnectId self)
- afterPrevYear :: CalendarClass self => self -> IO () -> IO (ConnectId self)

# Detail

`Calendar` is a widget that displays a 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`.

# Class Hierarchy

    | GObject
    | +----Object
    | +----Widget
    | +----Calendar

# Types

data Calendar Source #

#### Instances

Instances details

Eq Calendar Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods (==) :: Calendar -> Calendar -> Bool Source # (/=) :: Calendar -> Calendar -> Bool Source #
Ord Calendar Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods compare :: Calendar -> Calendar -> Ordering Source # (<) :: Calendar -> Calendar -> Bool Source # (<=) :: Calendar -> Calendar -> Bool Source # (>) :: Calendar -> Calendar -> Bool Source # (>=) :: Calendar -> Calendar -> Bool Source # max :: Calendar -> Calendar -> Calendar Source # min :: Calendar -> Calendar -> Calendar Source #
GObjectClass Calendar Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: Calendar -> GObject Source # unsafeCastGObject :: GObject -> Calendar Source #
CalendarClass Calendar Source # |
Instance details Defined in Graphics.UI.Gtk.Types
WidgetClass Calendar Source # |
Instance details Defined in Graphics.UI.Gtk.Types

class WidgetClass o => CalendarClass o Source #

#### Instances

Instances details

CalendarClass Calendar Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToCalendar :: GObjectClass obj => obj -> Calendar Source #

gTypeCalendar :: GType Source #

toCalendar :: CalendarClass o => o -> Calendar Source #

data CalendarDisplayOptions Source #

Specify which items of a calendar should be displayed.

Constructors

CalendarShowHeading |
CalendarShowDayNames |
CalendarNoMonthChange |
CalendarShowWeekNumbers |
CalendarShowDetails |

#### Instances

Instances details

Bounded CalendarDisplayOptions Source # |
Instance details Defined in Graphics.UI.Gtk.General.Enums Methods minBound :: CalendarDisplayOptions Source # maxBound :: CalendarDisplayOptions Source #
Enum CalendarDisplayOptions Source # |

Instance details

Defined in Graphics.UI.Gtk.General.Enums

Methods

succ :: CalendarDisplayOptions -> CalendarDisplayOptions Source #

pred :: CalendarDisplayOptions -> CalendarDisplayOptions Source #

toEnum :: Int -> CalendarDisplayOptions Source #

fromEnum :: CalendarDisplayOptions -> Int Source #

enumFrom :: CalendarDisplayOptions -> [CalendarDisplayOptions] Source #

enumFromThen :: CalendarDisplayOptions -> CalendarDisplayOptions -> [CalendarDisplayOptions] Source #

enumFromTo :: CalendarDisplayOptions -> CalendarDisplayOptions -> [CalendarDisplayOptions] Source #

enumFromThenTo :: CalendarDisplayOptions -> CalendarDisplayOptions -> CalendarDisplayOptions -> [CalendarDisplayOptions] Source #

Show CalendarDisplayOptions Source # |
Instance details Defined in Graphics.UI.Gtk.General.Enums Methods showsPrec :: Int -> CalendarDisplayOptions -> ShowS Source # show :: CalendarDisplayOptions -> String Source # showList :: [CalendarDisplayOptions] -> ShowS Source #
Eq CalendarDisplayOptions Source # |
Instance details Defined in Graphics.UI.Gtk.General.Enums Methods (==) :: CalendarDisplayOptions -> CalendarDisplayOptions -> Bool Source # (/=) :: CalendarDisplayOptions -> CalendarDisplayOptions -> Bool Source #
Flags CalendarDisplayOptions Source # |
Instance details Defined in Graphics.UI.Gtk.General.Enums

# Constructors

calendarNew :: IO Calendar Source #

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

# Methods

calendarSelectMonth Source #

Arguments

:: CalendarClass self |
=> self |
-> Int | `month` - a month number between 0 and 11.
-> Int | `year` - the year the month is in.
-> IO () |

Shifts the calendar to a different month.

calendarSelectDay Source #

Arguments

:: CalendarClass self |
=> self |
-> Int | `day` - the day number between 1 and 31, or 0 to unselect the currently selected day.
-> IO () |

Selects a day from the current month.

calendarMarkDay Source #

Arguments

:: CalendarClass self |
=> self |
-> Int | `day` - the day number to mark between 1 and 31.
-> IO () |

Places a visual marker on a particular day.

calendarUnmarkDay Source #

Arguments

:: CalendarClass self |
=> self |
-> Int | `day` - the day number to unmark between 1 and 31.
-> IO () |

Removes the visual marker from a particular day.

calendarClearMarks :: CalendarClass self => self -> IO () Source #

Remove all visual markers.

calendarSetDisplayOptions :: CalendarClass self => self -> [CalendarDisplayOptions] -> IO () Source #

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

- Available since Gtk+ version 2.4

calendarGetDisplayOptions :: CalendarClass self => self -> IO [CalendarDisplayOptions] Source #

Returns the current display options for the calendar.

- Available since Gtk+ version 2.4

calendarGetDate Source #

Arguments

:: CalendarClass self |
=> self |

-> IO (Int, Int, Int)

    (year, month, day)

Retrieve the currently selected date.

# Attributes

calendarYear :: CalendarClass self => Attr self Int Source #

The selected year.

Allowed values: >= 0

Default value: 0

calendarMonth :: CalendarClass self => Attr self Int Source #

The selected month (as a number between 0 and 11).

Allowed values: [0,11]

Default value: 0

calendarDay :: CalendarClass self => Attr self Int Source #

The selected day (as a number between 1 and 31, or 0 to unselect the currently selected day).

Allowed values: [0,31]

Default value: 0

calendarShowHeading :: CalendarClass self => Attr self Bool Source #

Determines whether a heading is displayed.

Default value: `True`

calendarShowDayNames :: CalendarClass self => Attr self Bool Source #

Determines whether day names are displayed.

Default value: `True`

calendarNoMonthChange :: CalendarClass self => Attr self Bool Source #

Determines whether the selected month can be changed.

Default value: `False`

calendarShowWeekNumbers :: CalendarClass self => Attr self Bool Source #

Determines whether week numbers are displayed.

Default value: `False`

# Signals

onDaySelected :: CalendarClass self => self -> IO () -> IO (ConnectId self) Source #

'displayOptions' property. See `calendarGetDisplayOptions` and `calendarSetDisplayOptions`

calendarDisplayOptions :: CalendarClass self => Attr self [CalendarDisplayOptions] calendarDisplayOptions = newAttr calendarGetDisplayOptions calendarSetDisplayOptions

Emitted when a day was selected.

afterDaySelected :: CalendarClass self => self -> IO () -> IO (ConnectId self) Source #

'displayOptions' property. See `calendarGetDisplayOptions` and `calendarSetDisplayOptions`

calendarDisplayOptions :: CalendarClass self => Attr self [CalendarDisplayOptions] calendarDisplayOptions = newAttr calendarGetDisplayOptions calendarSetDisplayOptions

Emitted when a day was selected.

onDaySelectedDoubleClick :: CalendarClass self => self -> IO () -> IO (ConnectId self) Source #

Emitted when a day received a double click.

afterDaySelectedDoubleClick :: CalendarClass self => self -> IO () -> IO (ConnectId self) Source #

Emitted when a day received a double click.

onMonthChanged :: CalendarClass self => self -> IO () -> IO (ConnectId self) Source #

The month changed.

afterMonthChanged :: CalendarClass self => self -> IO () -> IO (ConnectId self) Source #

The month changed.

onNextMonth :: CalendarClass self => self -> IO () -> IO (ConnectId self) Source #

The next month was selected.

afterNextMonth :: CalendarClass self => self -> IO () -> IO (ConnectId self) Source #

The next month was selected.

onNextYear :: CalendarClass self => self -> IO () -> IO (ConnectId self) Source #

The next year was selected.

afterNextYear :: CalendarClass self => self -> IO () -> IO (ConnectId self) Source #

The next year was selected.

onPrevMonth :: CalendarClass self => self -> IO () -> IO (ConnectId self) Source #

The previous month was selected.

afterPrevMonth :: CalendarClass self => self -> IO () -> IO (ConnectId self) Source #

The previous month was selected.

onPrevYear :: CalendarClass self => self -> IO () -> IO (ConnectId self) Source #

The previous year was selected.

afterPrevYear :: CalendarClass self => self -> IO () -> IO (ConnectId self) Source #

The previous year was selected.