Mercurial > MadButterfly
view include/mb_ani_menu.h @ 1340:10d5f06f7566
Fix issue of shouting error when removing a node.
- It shout a Python traceback message when removing a node that is
referenced by a svg:use node.
- when the node been removed, the node would be duplicated. The
duplication was used to replace the svg:use one.
- The ID of inserted duplication is the same as duplicated node,
and modified to a new and unique ID.
- Original design of domview_monitor can not handle it.
- It is resolved by changing domview_monitor._id2node from single
mapping to multiple mapping one.
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Sun, 06 Feb 2011 23:12:48 +0800 |
parents | 1993e5ae60aa |
children |
line wrap: on
line source
// -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*- // vim: sw=4:ts=8:sts=4 #ifndef __ANIMATED_MENU_H #define __ANIMATED_MENU_H typedef struct _mb_animated_menu { char **titles; int *menus_y; int *items; int top; int cur; int max; int ready; int speed; mbaf_t *app; mb_sprite_t *sprite; mb_obj_t **objects; mb_obj_t *lightbar; void (*callback)(struct _mb_animated_menu *m, int sel); void (*update_callback)(struct _mb_animated_menu *m, int sel); mb_progm_t *progm; mb_kb_event_t pending_keys[16]; int pending_pos, pending_last; } mb_animated_menu_t; /** \brief Create an instace of animated menu. * * The objectnames is used to extract symbols from the SVG file. * ${objectnames}0 - ${objectnames}8 is the text object. * ${objectnames}_lightbar is the lightbar. * */ mb_animated_menu_t *mb_animated_menu_new(mbaf_t *app,mb_sprite_t *sp,char *objnames,char *menus[]); void mb_animated_menu_set_speed(mb_animated_menu_t *m,int speed); int mb_animated_menu_get_speed(mb_animated_menu_t *m); void mb_animated_menu_set_callback(mb_animated_menu_t *m, void (*f)(mb_animated_menu_t *m, int sel)); #endif