GnomeDateEdit

Name

GnomeDateEdit -- Date and time entry widget.

Synopsis


#include <gnome.h>


typedef     GnomeDateEdit;
GtkWidget*  gnome_date_edit_new             (time_t the_time,
                                             int show_time,
                                             int use_24_format);
void        gnome_date_edit_set_time        (GnomeDateEdit *gde,
                                             time_t the_time);
void        gnome_date_edit_set_popup_range (GnomeDateEdit *gde,
                                             int low_hour,
                                             int up_hour);
time_t      gnome_date_edit_get_date        (GnomeDateEdit *gde);

Object Hierarchy


  GtkObject
   +----GtkWidget
         +----GtkContainer
               +----GtkBox
                     +----GtkHBox
                           +----GnomeDateEdit

Signal Prototypes


"date-changed"
            void        user_function      (GnomeDateEdit *dateedit,
                                            gpointer user_data);
"time-changed"
            void        user_function      (GnomeDateEdit *dateedit,
                                            gpointer user_data);

Description

The GnomeDateEdit widget provides a way to enter dates and times with a helper calendar to let the user select the date.

Details

GnomeDateEdit

typedef struct {
	GtkHBox hbox;

	GtkWidget *date_entry;
	GtkWidget *date_button;
	
	GtkWidget *time_entry;
	GtkWidget *time_popup;

	GtkWidget *cal_label;
	GtkWidget *cal_popup;
	GtkWidget *calendar;

	int       lower_hour;
	int       upper_hour;
	
	time_t    initial_time;
	int       flags;
} GnomeDateEdit;


gnome_date_edit_new ()

GtkWidget*  gnome_date_edit_new             (time_t the_time,
                                             int show_time,
                                             int use_24_format);

Creates a new GnomeDateEdit widget which can be used to provide an easy to use way for entering dates and times.

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 GnomeDateEdit widget.


gnome_date_edit_set_time ()

void        gnome_date_edit_set_time        (GnomeDateEdit *gde,
                                             time_t the_time);

Changes the displayed date and time in the GnomeDateEdit widget to be the one represented by the_time.

gde : the GnomeDateEdit widget
the_time : The time and date that should be set on the widget


gnome_date_edit_set_popup_range ()

void        gnome_date_edit_set_popup_range (GnomeDateEdit *gde,
                                             int low_hour,
                                             int up_hour);

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

gde : The GnomeDateEdit widget
low_hour : low boundary for the time-range display popup.
up_hour : upper boundary for the time-range display popup.


gnome_date_edit_get_date ()

time_t      gnome_date_edit_get_date        (GnomeDateEdit *gde);

gde : The GnomeDateEdit widget
Returns :the time entered in the GnomeDateEdit widget

Signals

The "date-changed" signal

void        user_function                  (GnomeDateEdit *dateedit,
                                            gpointer user_data);

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                  (GnomeDateEdit *dateedit,
                                            gpointer user_data);

dateedit :the object which received the signal.
user_data :user data set when the signal handler was connected.