Gestito l'evento XIE_POST_NAVIGATION

git-svn-id: svn://10.65.10.50/trunk@3013 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1996-06-18 15:34:25 +00:00
parent 7371da0e38
commit b507cb2c35

View File

@ -135,7 +135,7 @@ XVT_FNTID xvt_default_font(bool bold)
}
static byte event_map[XIE_POST_NAVIGATION+1];
enum event_action { a_ignore, a_xvt, a_xvt_post, a_obj, a_child, a_update, a_select, a_debug };
enum event_action { a_ignore, a_xvt, a_xvt_post, a_obj, a_child, a_update, a_select, a_post, a_debug };
void init_controls()
{
@ -196,7 +196,7 @@ void init_controls()
event_map[XIE_COL_DELETE] = a_ignore;
event_map[XIE_COL_MOVE] = a_ignore;
event_map[XIE_COL_SIZE] = a_ignore;
event_map[XIE_POST_NAVIGATION]= a_debug;
event_map[XIE_POST_NAVIGATION]= a_post;
if (_picture == NULL)
_picture = new TPicture_array;
@ -404,6 +404,20 @@ HIDDEN void xi_event_handler(XI_OBJ* itf, XI_EVENT* xiev)
else
notify_xvt = TRUE;
break;
case a_post:
{
XI_OBJ * obj = xi_get_focus(itf);
if ((obj != NULL && obj->type != XIT_ITF))
{
if ((obj->type == XIT_CELL || (obj->type == XIT_BTN && obj->v.btn->type == XIBT_RADIOBTN)))
obj = obj->parent;
CHECK(obj != NULL, "Unexpected null obj");
ctl = (TControl*)xi_get_app_data(obj);
}
}
break;
case a_debug:
break; // Put your breakpoint here
default:
@ -1100,7 +1114,10 @@ bool TButton_control::event_handler(XI_OBJ* itf, XI_EVENT* xiev)
ok = FALSE;
}
else
ok = TControl::event_handler(itf, xiev);
if (xiev->type == XIE_POST_NAVIGATION)
ok == notify_key(K_CTRL + K_TAB);
else
ok = TControl::event_handler(itf, xiev);
return ok;
}