EMonthWidget

EMonthWidget

Functions

Properties

gboolean show-day-names Read / Write
gboolean show-week-numbers Read / Write
int week-start-day Read / Write

Signals

void changed Action
void day-clicked Action

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── GtkEventBox
                        ╰── EMonthWidget

Description

Functions

e_month_widget_new ()

GtkWidget *
e_month_widget_new (void);

Creates a new EMonthWidget

Returns

a new EMonthWidget.

[transfer full]

Since: 3.46


e_month_widget_set_month ()

void
e_month_widget_set_month (EMonthWidget *self,
                          GDateMonth month,
                          guint year);

Sets the month of the year to be shown in the self .

Parameters

self

an EMonthWidget

 

month

a month to show, as GDateMonth

 

year

a year to show

 

Since: 3.46


e_month_widget_get_month ()

void
e_month_widget_get_month (EMonthWidget *self,
                          GDateMonth *out_month,
                          guint *out_year);

Retrieve currently shown month and/or year in the self .

Parameters

self

an EMonthWidget

 

out_month

an output location to set the shown month to, as GDateMonth, or NULL.

[out][optioal]

out_year

an output location to set the shown year to, or NULL.

[out][optional]

Since: 3.46


e_month_widget_set_week_start_day ()

void
e_month_widget_set_week_start_day (EMonthWidget *self,
                                   GDateWeekday value);

Set which day of week the week starts on.

Parameters

self

an EMonthWidget

 

value

a GDateWeekday

 

Since: 3.46


e_month_widget_get_week_start_day ()

GDateWeekday
e_month_widget_get_week_start_day (EMonthWidget *self);

Parameters

self

an EMonthWidget

 

Returns

which day the week starts with

Since: 3.46


e_month_widget_set_show_week_numbers ()

void
e_month_widget_set_show_week_numbers (EMonthWidget *self,
                                      gboolean value);

Set whether to show the week numbers.

Parameters

self

an EMonthWidget

 

value

whether to show week numbers

 

Since: 3.46


e_month_widget_get_show_week_numbers ()

gboolean
e_month_widget_get_show_week_numbers (EMonthWidget *self);

Parameters

self

an EMonthWidget

 

Returns

whether week numbers are shown

Since: 3.46


e_month_widget_set_show_day_names ()

void
e_month_widget_set_show_day_names (EMonthWidget *self,
                                   gboolean value);

Set whether to show day names above the month days.

Parameters

self

an EMonthWidget

 

value

whether to show day names

 

Since: 3.46


e_month_widget_get_show_day_names ()

gboolean
e_month_widget_get_show_day_names (EMonthWidget *self);

Parameters

self

an EMonthWidget

 

Returns

whether day names are shown.

Since: 3.46


e_month_widget_set_day_selected ()

void
e_month_widget_set_day_selected (EMonthWidget *self,
                                 guint day,
                                 gboolean selected);

Sets the day as selected . There can be selected more than one day.

Using the day out of range for the current month and year leads to no change being done.

Parameters

self

an EMonthWidget

 

day

a day of month

 

selected

whether to select the day

 

Since: 3.46


e_month_widget_get_day_selected ()

gboolean
e_month_widget_get_day_selected (EMonthWidget *self,
                                 guint day);

Returns whether the day is selected. Using the day out of range for the current month and year always returns FALSE.

Parameters

self

an EMonthWidget

 

day

a day of month

 

Returns

whether the day is selected

Since: 3.46


e_month_widget_set_day_tooltip_markup ()

void
e_month_widget_set_day_tooltip_markup (EMonthWidget *self,
                                       guint day,
                                       const gchar *tooltip_markup);

Sets a tooltip tooltip_markup for the day . The tooltip_markup is expected to be markup.

The function does nothing when the day is out of range.

Parameters

self

an EMonthWidget

 

day

a day of month

 

tooltip_markup

a tooltip to set, or NULL to unset.

[nullable]

Since: 3.46


e_month_widget_get_day_tooltip_markup ()

const gchar *
e_month_widget_get_day_tooltip_markup (EMonthWidget *self,
                                       guint day);

Returns a tooltip markup for the day , previously set by e_month_widget_set_day_tooltip_markup(), or NULL when none is set.

The function returns NULL when the day is out of range.

Parameters

self

