include/alp/dateselector.h File Reference


Detailed Description

ALP Date Selector widget API.

#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include <gtk/gtkbin.h>

Go to the source code of this file.

Data Structures

struct  _AlpDateSelector
struct  _AlpDateSelectorClass

Defines

#define ALP_DATE_SELECTOR(obj)   (G_TYPE_CHECK_INSTANCE_CAST((obj), ALP_TYPE_DATE_SELECTOR, AlpDateSelector))
#define ALP_DATE_SELECTOR_CALENDAR_NROWS   6
#define ALP_DATE_SELECTOR_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST((klass), ALP_TYPE_DATE_SELECTOR, AlpDateSelectorClass))
#define ALP_DATE_SELECTOR_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), ALP_TYPE_DATE_SELECTOR, AlpDateSelectorClass))
#define ALP_IS_DATE_SELECTOR(obj)   (G_TYPE_CHECK_INSTANCE_TYPE((obj), ALP_TYPE_DATE_SELECTOR))
#define ALP_IS_DATE_SELECTOR_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass), ALP_TYPE_DATE_SELECTOR))
#define ALP_TYPE_DATE_SELECTOR   (alp_date_selector_get_type())

Typedefs

typedef _AlpDateSelector AlpDateSelector
typedef _AlpDateSelectorClass AlpDateSelectorClass
typedef _AlpDateSelectorPrivate AlpDateSelectorPrivate

Enumerations

enum  AlpDateSelectorFlags {
  ALP_DATE_SELECTOR_BEGINS_SUN = 0, ALP_DATE_SELECTOR_BEGINS_MON = 1, ALP_DATE_SELECTOR_BEGINS_TUE = 2, ALP_DATE_SELECTOR_BEGINS_WED = 3,
  ALP_DATE_SELECTOR_BEGINS_THU = 4, ALP_DATE_SELECTOR_BEGINS_FRI = 5, ALP_DATE_SELECTOR_BEGINS_SAT = 6, ALP_DATE_SELECTOR_BEGINS_MASK = 0x07,
  ALP_DATE_SELECTOR_SPECIFY_WEEK_START = (1 << 3), ALP_DATE_SELECTOR_NEED_TODAY = (1 << 16), ALP_DATE_SELECTOR_TIME_T_RANGE = (1 << 17)
}
 Flags to specify behavior of AlpDateSelector For the day the week starts, the default behavior is to use the ALP locale's value (via alp_loc_get_locale_setting()). To specify another day to start the week with, use one of the ALP_DATE_SELECTOR_BEGINS values, combined with ALP_DATE_SELECTOR_SPECIFY_WEEK_START. For example, to start the week on Thursday, use: ALP_DATE_SELECTOR_BEGINS_THU | ALP_DATE_SELECTOR_SPECIFY_WEEK_START. More...

Functions

gint alp_date_selector_get_day (AlpDateSelector *selector)
 get the day of a month
gint alp_date_selector_get_month (AlpDateSelector *selector)
 get the month
void alp_date_selector_get_range (AlpDateSelector *selector, gint *min, gint *max)
 get the allowable range of year
GType alp_date_selector_get_type (void) G_GNUC_CONST
 Get the AlpDateSelector object type.
gint alp_date_selector_get_year (AlpDateSelector *selector)
 get the year
GtkWidget * alp_date_selector_new (gint flags)
 Creates a new AlpDateSelector.
void alp_date_selector_register_today_button (AlpDateSelector *selector, GtkButton *today)
 Register a "Today" button. The button is disabled when current date is selected, and enabled when current date not selected. Registration does not set a "clicked" handler - the button is responsible for calling alp_date_selector_set_month / alp_date_selector_set_day / alp_date_selector_set_year.
gint alp_date_selector_select (GtkWidget *parent, const gchar *title, gint *year, gint *month, gint *day, gint flags)
 shows the dialog containing the date selector and ask user to select one date.
void alp_date_selector_set_day (AlpDateSelector *selector, gint day)
void alp_date_selector_set_month (AlpDateSelector *selector, gint month)
 set the month If the selector has been visible, calender changed immidately.
void alp_date_selector_set_range (AlpDateSelector *selector, gint min, gint max)
 set the allowable range of years The maximum (and default) range is 1-9999.
void alp_date_selector_set_time_t_range (AlpDateSelector *selector)
 limit the allowable years to be those a time_t can handle If the results from the date selector will be stored into a time_t, the routine alp_date_selector_set_time_t_range() will limit the selector to the years that can be fully represented in the time_t data type, which on 32-bit Linux is typically 1970-2037. This routine is useful for changing the range of a date selector that has already been created and initialized, including date selectors created via glade. The same limits can also be set when the date selector is created by passing the ALP_DATE_SELECTOR_TIME_T_RANGE flag to either alp_date_selector_new() or alp_date_selector_select().
void alp_date_selector_set_year (AlpDateSelector *selector, gint year)
 set the year If the selector is visible, calender changed immidately.


Generated on Wed Jul 30 07:06:40 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.