Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

menu.cpp File Reference

#include <assert.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <os2win.h>
#include <heapstring.h>
#include "controls.h"
#include "menu.h"

Include dependency graph for menu.cpp:

Include dependency graph

Go to the source code of this file.

Compounds

struct  MENUITEM
struct  POPUPMENU
struct  MTRACKER

Defines

#define MM_SETMENUHANDLE   (WM_USER + 0)
#define MM_GETMENUHANDLE   (WM_USER + 1)
#define TF_ENDMENU   0x0001
#define TF_SUSPENDPOPUP   0x0002
#define TF_SKIPREMOVE   0x0004
#define MENU_MAGIC   0x554d
#define IS_A_MENU(pmenu)   ((pmenu) && (pmenu)->wMagic == MENU_MAGIC)
#define ITEM_PREV   -1
#define ITEM_NEXT   1
#define TPM_INTERNAL   0xF0000000
#define TPM_ENTERIDLEEX   0x80000000
#define TPM_BUTTONDOWN   0x40000000
#define TPM_POPUPMENU   0x20000000
#define TPM_CAPTIONSYSMENU   0x10000000
#define POPUP_XSHADE   4
#define POPUP_YSHADE   4
#define MENU_BAR_ITEMS_SPACE   12
#define MENU_TAB_SPACE   8
#define SEPARATOR_HEIGHT   5
#define NO_SELECTED_ITEM   0xffff
#define MENU_ITEM_TYPE(flags)   ((flags) & (MF_STRING | MF_BITMAP | MF_OWNERDRAW | MF_SEPARATOR))
#define IS_STRING_ITEM(flags)   (MENU_ITEM_TYPE ((flags)) == MF_STRING)
#define IS_SEPARATOR_ITEM(flags)   (MENU_ITEM_TYPE ((flags)) == MF_SEPARATOR)
#define IS_BITMAP_ITEM(flags)   (MENU_ITEM_TYPE ((flags)) == MF_BITMAP)
#define IS_SYSTEM_MENU(menu)   (!((menu)->wFlags & MF_POPUP) && (menu)->wFlags & MF_SYSMENU)
#define IS_SYSTEM_POPUP(menu)   ((menu)->wFlags & MF_POPUP && (menu)->wFlags & MF_SYSMENU)
#define TYPE_MASK
#define STATE_MASK   (~TYPE_MASK)
#define SUBMENU_POPUP_TIMERID   100
#define POPUP_MENU_DELAY   500
#define debug_print_menuitem(pre, mp, post)   if(!TRACE_ON(menu)) ; else do_debug_print_menuitem(pre, mp, post)
#define MENUOUT(text)   DPRINTF("%s%s", (count++ ? "," : ""), (text))
#define MENUFLAG(bit, text)

Typedefs

typedef * LPPOPUPMENU

Functions