an EMonthWidget

 

day

a day of month

 

Returns

a tooltip markup for the day, or NULL.

[transfer none][nullable]

Since: 3.46


e_month_widget_clear_day_tooltips ()

void
e_month_widget_clear_day_tooltips (EMonthWidget *self);

Clear tooltips for all days of the month.

Parameters

self

an EMonthWidget

 

Since: 3.46


e_month_widget_add_day_css_class ()

void
e_month_widget_add_day_css_class (EMonthWidget *self,
                                  guint day,
                                  const gchar *name);

Add the CSS class name for the day .

The function does nothing when the day is out of range.

Parameters

self

an EMonthWidget

 

day

a day of month

 

name

a CSS class name to add

 

Since: 3.46


e_month_widget_remove_day_css_class ()

void
e_month_widget_remove_day_css_class (EMonthWidget *self,
                                     guint day,
                                     const gchar *name);

Add the CSS class name for the day .

The function does nothing when the day is out of range.

Parameters

self

an EMonthWidget

 

day

a day of month

 

name

a CSS class name to remove

 

Since: 3.46


e_month_widget_clear_day_css_classes ()

void
e_month_widget_clear_day_css_classes (EMonthWidget *self);

Clear CSS classes for all days of the month. Those considered are E_MONTH_WIDGET_CSS_CLASS_BOLD , E_MONTH_WIDGET_CSS_CLASS_ITALIC , E_MONTH_WIDGET_CSS_CLASS_UNDERLINE and E_MONTH_WIDGET_CSS_CLASS_HIGHLIGHT . The function also removes selected state from the days, if set.

Parameters

self

an EMonthWidget

 

Since: 3.46


e_month_widget_get_day_at_position ()

guint
e_month_widget_get_day_at_position (EMonthWidget *self,
                                    gdouble x_win,
                                    gdouble y_win);

Returns the day of month above which the x_win , y_win is. The position is in the self widget coordinates. A value 0 is returned when the position doesn't point into any day.

Parameters

self

an EMonthWidget

 

x_win

window x coordinate

 

y_win

window y coordinate

 

Returns

the day of month the x_win , y_win points to, or 0 if not any day

Since: 3.46

Types and Values

E_MONTH_WIDGET_CSS_CLASS_BOLD

#define E_MONTH_WIDGET_CSS_CLASS_BOLD "emw-bold"

E_MONTH_WIDGET_CSS_CLASS_ITALIC

#define E_MONTH_WIDGET_CSS_CLASS_ITALIC "emw-italic"

E_MONTH_WIDGET_CSS_CLASS_UNDERLINE

#define E_MONTH_WIDGET_CSS_CLASS_UNDERLINE "emw-underline"

E_MONTH_WIDGET_CSS_CLASS_HIGHLIGHT

#define E_MONTH_WIDGET_CSS_CLASS_HIGHLIGHT "emw-highlight"

Property Details

The “show-day-names” property

  “show-day-names”           gboolean

Whether to show day names.

Owner: EMonthWidget

Flags: Read / Write

Default value: FALSE

Since: 3.46


The “show-week-numbers” property

  “show-week-numbers”        gboolean

Whether to show week numbers.

Owner: EMonthWidget

Flags: Read / Write

Default value: FALSE

Since: 3.46


The “week-start-day” property

  “week-start-day”           int

A day the week starts with.

Owner: EMonthWidget

Flags: Read / Write

Allowed values: [0,7]

Default value: 7

Since: 3.46

Signal Details

The “changed” signal

void
user_function (EMonthWidget *self,
               gpointer      user_data)

This signal is emitted when the shown date (month or year) changes.

Parameters

self

an EMonthWidget, which sent the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Action

Since: 3.46


The “day-clicked” signal

void
user_function (EMonthWidget *self,
               GdkEvent     *event,
               guint         year,
               int           month,
               guint         day,
               gpointer      user_data)

This signal is emitted when a day is clicked. It's identified as a date split into year , month and day .

Parameters

self

an EMonthWidget, which sent the signal

 

event

a GdkButtonEvent causing this signal; it's always a button release event

 

year

the year of the clicked day

 

month

the month of the clicked day

 

day

the day of the clicked day

 

user_data

user data set when the signal handler was connected.

 

Flags: Action

Since: 3.46