public class Calendar extends Widget
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.
|
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.QueryTooltip, Widget.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent
Constructor and Description |
---|
Calendar()
Creates a new Calendar instance.
|
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.
|
activate, addEvents, connect, 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
public void connect(Calendar.DaySelected handler)
Calendar.DaySelected
signals.public void connect(Calendar.DaySelectedDoubleClick handler)
Calendar.DaySelectedDoubleClick
signals.public int getDateDay()
getDateYear()
and
getDateMonth()
for the other components of the
date.public int getDateMonth()
getDateYear()
and
getDateDay()
for the other components of the
date.1
to 12
.public int getDateYear()
getDateMonth()
and
getDateDay()
for the other components of the
date.public CalendarDisplayOptions getDisplayOptions()
public void selectDay(int day)
selectMonth()
to change the month and
year.day
- should be in the range of 1
to 31
.
Passing 0
will unselect the day.public void selectMonth(int month, int year)
selectDay()
to change the day that is selected.month
- is in the range of 1
(January) to
12
(December).year
- a four-digit year.public void setDisplayOptions(CalendarDisplayOptions flags)
CalendarDisplayOptions
for details.