POPUPMENUMENU_GetMenu (HMENU hMenu)
HMENU MENU_CopySysPopup (void)
HWND MENU_GetTopPopupWnd ()
void MENU_ReleaseTopPopupWnd ()
void MENU_DestroyTopPopupWnd ()
HMENU MENU_GetSysMenu (HWND hWnd, HMENU hPopupMenu)
BOOL MENU_Init ()
void MENU_InitSysMenuPopup (HMENU hmenu, DWORD style, DWORD clsStyle)
UINT MENU_GetStartOfNextColumn (HMENU hMenu)
UINT MENU_GetStartOfPrevColumn (HMENU hMenu)
MENUITEMMENU_FindItem (HMENU *hmenu, UINT *nPos, UINT wFlags)
UINT MENU_FindSubMenu (HMENU *hmenu, HMENU hSubTarget)
void MENU_FreeItemData (MENUITEM *item)
MENUITEMMENU_FindItemByCoords (POPUPMENU *menu, POINT pt, UINT *pos)
UINT MENU_FindItemByKey (HWND hwndOwner, HMENU hmenu, UINT key, BOOL forceMenuChar)
HBITMAP MENU_LoadMagicItem (UINT id, BOOL hilite, DWORD dwItemData)
void MENU_CalcItemSize (HDC hdc, MENUITEM *lpitem, HWND hwndOwner, INT orgX, INT orgY, BOOL menuBar)
void MENU_PopupMenuCalcSize (LPPOPUPMENU lppop, HWND hwndOwner)
void MENU_MenuBarCalcSize (HDC hdc, LPRECT lprect, LPPOPUPMENU lppop, HWND hwndOwner)
void MENU_DrawMenuItem (HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc, MENUITEM *lpitem, UINT height, BOOL menuBar, UINT odaction)
void MENU_DrawPopupMenu (HWND hwnd, HDC hdc, HMENU hmenu)
UINT MENU_DrawMenuBar (HDC hDC, LPRECT lprect, HWND hwnd, BOOL suppress_draw)
BOOL MENU_PatchResidentPopup (HQUEUE checkQueue, HWND checkWnd)
BOOL MENU_ShowPopup (HWND hwndOwner, HMENU hmenu, UINT id, INT x, INT y, INT xanchor, INT yanchor)
void MENU_SelectItem (HWND hwndOwner, HMENU hmenu, UINT wIndex, BOOL sendMenuSelect, HMENU topmenu)
void MENU_MoveSelection (HWND hwndOwner, HMENU hmenu, INT offset)
BOOL MENU_SetItemData (MENUITEM *item, UINT flags, UINT id, LPCSTR str)
MENUITEMMENU_InsertItem (HMENU hMenu, UINT pos, UINT flags)
LPCSTR MENU_ParseResource (LPCSTR res, HMENU hMenu, BOOL unicode)
LPCSTR MENUEX_ParseResource (LPCSTR res, HMENU hMenu)
HMENU MENU_GetSubPopup (HMENU hmenu)
void MENU_HideSubPopups (HWND hwndOwner, HMENU hmenu, BOOL sendMenuSelect)
HMENU MENU_ShowSubPopup (HWND hwndOwner, HMENU hmenu, BOOL selectFirst, UINT wFlags, POINT *pt)
HMENU MENU_PtMenu (HMENU hMenu, POINT pt, BOOL inMenuBar)
INT MENU_ExecFocusedItem (MTRACKER *pmt, HMENU hMenu, UINT wFlags)
void MENU_SwitchTracking (MTRACKER *pmt, HMENU hPtMenu, UINT id)
BOOL MENU_ButtonDown (MTRACKER *pmt, HMENU hPtMenu, UINT wFlags)
INT MENU_ButtonUp (MTRACKER *pmt, HMENU hPtMenu, UINT wFlags)
BOOL MENU_MouseMove (MTRACKER *pmt, HMENU hPtMenu, UINT wFlags)
LRESULT MENU_DoNextMenu (MTRACKER *pmt, UINT vk)
BOOL MENU_SuspendPopup (MTRACKER *pmt, UINT uMsg)
void MENU_KeyLeft (MTRACKER *pmt, UINT wFlags)
void MENU_KeyRight (MTRACKER *pmt, UINT wFlags)
VOID MENU_DispatchMouseMsg (MSG *msg)
INT MENU_TrackMenu (HMENU hmenu, UINT wFlags, INT x, INT y, HWND hwnd, BOOL inMenuBar, const RECT *lprect)
BOOL MENU_InitTracking (HWND hWnd, HMENU hMenu, BOOL bPopup, UINT wFlags)
BOOL MENU_ExitTracking (HWND hWnd)
void MENU_TrackMouseMenuBar (HWND hWnd, INT ht, POINT pt)
void MENU_TrackMouseMenuBar_MouseMove (HWND hwnd, POINT pt, BOOL OnMenu)
void MENU_TrackKbdMenuBar (HWND hWnd, UINT wParam, INT vkey)
BOOL WINAPI TrackPopupMenu (HMENU hMenu, UINT wFlags, INT x, INT y, INT nReserved, HWND hWnd, const RECT *lpRect)
BOOL WINAPI TrackPopupMenuEx (HMENU hMenu, UINT wFlags, INT x, INT y, HWND hWnd, LPTPMPARAMS lpTpm)
LRESULT WINAPI PopupMenuWndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
UINT MENU_GetMenuBarHeight (HWND hwnd, UINT menubarWidth, INT orgX, INT orgY)
BOOL WINAPI ChangeMenuA (HMENU hMenu, UINT pos, LPCSTR data, UINT id, UINT flags)
BOOL WINAPI ChangeMenuW (HMENU hMenu, UINT pos, LPCWSTR data, UINT id, UINT flags)
DWORD WINAPI CheckMenuItem (HMENU hMenu, UINT id, UINT flags)
UINT WINAPI EnableMenuItem (HMENU hMenu, UINT wItemID, UINT wFlags)
INT WINAPI GetMenuStringA (HMENU hMenu, UINT wItemID, LPSTR str, INT nMaxSiz, UINT wFlags)
INT WINAPI GetMenuStringW (HMENU hMenu, UINT wItemID, LPWSTR str, INT nMaxSiz, UINT wFlags)
BOOL WINAPI HiliteMenuItem (HWND hWnd, HMENU hMenu, UINT wItemID, UINT wHilite)
UINT WINAPI GetMenuState (HMENU hMenu, UINT wItemID, UINT wFlags)
INT WINAPI GetMenuItemCount (HMENU hMenu)
UINT WINAPI GetMenuItemID (HMENU hMenu, INT nPos)
BOOL WINAPI InsertMenuA (HMENU hMenu, UINT pos, UINT flags, UINT id, LPCSTR str)
BOOL WINAPI InsertMenuW (HMENU hMenu, UINT pos, UINT flags, UINT id, LPCWSTR str)
BOOL WINAPI AppendMenuA (HMENU hMenu, UINT flags, UINT id, LPCSTR data)
BOOL WINAPI AppendMenuW (HMENU hMenu, UINT flags, UINT id, LPCWSTR data)
BOOL WINAPI RemoveMenu (HMENU hMenu, UINT nPos, UINT wFlags)
BOOL WINAPI DeleteMenu (HMENU hMenu, UINT nPos, UINT wFlags)
BOOL WINAPI ModifyMenuA (HMENU hMenu, UINT pos, UINT flags, UINT id, LPCSTR str)
BOOL WINAPI ModifyMenuW (HMENU hMenu, UINT pos, UINT flags, UINT id, LPCWSTR str)
HMENU WINAPI CreatePopupMenu (void)
DWORD WINAPI GetMenuCheckMarkDimensions (void)
BOOL WINAPI SetMenuItemBitmaps (HMENU hMenu, UINT nPos, UINT wFlags, HBITMAP hNewUnCheck, HBITMAP hNewCheck)
HMENU WINAPI CreateMenu (void)
BOOL WINAPI DestroyMenu (HMENU hMenu)
HMENU WINAPI GetSystemMenu (HWND hWnd, BOOL bRevert)
BOOL WINAPI SetSystemMenu (HWND hwnd, HMENU hMenu)
HMENU WINAPI GetMenu (HWND hWnd)
BOOL WINAPI SetMenu (HWND hWnd, HMENU hMenu)
HMENU WINAPI GetSubMenu (HMENU hMenu, INT nPos)
BOOL WINAPI DrawMenuBar (HWND hWnd)
void WINAPI EndMenu (void)
HMENU WINAPI LoadMenuA (HINSTANCE instance, LPCSTR name)
HMENU WINAPI LoadMenuW (HINSTANCE instance, LPCWSTR name)
HMENU WINAPI LoadMenuIndirectA (CONST MENUITEMTEMPLATEHEADER *lpMenuTemplate)
HMENU WINAPI LoadMenuIndirectW (CONST MENUITEMTEMPLATEHEADER *lpMenuTemplate)
BOOL WINAPI IsMenu (HMENU hmenu)
BOOL GetMenuItemInfo_common (HMENU hmenu, UINT item, BOOL bypos, LPMENUITEMINFOA lpmii, BOOL unicode)
BOOL WINAPI GetMenuItemInfoA (HMENU hmenu, UINT item, BOOL bypos, LPMENUITEMINFOA lpmii)
BOOL WINAPI GetMenuItemInfoW (HMENU hmenu, UINT item, BOOL bypos, LPMENUITEMINFOW lpmii)
BOOL SetMenuItemInfo_common (MENUITEM *menu, const MENUITEMINFOA *lpmii, BOOL unicode)
BOOL WINAPI SetMenuItemInfoA (HMENU hmenu, UINT item, BOOL bypos, const MENUITEMINFOA *lpmii)
BOOL WINAPI SetMenuItemInfoW (HMENU hmenu, UINT item, BOOL bypos, const MENUITEMINFOW *lpmii)
BOOL WINAPI SetMenuDefaultItem (HMENU hmenu, UINT uItem, UINT bypos)
UINT WINAPI GetMenuDefaultItem (HMENU hmenu, UINT bypos, UINT flags)
BOOL WINAPI InsertMenuItemA (HMENU hMenu, UINT uItem, BOOL bypos, const MENUITEMINFOA *lpmii)
BOOL WINAPI InsertMenuItemW (HMENU hMenu, UINT uItem, BOOL bypos, const MENUITEMINFOW *lpmii)
BOOL WINAPI CheckMenuRadioItem (HMENU hMenu, UINT first, UINT last, UINT check, UINT bypos)
BOOL WINAPI GetMenuItemRect (HWND hwnd, HMENU hMenu, UINT uItem, LPRECT rect)
BOOL WINAPI SetMenuInfo (HMENU hMenu, LPCMENUINFO lpmi)
BOOL WINAPI GetMenuInfo (HMENU hMenu, LPMENUINFO lpmi)
BOOL WINAPI SetMenuContextHelpId (HMENU hMenu, DWORD dwContextHelpID)
DWORD WINAPI GetMenuContextHelpId (HMENU hMenu)
UINT WINAPI MenuItemFromPoint (HWND hWnd, HMENU hMenu, POINT ptScreen)
BOOL IsMenuActive (void)
BOOL POPUPMENU_Register ()
BOOL POPUPMENU_Unregister ()

