HildonCalendar

HildonCalendar — A calendar widget

Synopsis

enum                HildonCalendarDisplayOptions;
                    HildonCalendar;
GtkWidget*          hildon_calendar_new                 (void);
gboolean            hildon_calendar_select_month        (HildonCalendar *calendar,
                                                         guint month,
                                                         guint year);
void                hildon_calendar_select_day          (HildonCalendar *calendar,
                                                         guint day);
gboolean            hildon_calendar_mark_day            (HildonCalendar *calendar,
                                                         guint day);
gboolean            hildon_calendar_unmark_day          (HildonCalendar *calendar,
                                                         guint day);
void                hildon_calendar_clear_marks         (HildonCalendar *calendar);
void                hildon_calendar_set_display_options (HildonCalendar *calendar,
                                                         HildonCalendarDisplayOptions flags);
HildonCalendarDisplayOptions hildon_calendar_get_display_options
                                                        (HildonCalendar *calendar);
void                hildon_calendar_get_date            (HildonCalendar *calendar,
                                                         guint *year,
                                                         guint *month,
                                                         guint *day);
void                hildon_calendar_freeze              (HildonCalendar *calendar);
void                hildon_calendar_thaw                (HildonCalendar *calendar);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----HildonCalendar

Implemented Interfaces

HildonCalendar implements AtkImplementorIface and GtkBuildable.

Properties

  "day"                      gint                  : Read / Write
  "max-year"                 gint                  : Read / Write
  "min-year"                 gint                  : Read / Write
  "month"                    gint                  : Read / Write
  "no-month-change"          gboolean              : Read / Write
  "show-day-names"           gboolean              : Read / Write
  "show-heading"             gboolean              : Read / Write
  "show-week-numbers"        gboolean              : Read / Write
  "week-start"               gint                  : Read / Write
  "year"                     gint                  : Read / Write

Signals

  "day-selected"                                   : Run First
  "day-selected-double-click"                      : Run First
  "erroneous-date"                                 : Run First
  "month-changed"                                  : Run First
  "next-month"                                     : Run First
  "next-year"                                      : Run First
  "prev-month"                                     : Run First
  "prev-year"                                      : Run First
  "selected-date"                                  : Run First

Description

HildonCalendar is a slightly modified GtkCalendar. It has an almost same API but a slightly different look and behaviour. Use this widget instead of standard GtkCalendar or use HildonDateEditor for more higher-level date setting operations.

Details

enum HildonCalendarDisplayOptions

typedef enum
{
    HILDON_CALENDAR_SHOW_HEADING                = 1 << 0,
    HILDON_CALENDAR_SHOW_DAY_NAMES              = 1 << 1,
    HILDON_CALENDAR_NO_MONTH_CHANGE             = 1 << 2,
    HILDON_CALENDAR_SHOW_WEEK_NUMBERS           = 1 << 3,
    HILDON_CALENDAR_WEEK_START_MONDAY           = 1 << 4
} HildonCalendarDisplayOptions;

Warning

HildonCalendarDisplayOptions is deprecated and should not be used in newly-written code.


HildonCalendar

typedef struct _HildonCalendar HildonCalendar;

Warning

HildonCalendar is deprecated and should not be used in newly-written code.


hildon_calendar_new ()

GtkWidget*          hildon_calendar_new                 (void);

Warning

hildon_calendar_new is deprecated and should not be used in newly-written code.

Returns :

hildon_calendar_select_month ()

gboolean            hildon_calendar_select_month        (HildonCalendar *calendar,
                                                         guint month,
                                                         guint year);

Warning

hildon_calendar_select_month is deprecated and should not be used in newly-written code.

calendar :
month :
year :
Returns :

hildon_calendar_select_day ()

void                hildon_calendar_select_day          (HildonCalendar *calendar,
                                                         guint day);

Warning

hildon_calendar_select_day is deprecated and should not be used in newly-written code.

calendar :
day :

hildon_calendar_mark_day ()

gboolean            hildon_calendar_mark_day            (HildonCalendar *calendar,
                                                         guint day);

Warning

hildon_calendar_mark_day is deprecated and should not be used in newly-written code.

calendar :
day :
Returns :

hildon_calendar_unmark_day ()

gboolean            hildon_calendar_unmark_day          (HildonCalendar *calendar,
                                                         guint day);

Warning

hildon_calendar_unmark_day is deprecated and should not be used in newly-written code.

calendar :
day :
Returns :

hildon_calendar_clear_marks ()

void                hildon_calendar_clear_marks         (HildonCalendar *calendar);

Warning

hildon_calendar_clear_marks is deprecated and should not be used in newly-written code.

calendar :

hildon_calendar_set_display_options ()

