editint.h

Go to the documentation of this file.
00001 
00041 /*#*
00042  *#* $Log$
00043  *#* Revision 1.2  2006/07/19 12:56:26  bernie
00044  *#* Convert to new Doxygen style.
00045  *#*
00046  *#* Revision 1.1  2005/11/04 18:26:38  bernie
00047  *#* Import into DevLib.
00048  *#*
00049  *#* Revision 1.3  2005/06/10 15:46:09  batt
00050  *#* Add EDIS_WRAP style that wrap around min and max.
00051  *#*
00052  *#* Revision 1.2  2005/05/26 14:44:10  batt
00053  *#* Abstract widget from layer: use context.
00054  *#*
00055  *#* Revision 1.1  2005/05/26 08:32:53  batt
00056  *#* Add new Develer widget system :)
00057  *#*
00058  *#*/
00059 
00060 #ifndef DT_EDITINT_H
00061 #define DT_EDITINT_H
00062 
00063 #include <dt/dwidget.h>
00064 #include <dt/dtag.h>
00065 #include <drv/lcd_text.h>
00066 
00067 #include <cfg/compiler.h>
00068 #include <cfg/macros.h>
00069 
00070 
00071 #define EDIS_DEFAULT        0
00072 #define EDIS_CURSORLEFT     BV(0)
00073 #define EDIS_WRAP           BV(1)
00074 
00076 typedef uint16_t dstyle_t;
00077 
00078 typedef struct DEditInt
00079 {
00080     DWidget widget;
00081 
00082     int *value;
00083     int min;
00084     int max;
00085     dstyle_t style;
00086     void (*draw)(struct DEditInt *);
00087 
00088 } DEditInt;
00089 
00090 void editint_init(DEditInt *e, dpos_t pos, dpos_t size, dcontext_t *context, int *value, int min, int max);
00091 void editint_update(DEditInt *e, dtag_t tag, dval_t val);
00092 void editint_draw(DEditInt *e);
00093 
00094 #endif