OptButton

Table of Contents

## NAME

XfwfOptionButton

## DESCRIPTION

The option button is very much like a PullDown button, except that the label of the button is automatically set to the label of the last selected menu item.

There are two ways to specify the menu: with the popup resource, or with the menu resource. When the popup resource is used, the option button cannot update its own label, so it becomes the responsibility of the application that created the pop up widget to set the label.

For more explanation of menu and popup, see the XfwfPullDown class.

Public variables
_______________________________

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

XtNframeWidth
The frame width is again set to a default of 2 pixels.

______________________________________________________________

|
  XfwfPullDown

| Name
  | Class | Type | Default

| XtNpopup
  | XtCPopup | Widget | NULL

| XtNmenu
  | XtCMenu | String | NULL

| XtNcascaded
  | XtCCascaded | Boolean | False

| XtNhotkey
  | XtCHotkey | String | NULL

| XtNmenuCursor
  | XtCMenuCursor | Cursor | "arrow"

| XtNprepare
  | XtCPrepare | Callback| NULL | XtNchangeSelection| XtCChangeSelection| Callback| NULL

|
  | | | |___________________|____________________|__________|_________

________________________________________________
  XfwfButton

Name
  Class Type Default XtNactivate XtCActivate Callback NULL XtNenter XtCEnter Callback NULL XtNleave XtCLeave Callback NULL

________________________________________________
  | | | | __________|____________|_____________|__________|_________|____________ | | | XfwfLa|bel | | | Name | | Clas|s | |Type || Default | | XtNlabel | | XtCL|abel | |String || NULL | | XtNtablis|t | XtCT|ablist | |String || NULL | | XtNfont | | XtCF|ont | |FontStruct|| XtDefaul|tFont | XtNforegr|ound | XtCF|oreground | |Pixel || XtDefaul|tForeground | XtNhlFore|ground| XtCH|lForeground| |Pixel || XtDefaul|tForeground | XtNalignm|ent | XtCA|lignment | |Alignment || 0 | | XtNtopMar|gin | XtCT|opMargin | |Dimension || 2 | | XtNbottom|Margin| XtCB|ottomMargin| |Dimension || 2 | | XtNleftMa|rgin | XtCL|eftMargin | |Dimension || 2 | | XtNrightM|argin | XtCR|ightMargin | |Dimension || 2 | | XtNshrink|ToFit | XtCS|hrinkToFit | |Boolean || False | | XtNrvStar|t | XtCR|vStart | |Int || 0 | | XtNrvLeng|th | XtCR|vLength | |Int || 0 | | XtNhlStar|t | XtCH|lStart | |Int || 0 | | XtNhlLeng|th | XtCH|lLength | |Int || 0 | | | | | | | || | |__________|_____|______|__________|__|_________||_________|___________ | | | | _|____________|_____________|__________|_________|___

| |
  | XfwfBo|ard | |

| |Name
  | Class | | Type | | Defa|ult

| |XtNabs_x
  | XtCAbs_x | | Positi|on | 0 |

| |XtNrel_x
  | XtCRel_x | | Float | | "0.0|"

| |XtNabs_y
  | XtCAbs_y | | Positi|on | 0 |

| |XtNrel_y
  | XtCRel_y | | Float | | "0.0|" | |XtNabs_width | XtCAbs_widt|h | Positi|on | 0 | | |XtNrel_width | XtCRel_widt|h | Float | | "1.0|" | |XtNabs_height| XtCAbs_heig|ht| Positi|on | 0 | | |XtNrel_height| XtCRel_heig|ht| 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

| Name | Class | Type | Default

| XtNx
  | XtCX | Position | 0

| XtNy
  | XtCY | Position | 0

| XtNwidth
  | XtCWidth | Dimension | 0

| XtNheight
  | XtCHeight | Dimension | 0

| borderWidth
  | XtCBorderWidth | Dimension | 0

| XtNcolormap
  | XtCColormap | Colormap | NULL

| XtNdepth
  | XtCDepth | Int | 0 | destroyCallback | XtCDestroyCallback | XTCallbackList | NULL | XtNsensitive | XtCSensitive | Boolean | True

| XtNtm
  | XtCTm | XTTMRec | NULL | ancestorSensitive| XtCAncestorSensitive| Boolean | False | accelerators | XtCAccelerators | XTTranslations | NULL

| borderColor
  | XtCBorderColor | Pixel | 0 | borderPixmap | XtCBorderPixmap | Pixmap | NULL

| background
  | XtCBackground | Pixel | 0 | backgroundPixmap | XtCBackgroundPixmap | Pixmap | NULL | mappedWhenManaged| XtCMappedWhenManaged| Boolean | True

| XtNscreen
  | XtCScreen | Screen * | NULL | | | | |__________________|______________________|_________________|_________

Translations
Since wbuild cannot yet inherit translations, they must be given again.

<Btn1Down>: prepare() open_menu()

Button1<Enter>: prepare() open_menu()

<Key>Return: prepare() open_menu()

<Btn1Up>: popdown_maybe()

Table of Contents

- NAME
- DESCRIPTION