Variables

WORD check_bitmap_width = 0
WORD check_bitmap_height = 0
WORD arrow_bitmap_width = 0
WORD arrow_bitmap_height = 0
HBITMAP hStdRadioCheck = 0
HBITMAP hStdCheck = 0
HBITMAP hStdMnArrow = 0
HBITMAP hBmpMinimize = 0
HBITMAP hBmpMinimizeD = 0
HBITMAP hBmpMaximize = 0
HBITMAP hBmpMaximizeD = 0
HBITMAP hBmpClose = 0
HBITMAP hBmpCloseD = 0
HBRUSH hShadeBrush = 0
HFONT hMenuFont = 0
HFONT hMenuFontBold = 0
HMENU MENU_DefSysPopup = 0
HWND pTopPopupWnd = 0
UINT uSubPWndLevel = 0
BOOL fEndMenu = FALSE
UINT mouseOverMenuID = -1
BOOL isTimerSet = FALSE
MENUITEMMENU_HighlightedItem = NULL
UINT MENU_HighlightedItemID = 0xffff
POPUPMENUMENU_HighlightedMenu = NULL


Define Documentation

#define MM_SETMENUHANDLE   (WM_USER + 0)
 

Definition at line 51 of file menu.cpp.

#define MM_GETMENUHANDLE   (WM_USER + 1)
 

Definition at line 52 of file menu.cpp.

#define TF_ENDMENU   0x0001
 

Definition at line 96 of file menu.cpp.

#define TF_SUSPENDPOPUP   0x0002
 

Definition at line 97 of file menu.cpp.

#define TF_SKIPREMOVE   0x0004
 

Definition at line 98 of file menu.cpp.

#define MENU_MAGIC   0x554d
 

Definition at line 109 of file menu.cpp.

#define IS_A_MENU pmenu       ((pmenu) && (pmenu)->wMagic == MENU_MAGIC)
 

Definition at line 111 of file menu.cpp.

Referenced by DestroyMenu(), GetMenuItemCount(), IsMenu(), MENU_GetMenu(), MENU_SetItemData(), and SetMenuItemInfo_common().

#define ITEM_PREV   -1
 

Definition at line 113 of file menu.cpp.

#define ITEM_NEXT   1
 

Definition at line 114 of file menu.cpp.

#define TPM_INTERNAL   0xF0000000
 

Definition at line 117 of file menu.cpp.

#define TPM_ENTERIDLEEX   0x80000000
 

Definition at line 118 of file menu.cpp.

#define TPM_BUTTONDOWN   0x40000000
 

Definition at line 119 of file menu.cpp.

#define TPM_POPUPMENU   0x20000000
 

Definition at line 120 of file menu.cpp.

#define TPM_CAPTIONSYSMENU   0x10000000
 

Definition at line 121 of file menu.cpp.

#define POPUP_XSHADE   4
 

Definition at line 124 of file menu.cpp.

#define POPUP_YSHADE   4
 

Definition at line 125 of file menu.cpp.

#define MENU_BAR_ITEMS_SPACE   12
 

Definition at line 128 of file menu.cpp.

#define MENU_TAB_SPACE   8
 

Definition at line 131 of file menu.cpp.

#define SEPARATOR_HEIGHT   5
 

Definition at line 134 of file menu.cpp.

#define NO_SELECTED_ITEM   0xffff
 

Definition at line 137 of file menu.cpp.

#define MENU_ITEM_TYPE flags       ((flags) & (MF_STRING | MF_BITMAP | MF_OWNERDRAW | MF_SEPARATOR))
 

Definition at line 139 of file menu.cpp.

Referenced by GetMenuItemInfoAW(), GetMenuItemInfo_common(), MENUFLAG(), and SetMenuItemInfo_common().

#define IS_STRING_ITEM flags       (MENU_ITEM_TYPE ((flags)) == MF_STRING)
 

Definition at line 142 of file menu.cpp.

Referenced by GetMenuStringA(), GetMenuStringW(), InsertMenuA(), InsertMenuW(), MENU_CalcItemSize(), MENU_DrawMenuItem(), MENU_FindItemByKey(), MENU_FreeItemData(), MENU_ParseResource(), MENU_PopupMenuCalcSize(), MENU_SetItemData(), ModifyMenuA(), ModifyMenuW(), and SetMenuItemInfo_common().

