X11 Work Bench Toolkit  1.0
__WB_FW_MENU_HANDLER__ Struct Reference

structure for managing menu callbacks More...

#include <frame_window.h>

Data Fields

unsigned long lMenuID
 menu ID (< 0x10000L) or const pointer to string
 
int(* callback )(XClientMessageEvent *)
 menu callback (gets pointer to the 'XClientMessageEvent').
 
int(* UIcallback )(WBMenu *, WBMenuItem *)
 menu 'UI' callback to handle displaying menu states. More...
 

Detailed Description

structure for managing menu callbacks

The WBFWMenuHandler structure is designed to be initialized via macros, so that a set of callback functions can then be easily used to handle menu events. If no menu handler is present for a menu item, or if the menu UI handler is NOT NULL and returns a non-zero value, the menu item will be disabled and displayed accordingly. It will not be possible to use its hotkey nor select it. Otherwise, the menu will be displayed normally and be selectable, and its hotkey will be able to activate it.

typedef struct __WB_FW_MENU_HANDLER__
{
unsigned long lMenuID; // menu ID (< 0x10000L) or const pointer to string
int (* callback)(XClientMessageEvent *); // menu callback (gets pointer to the 'XClientMessageEvent')
int (* UIcallback)(WBMenu *, WBMenuItem *); // menu 'UI' callback to handle displaying menu states
// A return value of '0' displays normally, -1 disables
// Other return values are reserved
See Also
FW_MENU_HANDLER_ENTRY, FW_MENU_HANDLER_BEGIN

Definition at line 215 of file frame_window.h.

Field Documentation

int(* UIcallback)(WBMenu *, WBMenuItem *)

menu 'UI' callback to handle displaying menu states.

This callback function handles the menu states. A return value of '0' displays normaly, -1 disables.
Other return values are reserved.

Definition at line 226 of file frame_window.h.


The documentation for this struct was generated from the following file: