[ Previous | Next | Contents | Glossary | Home | Search ]
Motif 2.1 Widget Writer's Guide


XmQTscrollFrame

A widget holding this trait can handle one or more navigator widgets

Format

#include <Xm/ScrollFrameT.h>
 
typdefe struct {
        	int                               version;
        	XmScrollFrameInitProc             init;
        	XmScrollFrameGetInfoProc          getInfo;
        	XmScrollFrameAddNavigatorProc     addNavigator;
        	XmScrollFrameRemoveNavigatorProc  removeNavigator;
} XmSrollFrameTraitRec, *XmScrollFrameTrait;
void
(*XmScrollFrameInitProc)WidgetXtCallbackProcWidget
Boolean
(*XmScrollFrameGetInfoProc)WidgetCardinal*Widget**Cardinal*
void
(*XmScrollFrameAddNavigatorProc)WidgetWidgetMask
void
(*XmScrollFrameRemoveNavigatorProc)WidgetWidget

DESCRIPTION

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:

  1. XmScrolledWindow

  2. XmNotebook

    In addition, the following standard Motif widgets access the trait methods of XmQTscrollFrame:

    1. XmList

    2. XmText

    3. The init Trait Method
      void initWidget
      scrollFrameWidgetXtCallbackProc
      moveCBWidget 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.

      The getInfo Trait Method
      Boolean getInfoWidget
      scrollFrameWidgetCardinal
      *dimensionWidget **nav_listCardinal
      *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.

      The addNavigator Trait Method
      void addNavigatorWidget
      scrollFrameWidgetWidget
      navigatorWidgetMask 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.

      The removeNavigator Trait Method
      void removeNavigatorWidget
      scrollFrameWidgetWidget 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.

      RELATED

      XmScrolledWindow(3), XmNotebook(3), and XmQTnavigator(3).


      [ Previous | Next | Contents | Glossary | Home | Search ]