📄 gui_fixed_menuitems.c
字号:
/*----------------------------------------------------------------*/
old_theme = current_fixed_icontext_menuitem_theme;
current_fixed_icontext_menuitem_theme = (UI_fixed_icontext_menuitem_theme*)current_fixed_text_menuitem_theme;
gui_create_fixed_icontext_menuitem(m, width, height);
current_fixed_icontext_menuitem_theme = old_theme;
}
/*****************************************************************************
* FUNCTION
* gui_fixed_text_menuitem_set_text_position
* DESCRIPTION
* Set the text position of a common text menuitem
* PARAMETERS
* m [IN] common text menu item object
* x [IN] x
* y [IN] y
* RETURNS
* void
*****************************************************************************/
void gui_fixed_text_menuitem_set_text_position(fixed_text_menuitem *m, S32 x, S32 y)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
m->text_x = x;
m->text_y = y;
m->scroll_width = m->width - m->text_x;
}
/*****************************************************************************
* FUNCTION
* gui_resize_fixed_text_menuitem
* DESCRIPTION
* Resize a common text menu item.
* PARAMETERS
* m [IN] common text menu item object
* width [IN] new width
* height [IN] new height
* RETURNS
* void
*****************************************************************************/
void gui_resize_fixed_text_menuitem(fixed_text_menuitem *m, S32 width, S32 height)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
m->width = width;
m->height = height;
m->scroll_width = m->width - m->text_x;
}
/*****************************************************************************
* FUNCTION
* gui_fixed_text_menuitem_scroll_handler
* DESCRIPTION
* Scroll handler of the highlighted text menu item.
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void gui_fixed_text_menuitem_scroll_handler(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
gui_fixed_icontext_menuitem_scroll_handler();
}
/*****************************************************************************
* FUNCTION
* gui_fixed_text_menuitem_start_scroll
* DESCRIPTION
* Start scrolling for the highlighted text menu item.
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void gui_fixed_text_menuitem_start_scroll(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
gui_fixed_icontext_menuitem_start_scroll();
}
/*****************************************************************************
* FUNCTION
* gui_fixed_text_menuitem_stop_scroll
* DESCRIPTION
* Stop scrolling for the highlighted text menu item.
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void gui_fixed_text_menuitem_stop_scroll(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
gui_fixed_icontext_menuitem_stop_scroll();
}
/*****************************************************************************
* FUNCTION
* gui_show_fixed_text_menuitem
* DESCRIPTION
* Show a text menu item.
* PARAMETERS
* item [IN] private text menu item object
* common_item_data [IN] common text menu item object
* x [IN] x
* y [IN] y
* RETURNS
* void
*****************************************************************************/
void gui_show_fixed_text_menuitem(void *item, void *common_item_data, S32 x, S32 y)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
gui_show_fixed_icontext_menuitem(item, common_item_data, x, y);
}
/*****************************************************************************
* FUNCTION
* gui_measure_fixed_text_menuitem
* DESCRIPTION
* Measure a text menu item for dimension.
* PARAMETERS
* item [IN] private text menu item object
* common_item_data [IN] common text menu item object
* width [OUT] item width
* height [OUT] item height
* RETURNS
* void
*****************************************************************************/
void gui_measure_fixed_text_menuitem(void *item, void *common_item_data, S32 *width, S32 *height)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
gui_measure_fixed_icontext_menuitem(item, common_item_data, width, height);
}
/*****************************************************************************
* FUNCTION
* gui_highlight_fixed_text_menuitem
* DESCRIPTION
* Highlight a text menu item (not visually).
* PARAMETERS
* item [IN] private text menu item object
* common_item_data [IN] common text menu item object
* RETURNS
* void
*****************************************************************************/
void gui_highlight_fixed_text_menuitem(void *item, void *common_item_data)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
gui_highlight_fixed_icontext_menuitem(item, common_item_data);
}
/*****************************************************************************
* FUNCTION
* gui_remove_highlight_fixed_text_menuitem
* DESCRIPTION
* Remove the highlight of a text menu item (not visually).
* PARAMETERS
* item [IN] private text menu item object
* common_item_data [IN] common text menu item object
* RETURNS
* void
*****************************************************************************/
void gui_remove_highlight_fixed_text_menuitem(void *item, void *common_item_data)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
gui_remove_highlight_fixed_icontext_menuitem(item, common_item_data);
}
/*****************************************************************************
*
* ICONTEXT MENUITEM
*
*
*
*****************************************************************************/
/*****************************************************************************
* FUNCTION
* gui_set_fixed_icontext_menuitem_current_theme
* DESCRIPTION
* Apply the current theme to an icontext menu item.
* PARAMETERS
* m [IN] common icontext menu item object
* RETURNS
* void
*****************************************************************************/
void gui_set_fixed_icontext_menuitem_current_theme(fixed_icontext_menuitem *m)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
gui_set_fixed_icontext_menuitem_theme(m, current_fixed_icontext_menuitem_theme);
}
/*****************************************************************************
* FUNCTION
* gui_set_fixed_icontext_menuitem_theme
* DESCRIPTION
* Apply the given theme to an icontext menu item.
* PARAMETERS
* m [IN] common icontext menu item object
* t [IN] icontext menu item theme
* RETURNS
* void
*****************************************************************************/
void gui_set_fixed_icontext_menuitem_theme(fixed_icontext_menuitem *m, UI_fixed_icontext_menuitem_theme *t)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
m->disabled_filler = t->disabled_filler;
m->disabled_text_color = t->disabled_text_color;
m->flags |= t->flags;
m->focussed_filler = t->focussed_filler;
#ifdef __MMI_UI_TRANSPARENT_EFFECT__
/* This is to replace the UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR flag and alpha value from the themecomponent.h */
if (!m->focussed_filler->flags & UI_FILLED_AREA_TYPE_BITMAP)
{
fixed_icontext_menuitem_transparent_filled_area = *(m->focussed_filler);
m->focussed_filler = &fixed_icontext_menuitem_transparent_filled_area;
fixed_icontext_menuitem_transparent_filled_area.flags |= UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR;
fixed_icontext_menuitem_transparent_filled_area.c.alpha = HIGHLIGHTER_COLOR_OPACITY_VALUE;
}
#endif /* __MMI_UI_TRANSPARENT_EFFECT__ */
m->focussed_text_color = t->focussed_text_color;
m->normal_filler = t->normal_filler;
m->normal_text_color = t->normal_text_color;
m->selected_filler = t->selected_filler;
m->selected_text_color = t->selected_text_color;
m->text_font = t->text_font;
}
/*****************************************************************************
* FUNCTION
* gui_create_fixed_icontext_menuitem
* DESCRIPTION
* Create a common icontext menu item.
* PARAMETERS
* m [IN] common icontext menu item object
* width [IN] width
* height [IN] height
* RETURNS
* void
*****************************************************************************/
void gui_create_fixed_icontext_menuitem(fixed_icontext_menuitem *m, S32 width, S32 height)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
m->width = width;
m->height = height;
m->flags = 0;
m->ext_flags = 0;
gui_set_fixed_icontext_menuitem_current_theme(m);
m->text_x = 0;
m->text_y = 0;
m->icon_x = 0;
m->icon_y = 0;
m->scroll_x = 0;
m->scroll_width = width;
m->parent_list = NULL;
m->parent_matrix = NULL;
m->checkbox_clicked_callback = gui_menuitem_icontext_dummy_checkbox_clicked_callback;
m->checkbox_get_image_callback = gui_menuitem_icontext_dummy_checkbox_get_image_callback;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -