JanaGtkDayView

JanaGtkDayView

Functions

Properties

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

Signals

void event-activated Run Last
void event-selected Run Last
void selection-changed Run Last
void set-scroll-adjustments Action

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkObject
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── GtkEventBox
                            ╰── JanaGtkDayView

Implemented Interfaces

JanaGtkDayView implements AtkImplementorIface and GtkBuildable.

Description

Functions

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.

Parameters

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.

Parameters

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.

Parameters

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.

Parameters

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.

Parameters

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.

Parameters

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.

Parameters

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.

Parameters

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().

Parameters

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.

Parameters

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().

Parameters

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.

Parameters

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().

Parameters

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().

Parameters

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.

Parameters

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.

Parameters

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().

Parameters

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().

Parameters

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 .

Parameters

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);

Types and Values

JanaGtkDayView

typedef struct _JanaGtkDayView JanaGtkDayView;

Property Details

The “active-range” property

  “active-range”             JanaDuration *

The range that should be considered 'active'.

Flags: Read / Write


The “cells” property

  “cells”                    guint

Amount of cells to partition time into, per day.

Flags: Read / Write

Default value: 0


The “highlighted-time” property

  “highlighted-time”         GObject *

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

Flags: Read / Write


The “range” property

  “range”                    JanaDuration *

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

Flags: Read / Write


The “selected-event” property

  “selected-event”           GtkTreeRowReference *

A reference to the currently selected event in a JanaGtkEventStore.

Flags: Read / Write


The “selection” property

  “selection”                JanaDuration *

The currently selected range, as a JanaDuration.

Flags: Read / Write


The “spacing” property

  “spacing”                  guint

Spacing to use inside day boxes.

Flags: Read / Write

Default value: 2


The “style-hint” property

  “style-hint”               gchar *

The style hint to use when drawing.

Flags: Read / Write

Default value: NULL


The “xratio” property

  “xratio”                   gdouble

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

Flags: Read / Write

Allowed values: [G_MINDOUBLE,1]

Default value: 1


The “yratio” property

  “yratio”                   gdouble

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

Flags: Read / Write

Allowed values: [G_MINDOUBLE,1]

Default value: 1

Signal Details

The “event-activated” signal

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

Parameters

janagtkdayview

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “event-selected” signal

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

Parameters

janagtkdayview

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “selection-changed” signal

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

Parameters

janagtkdayview

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “set-scroll-adjustments” signal

void
user_function (JanaGtkDayView *janagtkdayview,
               GtkAdjustment  *arg1,
               GtkAdjustment  *arg2,
               gpointer        user_data)

Parameters

janagtkdayview

the object which received the signal.

 

user_data

user data set when the signal handler was connected.

 

Flags: Action