MenuBar

Table of Contents

## NAME

XfwfMenuBar

## DESCRIPTION

The MenuBar widget is a special kind of Rows widget. It assumes that all its children are PullDown buttons or other widgets that pop up a menu. (But nothing will break if they are not.)

The MenuBar attaches itself to the popup callback of the menu shell that is popped up by the children, and inserts itself in the list of pointer grabs that Xt maintains. This is necessary to be able to drag the mouse from one menu into another, popping down the first one and popping up the sec ond. If you use a RowCol widget instead of a MenuBar, you will find that switching from one menu to the next involves releasing the mouse and then pressing it again.

To find the menu shell, the children are asked for their popup resource. PullDown buttons have this resource, others may not.

The MenuBar widget introduces no new resources.

Public variables
_______________________________

|
  XfwfMenuBar | Name| Class| Type| Default | | | | |_____|_______|______|_________

XtNframeType

XtNtraversalOn

________________________________________________

|
  XfwfRows

| Name
  | Class | Type | Default | XtNalignTop| XtCAlignTop| Boolean | True | | | | |____________|_____________|__________|_________

_____________________________________________________

|
  XfwfBoard

| Name
  | Class | Type | Default

| XtNabs_x
  | XtCAbs_x | Position | 0

| XtNrel_x
  | XtCRel_x | Float | "0.0"

| XtNabs_y
  | XtCAbs_y | Position | 0

| XtNrel_y
  | XtCRel_y | Float | "0.0" | XtNabs_width | XtCAbs_width | Position | 0 | XtNrel_width | XtCRel_width | Float | "1.0" | XtNabs_height| XtCAbs_height| Position | 0 | XtNrel_height| XtCRel_height| Float | "1.0"

| XtNhunit
  | XtCHunit | Float | "1.0"

| XtNvunit
  | XtCVunit | Float | "1.0" | XtNlocation | XtCLocation | String | NULL | | | | |______________|_______________|___________|_________

________________________________________________________________________________________

|
  XfwfFrame | Name | Class | Type | Default | XtNcursor | XtCCursor | Cursor | None | XtNframeType | XtCFrameType | FrameType | XfwfRaised | XtNframeWidth | XtCFrameWidth | Dimension | 0 | XtNouterOffset | XtCOuterOffset | Dimension | 0 | XtNinnerOffset | XtCInnerOffset | Dimension | 0 | XtNshadowScheme | XtCShadowScheme | ShadowScheme | XfwfAuto | XtNtopShadowColor | XtCTopShadowColor | Pixel | compute_topcolor | XtNbottomShadowColor | XtCBottomShadowColor | Pixel | compute_bottomcolor | XtNtopShadowStipple | XtCTopShadowStipple | Bitmap | NULL | XtNbottomShadowStipple| XtCBottomShadowStipple| Bitmap | NULL | | | | |_______________________|________________________|_______________|______________________

___________________________________________________________________________________

|
  XfwfCommon | Name | Class | Type | Default | XtNtraversalOn | XtCTraversalOn | Boolean | True | XtNhighlightThickness| XtCHighlightThickness| Dimension | 2 | XtNhighlightColor | XtCHighlightColor | Pixel | XtDefaultForeground | XtNhighlightPixmap | XtCHighlightPixmap | Pixmap | None | XtNnextTop | XtCNextTop | Callback | NULL | XtNuserData | XtCUserData | Pointer | NULL | | | | |______________________|_______________________|____________|______________________

_____________________________________________________________
  Composite Name Class Type Default XtNchildren XtCChildren WidgetList NULL insertPosition XtCInsertPosition XTOrderProc NULL numChildren XtCNumChildren Cardinal 0

_____________________________________________________________
  | | | | ___|_______________|___________________|______________|_________|_____ | | | Core | | |

| Na|me || Class | | Type | | De|fault

| Xt|Nx
  || XtCX | | Position | | 0 |

| Xt|Ny
  || XtCY | | Position | | 0 |

| Xt|Nwidth
  || XtCWidth | | Dimension | | 0 |

| Xt|Nheight
  || XtCHeight | | Dimension | | 0 |

| bo|rderWidth
  || XtCBorderWidth | | Dimension | | 0 |

| Xt|Ncolormap
  || XtCColormap | | Colormap | | NU|LL

| Xt|Ndepth
  || XtCDepth | | Int | | 0 | | de|stroyCallback || XtCDestroyCallback| | XTCallback|List | NU|LL | Xt|Nsensitive || XtCSensitive | | Boolean | | Tr|ue

| Xt|Ntm
  || XtCTm | | XTTMRec | | NU|LL | an|cestorSensitive|| XtCAncestorSensiti|ve| Boolean | | Fa|lse | ac|celerators || XtCAccelerators | | XTTranslat|ions | NU|LL

| bo|rderColor
  || XtCBorderColor | | Pixel | | 0 | | bo|rderPixmap || XtCBorderPixmap | | Pixmap | | NU|LL

| ba|ckground
  || XtCBackground | | Pixel | | 0 | | ba|ckgroundPixmap || XtCBackgroundPixma|p | Pixmap | | NU|LL | ma|ppedWhenManaged|| XtCMappedWhenManag|ed| Boolean | | Tr|ue

| Xt|Nscreen
  || XtCScreen | | Screen * | | NU|LL | | || | | | | | |___|______________||___________________|_|____________|____|____|____ | | | | | | | | Expo|rts | | | T|he MenuBar wid|get has a method p|r_ocess_menu tha|t can be u|sed by children |(usually PullDown bu|ttons) to pop u|p a menu a|nd to register| it with the menu |bar. If they do|so, the m|enu bar is able |to process events el|sewhere in the |menu bar a|nd pop down t|he menu in favour o|f another one, |when the u|ser moves the mo|use to another butto|n in the menu |bar. A m|enu or a button|is unable to do thi|s by itself, si|nce they d|o not know what |other menus are pres|ent. | | | | | T|o call the proce|s_s_menu method, wi|dgets should |use the X|f_wfCallProcessMe|n_u function, which| will check |that the r|eceiver of the c|all is indeed a Menu|Bar widget. It |returns T|r_ue if the pro|c_ess_menu method cou|ld be called, o|therwise F|a_lse. | | | | | | | T|he value for cur|s_or can also be None|, in which c|ase the c|ursor from the| menu's parent (th|e root window, |usually) w|ill be used inst|ead. | |

|
  | Boolean XfwfCallProcessMenu( $, Widget menu, Cursor cursor)

Translations
Since the MenuBar widget adds itself to the list of cascaded popups that is maintained by Xt, it will receive pointer events when a menu is popped up. If the event is a button release, the current menu will have to be popped down.

<Btn1Up>: menu_popdown()

Table of Contents

- NAME
- DESCRIPTION