X11workbench Toolkit  1.0
menu_popup.c File Reference

Implementation file for menu popup windows. More...

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <memory.h>
#include <string.h>
#include <strings.h>
#include <signal.h>
#include <time.h>
#include <X11/cursorfont.h>
#include <X11/keysymdef.h>
#include "window_helper.h"
#include "pixmap_helper.h"
#include "frame_window.h"
#include "menu_popup.h"
#include "conf_help.h"

Go to the source code of this file.


#define XK_MISCELLANY   /* mostly for interix */
#define HEIGHT_SPACING   4 /* pixels between menu items */
#define SEPARATOR_HEIGHT   5 /* height of menu item separator */
#define SEPARATOR_POS   2 /* position of separator from 'iPosition' */
#define WB_MOUSE_FAR   24 /* 24 pixels, about 2 'W' characters on hi-res display */


static int MBMenuPopupEvent (Window wID, XEvent *pEvent)
static void __SetFirstSelection (WBMenuPopupWindow *pSelf, WBMenu *pMenu)
static void __SetNextSelection (WBMenuPopupWindow *pSelf, WBMenu *pMenu)
static void __SetPrevSelection (WBMenuPopupWindow *pSelf, WBMenu *pMenu)
static void __SetLastSelection (WBMenuPopupWindow *pSelf, WBMenu *pMenu)
static WBMenuItem__GetCurrentSelection (WBMenuPopupWindow *pSelf, WBMenu *pMenu)
WBMenuPopupWindowMBCreateMenuPopupWindow (Window wIDBar, Window wIDOwner, WBMenu *pMenu, int iX, int iY, int iFlags)
 Create a WBMenuPopupWindow object and associated window. More...
static int __FindMenuPopupWindowCallback (Window wID, void *pData)
WBMenuPopupWindowMBFindMenuPopupWindow (WBMenu *pMenu)
 Find the first WBMenuPopupWindow that references a WBMenu. More...
int MBMenuDoModal (WBMenuPopupWindow *pPopup)
 display a Menu Popup window in a 'modal' loop More...
void MBDestroyMenuPopupWindow (WBMenuPopupWindow *pMenuPopupWindow)
 Destroy a WBMenuPopupWindow structure. More...
static int MBMenuPopupHandleMenuItemUI (Display *pDisplay, WBMenuPopupWindow *pSelf, WBMenu *pMenu, WBMenuItem *pItem)
static void MBMenuPopupHandleMenuItem (Display *pDisplay, Window wID, WBMenuPopupWindow *pSelf, WBMenu *pMenu, WBMenuItem *pItem)
static int MenuPopupDoExposeEvent (XExposeEvent *pEvent, WBMenu *pMenu, Display *pDisplay, Window wID, WBMenuPopupWindow *pSelf)
static WBMenuItem__SelectMenuItemFromMousePos (Window wID, WBMenuPopupWindow *pSelf, WBMenu *pMenu, int iX, int iY)
static void __PostActivatePrevNextEvent (WBMenuPopupWindow *pSelf, int iPrevNext)

Detailed Description

Implementation file for menu popup windows.

This is the implementation file for menu popup windows, which are actually top-level windows that act as if they are child windows of the menu bar.

Definition in file menu_popup.c.