MateDateEdit

MateDateEdit

Synopsis

#include <libmateui/libmateui.h>

enum                MateDateEditFlags;
struct              MateDateEdit;
GtkWidget *         mate_date_edit_new                 (time_t the_time,
                                                         gboolean show_time,
                                                         gboolean use_24_format);
GtkWidget *         mate_date_edit_new_flags           (time_t the_time,
                                                         MateDateEditFlags flags);
void                mate_date_edit_construct           (MateDateEdit *gde,
                                                         time_t the_time,
                                                         MateDateEditFlags flags);
void                mate_date_edit_set_time            (MateDateEdit *gde,
                                                         time_t the_time);
time_t              mate_date_edit_get_time            (MateDateEdit *gde);
void                mate_date_edit_set_popup_range     (MateDateEdit *gde,
                                                         int low_hour,
                                                         int up_hour);
void                mate_date_edit_set_flags           (MateDateEdit *gde,
                                                         MateDateEditFlags flags);
int                 mate_date_edit_get_flags           (MateDateEdit *gde);
time_t              mate_date_edit_get_initial_time    (MateDateEdit *gde);
time_t              mate_date_edit_get_date            (MateDateEdit *gde);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBox
                                 +----GtkHBox
                                       +----MateDateEdit

Implemented Interfaces

MateDateEdit implements AtkImplementorIface, GtkBuildable and GtkOrientable.

Properties

  "dateedit-flags"           MateDateEditFlags    : Read / Write
  "initial-time"             gulong                : Read / Write
  "lower-hour"               gint                  : Read / Write
  "time"                     gulong                : Read / Write
  "upper-hour"               gint                  : Read / Write

Signals

  "date-changed"                                   : Run First
  "time-changed"                                   : Run First

Description

Details

enum MateDateEditFlags

typedef enum {
	MATE_DATE_EDIT_SHOW_TIME             = 1 << 0,
	MATE_DATE_EDIT_24_HR                 = 1 << 1,
	MATE_DATE_EDIT_WEEK_STARTS_ON_MONDAY = 1 << 2,
	MATE_DATE_EDIT_DISPLAY_SECONDS       = 1 << 3
} MateDateEditFlags;


struct MateDateEdit

struct MateDateEdit;


mate_date_edit_new ()

GtkWidget *         mate_date_edit_new                 (time_t the_time,
                                                         gboolean show_time,
                                                         gboolean use_24_format);

Creates a new MateDateEdit widget which can be used to provide an easy to use way for entering dates and times. If the_time is 0 then current time is used.

the_time :

date and time to be displayed on the widget

show_time :

whether time should be displayed

use_24_format :

whether 24-hour format is desired for the time display.

Returns :

a new MateDateEdit widget.

mate_date_edit_new_flags ()

GtkWidget *         mate_date_edit_new_flags           (time_t the_time,
                                                         MateDateEditFlags flags);

Creates a new MateDateEdit widget with the specified flags. If the_time is 0 then current time is used.

the_time :

The initial time for the date editor.

flags :

A bitmask of MateDateEditFlags values.

Returns :

the newly-created date editor widget.

mate_date_edit_construct ()

void                mate_date_edit_construct           (MateDateEdit *gde,
                                                         time_t the_time,
                                                         MateDateEditFlags flags);

For language bindings and subclassing only

gde :

The MateDateEdit object to construct

the_time :

The initial time for the date editor.

flags :

A bitmask of MateDateEditFlags values.

mate_date_edit_set_time ()

void                mate_date_edit_set_time            (MateDateEdit *gde,
                                                         time_t the_time);

Changes the displayed date and time in the MateDateEdit widget to be the one represented by the_time. If the_time is 0 then current time is used.

gde :

the MateDateEdit widget

the_time :

The time and date that should be set on the widget

mate_date_edit_get_time ()

time_t              mate_date_edit_get_time            (MateDateEdit *gde);

gde :

The MateDateEdit widget

Returns :

the time entered in the MateDateEdit widget

mate_date_edit_set_popup_range ()

void                mate_date_edit_set_popup_range     (MateDateEdit *gde,
                                                         int low_hour,
                                                         int up_hour);

Sets the range of times that will be provide by the time popup selectors.

gde :

The MateDateEdit widget

low_hour :

low boundary for the time-range display popup.

up_hour :

upper boundary for the time-range display popup.

mate_date_edit_set_flags ()

void                mate_date_edit_set_flags           (MateDateEdit *gde,
                                                         MateDateEditFlags flags);

Changes the display flags on an existing date editor widget.

gde :

The date editor widget whose flags should be changed.

flags :

The new bitmask of MateDateEditFlags values.

mate_date_edit_get_flags ()

int                 mate_date_edit_get_flags           (MateDateEdit *gde);

Queries the display flags on a date editor widget.

gde :

The date editor whose flags should be queried.

Returns :

The current display flags for the specified date editor widget.

mate_date_edit_get_initial_time ()

time_t              mate_date_edit_get_initial_time    (MateDateEdit *gde);

Queries the initial time that was set using the mate_date_edit_set_time or during creation

gde :

The date editor whose initial time should be queried

Returns :

The initial time in seconds (standard time_t format)

mate_date_edit_get_date ()

time_t              mate_date_edit_get_date            (MateDateEdit *gde);

Warning

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

Deprecated, use mate_date_edit_get_time

gde :

The MateDateEdit widget

Returns :

Property Details

The "dateedit-flags" property

  "dateedit-flags"           MateDateEditFlags    : Read / Write

Flags for how DateEdit looks.

Default value: MATE_DATE_EDIT_SHOW_TIME


The "initial-time" property

  "initial-time"             gulong                : Read / Write

The initial time.


The "lower-hour" property

  "lower-hour"               gint                  : Read / Write

Lower hour in the time popup selector.

Allowed values: [0,24]

Default value: 7


The "time" property

  "time"                     gulong                : Read / Write

The time currently selected.


The "upper-hour" property

  "upper-hour"               gint                  : Read / Write

Upper hour in the time popup selector.

Allowed values: [0,24]

Default value: 19

Signal Details

The "date-changed" signal

void                user_function                      (MateDateEdit *dateedit,
                                                        gpointer       user_data)      : Run First

dateedit :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "time-changed" signal

void                user_function                      (MateDateEdit *dateedit,
                                                        gpointer       user_data)      : Run First

dateedit :

the object which received the signal.

user_data :

user data set when the signal handler was connected.