void                hildon_calendar_set_display_options (HildonCalendar *calendar,
                                                         HildonCalendarDisplayOptions flags);

Warning

hildon_calendar_set_display_options is deprecated and should not be used in newly-written code.

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

calendar : a HildonCalendar
flags : the display options to set

hildon_calendar_get_display_options ()

HildonCalendarDisplayOptions hildon_calendar_get_display_options
                                                        (HildonCalendar *calendar);

Warning

hildon_calendar_get_display_options is deprecated and should not be used in newly-written code.

Returns the current display options of calendar.

calendar : a HildonCalendar
Returns : the display options.

hildon_calendar_get_date ()

void                hildon_calendar_get_date            (HildonCalendar *calendar,
                                                         guint *year,
                                                         guint *month,
                                                         guint *day);

Warning

hildon_calendar_get_date is deprecated and should not be used in newly-written code.

calendar :
year :
month :
day :

hildon_calendar_freeze ()

void                hildon_calendar_freeze              (HildonCalendar *calendar);

Warning

hildon_calendar_freeze is deprecated and should not be used in newly-written code.

calendar :

hildon_calendar_thaw ()

void                hildon_calendar_thaw                (HildonCalendar *calendar);

Warning

hildon_calendar_thaw is deprecated and should not be used in newly-written code.

calendar :

Property Details

The "day" property

  "day"                      gint                  : Read / Write

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

Allowed values: [0,31]

Default value: 0


The "max-year" property

  "max-year"                 gint                  : Read / Write

Maximum valid year (0 if no limit).

Allowed values: [0,10000]

Default value: 0


The "min-year" property

  "min-year"                 gint                  : Read / Write

Minimum valid year (0 if no limit).

Allowed values: [0,10000]

Default value: 0


The "month" property

  "month"                    gint                  : Read / Write

The selected month as number between 0 and 11.

Allowed values: [0,11]

Default value: 0


The "no-month-change" property

  "no-month-change"          gboolean              : Read / Write

Determines whether the selected month can be changed.

Default value: FALSE


The "show-day-names" property

  "show-day-names"           gboolean              : Read / Write

Determines whether day names are displayed.

Default value: TRUE


The "show-heading" property

  "show-heading"             gboolean              : Read / Write

Determines whether a heading is displayed.

Default value: TRUE


The "show-week-numbers" property

  "show-week-numbers"        gboolean              : Read / Write

Determines whether week numbers are displayed.

Default value: FALSE


The "week-start" property

  "week-start"               gint                  : Read / Write

Determines the start day of the week (0 for Sunday, 1 for Monday etc.)

Allowed values: [0,6]

Default value: 0


The "year" property

  "year"                     gint                  : Read / Write

The selected year.

Allowed values: >= 0

Default value: 0

Signal Details

The "day-selected" signal

void                user_function                      (HildonCalendar *hildoncalendar,
                                                        gpointer        user_data)           : Run First

hildoncalendar : the object which received the signal.
user_data : user data set when the signal handler was connected.

The "day-selected-double-click" signal

void                user_function                      (HildonCalendar *hildoncalendar,
                                                        gpointer        user_data)           : Run First

hildoncalendar : the object which received the signal.
user_data : user data set when the signal handler was connected.

The "erroneous-date" signal

void                user_function                      (HildonCalendar *arg0,
                                                        gpointer        user_data)      : Run First

Emitted when the user tries to set a date which is outside the boundaries set by min-year and max-year properties.

user_data : user data set when the signal handler was connected.

The "month-changed" signal

void                user_function                      (HildonCalendar *hildoncalendar,
                                                        gpointer        user_data)           : Run First

hildoncalendar : the object which received the signal.
user_data : user data set when the signal handler was connected.

The "next-month" signal

void                user_function                      (HildonCalendar *hildoncalendar,
                                                        gpointer        user_data)           : Run First

hildoncalendar : the object which received the signal.
user_data : user data set when the signal handler was connected.

The "next-year" signal

void                user_function                      (HildonCalendar *hildoncalendar,
                                                        gpointer        user_data)           : Run First

hildoncalendar : the object which received the signal.
user_data : user data set when the signal handler was connected.

The "prev-month" signal

void                user_function                      (HildonCalendar *hildoncalendar,
                                                        gpointer        user_data)           : Run First

hildoncalendar : the object which received the signal.
user_data : user data set when the signal handler was connected.

The "prev-year" signal

void                user_function                      (HildonCalendar *hildoncalendar,
                                                        gpointer        user_data)           : Run First

hildoncalendar : the object which received the signal.
user_data : user data set when the signal handler was connected.

The "selected-date" signal

void                user_function                      (HildonCalendar *arg0,
                                                        gpointer        user_data)      : Run First

Emitted on button-release when the user has selected a date.

user_data : user data set when the signal handler was connected.