org.gnome.gtk

## Class Calendar

- Object
- - org.freedesktop.bindings.Pointer
  - - org.freedesktop.bindings.Proxy
    - - org.gnome.glib.Object
      - - org.gnome.gtk.Widget
        - - org.gnome.gtk.Calendar

-     public class Calendar
      extends Widget

  Displays a monthly calendar with which users select a date.
  Since:
    4.0.3
  Author:
    Vreixo Formoso, Andrew Cowie

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `Calendar.DaySelected` Signal emitted when the user selects on one of the days showing in the Calendar.
    `static interface` | `Calendar.DaySelectedDoubleClick` Signal emitted when the user double clicks on one of the days showing in the Calendar.

    - ### Nested classes/interfaces inherited from class org.gnome.gtk.Widget

      `Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.Destroy, Widget.Draw, Widget.EnterNotifyEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Calendar()` Creates a new Calendar instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `connect(Calendar.DaySelected handler)` Hook up a handler for `Calendar.DaySelected` signals.
    `void` | `connect(Calendar.DaySelectedDoubleClick handler)` Hook up a handler for `Calendar.DaySelectedDoubleClick` signals.
    `int` | `getDateDay()` Get the day of the date currently selected in this Calendar.
    `int` | `getDateMonth()` Get the month of the date currently selected in this Calendar.
    `int` | `getDateYear()` Get the year of the date currently selected in this Calendar.
    `CalendarDisplayOptions` | `getDisplayOptions()` Returns the Flags object describing the current options enabled in this Calendar.
    `void` | `selectDay(int day)` Select the day showing on this Calendar.
    `void` | `selectMonth(int month, int year)` Change the month (and year) showing on this Calendar.
    `void` | `setDisplayOptions(CalendarDisplayOptions flags)` Sets the various options which control the details of how this Calendar is to be displayed.

    - ### Methods inherited from class org.gnome.gtk.Widget

      `activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, destroy, getAllocatedHeight, getAllocatedWidth, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getPreferredHeightForWidthMinimum, getPreferredHeightForWidthNatural, getPreferredHeightMinimum, getPreferredHeightNatural, getPreferredWidthForHeightMinimum, getPreferredWidthForHeightNatural, getPreferredWidthMinimum, getPreferredWidthNatural, getRequestMode, getRequisition, getSensitive, getStyleContext, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, overrideBackground, overrideColor, overrideFont, queueDraw, queueDrawArea, realize, setAlignHorizontal, setAlignVertical, setCanDefault, setCanFocus, setEvents, setExpandHorizontal, setExpandVertical, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll`

    - ### Methods inherited from class org.freedesktop.bindings.Pointer

      `toString`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Calendar

          public Calendar()

      Creates a new Calendar instance.

  - ### Method Detail

    - #### connect

          public void connect(Calendar.DaySelected handler)

      Hook up a handler for `Calendar.DaySelected` signals.
      Since:
        4.0.6

    - #### connect

          public void connect(Calendar.DaySelectedDoubleClick handler)

      Hook up a handler for `Calendar.DaySelectedDoubleClick` signals.
      Since:
        4.0.6

    - #### getDateDay

          public int getDateDay()

      Get the day of the date currently selected in this Calendar. See companion methods `getDateYear()` and `getDateMonth()` for the other components of the date.
      Since:
        4.0.6

    - #### getDateMonth

          public int getDateMonth()

      Get the month of the date currently selected in this Calendar. See companion methods `getDateYear()` and `getDateDay()` for the other components of the date.
      Returns:
        the numerical month, from `1` to `12`.
      Since:
        4.0.6

    - #### getDateYear

          public int getDateYear()

      Get the year of the date currently selected in this Calendar. See companion methods `getDateMonth()` and `getDateDay()` for the other components of the date.
      Since:
        4.0.6

    - #### getDisplayOptions

          public CalendarDisplayOptions getDisplayOptions()

      Returns the Flags object describing the current options enabled in this Calendar.

    - #### selectDay

          public void selectDay(int day)

      Select the day showing on this Calendar. See `selectMonth()` to change the month and year.
      Parameters:
        `day` - should be in the range of `1` to `31`. Passing `0` will unselect the day.
      Since:
        4.0.6

    - #### selectMonth

          public void selectMonth(int month,
                         int year)

      Change the month (and year) showing on this Calendar. See `selectDay()` to change the day that is selected.
      Parameters:
        `month` - is in the range of `1` (January) to `12` (December).
        `year` - a four-digit year.
      Since:
        4.0.6

    - #### setDisplayOptions

          public void setDisplayOptions(CalendarDisplayOptions flags)

      Sets the various options which control the details of how this Calendar is to be displayed. See the constants in `CalendarDisplayOptions` for details.