X11workbench Toolkit
1.0
|
Implementation file for menu bar 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 "window_helper.h"
#include "pixmap_helper.h"
#include "frame_window.h"
#include "menu_bar.h"
#include "menu_popup.h"
#include "conf_help.h"
Go to the source code of this file.
Macros | |
#define | BORDER 32 /* was 1 */ |
#define | MENU_FONT "fixed" |
#define | MENU_ALT_FONT "*-fixed-*" |
#define | MENU_FONT_SIZE 13 |
#define | DEBUG_VALIDATE(X) if(!(X)) { WB_WARN_PRINT("%s:%d - %s\n", __FUNCTION__, __LINE__, "WARNING - " #X " failed!\n"); } |
#define | COPY_COLOR_NAME(X, Y, Z) {const char *pX = X(WBGetDefaultDisplay()); if(pX) strncpy(Y,pX,sizeof(Y)); else strncpy(Y,Z,sizeof(Y));} |
Functions | |
int | MBMenuParentEvent (Window wIDMenu, XEvent *pEvent) |
int | MBMenuWinEvent (Window wID, XEvent *pEvent) |
static int | MenuBarDoExposeEvent (XExposeEvent *pEvent, WBMenu *pMenu, Display *pDisplay, Window wID, WBMenuBarWindow *pSelf) |
int | MBInitGlobal (void) |
Initialize global resources for Menu Bar windows. More... | |
WB_FONTC | MBGetDefaultMenuFont (void) |
Get a pointer to the default 'Menu Bar' font structure. More... | |
WBMenuBarWindow * | MBCreateMenuBarWindow (Window wIDParent, const char *pszResource, int iFlags) |
Create a Menu Bar windows and its associated WBMenuBarWindow structure. More... | |
static int | __FindMenuBarWindowCallback (Window wID, void *pData) |
WBMenuBarWindow * | MBFindMenuBarWindow (WBMenu *pMenu) |
Locate the first WBMenuBarWindow that is using a WBMenu structure. More... | |
void | MBReCalcMenuBarWindow (WBMenuBarWindow *pMenuBar) |
Cause a 'layout recalculation' for a Menu Bar window. More... | |
void | MBDestroyMenuBarWindow (WBMenuBarWindow *pMenuBar) |
Destroy a 'Menu Bar' window. More... | |
void | MBSetMenuBarMenuResource (WBMenuBarWindow *pMenuBar, const char *pszResource) |
Assign a new WBMenu for a Menu Bar window. More... | |
static void | MBMenuHandleMenuItem (Display *pDisplay, WBMenuBarWindow *pSelf, WBMenu *pMenu, WBMenuItem *pItem) |
Variables | |
XColor | clrMenuFG |
menu foreground color | |
XColor | clrMenuBG |
menu background color | |
XColor | clrMenuActiveFG |
menu 'active' foreground color | |
XColor | clrMenuActiveBG |
menu 'active' background color | |
XColor | clrMenuBorder1 |
menu border color 1 | |
XColor | clrMenuBorder2 |
menu border color 2 | |
XColor | clrMenuBorder3 |
menu border color 3 | |
XColor | clrMenuDisabledFG |
menu 'disabled' foreground color | |
XColor | clrMenuActiveDisabledFG |
menu 'disabled but active' foreground color | |
static int | iInitColorFlag = 0 |
static WB_FONT | pDefaultMenuFont = NULL |
Atom | aMENU_RESIZE |
Internal Client Message Atom for 'RESIZE' notification (tells menu bar to resize itself) More... | |
Atom | aMENU_ACTIVATE |
Internal Client Message Atom for 'ACTIVATE' notification. More... | |
Atom | aMENU_DISPLAY_POPUP |
Internal Client Message Atom for 'DISPLAY POPUP' action. More... | |
Implementation file for menu bar windows.
This is the implementation file for menus bars, which virtualize the menu structure's contents and handle user interaction
Definition in file menu_bar.c.