JanaGtkDayView

JanaGtkDayView

Synopsis

                    JanaGtkDayView;
GtkWidget *         jana_gtk_day_view_new               (JanaDuration *range,
                                                         guint cells);
void                jana_gtk_day_view_add_store         (JanaGtkDayView *self,
                                                         JanaGtkEventStore *store);
void                jana_gtk_day_view_remove_store      (JanaGtkDayView *self,
                                                         JanaGtkEventStore *store);
void                jana_gtk_day_view_scroll_to_cell    (JanaGtkDayView *self,
                                                         guint x,
                                                         guint y);
void                jana_gtk_day_view_scroll_to_time    (JanaGtkDayView *self,
                                                         JanaTime *time);
JanaGtkCellRendererEvent * jana_gtk_day_view_get_cell_renderer
                                                        (JanaGtkDayView *self);
JanaGtkCellRendererEvent * jana_gtk_day_view_get_24hr_cell_renderer
                                                        (JanaGtkDayView *self);
void                jana_gtk_day_view_set_range         (JanaGtkDayView *self,
                                                         JanaDuration *range);
JanaDuration *      jana_gtk_day_view_get_range         (JanaGtkDayView *self);
void                jana_gtk_day_view_set_cells         (JanaGtkDayView *self,
                                                         guint cells);
guint               jana_gtk_day_view_get_cells         (JanaGtkDayView *self);
void                jana_gtk_day_view_set_spacing       (JanaGtkDayView *self,
                                                         guint spacing);
guint               jana_gtk_day_view_get_spacing       (JanaGtkDayView *self);
JanaDuration *      jana_gtk_day_view_get_selection     (JanaGtkDayView *self);
void                jana_gtk_day_view_set_selection     (JanaGtkDayView *self,
                                                         JanaDuration *selection);
void                jana_gtk_day_view_set_visible_ratio (JanaGtkDayView *self,
                                                         gdouble xratio,
                                                         gdouble yratio);
void                jana_gtk_day_view_get_visible_ratio (JanaGtkDayView *self,
                                                         gdouble *xratio,
                                                         gdouble *yratio);
GtkTreeRowReference * jana_gtk_day_view_get_selected_event
                                                        (JanaGtkDayView *self);
void                jana_gtk_day_view_set_selected_event
                                                        (JanaGtkDayView *self,
                                                         GtkTreeRowReference *row);
void                jana_gtk_day_view_set_visible_func  (JanaGtkDayView *self,
                                                         GtkTreeModelFilterVisibleFunc visible_cb,
                                                         gpointer data);
void                jana_gtk_day_view_refilter          (JanaGtkDayView *self);
void                jana_gtk_day_view_set_highlighted_time
                                                        (JanaGtkDayView *self,
                                                         JanaTime *time);
void                jana_gtk_day_view_set_active_range  (JanaGtkDayView *self,
                                                         JanaDuration *range);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkWidget
               +----GtkContainer
                     +----GtkBin
                           +----GtkEventBox
                                 +----JanaGtkDayView

Implemented Interfaces

JanaGtkDayView implements AtkImplementorIface and GtkBuildable.

Properties

  "active-range"             JanaDuration*         : Read / Write
  "cells"                    guint                 : Read / Write
  "highlighted-time"         GObject*              : Read / Write
  "range"                    JanaDuration*         : Read / Write
  "selected-event"           GtkTreeRowReference*  : Read / Write
  "selection"                JanaDuration*         : Read / Write
  "spacing"                  guint                 : Read / Write
  "style-hint"               gchar*                : Read / Write
  "xratio"                   gdouble               : Read / Write
  "yratio"                   gdouble               : Read / Write

Signals

  "event-activated"                                : Run Last
  "event-selected"                                 : Run Last
  "selection-changed"                              : Run Last

Description

Details

JanaGtkDayView

typedef struct _JanaGtkDayView JanaGtkDayView;


jana_gtk_day_view_new ()

GtkWidget *         jana_gtk_day_view_new               (JanaDuration *range,
                                                         guint cells);

Creates a new JanaGtkDayView, which is a view of a single or multiple days on any amount of JanaGtkEventStore objects. range will be used to determine a rectangular viewing area, where the start of the duration is used to determine the earliest visible time each day, and the end of the duration is used to determine the latest visible time each day.

range :

The visible range on the day view

cells :

How many cells to use vertically

Returns :

A new JanaGtkDayView.

jana_gtk_day_view_add_store ()

void                jana_gtk_day_view_add_store         (JanaGtkDayView *self,
                                                         JanaGtkEventStore *store);

