## ECalendarItem

ECalendarItem

## Synopsis

    #define             E_CALENDAR_ITEM_YPAD_ABOVE_MONTH_NAME
    #define             E_CALENDAR_ITEM_YPAD_BELOW_MONTH_NAME
    #define             E_CALENDAR_ROWS_PER_MONTH
    #define             E_CALENDAR_COLS_PER_MONTH
    #define             E_CALENDAR_ITEM_MARK_BOLD
    #define             E_CALENDAR_ITEM_MARK_ITALIC
    #define             E_CALENDAR_ITEM_MIN_CELL_XPAD
    #define             E_CALENDAR_ITEM_MIN_CELL_YPAD
    #define             E_CALENDAR_ITEM_YPAD_ABOVE_DAY_LETTERS
    #define             E_CALENDAR_ITEM_YPAD_BELOW_DAY_LETTERS
    #define             E_CALENDAR_ITEM_YPAD_ABOVE_CELLS
    #define             E_CALENDAR_ITEM_YPAD_BELOW_CELLS
    #define             E_CALENDAR_ITEM_XPAD_BEFORE_MONTH_NAME_WITH_BUTTON
    #define             E_CALENDAR_ITEM_XPAD_BEFORE_MONTH_NAME
    #define             E_CALENDAR_ITEM_XPAD_AFTER_MONTH_NAME
    #define             E_CALENDAR_ITEM_XPAD_AFTER_MONTH_NAME_WITH_BUTTON
    #define             E_CALENDAR_ITEM_XPAD_BEFORE_WEEK_NUMBERS
    #define             E_CALENDAR_ITEM_XPAD_AFTER_WEEK_NUMBERS
    #define             E_CALENDAR_ITEM_XPAD_BEFORE_CELLS
    #define             E_CALENDAR_ITEM_XPAD_AFTER_CELLS
    enum                ECalendarItemColors;
    struct              ECalendarItem;
    void                e_calendar_item_get_first_month     (ECalendarItem *calitem,
                                                             gint *year,
                                                             gint *month);
    void                e_calendar_item_set_first_month     (ECalendarItem *calitem,
                                                             gint year,
                                                             gint month);
    gint                e_calendar_item_get_max_days_sel    (ECalendarItem *calitem);
    void                e_calendar_item_set_max_days_sel    (ECalendarItem *calitem,
                                                             gint days);
    gint                e_calendar_item_get_days_start_week_sel
                                                            (ECalendarItem *calitem);
    void                e_calendar_item_set_days_start_week_sel
                                                            (ECalendarItem *calitem,
                                                             gint days);
    gboolean            e_calendar_item_get_display_popup   (ECalendarItem *calitem);
    void                e_calendar_item_set_display_popup   (ECalendarItem *calitem,
                                                             gboolean display);
    gboolean            e_calendar_item_get_date_range      (ECalendarItem *calitem,
                                                             gint *start_year,
                                                             gint *start_month,
                                                             gint *start_day,
                                                             gint *end_year,
                                                             gint *end_month,
                                                             gint *end_day);
    gboolean            e_calendar_item_get_selection       (ECalendarItem *calitem,
                                                             GDate *start_date,
                                                             GDate *end_date);
    void                e_calendar_item_set_selection       (ECalendarItem *calitem,
                                                             const GDate *start_date,
                                                             const GDate *end_date);
    void                e_calendar_item_clear_marks         (ECalendarItem *calitem);
    void                e_calendar_item_mark_day            (ECalendarItem *calitem,
                                                             gint year,
                                                             gint month,
                                                             gint day,
                                                             guint8 day_style,
                                                             gboolean add_day_style);
    void                e_calendar_item_mark_days           (ECalendarItem *calitem,
                                                             gint start_year,
                                                             gint start_month,
                                                             gint start_day,
                                                             gint end_year,
                                                             gint end_month,
                                                             gint end_day,
                                                             guint8 day_style,
                                                             gboolean add_day_style);
    void                (*ECalendarItemStyleCallback)       (ECalendarItem *calitem,
                                                             gint year,
                                                             gint month,
                                                             gint day,
                                                             gint day_style,
                                                             gboolean today,
                                                             gboolean prev_or_next_month,
                                                             gboolean selected,
                                                             gboolean has_focus,
                                                             gboolean drop_target,
                                                             GdkColor **bg_color,
                                                             GdkColor **fg_color,
                                                             GdkColor **box_color,
                                                             gboolean *bold,
                                                             gboolean *italic,
                                                             gpointer data);
    void                e_calendar_item_set_style_callback  (ECalendarItem *calitem,
                                                             ECalendarItemStyleCallback cb,
                                                             gpointer data,
                                                             GDestroyNotify destroy);
    void                e_calendar_item_set_get_time_callback
                                                            (ECalendarItem *calitem,
                                                             ECalendarItemGetTimeCallback cb,
                                                             gpointer data,
                                                             GDestroyNotify destroy);
    void                e_calendar_item_normalize_date      (ECalendarItem *calitem,
                                                             gint *year,
                                                             gint *month);
    gint                e_calendar_item_get_week_number     (ECalendarItem *calitem,
                                                             gint day,
                                                             gint month,
                                                             gint year);
    void                e_calendar_item_style_set           (GtkWidget *widget,
                                                             ECalendarItem *calitem);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GnomeCanvasItem
                   +----ECalendarItem

