Table of Contents
XfwfToggle
The XfwfToggle is a button that switches states with every
activation (which is by default with every mouse click). The
states are named `on' and `off'. The states can be indicated
with a $d$ before the label Two callbacks report the changed
state to the application: onCallback is called when the but
ton switches to `on', offCallback is called when the button
switches back to `off'.
Public variables
_____________________________________________________________
- |
- XfwfToggle
- | Name
- | Class | Type | Default
| XtNonCallback | XtCOnCallback | Callback| NULL
| XtNoffCallback| XtCOffCallback| Callback| NULL
- | XtNon
- | XtCOn | Boolean | False
| XtNonIcon | XtCOnIcon | Icon * | "filledsquare"
| XtNoffIcon | XtCOffIcon | Icon * | "emptysquare"
- |
- | | |
|_______________|________________|__________|________________
XtNonCallback
The onCallback is called by the toggle action or by the
switch_on action, if the previous state was `off'. The
call_data argument will contain the XEvent pointer that
trigerred the action function.
XtNoffCallback
The offCallback is called from the toggle or switch_off
action, if the previous state was `on'. The call_data
argument will be a pointer to the XEvent that caused
the action.
XtNon
The variable on records the state of the widget: True
means `on' and False means `off'.
XtNonIcon
By default, the button displays a $d$ when on and noth
ing when off. The two resources onIcon and offPIcon can
replace these two graphics with arbitrary pixmaps. Sug
gested size for these pixmaps is about $16imes18$.
XtNoffIcon
The offIcon is displayed when the button is in `off'
state. By default, nothing is displayed in this state.
- ________________________________________________
-
- |
- XfwfButton
- | Name
- | Class | Type | Default
| XtNactivate| XtCActivate| Callback| NULL
| XtNenter | XtCEnter | Callback| NULL
| XtNleave | XtCLeave | Callback| NULL
| | | |
|____________|_____________|__________|_________
_______________________________________________________________________
| XfwfLabel
| Name | Class | Type | Default
| XtNlabel | XtCLabel | String | NULL
| XtNtablist | XtCTablist | String | NULL
| XtNfont | XtCFont | FontStruct| XtDefaultFont
| XtNforeground | XtCForeground | Pixel | XtDefaultForeground
| XtNhlForeground| XtCHlForeground| Pixel | XtDefaultForeground
| XtNalignment | XtCAlignment | Alignment | 0
| XtNtopMargin | XtCTopMargin | Dimension | 2
| XtNbottomMargin| XtCBottomMargin| Dimension | 2
| XtNleftMargin | XtCLeftMargin | Dimension | 2
| XtNrightMargin | XtCRightMargin | Dimension | 2
| XtNshrinkToFit | XtCShrinkToFit | Boolean | False
| XtNrvStart | XtCRvStart | Int | 0
| XtNrvLength | XtCRvLength | Int | 0
| XtNhlStart | XtCHlStart | Int | 0
| XtNhlLength | XtCHlLength | Int | 0
| | | |
|________________|_________________|____________|______________________
- _____________________________________________________
-
- |
- 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
| | || | | | | |
|___|______________||___________________|_|____________|____|____|____
| | | |
| | | |
Tran|slations | | |
T|he toggle action|toggles the widget |between `on' an|d `off'.
B|y default it is |bound to a click of |the left mouse| button
a|s well as to the|Return key. | |
| | | |
| | | |
| | | |
<|Btn1Down>: set_s|hadow(sunken) | |
| | | |
<|Btn1Up>: toggle(|) set_shadow() | |
| | | |
- <|Key>Return: togg|le()
- | |
| | | |
| | | |
| | | |
s|w_itch_on | | |
| | | |
| The switch_|o_n action switches t|he button to `o|n' if it
| is `off', ot|herwise it does no|thing. By def|ault it
isn't bound |to any event. If the|widget is chan|ged, the
onCallback is called with the event as call_data.
switch_off
The switch_off action switches the widget to `off' if
the state is `on', otherwise it does nothing. When the
widget changes states, the offCallback is called, with
a pointer to the XEvent structure as call_data argu
ment.
Table of Contents