#define IS_SEPARATOR_ITEM flags       (MENU_ITEM_TYPE ((flags)) == MF_SEPARATOR)
 

Definition at line 143 of file menu.cpp.

#define IS_BITMAP_ITEM flags       (MENU_ITEM_TYPE ((flags)) == MF_BITMAP)
 

Definition at line 144 of file menu.cpp.

Referenced by MENU_CalcItemSize(), MENU_DrawMenuItem(), MENU_MenuBarCalcSize(), and MENU_SetItemData().

#define IS_SYSTEM_MENU menu       (!((menu)->wFlags & MF_POPUP) && (menu)->wFlags & MF_SYSMENU)
 

Definition at line 146 of file menu.cpp.

Referenced by MENU_ButtonDown(), MENU_ButtonUp(), MENU_DoNextMenu(), MENU_MouseMove(), MENU_ShowSubPopup(), and MENU_TrackMenu().

#define IS_SYSTEM_POPUP menu       ((menu)->wFlags & MF_POPUP && (menu)->wFlags & MF_SYSMENU)
 

Definition at line 149 of file menu.cpp.

#define TYPE_MASK
 

Value:

(MFT_STRING | MFT_BITMAP | MFT_OWNERDRAW | MFT_SEPARATOR | \
                   MFT_MENUBARBREAK | MFT_MENUBREAK | MFT_RADIOCHECK | \
                   MFT_RIGHTORDER | MFT_RIGHTJUSTIFY | \
                   MF_POPUP | MF_SYSMENU | MF_HELP)

Definition at line 152 of file menu.cpp.

#define STATE_MASK   (~TYPE_MASK)
 

Definition at line 156 of file menu.cpp.

#define SUBMENU_POPUP_TIMERID   100
 

Definition at line 198 of file menu.cpp.

#define POPUP_MENU_DELAY   500
 

Definition at line 199 of file menu.cpp.

#define debug_print_menuitem pre,
mp,
post       if(!TRACE_ON(menu)) ; else do_debug_print_menuitem(pre, mp, post)
 

Definition at line 213 of file menu.cpp.

#define MENUOUT text       DPRINTF("%s%s", (count++ ? "," : ""), (text))
 

Definition at line 216 of file menu.cpp.

Referenced by MENUFLAG().

#define MENUFLAG bit,
text   
 

Value:

do { \
    if (flags & (bit)) { flags &= ~(bit); MENUOUT ((text)); } \
  } while (0)

Definition at line 219 of file menu.cpp.


Typedef Documentation

typedef * LPPOPUPMENU
 


Function Documentation

POPUPMENU* MENU_GetMenu HMENU    hMenu
 

Definition at line 312 of file menu.cpp.

Referenced by CreatePopupMenu(), DestroyMenu(), DrawMenuBar(), EnableMenuItem(), GetMenu(), GetMenuContextHelpId(), GetMenuDefaultItem(), GetMenuInfo(), GetMenuItemCount(), GetMenuItemRect(), GetMenuState(), GetSystemMenu(), HiliteMenuItem(), InsertMenuA(), IsMenu(), MENU_ButtonDown(), MENU_ButtonUp(), MENU_CopySysPopup(), MENU_DoNextMenu(), MENU_DrawMenuBar(), MENU_DrawPopupMenu(), MENU_ExecFocusedItem(), MENU_FindItem(), MENU_FindItemByKey(), MENU_FindSubMenu(), MENU_GetMenuBarHeight(), MENU_GetStartOfNextColumn(), MENU_GetStartOfPrevColumn(), MENU_GetSubPopup(), MENU_GetSysMenu(), MENU_HideSubPopups(), MENU_InsertItem(), MENU_KeyLeft(), MENU_KeyRight(), MENU_MouseMove(), MENU_MoveSelection(), MENU_PtMenu(), MENU_SelectItem(), MENU_SetItemData(), MENU_ShowPopup(), MENU_ShowSubPopup(), MENU_SwitchTracking(), MENU_TrackMenu(), MENU_TrackMouseMenuBar_MouseMove(), RemoveMenu(), SetMenu(), SetMenuContextHelpId(), SetMenuDefaultItem(), SetMenuInfo(), and SetMenuItemInfo_common().

HMENU MENU_CopySysPopup void    [static]
 

Definition at line 339 of file menu.cpp.

Referenced by GetSystemMenu(), MENU_GetSysMenu(), and MENU_Init().

HWND MENU_GetTopPopupWnd   [static]
 

Definition at line 383 of file menu.cpp.

Referenced by DestroyMenu(), MENU_HideSubPopups(), MENU_PatchResidentPopup(), MENU_ShowPopup(), and PopupMenuWndProc().

void MENU_ReleaseTopPopupWnd   [static]
 

Definition at line 392 of file menu.cpp.

Referenced by DestroyMenu(), MENU_HideSubPopups(), MENU_PatchResidentPopup(), MENU_ShowPopup(), and PopupMenuWndProc().

void MENU_DestroyTopPopupWnd   [static]
 

Definition at line 400 of file menu.cpp.

Referenced by PopupMenuWndProc().

HMENU MENU_GetSysMenu HWND    hWnd,
HMENU    hPopupMenu
 

Definition at line 416 of file menu.cpp.

BOOL MENU_Init  
 

Definition at line 463 of file menu.cpp.

Referenced by POPUPMENUCLASSNAME(), POPUPMENU_Register(), and SetWindowAppearance().

void MENU_InitSysMenuPopup HMENU    hmenu,
DWORD    style,
DWORD    clsStyle
[static]
 

Definition at line 539 of file menu.cpp.

Referenced by MENU_ShowSubPopup().

UINT MENU_GetStartOfNextColumn HMENU    hMenu [static]
 

Definition at line 568 of file menu.cpp.

Referenced by MENU_KeyRight().

UINT MENU_GetStartOfPrevColumn HMENU    hMenu [static]
 

Definition at line 600 of file menu.cpp.