Adds a JanaGtkEventStore to the view. Added stores will be monitored and visualised events will be kept up-to-date.

self :

A JanaGtkDayView

store :

The JanaGtkEventStore

jana_gtk_day_view_remove_store ()

void                jana_gtk_day_view_remove_store      (JanaGtkDayView *self,
                                                         JanaGtkEventStore *store);

Removes a JanaGtkEventStore from the view.

self :

A JanaGtkDayView

store :

The JanaGtkEventStore

jana_gtk_day_view_scroll_to_cell ()

void                jana_gtk_day_view_scroll_to_cell    (JanaGtkDayView *self,
                                                         guint x,
                                                         guint y);

Sets adjustments on self so that the cell at x , y is visible.

self :

A JanaGtkDayView

x :

The cell's x coordinate

y :

The cell's y coordinate

jana_gtk_day_view_scroll_to_time ()

void                jana_gtk_day_view_scroll_to_time    (JanaGtkDayView *self,
                                                         JanaTime *time);

Sets adjustments on self so that time is visible, assuming that time is in the visible range.

self :

A JanaGtkDayView

time :

The JanaTime to scroll to

jana_gtk_day_view_get_cell_renderer ()

JanaGtkCellRendererEvent * jana_gtk_day_view_get_cell_renderer
                                                        (JanaGtkDayView *self);

Retrieves the JanaGtkCellRendererEvent used to draw standard events.

self :

A JanaGtkDayView

Returns :

the JanaGtkCellRendererEvent used to draw standard events.

jana_gtk_day_view_get_24hr_cell_renderer ()

JanaGtkCellRendererEvent * jana_gtk_day_view_get_24hr_cell_renderer
                                                        (JanaGtkDayView *self);

Retrieves the JanaGtkCellRendererEvent used to draw all-day events.

self :

A JanaGtkDayView

Returns :

the JanaGtkCellRendererEvent used to draw all-day events.

jana_gtk_day_view_set_range ()

void                jana_gtk_day_view_set_range         (JanaGtkDayView *self,
                                                         JanaDuration *range);

Set the rectangular viewing area, where the start of range is used to determine the earliest visible time each day, and the end is used to determine the latest visible time each day.

self :

A JanaGtkDayView

range :

The visible range

jana_gtk_day_view_get_range ()

JanaDuration *      jana_gtk_day_view_get_range         (JanaGtkDayView *self);

Get the visible time-range, as a JanaDuration. See jana_gtk_day_view_set_range().

self :

A JanaGtkDayView

Returns :

The visible range.

jana_gtk_day_view_set_cells ()

void                jana_gtk_day_view_set_cells         (JanaGtkDayView *self,
                                                         guint cells);

Sets the amount of cells to divide time up into, per day; i.e. the amount of cells to display vertically.

self :

A JanaGtkDayView

cells :

Amount of cells to use, vertically.

jana_gtk_day_view_get_cells ()

guint               jana_gtk_day_view_get_cells         (JanaGtkDayView *self);

Gets the amount of cells used vertically. See jana_gtk_day_view_set_cells().

self :

A JanaGtkDayView

Returns :

Amount of cells used vertically.

jana_gtk_day_view_set_spacing ()

void                jana_gtk_day_view_set_spacing       (JanaGtkDayView *self,
                                                         guint spacing);

Sets the spacing used around events and text, in pixels.

self :

A JanaGtkDayView

spacing :

Spacing, in pixels

jana_gtk_day_view_get_spacing ()

guint               jana_gtk_day_view_get_spacing       (JanaGtkDayView *self);

Gets the spacing used around events and text. See jana_gtk_day_view_set_spacing().

self :

A JanaGtkDayView

Returns :

Spacing used around events and text, in pixels.

jana_gtk_day_view_get_selection ()

JanaDuration *      jana_gtk_day_view_get_selection     (JanaGtkDayView *self);

Get the selected time-range, as a JanaDuration. See jana_gtk_day_view_set_selection().

self :

A JanaGtkDayView

Returns :

The selected time-range, or NULL if no range is selected.

jana_gtk_day_view_set_selection ()

void                jana_gtk_day_view_set_selection     (JanaGtkDayView *self,
                                                         JanaDuration *selection);

Sets the selected time range.

self :

A JanaGtkDayView

selection :

The time-range to select

jana_gtk_day_view_set_visible_ratio ()

void                jana_gtk_day_view_set_visible_ratio (JanaGtkDayView *self,
                                                         gdouble xratio,
                                                         gdouble yratio);

