home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / doc / Xaw / Grip < prev    next >
Encoding:
Text File  |  1991-07-29  |  4.0 KB  |  163 lines

  1. .NH 2
  2. Grip Widget
  3. .XS
  4.     Grip Widget
  5. .XE
  6. .IN "Grip widget" "" "@DEF@"
  7. .Ds 0
  8. .TA 2.0i
  9. .ta 2.0i
  10. .sp
  11. Application header file    <X11/Xaw/Grip.h>
  12. .IN "Grip.h" ""
  13. Class header file    <X11/Xaw/GripP.h>
  14. .IN "GripP.h" ""
  15. Class    gripWidgetClass
  16. .IN "gripWidgetClass" ""
  17. Class Name    Grip
  18. .IN "Grip widget" "class name"
  19. Superclass    Simple
  20. .sp
  21. .De
  22. .LP
  23. The Grip widget provides a small rectangular region in which user input
  24. events (such as ButtonPress or ButtonRelease) may be handled.  The most
  25. common use for the Grip widget is as an attachment point for visually
  26. repositioning an object, such as the pane border in a Paned widget.
  27. .NH 3
  28. Resources
  29. .LP
  30. When creating a Grip widget instance, the following resources are
  31. retrieved from the argument list or from the resource database:
  32. .LP
  33. .IN "Grip widget" "resources"
  34. .ps 9
  35. .nr PS 9
  36. .vs 11
  37. .nr VS 11
  38. .TS H
  39. expand;
  40. lw(1i) lw(1i) lw(1i) lw(.5i) lw(2i).
  41. _
  42. .sp 3p
  43. .TB
  44. Name    Class    Type    Notes    Default Value
  45. .sp 3p
  46. _
  47. .TH
  48. .R
  49. .sp 3p
  50. accelerators    Accelerators    AcceleratorTable        NULL
  51. ancestorSensitive    AncestorSensitive    Boolean    D    True
  52. background    Background    Pixel        XtDefaultBackground
  53. backgroundPixmap    Pixmap    Pixmap        XtUnspecifiedPixmap
  54. borderColor    BorderColor    Pixel        XtDefaultForeground
  55. borderPixmap    Pixmap    Pixmap        XtUnspecifiedPixmap
  56. borderWidth    BorderWidth    Dimension        0
  57. callback    Callback    Callback        NULL
  58. colormap    Colormap    Colormap        Parent's Colormap
  59. cursor    Cursor    Cursor        None
  60. cursorName    Cursor    String        NULL
  61. depth    Depth    int    C    Parent's Depth
  62. destroyCallback    Callback    XtCallbackList        NULL
  63. foreground    Foreground    Pixel        XtDefaultForeground
  64. height    Height    Dimension        8
  65. insensitiveBorder    Insensitive    Pixmap        GreyPixmap
  66. mappedWhenManaged    MappedWhenManaged    Boolean        True
  67. pointerColor    Foreground    Pixel        XtDefaultForeground
  68. pointerColorBackground    Background    Pixel        XtDefaultBackground
  69. screen    Screen    Screen    R    Parent's Screen
  70. sensitive    Sensitive    Boolean        True
  71. translations    Translations    TranslationTable        NULL
  72. width    Width    Dimension        8
  73. x    Position    Position        0
  74. y    Position    Position        0
  75. .sp 3p
  76. _
  77. .TE
  78. .ps 11
  79. .nr PS 11
  80. .vs 13
  81. .nr VS 13
  82. .Ac
  83. .As
  84. .Bg
  85. .Gp
  86. .Bc
  87. .Bp
  88. .Bw
  89. .IP \fBcallback\fP 1.5i
  90. All routines on this list are called whenever the \fBGripAction\fP
  91. action routine is invoked.  The \fIcall_data\fP contains all
  92. information passed to the action routine.  A more thorough description
  93. is given below in the \fBGrip Actions\fP section.
  94. .Cm
  95. .Cu
  96. .Pn
  97. .Dp
  98. .Dc
  99. .IP \fBforeground\fP 1.5i
  100. A pixel value which indexes the widget's colormap to derive the color
  101. used to flood fill the entire Grip widget.
  102. .Hw
  103. .Ib
  104. .Mm
  105. .Pf
  106. .Pb
  107. .Sc
  108. .Se
  109. .Tr
  110. .Xy
  111. .NH 3
  112. Grip Actions
  113. .IN "Grip widget" "actions"
  114. .LP
  115. The Grip widget does not declare any default event translation bindings,
  116. but it does declare a single action routine named \fBGripAction\fP.  The
  117. .IN "Grip widget" "GripAction routine"
  118. client specifies an arbitrary event translation table, optionally giving
  119. parameters to the \fBGripAction\fP routine.
  120. .LP
  121. The \fBGripAction\fP routine executes the callbacks on the
  122. \fBcallback\fP list, passing as \fIcall_data\fP a pointer to a
  123. \fBXawGripCallData\fP structure, defined in the Grip widget's application
  124. header file.
  125. .LP
  126. .Ds 0
  127. .TA .5i 2.25i
  128. .ta .5i 2.25i
  129. .IN "XawGripCallData" "" "@DEF@"
  130. .IN "XawGripCallDataRec" "" "@DEF@"
  131. .sp
  132. typedef struct _XawGripCallData {
  133.     XEvent *event;
  134.     String *params;
  135.     Cardinal num_params;
  136. } XawGripCallDataRec, *XawGripCallData,
  137.   GripCallDataRec, *GripCallData; /* supported for R4 compatibility */
  138. .IN "XawGripCallDataRec" ""
  139. .IN "XawGripCallData" ""
  140. .IN "GripCallData" ""
  141. .sp
  142. .De
  143. .LP
  144. In this structure, the \fIevent\fP is a pointer to the input event that
  145. triggered the action.  \fIparams\fP and \fInum_params\fP give the string
  146. parameters specified in the translation table for the particular event
  147. binding.
  148. .IN "Grip widget" "GripAction table"
  149. .LP
  150. The following is an example of a translation table that uses the GripAction:
  151. .LP
  152. .Ds 0
  153. .TA .5i 2.5i
  154. .ta .5i 2.5i
  155. .sp
  156.     <Btn1Down>:    GripAction(press)
  157.     <Btn1Motion>:    GripAction(move)
  158.     <Btn1Up>:    GripAction(release)
  159. .sp
  160. .De
  161. For a complete description of the format of translation tables, see the
  162. \fI\*(xT\fP.
  163.