Referenced by MENU_KeyLeft().

MENUITEM* MENU_FindItem HMENU *    hmenu,
UINT *    nPos,
UINT    wFlags
[static]
 

Definition at line 643 of file menu.cpp.

Referenced by CheckMenuItem(), CheckMenuRadioItem(), DeleteMenu(), EnableMenuItem(), GetMenuItemID(), GetMenuItemInfo_common(), GetMenuItemRect(), GetMenuState(), GetMenuStringA(), GetMenuStringW(), GetSubMenu(), HiliteMenuItem(), MENU_InsertItem(), ModifyMenuA(), RemoveMenu(), SetMenuItemBitmaps(), SetMenuItemInfoA(), and SetMenuItemInfoW().

UINT MENU_FindSubMenu HMENU *    hmenu,
HMENU    hSubTarget
 

Definition at line 692 of file menu.cpp.

Referenced by MENU_SelectItem().

void MENU_FreeItemData MENUITEM   item [static]
 

Definition at line 721 of file menu.cpp.

Referenced by DestroyMenu(), and RemoveMenu().

MENUITEM* MENU_FindItemByCoords POPUPMENU   menu,
POINT    pt,
UINT *    pos
[static]
 

Definition at line 735 of file menu.cpp.

Referenced by MENU_ButtonDown(), MENU_ButtonUp(), MENU_MouseMove(), MENU_TrackMenu(), and MENU_TrackMouseMenuBar_MouseMove().

UINT MENU_FindItemByKey HWND    hwndOwner,
HMENU    hmenu,
UINT    key,
BOOL    forceMenuChar
[static]
 

Definition at line 764 of file menu.cpp.

Referenced by MENU_TrackKbdMenuBar(), and MENU_TrackMenu().

HBITMAP MENU_LoadMagicItem UINT    id,
BOOL    hilite,
DWORD    dwItemData
[static]
 

Definition at line 812 of file menu.cpp.

Referenced by MENU_CalcItemSize(), and MENU_DrawMenuItem().

void MENU_CalcItemSize HDC    hdc,
MENUITEM   lpitem,
HWND    hwndOwner,
INT    orgX,
INT    orgY,
BOOL    menuBar
[static]
 

Definition at line 852 of file menu.cpp.

Referenced by MENU_MenuBarCalcSize(), and MENU_PopupMenuCalcSize().

void MENU_PopupMenuCalcSize LPPOPUPMENU    lppop,
HWND    hwndOwner
[static]
 

Definition at line 962 of file menu.cpp.

Referenced by MENU_ShowPopup().

void MENU_MenuBarCalcSize HDC    hdc,
LPRECT    lprect,
LPPOPUPMENU    lppop,
HWND    hwndOwner
[static]
 

Definition at line 1043 of file menu.cpp.

Referenced by MENU_DrawMenuBar(), and MENU_GetMenuBarHeight().

void MENU_DrawMenuItem HWND    hwnd,
HMENU    hmenu,
HWND    hwndOwner,
HDC    hdc,
MENUITEM   lpitem,
UINT    height,
BOOL    menuBar,
UINT    odaction
[static]
 

Definition at line 1114 of file menu.cpp.

Referenced by MENU_DrawMenuBar(), MENU_DrawPopupMenu(), MENU_SelectItem(), and MENU_ShowSubPopup().

void MENU_DrawPopupMenu HWND    hwnd,
HDC    hdc,
HMENU    hmenu
[static]
 

Definition at line 1402 of file menu.cpp.

Referenced by PopupMenuWndProc().

UINT MENU_DrawMenuBar HDC    hDC,
LPRECT    lprect,
HWND    hWnd,
BOOL    suppress_draw
 

Definition at line 1453 of file menu.cpp.

BOOL MENU_PatchResidentPopup HQUEUE    checkQueue,
HWND    checkWnd
 

Definition at line 1533 of file menu.cpp.

Referenced by MENU_ShowPopup().

BOOL MENU_ShowPopup HWND    hwndOwner,
HMENU    hmenu,
UINT    id,
INT    x,
INT    y,
INT    xanchor,
INT    yanchor
[static]
 

Definition at line 1594 of file menu.cpp.

Referenced by MENU_ShowSubPopup(), and TrackPopupMenu().

void MENU_SelectItem HWND    hwndOwner,
HMENU    hmenu,
UINT    wIndex,
BOOL    sendMenuSelect,
HMENU    topmenu
[static]
 

Definition at line 1705 of file menu.cpp.

Referenced by HiliteMenuItem(), MENU_DoNextMenu(), MENU_HideSubPopups(), MENU_KeyLeft(), MENU_KeyRight(), MENU_MouseMove(), MENU_MoveSelection(), MENU_SwitchTracking(), MENU_TrackKbdMenuBar(), and MENU_TrackMenu().

void MENU_MoveSelection HWND    hwndOwner,
HMENU    hmenu,
INT    offset
[static]
 

Definition at line 1777 of file menu.cpp.

Referenced by MENU_KeyLeft(), MENU_KeyRight(), MENU_ShowSubPopup(), MENU_TrackKbdMenuBar(), and MENU_TrackMenu().

BOOL MENU_SetItemData MENUITEM   item,
UINT    flags,
UINT    id,
LPCSTR    str
[static]
 

Definition at line 1815 of file menu.cpp.

Referenced by InsertMenuA(), and ModifyMenuA().

MENUITEM* MENU_InsertItem HMENU    hMenu,
UINT    pos,
UINT    flags
[static]
 

Definition at line 1901 of file menu.cpp.

Referenced by InsertMenuA(), InsertMenuItemA(), and InsertMenuItemW().

LPCSTR MENU_ParseResource LPCSTR    res,
HMENU    hMenu,
BOOL    unicode
[static]
 

Definition at line 1951 of file menu.cpp.

LPCSTR MENUEX_ParseResource LPCSTR    res,
HMENU    hMenu
[static]
 

Definition at line 1996 of file menu.cpp.

HMENU MENU_GetSubPopup HMENU    hmenu [static]
 

Definition at line 2052 of file menu.cpp.

Referenced by MENU_KeyLeft().