Sets the amount of the visible range that should be viewable at once, without scrolling. This is represented as a fraction, from G_MINFLOAT to 1.0, inclusive. If, for example, a JanaGtkDayView was placed in a GtkScrolledWindow, and the xratio and yratio were set to 1.0 and 0.5, respectively, a horizontal scroll-bar would not be required, but the JanaGtkDayView would size itself so that only half of itself were visible and a vertical scroll-bar would be required. Ratios below 1.0 must not be set when the scrolling policy of the containing widget disallows scrolling.

self :

A JanaGtkDayView

xratio :

The fraction of the set visible range that should be visible without scrolling, on the x-axis.

yratio :

The fraction of the set visible range that should be visible without scrolling, on the y-axis.

jana_gtk_day_view_get_visible_ratio ()

void                jana_gtk_day_view_get_visible_ratio (JanaGtkDayView *self,
                                                         gdouble *xratio,
                                                         gdouble *yratio);

Retrieves the amount of the visible range that should be viewable at once, on each axis. See jana_gtk_day_view_set_visible_ratio().

self :

A JanaGtkDayView

xratio :

Return location for xratio, or NULL

yratio :

Return location for yratio, or NULL

jana_gtk_day_view_get_selected_event ()

GtkTreeRowReference * jana_gtk_day_view_get_selected_event
                                                        (JanaGtkDayView *self);

Retrieves the selected event, returned as a GtkTreeRowReference on a JanaGtkEventStore. See jana_gtk_day_view_set_selected_event().

self :

A JanaGtkDayView

Returns :

the selected event, as a row reference on a JanaGtkEventStore.

jana_gtk_day_view_set_selected_event ()

void                jana_gtk_day_view_set_selected_event
                                                        (JanaGtkDayView *self,
                                                         GtkTreeRowReference *row);

Sets the selected event, if the specified row is visible on self.

self :

A JanaGtkDayView

row :

A GtkTreeRowReference on a JanaGtkEventStore

jana_gtk_day_view_set_visible_func ()

void                jana_gtk_day_view_set_visible_func  (JanaGtkDayView *self,
                                                         GtkTreeModelFilterVisibleFunc visible_cb,
                                                         gpointer data);


jana_gtk_day_view_refilter ()

void                jana_gtk_day_view_refilter          (JanaGtkDayView *self);


jana_gtk_day_view_set_highlighted_time ()

void                jana_gtk_day_view_set_highlighted_time
                                                        (JanaGtkDayView *self,
                                                         JanaTime *time);


jana_gtk_day_view_set_active_range ()

void                jana_gtk_day_view_set_active_range  (JanaGtkDayView *self,
                                                         JanaDuration *range);

Property Details

The "active-range" property

  "active-range"             JanaDuration*         : Read / Write

The range that should be considered 'active'.


The "cells" property

  "cells"                    guint                 : Read / Write

Amount of cells to partition time into, per day.

Default value: 0


The "highlighted-time" property

  "highlighted-time"         GObject*              : Read / Write

A time that should be highlighted, for example, the current time.


The "range" property

  "range"                    JanaDuration*         : Read / Write

The range shown by this day-view, as a JanaDuration.


The "selected-event" property

  "selected-event"           GtkTreeRowReference*  : Read / Write

A reference to the currently selected event in a JanaGtkEventStore.


The "selection" property

  "selection"                JanaDuration*         : Read / Write

The currently selected range, as a JanaDuration.


The "spacing" property

  "spacing"                  guint                 : Read / Write

Spacing to use inside day boxes.

Default value: 2


The "style-hint" property

  "style-hint"               gchar*                : Read / Write

The style hint to use when drawing.

Default value: NULL


The "xratio" property

  "xratio"                   gdouble               : Read / Write

The proportion of the calendar that should be visible, on the x-axis.

Allowed values: [G_MINDOUBLE,1]

Default value: 1


The "yratio" property

  "yratio"                   gdouble               : Read / Write

The proportion of the calendar that should be visible, on the y-axis.

Allowed values: [G_MINDOUBLE,1]

Default value: 1

Signal Details

The "event-activated" signal

void                user_function                      (JanaGtkDayView      *janagtkdayview,
                                                        GtkTreeRowReference *arg1,
                                                        gpointer             user_data)           : Run Last

janagtkdayview :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "event-selected" signal

void                user_function                      (JanaGtkDayView      *janagtkdayview,
                                                        GtkTreeRowReference *arg1,
                                                        gpointer             user_data)           : Run Last

janagtkdayview :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "selection-changed" signal

void                user_function                      (JanaGtkDayView *janagtkdayview,
                                                        JanaDuration   *arg1,
                                                        gpointer        user_data)           : Run Last

janagtkdayview :

the object which received the signal.

user_data :

user data set when the signal handler was connected.