Mainmenu is the screen to list and entry various Cosmos apps
Main functionality:
– Browse apps in multi-page style menu
– User can customize the app item order
– Shortcut bar for common apps
1.File Structure
venusmmi/app/Cosmos/Mainmenu Vapp_mainmenu.[cpp | h] Mainmenu app/screen, app order data handling
venusmmi/app/Cosmos/Mainmenu Vapp_mainmenu_builder.[cpp | h] Init the mainmenu presentation from the app order data
venusmmi/app/Cosmos/Mainmenu Vapp_mainmenu_default_order.h Contain the default order list
venusmmi/app/Cosmos/Mainmenu Vapp_mainmenu_gprot.h Mainmenu interface
venusmmi/app/Cosmos/Mainmenu Vapp_mainmenu_page_menu.[cpp | h] The mainmenu presentation (browse/organize modes handling)
venusmmi/app/Cosmos/Mainmenu Vapp_mainmenu_shortcut_bar.[cpp | h] The shortcut bar to be shown in Home
venusmmi/app/Cosmos/Mainmenu /res Resource files
Common Files with 3D Mainmenu
venusmmi/app/common/Interface/cp/ vcp_page_menu_util.h Handling Mainmenu layout / effect
venusmmi/app/common/cp/ vcp_page_menu_util.cpp Handling Mainmenu layout / effect
2.Class
VappMainmenuApp
– Represent mainmenu app
VappMainmenuScr
– The mainmenu screen, handling the overall layout, and maintain the mainmenuapp order data
VappMainmenuPageMenu
VappMainmenuPageMenu
– Presentation of the mainmenu items
VcpPageMenuView
– The classes starts with Vcp are the common part of Cosmos Mainmenu and 3D Mainmenu, this class handling the layout of memu items
IVcpPageView, VcpRotatePageView
– Handle menu item level layout/animation/effect
VcpPageMenuLayout
– Struct to hold the menu item layout setting
VcpPageMenuIndicator
– The menu indicator control
VcpPageMenuIndicatorLayout
– Struct to hold the indicator layout setting
VcpPageMenuCell
– Base class for menu item(cell)
VappMainmenuCell
– Class to handle cosmos specific menu item functions
VappMainMenuBuilder
– Setup the menu items from the Mainmenu App Order Data
VappMainmenuShortcutBar
– A Control to be shown on the bottom of Home, to access part of the mainmenu functions
VappMainmenuScr::m_allOrderData
– An array of app names
Each app name max size is 60
Ex: {“APP_NAME_1 /0”,
“APP_NAME_2 /0”,
“APP_NAME_3 /0”,
…}
VappMainmenuPageMenu::m_cells
– An array to cell frames
Menu Item Order Table: {“APP_NAME_4 /0”,
“APP_NAME_5 /0”,
“APP_NAME_6 /0”,
“APP_NAME_7 /0”,
“/0”,
“APP_NAME_0 /0”…}
Cell Array: number means a pointer to a cell, assume 16 cells per page
{4, 5, 6, 7, NULL X 12, 第一页
0, 1, 2, 3, 8, 9, 10, 11, NULL X 8} 第2页