## Implemented Interfaces

ECalendarItem implements EExtensible.

## Properties

      "column-width"             gint                  : Read
      "days-to-start-week-selection" gint                  : Read / Write
      "display-popup"            gboolean              : Read / Write
      "font-desc"                PangoFontDescription*  : Read / Write
      "keep-wdays-on-weeknum-click" gboolean              : Read / Write
      "maximum-columns"          gint                  : Read / Write
      "maximum-days-selected"    gint                  : Read / Write
      "maximum-rows"             gint                  : Read / Write
      "minimum-columns"          gint                  : Read / Write
      "minimum-rows"             gint                  : Read / Write
      "month"                    gint                  : Read / Write
      "move-selection-when-moving" gboolean              : Read / Write
      "preserve-day-when-moving" gboolean              : Read / Write
      "row-height"               gint                  : Read
      "show-week-numbers"        gboolean              : Read / Write
      "week-number-font-desc"    PangoFontDescription*  : Read / Write
      "week-start-day"           EDateWeekday          : Read / Write
      "x1"                       gdouble               : Read / Write
      "x2"                       gdouble               : Read / Write
      "y1"                       gdouble               : Read / Write
      "y2"                       gdouble               : Read / Write
      "year"                     gint                  : Read / Write

## Signals

      "date-range-changed"                             : Run First
      "selection-changed"                              : Run First
      "selection-preview-changed"                      : Run Last

## Description

## Details

### E_CALENDAR_ITEM_YPAD_ABOVE_MONTH_NAME

    #define E_CALENDAR_ITEM_YPAD_ABOVE_MONTH_NAME 1

### E_CALENDAR_ITEM_YPAD_BELOW_MONTH_NAME

    #define E_CALENDAR_ITEM_YPAD_BELOW_MONTH_NAME 1

### E_CALENDAR_ROWS_PER_MONTH

    #define E_CALENDAR_ROWS_PER_MONTH 6

### E_CALENDAR_COLS_PER_MONTH

    #define E_CALENDAR_COLS_PER_MONTH 7

### E_CALENDAR_ITEM_MARK_BOLD

    #define E_CALENDAR_ITEM_MARK_BOLD (1 << 0)

### E_CALENDAR_ITEM_MARK_ITALIC

    #define E_CALENDAR_ITEM_MARK_ITALIC     (1 << 1)

### E_CALENDAR_ITEM_MIN_CELL_XPAD

    #define E_CALENDAR_ITEM_MIN_CELL_XPAD 4

### E_CALENDAR_ITEM_MIN_CELL_YPAD

    #define E_CALENDAR_ITEM_MIN_CELL_YPAD 0

### E_CALENDAR_ITEM_YPAD_ABOVE_DAY_LETTERS

    #define E_CALENDAR_ITEM_YPAD_ABOVE_DAY_LETTERS		1

### E_CALENDAR_ITEM_YPAD_BELOW_DAY_LETTERS

    #define E_CALENDAR_ITEM_YPAD_BELOW_DAY_LETTERS		0

### E_CALENDAR_ITEM_YPAD_ABOVE_CELLS

    #define E_CALENDAR_ITEM_YPAD_ABOVE_CELLS		1

### E_CALENDAR_ITEM_YPAD_BELOW_CELLS

    #define E_CALENDAR_ITEM_YPAD_BELOW_CELLS		2

### E_CALENDAR_ITEM_XPAD_BEFORE_MONTH_NAME_WITH_BUTTON

    #define E_CALENDAR_ITEM_XPAD_BEFORE_MONTH_NAME_WITH_BUTTON 10

### E_CALENDAR_ITEM_XPAD_BEFORE_MONTH_NAME

    #define E_CALENDAR_ITEM_XPAD_BEFORE_MONTH_NAME			3

### E_CALENDAR_ITEM_XPAD_AFTER_MONTH_NAME

    #define E_CALENDAR_ITEM_XPAD_AFTER_MONTH_NAME			3

### E_CALENDAR_ITEM_XPAD_AFTER_MONTH_NAME_WITH_BUTTON

    #define E_CALENDAR_ITEM_XPAD_AFTER_MONTH_NAME_WITH_BUTTON 10

### E_CALENDAR_ITEM_XPAD_BEFORE_WEEK_NUMBERS

    #define E_CALENDAR_ITEM_XPAD_BEFORE_WEEK_NUMBERS 4

### E_CALENDAR_ITEM_XPAD_AFTER_WEEK_NUMBERS

    #define E_CALENDAR_ITEM_XPAD_AFTER_WEEK_NUMBERS		2

### E_CALENDAR_ITEM_XPAD_BEFORE_CELLS

    #define E_CALENDAR_ITEM_XPAD_BEFORE_CELLS		1

### E_CALENDAR_ITEM_XPAD_AFTER_CELLS

    #define E_CALENDAR_ITEM_XPAD_AFTER_CELLS		4

### enum ECalendarItemColors

    typedef enum {
    	E_CALENDAR_ITEM_COLOR_TODAY_BOX,
    	E_CALENDAR_ITEM_COLOR_SELECTION_FG,
    	E_CALENDAR_ITEM_COLOR_SELECTION_BG_FOCUSED,
    	E_CALENDAR_ITEM_COLOR_SELECTION_BG,
    	E_CALENDAR_ITEM_COLOR_PREV_OR_NEXT_MONTH_FG,

    	E_CALENDAR_ITEM_COLOR_LAST
    } ECalendarItemColors;

`E_CALENDAR_ITEM_COLOR_TODAY_BOX` |
`E_CALENDAR_ITEM_COLOR_SELECTION_FG` |
`E_CALENDAR_ITEM_COLOR_SELECTION_BG_FOCUSED` |
`E_CALENDAR_ITEM_COLOR_SELECTION_BG` |
`E_CALENDAR_ITEM_COLOR_PREV_OR_NEXT_MONTH_FG` |
`E_CALENDAR_ITEM_COLOR_LAST` |

### struct ECalendarItem

    struct ECalendarItem;

### e_calendar_item_get_first_month ()

    void                e_calendar_item_get_first_month     (ECalendarItem *calitem,
                                                             gint *year,
                                                             gint *month);

### e_calendar_item_set_first_month ()

    void                e_calendar_item_set_first_month     (ECalendarItem *calitem,
                                                             gint year,
                                                             gint month);

### e_calendar_item_get_max_days_sel ()

    gint                e_calendar_item_get_max_days_sel    (ECalendarItem *calitem);

### e_calendar_item_set_max_days_sel ()

    void                e_calendar_item_set_max_days_sel    (ECalendarItem *calitem,
                                                             gint days);

### e_calendar_item_get_days_start_week_sel ()

    gint                e_calendar_item_get_days_start_week_sel
                                                            (ECalendarItem *calitem);

### e_calendar_item_set_days_start_week_sel ()

    void                e_calendar_item_set_days_start_week_sel
                                                            (ECalendarItem *calitem,
                                                             gint days);

### e_calendar_item_get_display_popup ()

    gboolean            e_calendar_item_get_display_popup   (ECalendarItem *calitem);

### e_calendar_item_set_display_popup ()

    void                e_calendar_item_set_display_popup   (ECalendarItem *calitem,
                                                             gboolean display);

### e_calendar_item_get_date_range ()

    gboolean            e_calendar_item_get_date_range      (ECalendarItem *calitem,
                                                             gint *start_year,
                                                             gint *start_month,
                                                             gint *start_day,
                                                             gint *end_year,
                                                             gint *end_month,
                                                             gint *end_day);

### e_calendar_item_get_selection ()

    gboolean            e_calendar_item_get_selection       (ECalendarItem *calitem,
                                                             GDate *start_date,
                                                             GDate *end_date);

### e_calendar_item_set_selection ()

    void                e_calendar_item_set_selection       (ECalendarItem *calitem,
                                                             const GDate *start_date,
                                                             const GDate *end_date);

### e_calendar_item_clear_marks ()

    void                e_calendar_item_clear_marks         (ECalendarItem *calitem);

### e_calendar_item_mark_day ()

    void                e_calendar_item_mark_day            (ECalendarItem *calitem,
                                                             gint year,
                                                             gint month,
                                                             gint day,
                                                             guint8 day_style,
                                                             gboolean add_day_style);

