XmQTscrollFrame — A widget holding this trait can handle one or more navigator widgets
#include <Xm/ScrollFrameT.h> typdefe struct { int version; XmScrollFrameInitProc init; XmScrollFrameGetInfoProc getInfo; XmScrollFrameAddNavigatorProc addNavigator; XmScrollFrameRemoveNavigatorProc removeNavigator; } XmSrollFrameTraitRec, *XmScrollFrameTrait;
void (*XmScrollFrameInitProc)
(, , , Boolean (*XmScrollFrameGetInfoProc)
, , , , void (*XmScrollFrameAddNavigatorProc)
, , , void (*XmScrollFrameRemoveNavigatorProc)
, );A widget holding the XmQTscrollFrame trait can handle one or more navigator widgets and use them to pan a scrollable object. The trait methods of XmQTscrollFrame are useful if you are writing you own navigator or scrollable widget.
The following standard Motif manager widgets hold this trait:
XmScrolledWindow
XmNotebook
In addition, the following standard Motif widgets access the trait methods of XmQTscrollFrame:
XmList
XmText
void init
(scrollFrameWidget, moveCB, scrollableWidget);The init trait method initializes several internal data fields. One of these fields must hold the name the default move callback (moveCB) procedure that is to be associated with this widget.
scrollFrameWidget | Specifies the widget that holds the XmQTscrollFrame trait. | |
moveCB | Specifies the default move callback procedure that is to be associated with this widget. Typically, this callback is going to be added to a list of navigator widgets maintained by the scrollFrameWidget. | |
scrollableWidget | Specifies client data to be passed to the moveCB. Typically, the client data will be the name of a scrollable widget. |
Boolean getInfo
(scrollFrameWidget, dimension, nav_list, num_nav_list);The getInfo trait method returns information about the scrollFrameWidget. The caller may set the dimension, nav_list, or num_nav_list fields to NULL if the returned information would be of no interest.
scrollFrameWidget | Specifies the widget that is providing this method. | |
dimension | Returns the dimension(s) that scrollFrameWidget is capable of operating upon. | |
nav_list | Returns the current list of navigators associated with this scrollFrameWidget. This data is returned to internal storage, and should not be modified or freed by the caller. | |
num_nav_list | Returns the number of navigators returned in nav_list. |
This method returns True if the init trait method was already called. This method returns False if init has not yet been called. If this method returns False, then the returned information in the other fields should be ignored.
void addNavigator
(scrollFrameWidget, navigatorWidget, dimMask);The addNavigator trait method associates a navigatorWidget with a scrollFrameWidget. Since one scrollFrameWidget can support multiple navigator widgets, it is possible that this method will be called multiple times.
scrollFrameWidget | Specifies the scroll frame widget that is providing this method. | |
navigatorWidget | Specifies the navigator widget to be associated with the scrollFrameWidget. | |
dimMask | Specifies the dimension(s) upon which the navigatorWidget is going to operate. |
void removeNavigator
(scrollFrameWidget, navigatorWidget);The removeNavigator trait method disassociates a navigatorWidget from a scrollFrameWidget. Since one scrollFrameWidget can support multiple navigatorWidgets, this method can be called multiple times.
It is the responsibility of whomever associated the navigatorWidget with the scrollFrameWidget to call removeNavigator prior to destroying it.
scrollFrameWidget | Specifies the scroll frame widget that is providing this method. | |
navigatorWidget | Specifies the navigator widget to be disassociated from the scrollFrameWidget. |
XmScrolledWindow(3), XmNotebook(3), and XmQTnavigator(3).