void MENU_HideSubPopups HWND    hwndOwner,
HMENU    hmenu,
BOOL    sendMenuSelect
[static]
 

Definition at line 2073 of file menu.cpp.

Referenced by HiliteMenuItem(), MENU_DoNextMenu(), MENU_KeyLeft(), MENU_KeyRight(), MENU_SwitchTracking(), and MENU_TrackMenu().

HMENU MENU_ShowSubPopup HWND    hwndOwner,
HMENU    hmenu,
BOOL    selectFirst,
UINT    wFlags,
POINT *    pt
[static]
 

Definition at line 2122 of file menu.cpp.

Referenced by MENU_ButtonDown(), MENU_ExecFocusedItem(), MENU_KeyLeft(), MENU_KeyRight(), MENU_MouseMove(), and MENU_TrackMenu().

HMENU MENU_PtMenu HMENU    hMenu,
POINT    pt,
BOOL    inMenuBar
[static]
 

Definition at line 2230 of file menu.cpp.

Referenced by MENU_TrackMenu().

INT MENU_ExecFocusedItem MTRACKER   pmt,
HMENU    hMenu,
UINT    wFlags
[static]
 

Definition at line 2274 of file menu.cpp.

Referenced by MENU_ButtonUp(), and MENU_TrackMenu().

void MENU_SwitchTracking MTRACKER   pmt,
HMENU    hPtMenu,
UINT    id
[static]
 

Definition at line 2317 of file menu.cpp.

Referenced by MENU_ButtonDown(), and MENU_MouseMove().

BOOL MENU_ButtonDown MTRACKER   pmt,
HMENU    hPtMenu,
UINT    wFlags
[static]
 

Definition at line 2342 of file menu.cpp.

Referenced by MENU_TrackMenu().

INT MENU_ButtonUp MTRACKER   pmt,
HMENU    hPtMenu,
UINT    wFlags
[static]
 

Definition at line 2392 of file menu.cpp.

Referenced by MENU_TrackMenu().

BOOL MENU_MouseMove MTRACKER   pmt,
HMENU    hPtMenu,
UINT    wFlags
[static]
 

Definition at line 2429 of file menu.cpp.

Referenced by MENU_TrackMenu().

LRESULT MENU_DoNextMenu MTRACKER   pmt,
UINT    vk
[static]
 

Definition at line 2525 of file menu.cpp.

Referenced by MENU_KeyLeft(), and MENU_KeyRight().

BOOL MENU_SuspendPopup MTRACKER   pmt,
UINT    uMsg
[static]
 

Definition at line 2630 of file menu.cpp.

Referenced by MENU_KeyLeft(), and MENU_KeyRight().

void MENU_KeyLeft MTRACKER   pmt,
UINT    wFlags
[static]
 

Definition at line 2667 of file menu.cpp.

Referenced by MENU_TrackMenu().

void MENU_KeyRight MTRACKER   pmt,
UINT    wFlags
[static]
 

Definition at line 2720 of file menu.cpp.

Referenced by MENU_TrackMenu().

VOID MENU_DispatchMouseMsg MSG *    msg
 

Definition at line 2771 of file menu.cpp.

INT MENU_TrackMenu HMENU    hmenu,
UINT    wFlags,
INT    x,
INT    y,
HWND    hwnd,
BOOL    inMenuBar,
const RECT *    lprect
[static]
 

Definition at line 2787 of file menu.cpp.

Referenced by MENU_TrackKbdMenuBar(), MENU_TrackMouseMenuBar(), and TrackPopupMenu().

BOOL MENU_InitTracking HWND    hWnd,
HMENU    hMenu,
BOOL    bPopup,
UINT    wFlags
[static]
 

Definition at line 3119 of file menu.cpp.

Referenced by MENU_TrackKbdMenuBar(), MENU_TrackMouseMenuBar(), and TrackPopupMenu().

BOOL MENU_ExitTracking HWND    hWnd [static]
 

Definition at line 3139 of file menu.cpp.

Referenced by MENU_TrackKbdMenuBar(), MENU_TrackMouseMenuBar(), and TrackPopupMenu().

void MENU_TrackMouseMenuBar HWND    hWnd,
INT    ht,
POINT    pt
 

Definition at line 3153 of file menu.cpp.

void MENU_TrackMouseMenuBar_MouseMove HWND    hwnd,
POINT    pt,
BOOL    OnMenu
 

Definition at line 3175 of file menu.cpp.

void MENU_TrackKbdMenuBar HWND    hWnd,
UINT    wParam,
INT    vkey
 

Definition at line 3240 of file menu.cpp.

BOOL WINAPI TrackPopupMenu HMENU    hMenu,
UINT    wFlags,
INT    x,
INT    y,
INT    nReserved,
HWND    hWnd,
const RECT *    lpRect
 

Definition at line 3303 of file menu.cpp.

BOOL WINAPI TrackPopupMenuEx HMENU    hMenu,
UINT    wFlags,
INT    x,
INT    y,
HWND    hWnd,
LPTPMPARAMS    lpTpm
 

Definition at line 3332 of file menu.cpp.

LRESULT WINAPI PopupMenuWndProc HWND    hwnd,
UINT    message,
WPARAM    wParam,
LPARAM    lParam
 

Definition at line 3346 of file menu.cpp.

UINT MENU_GetMenuBarHeight HWND    hWnd,
UINT    menubarWidth,
INT    orgX,
INT    orgY
 

Definition at line 3438 of file menu.cpp.

BOOL WINAPI ChangeMenuA HMENU    hMenu,
UINT    pos,
LPCSTR    data,
UINT    id,
UINT    flags
 

Definition at line 3466 of file menu.cpp.

BOOL WINAPI ChangeMenuW HMENU    hMenu,
UINT    pos,
LPCWSTR    data,
UINT    id,
UINT    flags
 

Definition at line 3489 of file menu.cpp.

DWORD WINAPI CheckMenuItem HMENU    hMenu,
UINT    arg2,
UINT    arg3
 

Definition at line 3512 of file menu.cpp.

