/* gtkcombo - combo widget for gtk+
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

/*
 * gtkcombo modified
 */

#ifndef __GTK_SMART_COMBOCAL_H__
#define __GTK_SMART_COMBOCAL_H__

#include <gtk/gtkhbox.h>

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#define GTK_TYPE_COMBOCAL		(gtk_combocal_get_type())
#define GTK_COMBOCAL(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_COMBOCAL, GtkCombocal))
#define GTK_COMBOCAL_CLASS (Klass)	(G_TYPE_CHECK_CLASS_CAST ((Klass), GTK_TYPE_COMBOCAL, GtkCombocalClass))
#define IS_GTK_COMBOCAL(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_COMBOCAL))
#define IS_GTK_COMBOCAL_CLASS(Klass)	(G_TYPE_CHECK_CLASS_TYPE ((Klass), GTK_TYPE_COMBOCAL))
#define GTK_COMBOCAL_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_COMBOCAL, GtkCombocalClass))

typedef struct _GtkCombocal		GtkCombocal;
typedef struct _GtkCombocalClass	GtkCombocalClass;

struct _GtkCombocal
{
	GtkHBox hbox;
  
        /*< public >*/
	GtkWidget *entry;
	
        /*< private >*/
	GtkWidget *button;
	GtkWidget *popup;
	GtkWidget *popwin;
	

        /*< public >*/
	GtkWidget *calendar;


        /*< private >*/
	guint entry_change_id;
	guint calendar_change_id;
	guint calendar_year_change_id;
	guint calendar_month_change_id;
	guint calendar_day_change_id;
	guint ok_if_empty:1;
	guint use_arrows:1;
	guint use_arrows_always:1;
	guint date_format;
	gchar date_separator;

        guint16 current_button;
	guint activate_id;
};

struct _GtkCombocalClass {
	GtkHBoxClass parent_class;

        /* Padding for future expansion */
        void (*_gtk_reserved1) (void);
        void (*_gtk_reserved2) (void);
        void (*_gtk_reserved3) (void);
        void (*_gtk_reserved4) (void);
};

GType      gtk_combocal_get_type              (void) G_GNUC_CONST;

GtkWidget* gtk_combocal_new                   ();

/* set/unset arrows working for changing the value (can be annoying) */
void       gtk_combocal_set_use_arrows        (GtkCombocal*    combocal, 
                                               gboolean     val);

void	   gtk_combocal_set_use_arrows_always (GtkCombocal * combocal, 
						gboolean val);

/* set the date separator  character*/
void	   gtk_combocal_set_date_separator 	( GtkCombocal *combocal,
				  		  guint date_separator);

/* set the date format to use */
void	   gtk_combocal_set_date_format		( GtkCombocal *combocal,
			       			  guint date_format);

void       gtk_combocal_disable_activate      (GtkCombocal*    combocal);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __GTK_SMART_COMBOCAL_H__ */

