|
Graphics.UI.Gtk.Misc.Calendar | Portability | portable (depends on GHC) | Stability | provisional | Maintainer | gtk2hs-users@lists.sourceforge.net |
|
|
|
|
|
Description |
Displays a calendar and allows the user to select a date
|
|
Synopsis |
|
|
|
|
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 CalendarDisplayOptions | Source |
|
Specify which items of a calendar should be displayed.
| Constructors | CalendarShowHeading | | CalendarShowDayNames | | CalendarNoMonthChange | | CalendarShowWeekNumbers | | CalendarWeekStartMonday | | CalendarShowDetails | |
|
|
|
Constructors
|
|
|
Creates a new calendar, with the current date being selected.
|
|
Methods
|
|
|
:: CalendarClass self | | => self | month - a month number between 0 and 11.
| -> Int | year - the year the month is in.
| -> Int | returns True, always
| -> IO Bool | | Shifts the calendar to a different month.
|
|
|
|
:: CalendarClass self | | => self | day - the day number between 1 and 31, or 0 to unselect the
currently selected day.
| -> Int | | -> IO () | | Selects a day from the current month.
|
|
|
|
:: CalendarClass self | | => self | day - the day number to mark between 1 and 31.
| -> Int | returns True, always
| -> IO Bool | | Places a visual marker on a particular day.
|
|
|
|
:: CalendarClass self | | => self | day - the day number to unmark between 1 and 31.
| -> Int | returns True, always
| -> IO Bool | | Removes the visual marker from a particular day.
|
|
|
|
Remove all visual markers.
|
|
|
Sets display options (whether to display the heading and the month
headings).
|
|
|
Sets display options (whether to display the heading and the month
headings).
- Available since Gtk+ version 2.4
|
|
|
Returns the current display options for the calendar.
- Available since Gtk+ version 2.4
|
|
|
|
|
|
:: CalendarClass self | | => self | An action that performs several update operations on the
calendar. After the action finnishes all the changes made by it
are displayed.
| -> IO a | | -> IO a | | Does nothing. Previously locked the display of the calendar for several
update operations.
- Warning: this function is deprecated and should not be used in
newly-written code.
|
|
|
Attributes
|
|
|
The selected year.
Allowed values: >= 0
Default value: 0
|
|
|
The selected month (as a number between 0 and 11).
Allowed values: [0,11]
Default value: 0
|
|
|
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
|
|
|
Determines whether a heading is displayed.
Default value: True
|
|
|
Determines whether day names are displayed.
Default value: True
|
|
|
Determines whether the selected month can be changed.
Default value: False
|
|
|
Determines whether week numbers are displayed.
Default value: False
|
|
Signals
|
|
|
|
|
'displayOptions' property. See calendarGetDisplayOptions and
calendarSetDisplayOptions
calendarDisplayOptions :: CalendarClass self => Attr self [CalendarDisplayOptions]
calendarDisplayOptions = newAttr
calendarGetDisplayOptions
calendarSetDisplayOptions
Emitted when a day was selected.
|
|
|
|
|
Emitted when a day received a double click.
|
|
|
|
|
The month changed.
|
|
|
|
|
The next month was selected.
|
|
|
|
|
The next year was selected.
|
|
|
|
|
The previous month was selected.
|
|
|
|
|
The previous year was selected.
|
|
Produced by Haddock version 2.6.0 |