mt2503 Inline CUI PROGRESS_BAR 如何客制化实现对pen move event的响应
时间:10-02
整理:3721RD
点击:
[UI]Inline CUI PROGRESS_BAR 如何客制化实现对pen move event的响应
[DESCRIPTION]
InlineCUIPROGRESS_BAR如何客制化实现对penmoveevent的响应 [SOLUTION]
solution适用的SWversion:10A
修改两个地方(蓝色高亮部分)
1.
BOOLgui_progress_bar_pen_handler(gui_progress_bar_struct*instance,MMI_pen_event_type_enumpen_event,S16x,S16y)
{
/*----------------------------------------------------------------*/
/*LocalVariables*/
/*----------------------------------------------------------------*/
U16step_count=(instance->max_value/instance->step_size);
U16step_pixel=(instance->width/step_count);
U16old_value=*(instance->value);
U16new_value=*(instance->value);;
/*----------------------------------------------------------------*/
/*CodeBody*/
/*----------------------------------------------------------------*/
/*Checkifthepenistouchedoncontrolarea*/
if(!PEN_CHECK_BOUND(x,y,instance->x,instance->y,instance->width,instance->height))
{
returnMMI_FALSE;
}
switch(pen_event)
{caseMMI_PEN_EVENT_MOVE://modifyforCustomer
caseMMI_PEN_EVENT_DOWN:
{
2.
gui_inline_translate_pen_event()最后面:
if(((wgui_inline_itEMS[wgui_inline_pen_down_item_index].flags&0xFF)==INLINE_ITEM_TYPE_DISPLAY_ONLY)||
((wgui_inline_items[wgui_inline_pen_down_item_index].flags&0xFF)==INLINE_ITEM_TYPE_FULL_SCREEN_EDIT)
)
{
if(inline_fte_displayonly_item_pen_handler(pen_event,x,y,inline_event,(U16)wgui_inline_pen_down_item_index)==MMI_FALSE)
{
wgui_inline_pen_handler_type=WGUI_INLINE_PEN_HANDLER_NONE;
}
}
}
#endif
}
elseif(wgui_inline_pen_handler_type==WGUI_INLINE_PEN_HANDLER_NONE)
{
/*Donothing*/
if(gui_inline_handle_pen_event_by_item(m,pen_event,x,y,inline_event))//modifyforCustomer
{//modifyforCustomer
wgui_inline_pen_handler_type=WGUI_INLINE_PEN_HANDLER_CURRENT_ITEM;//modifyforCustomer
}//modifyforCustomer
}
}
returnret;
}
[DESCRIPTION]
InlineCUIPROGRESS_BAR如何客制化实现对penmoveevent的响应 [SOLUTION]
solution适用的SWversion:10A
修改两个地方(蓝色高亮部分)
1.
BOOLgui_progress_bar_pen_handler(gui_progress_bar_struct*instance,MMI_pen_event_type_enumpen_event,S16x,S16y)
{
/*----------------------------------------------------------------*/
/*LocalVariables*/
/*----------------------------------------------------------------*/
U16step_count=(instance->max_value/instance->step_size);
U16step_pixel=(instance->width/step_count);
U16old_value=*(instance->value);
U16new_value=*(instance->value);;
/*----------------------------------------------------------------*/
/*CodeBody*/
/*----------------------------------------------------------------*/
/*Checkifthepenistouchedoncontrolarea*/
if(!PEN_CHECK_BOUND(x,y,instance->x,instance->y,instance->width,instance->height))
{
returnMMI_FALSE;
}
switch(pen_event)
{caseMMI_PEN_EVENT_MOVE://modifyforCustomer
caseMMI_PEN_EVENT_DOWN:
{
2.
gui_inline_translate_pen_event()最后面:
if(((wgui_inline_itEMS[wgui_inline_pen_down_item_index].flags&0xFF)==INLINE_ITEM_TYPE_DISPLAY_ONLY)||
((wgui_inline_items[wgui_inline_pen_down_item_index].flags&0xFF)==INLINE_ITEM_TYPE_FULL_SCREEN_EDIT)
)
{
if(inline_fte_displayonly_item_pen_handler(pen_event,x,y,inline_event,(U16)wgui_inline_pen_down_item_index)==MMI_FALSE)
{
wgui_inline_pen_handler_type=WGUI_INLINE_PEN_HANDLER_NONE;
}
}
}
#endif
}
elseif(wgui_inline_pen_handler_type==WGUI_INLINE_PEN_HANDLER_NONE)
{
/*Donothing*/
if(gui_inline_handle_pen_event_by_item(m,pen_event,x,y,inline_event))//modifyforCustomer
{//modifyforCustomer
wgui_inline_pen_handler_type=WGUI_INLINE_PEN_HANDLER_CURRENT_ITEM;//modifyforCustomer
}//modifyforCustomer
}
}
returnret;
}
小编大好人!每日一贴!
顶小编
谢谢分享。