Lines Matching refs:info
45 ContextMenuItem::ContextMenuItem(const MENUITEMINFO& info)
47 if (info.fMask & MIIM_FTYPE)
48 m_type = info.fType == MFT_SEPARATOR ? SeparatorType : ActionType;
52 if (m_type == ActionType && info.fMask & MIIM_STRING)
53 m_title = String(info.dwTypeData, info.cch);
55 if ((info.fMask & MIIM_SUBMENU) && info.hSubMenu) {
57 ContextMenu::getContextMenuItems(info.hSubMenu, m_subMenuItems);
60 if (info.fMask & MIIM_ID)
61 m_action = static_cast<ContextMenuAction>(info.wID);
65 if (info.fMask & MIIM_STATE) {
66 m_checked = info.fState & MFS_CHECKED;
67 m_enabled = !(info.fState & MFS_DISABLED);
74 // ContextMenuItem::nativeMenuItem doesn't set the info.dwTypeData. This is
80 MENUITEMINFO info = {0};
81 info.cbSize = sizeof(MENUITEMINFO);
84 info.fMask = MIIM_FTYPE;
85 info.fType = MFT_SEPARATOR;
86 return info;
89 info.fMask = MIIM_FTYPE | MIIM_ID | MIIM_STATE;
90 info.fType = MFT_STRING;
92 info.wID = m_action;
95 info.fMask |= MIIM_SUBMENU;
96 info.hSubMenu = ContextMenu::createNativeMenuFromItems(m_subMenuItems);
99 info.fState |= m_enabled ? MFS_ENABLED : MFS_DISABLED;
100 info.fState |= m_checked ? MFS_CHECKED : MFS_UNCHECKED;
102 return info;