Files
MiniGUI/doc/man3/miniguiMenu.3
2017-05-29 12:20:05 +08:00

153 lines
6.5 KiB
Plaintext

.\" This manpage is Copyright (C) 2000 Wei Yongming
.\" 2000 BluePoint Software
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since MiniGUI is constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein. The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.TH "MenuHandler" "3" "August 2000" "MiniGUI"
.SH "NAME"
MenuHandler \- Menu Support Functioins.
.SH "SYNOPSIS"
.B #include <minigui/window.h>
.br
.PP
.BI "HMENU GUIAPI LoadMenuFromFile" "(const char* filename, int id);"
.br
.BI "HMENU GUIAPI CreateMenu" "(void);"
.br
.BI "HMENU GUIAPI CreatePopupMenu" "( PMENUITEMINFO pmii);"
.br
.BI "HMENU GUIAPI CreateSystemMenu" "(HWND hwnd, DWORD dwStyle);"
.br
.BI "int GUIAPI InsertMenuItem" "(HMENU hmnu, int item,BOOL flag, PMENUITEMINFO pmii);"
.br
.BI "int GUIAPI RemoveMenu" "(HMENU hmnu, int item, UINT flags);"
.br
.BI "int GUIAPI DeleteMenu" "(HMENU hmnu, int item, UINT flags);"
.br
.BI "int GUIAPI DestroyMenu" "(HMENU hmnu);"
.br
.BI "int GUIAPI IsMenu" "(HMENU hmnu);"
.br
.BI "HMENU GUIAPI SetMenu" "(HWND hwnd, HMENU hmnu);"
.br
.BI "HMENU GUIAPI GetMenu" "(HWND hwnd);"
.br
.BI "void GUIAPI DrawMenuBar" "(HWND hwnd);"
.br
.BI "int GUIAPI TrackMenuBar" "(HWND hwnd, int pos);"
.br
.BI "int GUIAPI TrackPopupMenu" "(HMENU hmnu, UINT uFlags, int x, int y, HWND hwnd);"
.br
.BI "HMENU GUIAPI GetMenuBarItemRect" "(HWND hwnd, int pos, RECT* prc);"
.br
.BI "BOOL GUIAPI HiliteMenuBarItem" "(HWND hwnd, int pos, UINT flag);"
.br
.BI "int GUIAPI GetMenuItemCount" "(HMENU hmnu);"
.br
.BI "int GUIAPI GetMenuItemID" "(HMENU hmnu, int pos);"
.br
.BI "int GUIAPI GetMenuItemInfo" "(HMENU hmnu, int item, BOOL flag, PMENUITEMINFO pmii);"
.br
.BI "int GUIAPI GetMenuItemRect" "(HWND hwnd, HMENU hmnu, int item, PRECT prc);"
.br
.BI "HMENU GUIAPI GetPopupSubMenu" "(HMENU hpppmnu);"
.br
.BI "HMENU GUIAPI GetSubMenu" "(HMENU hmnu, int pos);"
.br
.BI "int GUIAPI GetSystemMenu" "(HWND hwnd, BOOL flag);"
.br
.BI "UINT GUIAPI EnableMenuItem" "(HMENU hmnu, int item, UINT flags);"
.br
.BI "int GUIAPI CheckMenuRadioItem" "(HMENU hmnu, int first, int last, int checkitem, UINT flags);"
.br
.BI "int GUIAPI SetMenuItemBitmaps" "(HMENU hmnu, int item, UINT flags, PBITMAP hBmpUnchecked, PBITMAP hBmpChecked);"
.br
.BI "int GUIAPI SetMenuItemInfo" "(HMENU hmnu, int item, BOOL flag, PMENUITEMINFO pmii);"
.SH "DESCRIPTION"
.PP
\fBLoadMenuFromFile\fP function loads a menu from a external file. The function is not implemented at current time.
.PP
\fBCreateMenu\fP function creates a menu. The menu is initially empty, but it can be filled with menu items by using the InsertMenuItem, AppendMenu, and InsertMenu functions.
.PP
\fBCreatePopupMenu\fP function creates a drop-down menu or submenu. The menu is initially empty. You can insert or append menu items by using the InsertMenuItem function.
.PP
\fBCreateSystemMenu\fP function creates a system menu. It can be used to replace the application's system menu.
.PP
\fBInsertMenuItem\fP function inserts a new menu item at the specified position in a menu.
.PP
\fBRemoveMenu\fP function deletes a menu item or detaches a submenu from the specified menu.
.PP
\fBDeleteMenu\fP function deletes an item from the specified menu.
.PP
\fBDestroyMenu\fP function destroys the specified menu and frees any memory that the menu occupies.
.PP
\fBIsMenu\fP function determines whether a handle is a menu handle.
.PP
\fBSetMenu\fP function assigns a new menu to the specified window.
.PP
\fBGetMenu\fP function retrieves the handle to the menu assigned to the given window.
.PP
\fBDrawMenuBar\fP function redraws the menu bar of the specified window. If the menu bar changes after the system has created the window, this function must be called to draw the changed menu bar.
.PP
\fBTrackMenuBar\fP function displays the specified submenu.
.PP
\fBTrackPopupMenu\fP function displays a shortcut menu at the specified location and tracks the selection of items on the menu. The shortcut menu can appear anywhere on the screen.
.PP
\fBGetMenuBarItemRect\fP function retrieves the rect of the menu bar item specified by the parameter \fBpos\fP.
.PP
\fBHiliteMenuBarItem\fP function draws the specified menubar item with 3D effect.
.PP
\fBGetMenuItemCount\fP function determines the number of items in the specified menu.
.PP
\fBGetMenuItemID\fP function retrieves the menu item identifier of a menu item at specified position in a menu.
.PP
\fBGetMenuItemInfo\fP function retrieves information about a menu item.
.PP
\fBGetMenuItemRect\fP function retrieves the bounding rectangle for the specified menu item.
.PP
\fBGetPopupSubMenu\fP function retrieves the submenu of the specified popup menu.
.PP
\fBGetSubMenu\fP function retrieves the handle to the drop-down menu or submenu activated by the specified menu item.
.PP
\fBGetSystemMenu\fP function allows the application to access the window menu (also known as the system menu or the control menu) for copying and modifying.
.PP
\fBEnableMenuItem\fP function enables, disables, or grays the specified menu item.
.PP
\fBCheckMenuRadioItem\fP function checks a specified menu item and makes it a radio item. At the same time, the function unchecks all other menu items in the associated group and clears the radio-item type flag for those items.
.PP
\fBSetMenuItemBitmaps\fP function associates the specified bitmap with a menu item. Whether the menu item is checked or unchecked, the system displays the appropriate bitmap next to the menu item.
.PP
\fBSetMenuItemInfo\fP function changes information about a menu item.
.SH "RETURN VALUE"
.PP
.SH "NOTE"
.PP
.SH "SEE ALSO"
.SH "AUTHOR"
.PP
This manual page was edited by Song Lixin <zjujoe@minigui.org>.
If you have any problems, comments or found some bugs, please send messages to me.