XmTab
Synopsis
Public Header | <Xmext/Tab.h> |
Private Header | <Xmext/TabP.h> |
Class Name | XmTab |
Class Hierarchy | Core::XmPrimitive::XmLabel::XmTab |
Class Pointer | xmTabWidgetClass |
Description
A Tab displays a text or graphics label. It invokes a callback when clicked on
or pressed. It is usually used in conjunction with the PropertySheet widget.
New Resources
The Tab widget defines the following resources:
Name | Class | Type | Default | Access |
XmNarmColor | XmCArmColor | Pixel | dynamic | CSG |
XmNarmPixmap | XmCArmPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
XmNcornerStyle | XmCCornerStyle | int | XmCORNER_LINE | CSG |
XmNcornerSize | XmCCornerSize | int | 0 | CSG |
XmNfillOnArm | XmCFillOnArm | Boolean | False | CSG |
XmNshowAsActive | XmCShowAsActive | Boolean | False | CSG |
- XmNarmColor
- The background color used when XmNfillOnArm is set to True.
- XmNarmPixmap
- The background pixmap used when XmNfillOnArm is set to True and XmNlabelType is set to XmPIXMAP.
- XmNcornerStyle
- The visual style for the top corners. This resource can be set to one of the following:
- XmCORNER_NONE
- XmCORNER_LINE (default)
- XmCORNER_ARC
- XmNcornerSize
- The size of the top corners used when XmNcornerStyle is not set to XmCORNER_NONE.
The size can not exceed 20 and must be greater than or equal to 0.
If set to 0 use the default size for the current corner style.
- XmNfillOnArm
- If set to True will fill the background when pressed.
- XmNshowAsActive
- If set to True a geometry request will be made to raise the widget.
If set to False a geometry request will be made to lower the widget.
Callback Resources
The Tab widget defines the following callback resources:
Name | Class | Type | Default | Access |
XmNactivateCallback | XmCCallback | XtCallbackList | NULL | CSG |
XmNarmCallback | XmCCallback | XtCallbackList | NULL | CSG |
XmNdisarmCallback | XmCCallback | XtCallbackList | NULL | CSG |
- XmNactivateCallback
- The activate callback specifies a list of callback functions that are
called when the Tab Widget is activated. This is when the Tab is pressed
and release. The reason field of the Callback structure has the value
XmCR_ACTIVATE.
- XmNarmCallback
- The arm callback specifies a list of callback functions that are
called when the Tab Widget is armed.
This is when the Tab is Pressed.
The reason field of the callback structure has the value XmCR_ARM.
- XmNdisarmCallback
- The disarm callback specifies a list of callback functions that are
called when the Tab Widget is disarmed.
This is when the Tab is pressed and release.
The reason field of the callback structure has the value XmCR_DISARM.
Callback Structure
#define XmTabCallbackStruct XmAnyCallbackStruct
typedef struct
{
int reason;
XEvent *event;
} XmAnyCallbackStruct;
Modified Inherited Resources
Name | Class | Type | Default | Access |
XmNrecomputeSize | XmCRecomputeSize | Boolean | True | CSG |
XmNtraversalOn | XmCTraversalOn | Boolean | True | CSG |
XmNhighlightThickness | XmCHighlightThickness | Dimension | 2 | CSG |
XmNshadowThickness | XmCShadowThickness | Dimension | 2 | CSG |
Translations
<Btn1Down>: | Arm() |
<Btn1Down>,<Btn1Up>: | Activate() Disarm() |
<Btn1Up>: | Activate() Disarm() |
<Btn2Down>: | ProcessDrag() |
<EnterWindow>: | Enter() |
<LeaveWindow>: | Leave() |
<Key>osfSelect: | ArmAndActivate() |
<Key>osfHelp: | Help() |
<Key>osfActivate: | PrimitiveParentActivate() |
<Key>Return: | PrimitiveParentActivate() |
<Key>space: | ArmAndActivate() |
Action Routines
The Tab widget defines the following action routines:
- Activate()
- Invokes the list of callbacks specified by the XmNactivateCallback resource.
- Arm()
- Invokes the list of callbacks specified by the XmNarmCallback resource.
- ArmAndActivate()
- Invokes the list of callbacks specified by the XmNarmCallback and XmNactivateCallback resource.
- Disarm()
- Invokes the list of callbacks specified by the XmNdisarmCallback resource.
- Enter()
- Calls the expose routine for the widget if armed.
- Help()
- Calls the PrimitiveHelp action routine.
- Leave()
- Calls the expose routine for the widget if armed.
- ProcessDrag()
- Not implemented yet.
Public Functions
- Widget XmCreateTab(Widget Parent,char *Name,Arg *arglist,Cardinal count);
- Create an instance of a tab widget. The routine takes four arguments. The parents widget, the name of the new widget, a list of resources and their corresponding values, and finally the number of resources in the list.