### e_calendar_item_mark_days ()

    void                e_calendar_item_mark_days           (ECalendarItem *calitem,
                                                             gint start_year,
                                                             gint start_month,
                                                             gint start_day,
                                                             gint end_year,
                                                             gint end_month,
                                                             gint end_day,
                                                             guint8 day_style,
                                                             gboolean add_day_style);

### ECalendarItemStyleCallback ()

    void                (*ECalendarItemStyleCallback)       (ECalendarItem *calitem,
                                                             gint year,
                                                             gint month,
                                                             gint day,
                                                             gint day_style,
                                                             gboolean today,
                                                             gboolean prev_or_next_month,
                                                             gboolean selected,
                                                             gboolean has_focus,
                                                             gboolean drop_target,
                                                             GdkColor **bg_color,
                                                             GdkColor **fg_color,
                                                             GdkColor **box_color,
                                                             gboolean *bold,
                                                             gboolean *italic,
                                                             gpointer data);

### e_calendar_item_set_style_callback ()

    void                e_calendar_item_set_style_callback  (ECalendarItem *calitem,
                                                             ECalendarItemStyleCallback cb,
                                                             gpointer data,
                                                             GDestroyNotify destroy);

### e_calendar_item_set_get_time_callback ()

    void                e_calendar_item_set_get_time_callback
                                                            (ECalendarItem *calitem,
                                                             ECalendarItemGetTimeCallback cb,
                                                             gpointer data,
                                                             GDestroyNotify destroy);

### e_calendar_item_normalize_date ()

    void                e_calendar_item_normalize_date      (ECalendarItem *calitem,
                                                             gint *year,
                                                             gint *month);

### e_calendar_item_get_week_number ()

    gint                e_calendar_item_get_week_number     (ECalendarItem *calitem,
                                                             gint day,
                                                             gint month,
                                                             gint year);

### e_calendar_item_style_set ()

    void                e_calendar_item_style_set           (GtkWidget *widget,
                                                             ECalendarItem *calitem);

## Property Details

### The `"column-width"` property

      "column-width"             gint                  : Read

Default value: 0

### The `"days-to-start-week-selection"` property

      "days-to-start-week-selection" gint                  : Read / Write

Default value: 0

### The `"display-popup"` property

      "display-popup"            gboolean              : Read / Write

Default value: TRUE

### The `"font-desc"` property

      "font-desc"                PangoFontDescription*  : Read / Write

### The `"keep-wdays-on-weeknum-click"` property

      "keep-wdays-on-weeknum-click" gboolean              : Read / Write

Default value: FALSE

### The `"maximum-columns"` property

      "maximum-columns"          gint                  : Read / Write

Default value: 0

### The `"maximum-days-selected"` property

      "maximum-days-selected"    gint                  : Read / Write

Default value: 0

### The `"maximum-rows"` property

      "maximum-rows"             gint                  : Read / Write

Default value: 0

### The `"minimum-columns"` property

      "minimum-columns"          gint                  : Read / Write

Default value: 0

### The `"minimum-rows"` property

      "minimum-rows"             gint                  : Read / Write

Default value: 0

### The `"month"` property

      "month"                    gint                  : Read / Write

Default value: 0

### The `"move-selection-when-moving"` property

      "move-selection-when-moving" gboolean              : Read / Write

Default value: TRUE

### The `"preserve-day-when-moving"` property

      "preserve-day-when-moving" gboolean              : Read / Write

Default value: TRUE

### The `"row-height"` property

      "row-height"               gint                  : Read

Default value: 0

### The `"show-week-numbers"` property

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

Default value: TRUE

### The `"week-number-font-desc"` property

      "week-number-font-desc"    PangoFontDescription*  : Read / Write

### The `"week-start-day"` property

      "week-start-day"           EDateWeekday          : Read / Write

Default value: E_DATE_MONDAY

### The `"x1"` property

      "x1"                       gdouble               : Read / Write

Default value: 0

### The `"x2"` property

      "x2"                       gdouble               : Read / Write

Default value: 0

### The `"y1"` property

      "y1"                       gdouble               : Read / Write

Default value: 0

### The `"y2"` property

      "y2"                       gdouble               : Read / Write

Default value: 0

### The `"year"` property

      "year"                     gint                  : Read / Write

Default value: 0

## Signal Details

### The `"date-range-changed"` signal

    void                user_function                      (ECalendarItem *ecalendaritem,
                                                            gpointer       user_data)          : Run First

### The `"selection-changed"` signal

    void                user_function                      (ECalendarItem *ecalendaritem,
                                                            gpointer       user_data)          : Run First

### The `"selection-preview-changed"` signal

    void                user_function                      (ECalendarItem *ecalendaritem,
                                                            gpointer       user_data)          : Run Last