* invalidate any other reasons why the executable file might be covered by
* the GNU General Public License.
*
- * Copyright 2003, 2004, 2006 Develer S.r.l. (http://www.develer.com/)
- * Copyright 2000 Bernardo Innocenti <bernie@codewiz.org>
+ * Copyright 2003, 2004, 2006, 2010 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 2000 Bernie Innocenti <bernie@codewiz.org>
*
* -->
*
- * \version $Id$
- *
- * \author Bernardo Innocenti <bernie@develer.com>
+ * \author Bernie Innocenti <bernie@codewiz.org>
* \author Stefano Fedrigo <aleph@develer.com>
*
* \brief General pourpose menu handling functions
#include "menu.h"
#include "cfg/cfg_gfx.h"
+#include "cfg/cfg_menu.h"
+#include "cfg/cfg_arch.h"
#include <cfg/compiler.h>
#include <cfg/debug.h>
#if CONFIG_MENU_SMOOTH
#include <drv/lcd_gfx.h>
+/**
+ * With this you can choose, at compile time, which backend to use.
+ *
+ * $WIZ$ menu_backend_lcd = "LCD_RIT128X96_DRV", "LCD_32122A_DRV"
+ */
+#define LCD_RIT128X96_DRV 0 ///<
+#define LCD_32122A_DRV 1 ///<
+
+
#endif
#if (CONFIG_MENU_TIMEOUT != 0)
}
}
-#warning FIXME:REVISE this code!
-#if 0
-//#if CPU_HARVARD
+#if CPU_HARVARD
((item->flags & MIF_RAMLABEL) ? text_xyprintf : text_xyprintf_P)
#else
text_xyprintf
ypos = bm->cr.ymin;
-#if 0
+#if 1
if (redraw)
{
/* Clear screen */
if (!(item->flags & MIF_HIDDEN))
{
/* Check if a special render function is supplied, otherwise use defaults */
+ #if (ARCH & ARCH_NIGHTTEST)
+ #warning __FILTER_NEXT_WARNING__
+ #endif
RenderHook renderhook = (item->flags & MIF_RENDERHOOK) ? (RenderHook)item->label : menu_defaultRenderHook;
/* Render menuitem */
/* Clear rest of area */
gfx_rectClear(bm, bm->cr.xmin, ypos, bm->cr.xmax, bm->cr.ymax);
- lcd_blitBitmap(&lcd_bitmap);
+ lcd_blitBitmap(bm);
}
/* Restore old cliprect */
items_per_page =
- (menu->bitmap->height / menu->bitmap->font->height)
+ (menu->bitmap->height / menu->bitmap->font->height - 1)
#if CONFIG_MENU_MENUBAR
- 1 /* menu bar labels */
#endif
/* Store currently selected item before leaving. */
if (menu->flags & MF_SAVESEL)
+ #if (ARCH & ARCH_NIGHTTEST)
+ #warning __FILTER_NEXT_WARNING__
+ #endif
CONST_CAST(struct Menu *, menu)->selected = selected;
return result;