UINT WINAPI EnableMenuItem HMENU    hMenu,
UINT    uIDEnableItem,
UINT    uEnable
 

Definition at line 3531 of file menu.cpp.

INT WINAPI GetMenuStringA HMENU    hMenu,
UINT    wItemID,
LPSTR    str,
INT    nMaxSiz,
UINT    wFlags
 

Definition at line 3576 of file menu.cpp.

INT WINAPI GetMenuStringW HMENU    hMenu,
UINT    wItemID,
LPWSTR    str,
INT    nMaxSiz,
UINT    wFlags
 

Definition at line 3615 of file menu.cpp.

BOOL WINAPI HiliteMenuItem HWND    hMenu,
HMENU    arg2,
UINT    arg3,
UINT    arg4
 

Definition at line 3650 of file menu.cpp.

UINT WINAPI GetMenuState HMENU    hMenu,
UINT    arg2,
UINT    arg3
 

Definition at line 3671 of file menu.cpp.

INT WINAPI GetMenuItemCount HMENU    hMenu
 

Definition at line 3702 of file menu.cpp.

UINT WINAPI GetMenuItemID HMENU    hMenu,
INT    nPos
 

Definition at line 3717 of file menu.cpp.

BOOL WINAPI InsertMenuA HMENU    hMenu,
UINT    pos,
UINT    flags,
UINT    id,
LPCSTR    str
 

Definition at line 3732 of file menu.cpp.

BOOL WINAPI InsertMenuW HMENU    hMenu,
UINT    arg2,
UINT    arg3,
UINT    arg4,
LPCWSTR    arg5
 

Definition at line 3766 of file menu.cpp.

BOOL WINAPI AppendMenuA HMENU    hMenu,
UINT    uFlags,
UINT    id,
LPCSTR    lpNewItem
 

Definition at line 3785 of file menu.cpp.

BOOL WINAPI AppendMenuW HMENU    hMenu,
UINT    uFlags,
UINT    id,
LPCWSTR    lpNewItem
 

Definition at line 3797 of file menu.cpp.

BOOL WINAPI RemoveMenu HMENU    hMenu,
UINT    arg2,
UINT    arg3
 

Definition at line 3809 of file menu.cpp.

BOOL WINAPI DeleteMenu HMENU    hMenu,
UINT    arg2,
UINT    arg3
 

Definition at line 3847 of file menu.cpp.

BOOL WINAPI ModifyMenuA HMENU    hMenu,
UINT    uItem,
UINT    fuFlags,
UINT    idNewItem,
LPCSTR    lpszNewItem
 

Definition at line 3864 of file menu.cpp.

BOOL WINAPI ModifyMenuW HMENU    hMenu,
UINT    arg2,
UINT    arg3,
UINT    arg4,
LPCWSTR    arg5
 

Definition at line 3892 of file menu.cpp.

HMENU WINAPI CreatePopupMenu void   
 

Definition at line 3911 of file menu.cpp.

Referenced by MENUEX_ParseResource(), and MENU_ParseResource().

DWORD WINAPI GetMenuCheckMarkDimensions void   
 

Definition at line 3929 of file menu.cpp.

BOOL WINAPI SetMenuItemBitmaps HMENU    hMenu,
UINT    arg2,
UINT    arg3,
HBITMAP    arg4,
HBITMAP    arg5
 

Definition at line 3940 of file menu.cpp.

HMENU WINAPI CreateMenu void   
 

Definition at line 3968 of file menu.cpp.

Referenced by CreatePopupMenu(), LoadMenuIndirectA(), and MENU_GetSysMenu().

BOOL WINAPI DestroyMenu HMENU    hMenu
 

Definition at line 3997 of file menu.cpp.

HMENU WINAPI GetSystemMenu HWND    hSystemWindow,
BOOL    bRevert
 

Definition at line 4052 of file menu.cpp.

BOOL WINAPI SetSystemMenu HWND    hwnd,
HMENU    hMenu
 

Definition at line 4112 of file menu.cpp.

HMENU WINAPI GetMenu HWND    hwnd
 

Definition at line 4131 of file menu.cpp.

BOOL WINAPI SetMenu HWND    hwnd,
HMENU    hMenu
 

Definition at line 4155 of file menu.cpp.

HMENU WINAPI GetSubMenu HMENU    hMenu,
INT    nPos
 

Definition at line 4202 of file menu.cpp.

BOOL WINAPI DrawMenuBar HWND    hWnd
 

Definition at line 4225 of file menu.cpp.

Referenced by MDI_AugmentFrameMenu(), and MDI_RestoreFrameMenu().

void WINAPI EndMenu void   
 

Definition at line 4252 of file menu.cpp.

HMENU WINAPI LoadMenuA HINSTANCE    hinst,
LPCSTR    lpszMenu
 

Definition at line 4266 of file menu.cpp.

HMENU WINAPI LoadMenuW HINSTANCE    hinst,
LPCWSTR    lpszMenu
 

Definition at line 4280 of file menu.cpp.

HMENU WINAPI LoadMenuIndirectA CONST MENUITEMTEMPLATEHEADER *    lpMenuTemplate
 

Definition at line 4294 of file menu.cpp.

Referenced by LoadMenuA(), and LoadMenuIndirectW().

HMENU WINAPI LoadMenuIndirectW CONST MENUITEMTEMPLATEHEADER *    lpMenuTemplate
 

Definition at line 4337 of file menu.cpp.

BOOL WINAPI IsMenu HMENU    hMenu
 

Definition at line 4349 of file menu.cpp.

BOOL GetMenuItemInfo_common HMENU    hmenu,
UINT    item,
BOOL    bypos,
LPMENUITEMINFOA    lpmii,
BOOL    unicode
[static]
 

Definition at line 4362 of file menu.cpp.

Referenced by GetMenuItemInfoA(), and GetMenuItemInfoW().

BOOL WINAPI GetMenuItemInfoA HMENU    hmenu,
UINT    item,
BOOL    bypos,
LPMENUITEMINFOA    lpmii
 

Definition at line 4435 of file menu.cpp.

BOOL WINAPI GetMenuItemInfoW HMENU    hmenu,
UINT    item,
BOOL    bypos,
LPMENUITEMINFOW    lpmii
 

