include/alp/spinbutton.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * Copyright (c) 1999-2008 ACCESS CO., LTD. All rights reserved.
00003  * Copyright (c) 2006 PalmSource, Inc (an ACCESS company). All rights reserved.
00004  *****************************************************************************/
00010 #ifndef __ALP_SPIN_BUTTON_H__
00011 #define __ALP_SPIN_BUTTON_H__
00012 
00013 #include <gdk/gdk.h>
00014 #include <gtk/gtk.h>
00015 #include <gtk/gtkbin.h>
00016 
00017 G_BEGIN_DECLS
00018 
00024 /* @{ */
00025 
00026 #define ALP_TYPE_SPIN_BUTTON            (alp_spin_button_get_type())
00027 #define ALP_SPIN_BUTTON(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), ALP_TYPE_SPIN_BUTTON, AlpSpinButton))
00028 #define ALP_SPIN_BUTTON_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), ALP_TYPE_SPIN_BUTTON, AlpSpinButtonClass))
00029 #define ALP_IS_SPIN_BUTTON(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), ALP_TYPE_SPIN_BUTTON))
00030 #define ALP_IS_SPIN_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), ALP_TYPE_SPIN_BUTTON))
00031 #define ALP_SPIN_BUTTON_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), ALP_TYPE_SPIN_BUTTON, AlpSpinButtonClass))
00032                                          
00033 typedef struct _AlpSpinButton AlpSpinButton;
00034 typedef struct _AlpSpinButtonClass AlpSpinButtonClass;
00035 typedef struct _AlpSpinButtonPrivate AlpSpinButtonPrivate;
00036 
00037 struct _AlpSpinButtonClass {
00038   GtkWidgetClass parent_class;
00039 
00040   /* signals */
00041   void (*value_changed) (AlpSpinButton *spinbutton, gpointer user_data); 
00042   void (*value_at_lower_limit) (AlpSpinButton *spinbutton, gpointer new_value, gpointer user_data); 
00043   void (*value_at_upper_limit) (AlpSpinButton *spinbutton, gpointer new_value, gpointer user_data); 
00044   void (*query_value_at_lower_limit) (AlpSpinButton *spinbutton, gpointer can_wrap, gpointer user_data);
00045   void (*query_value_at_upper_limit) (AlpSpinButton *spinbutton, gpointer can_wrap, gpointer user_data);
00046 };
00047 
00048 struct _AlpSpinButton {
00049   GtkWidget widget;
00050 
00054   gint value;
00055   gint saved_value;
00056 
00061   gint min;
00062 
00067   gint max;
00068 
00073   guint columns:16; 
00074 
00079   guint wrap:1;
00080 
00088   guint horizontal:1;
00089 
00094   guint show_arrow_always:1;
00095 
00101   guint border:1;
00102 
00106   guint highlight_on_focus:1;
00107 
00108   /* <private *> */
00109   guint timer_first: 1;
00110   guint increasing: 1;
00111   guint button_down: 1;
00112   guint active: 1;
00113   
00117   guint draw_short_months: 1;
00118 
00123   gint arrow_pad: 16;
00124 
00129   guint arrow_thickness: 16;
00130 
00136   guint init_delay: 16;
00137 
00142   guint delay: 16;
00143 
00144   /* <private> */
00145   GdkWindow *input_wnd;
00146   gint ascent;
00147   gint descent;
00148   gint digit_width;
00149   guint cur_column:16;
00150   PangoLayout *layout;
00151   guint timer;
00152   AlpSpinButtonPrivate *priv;
00153 };
00154 
00160 GType alp_spin_button_get_type(void) G_GNUC_CONST;
00161 
00167 GtkWidget *alp_spin_button_new(gboolean horizontal);
00168 
00174 void alp_spin_button_set_value(AlpSpinButton *spinbutton, gint value);
00175 
00181 gint alp_spin_button_get_value(AlpSpinButton *spinbutton);
00182 
00189 void alp_spin_button_set_range(AlpSpinButton *spinbutton, gint min, gint max);
00190 
00197 void alp_spin_button_get_range(AlpSpinButton *spinbutton, gint *min, gint *max);
00198 
00199 /* @} */
00200 
00201 G_END_DECLS
00202 
00203 #endif /* __ALP_SPIN_BUTTON_H__ */

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

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