Definition at line 4446 of file menu.cpp.

BOOL SetMenuItemInfo_common MENUITEM   menu,
const MENUITEMINFOA *    lpmii,
BOOL    unicode
[static]
 

Definition at line 4459 of file menu.cpp.

Referenced by InsertMenuItemA(), InsertMenuItemW(), SetMenuItemInfoA(), and SetMenuItemInfoW().

BOOL WINAPI SetMenuItemInfoA HMENU    hMenu,
UINT    par1,
BOOL    par2,
const MENUITEMINFOA *    lpmii
 

Definition at line 4547 of file menu.cpp.

BOOL WINAPI SetMenuItemInfoW HMENU    hMenu,
UINT    uItem,
BOOL    fByPosition,
const MENUITEMINFOW *    lpmmi
 

Definition at line 4559 of file menu.cpp.

BOOL WINAPI SetMenuDefaultItem HMENU    hMenu,
UINT    uItem,
UINT    fByPos
 

Definition at line 4572 of file menu.cpp.

UINT WINAPI GetMenuDefaultItem HMENU    hMenu,
UINT    fByPos,
UINT    gmdiFlags
 

Definition at line 4622 of file menu.cpp.

BOOL WINAPI InsertMenuItemA HMENU    hMenu,
UINT    uItem,
BOOL    fByPosition,
const MENUITEMINFOA *    lpmii
 

Definition at line 4664 of file menu.cpp.

BOOL WINAPI InsertMenuItemW HMENU    hMenu,
UINT    uItem,
BOOL    fByPosition,
const MENUITEMINFOW *    lpmii
 

Definition at line 4678 of file menu.cpp.

BOOL WINAPI CheckMenuRadioItem HMENU    hMenu,
UINT    idFirst,
UINT    idLast,
UINT    idCheck,
UINT    uFlags
 

Definition at line 4692 of file menu.cpp.

BOOL WINAPI GetMenuItemRect HWND    hwnd,
HMENU    hMenu,
UINT    uItem,
LPRECT    lprcItem
 

Definition at line 4736 of file menu.cpp.

BOOL WINAPI SetMenuInfo HMENU    hMenu,
LPCMENUINFO    lpmi
 

Definition at line 4780 of file menu.cpp.

BOOL WINAPI GetMenuInfo HMENU    hMenu,
LPMENUINFO    lpmi
 

Definition at line 4817 of file menu.cpp.

BOOL WINAPI SetMenuContextHelpId HMENU    hMenu,
DWORD    dwContextHelpId
 

Definition at line 4849 of file menu.cpp.

DWORD WINAPI GetMenuContextHelpId HMENU    hMenu
 

Definition at line 4868 of file menu.cpp.

UINT WINAPI MenuItemFromPoint HWND    hWnd,
HMENU    hMenu,
POINT    ptScreen
 

Definition at line 4885 of file menu.cpp.

BOOL IsMenuActive void   
 

Definition at line 4895 of file menu.cpp.

Referenced by POPUPMENUCLASSNAME().

BOOL POPUPMENU_Register  
 

Definition at line 4900 of file menu.cpp.

Referenced by CONTROLS_Register(), and POPUPMENUCLASSNAME().

BOOL POPUPMENU_Unregister  
 

Definition at line 4924 of file menu.cpp.

Referenced by CONTROLS_Unregister(), and POPUPMENUCLASSNAME().


Variable Documentation

WORD check_bitmap_width = 0 [static]
 

Definition at line 159 of file menu.cpp.

WORD check_bitmap_height = 0 [static]
 

Definition at line 159 of file menu.cpp.

WORD arrow_bitmap_width = 0 [static]
 

Definition at line 160 of file menu.cpp.

WORD arrow_bitmap_height = 0 [static]
 

Definition at line 160 of file menu.cpp.

HBITMAP hStdRadioCheck = 0 [static]
 

Definition at line 162 of file menu.cpp.

HBITMAP hStdCheck = 0 [static]
 

Definition at line 163 of file menu.cpp.

HBITMAP hStdMnArrow = 0 [static]
 

Definition at line 164 of file menu.cpp.

HBITMAP hBmpMinimize = 0 [static]
 

Definition at line 167 of file menu.cpp.

HBITMAP hBmpMinimizeD = 0 [static]
 

Definition at line 168 of file menu.cpp.

HBITMAP hBmpMaximize = 0 [static]
 

Definition at line 169 of file menu.cpp.

HBITMAP hBmpMaximizeD = 0 [static]
 

Definition at line 170 of file menu.cpp.

HBITMAP hBmpClose = 0 [static]
 

Definition at line 171 of file menu.cpp.

HBITMAP hBmpCloseD = 0 [static]
 

Definition at line 172 of file menu.cpp.

HBRUSH hShadeBrush = 0 [static]
 

Definition at line 175 of file menu.cpp.

HFONT hMenuFont = 0 [static]
 

Definition at line 176 of file menu.cpp.

HFONT hMenuFontBold = 0 [static]
 

Definition at line 177 of file menu.cpp.

HMENU MENU_DefSysPopup = 0 [static]
 

Definition at line 179 of file menu.cpp.

HWND pTopPopupWnd = 0 [static]
 

Definition at line 184 of file menu.cpp.

UINT uSubPWndLevel = 0 [static]
 

Definition at line 185 of file menu.cpp.

BOOL fEndMenu = FALSE [static]
 

Definition at line 188 of file menu.cpp.

UINT mouseOverMenuID = -1 [static]
 

Definition at line 200 of file menu.cpp.

BOOL isTimerSet = FALSE [static]
 

Definition at line 201 of file menu.cpp.

MENUITEM* MENU_HighlightedItem = NULL
 

Definition at line 3171 of file menu.cpp.

UINT MENU_HighlightedItemID = 0xffff
 

Definition at line 3172 of file menu.cpp.

POPUPMENU* MENU_HighlightedMenu = NULL
 

Definition at line 3173 of file menu.cpp.


Generated on Wed Jan 23 23:19:02 2002 for ODIN-user32 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001