1XbaeMatrix(3x) xbae XbaeMatrix(3x)
2
3
4
6 XbaeMatrix - The Bellcore Application Environment (BAE) XbaeMatrix wid‐
7 get class.
8
10 #include <Xbae/Matrix.h>
11
13 XbaeMatrix presents an editable array of string data to the user in a
14 scrollable grid-like format similar to a spreadsheet. Non editable
15 pixmaps can also be displayed on the matrix. The rows and columns of
16 the Matrix may optionally be labeled. Also, a number of fixed leading
17 or trailing rows or columns may be specified - these behave similarly
18 to the labels. While XbaeMatrix looks and acts like a grid of XmText
19 widgets, it actually contains only one XmText. This means that XbaeMa‐
20 trix widgets with hundreds or thousands of rows have much less overhead
21 than they would if they used an XmText for each cell.
22
23 Clicking on a cell with Button1 will edit the cell. While a cell is
24 being edited, Tab and Shift-Tab will edit the cell to the right or left
25 respectively. The osfUp and osfDown keys will edit the cell above or
26 below. Ctrl-Tab and Shift-Ctrl-Tab will traverse out of the Matrix and
27 into the next or previous tab groups.
28
29 The osfCancel key will cancel any edits made to a cell. The osfActi‐
30 vate key will commit any edits made to a cell and store them in the
31 Matrix. When traversing from another tab group into the Matrix, the
32 focus will go to whichever cell is currently being edited. If no cells
33 are being edited, then the upper left most visible non-fixed cell will
34 be edited.
35
36 The column sizes may be dynamically resized by pressing the Shift-But‐
37 ton2 combination when over a column boundary, similar to the behaviour
38 of some popular spreadsheets. After a column has been resized in this
39 manner, the XbaeMatrix calls the callbacks on the XmNresizeColumnCall‐
40 back callback list for post processing.
41
42 If the Matrix is resized until it is too small to display all of the
43 cells in a given dimension, then it will display a ScrollBar for that
44 dimension. The horizontal ScrollBar will scroll the cells and column
45 labels, but not the row labels, fixed columns or trailing fixed col‐
46 umns. The vertical ScrollBar will scroll the cells and row labels, but
47 not the column labels, fixed rows or trailing fixed rows.
48
49 For the application programmer, XbaeMatrix provides callbacks to assist
50 in data validation. The callbacks on the XmNmodifyVerifyCallback call‐
51 back list are called before text is inserted into, or deleted from, a
52 cell. This callback list can be used to force user input to match a
53 certain pattern (e.g. a date format). Similarly, the XmNvalueChanged‐
54 Callback is called after text is inserted or deleted.
55
56 When a cell is edited (by clicking on it or tabbing into it), the XmN‐
57 leaveCellCallback callbacks are called for the previous cell being
58 edited, if any. The application can verify the data entered in that
59 cell and disallow editing of the new cell if the data is invalid. If
60 the data was valid, then the XmNenterCellCallback callbacks for the new
61 cell are called. These callbacks can be used to specify the editabil‐
62 ity of the new cell.
63
64 The XmNtraverseCellCallback callbacks are also called when the user
65 attempts to edit a new cell and when the matrix gains or looses focus.
66 This allows the application to override the default traversal behavior
67 of XbaeMatrix.
68
69 The XmNdefaultActionCallback is provided to allow a double click action
70 in a cell to perform some function.
71
72 Motif's Drag and Drop functionality can be achieved via the XmNprocess‐
73 DragCallback.
74
75 For large amounts of data, the overhead of assigning data to the widget
76 can be avoided using the XmNdrawCellCallback. This callback also
77 allows user defined pixmaps to be placed in a certain cell. When using
78 this callback, data for string fields can be written back to the appli‐
79 cation by using the XmNwriteCellCallback.
80
82 XbaeMatrix inherits behavior and resources from the Core, Composite,
83 Constraint, and XmManager widget classes.
84 The class pointer is xbaeMatrixWidgetClass.
85 The class name is XbaeMatrix.
86
88 The following table lists the new resources defined by XbaeMatrix. The
89 codes in the ``Access'' column indicate whether the given resource can
90 be set at creation time (C), or set by using XtSetValues (S), or
91 retrieved by using XtGetValues (G).
92
93
94 ┌────────────────────────────────────────────────────────────────────────────────────┐
95 │ XbaeMatrix Resource Set │
96 ├────────────────────────┬─────────────────────┬───────────────┬───────────────┬─────┤
97 │Name │Class │Type │Default │Access│
98 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
99 │XmNallowColumnResize │XmCAllowResize │Boolean │True │CSG │
100 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
101 │XmNallowRowResize │XmCAllowResize │Boolean │True │CSG │
102 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
103 │XmNaltRowCount │XmCAltRowCount │int │1 │CSG │
104 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
105 │XmNboldLabels │XmCBoldLabels │Boolean │False │CSG │
106 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
107 │XmNbuttonLabels │XmCButtonLabels │Boolean │False │CSG │
108 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
109 │XmNbuttonLabelBackground │XmCColor │Pixel │dynamic │CSG │
110 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
111 │XmNcalcCursorPosition │XmCCalcCursorPosition │Boolean │False │CSG │
112 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
113 │XmNcellBackgrounds │XmCColors │PixelTable │NULL │CSG │
114 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
115 │XmNcellHighlightThickness│XmCHighlightThickness │Dimension │dynamic │CSG │
116 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
117 │XmNcellMarginHeight │XmCMarginHeight │Dimension │dynamic │CSG │
118 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
119 │XmNcellMarginWidth │XmCMarginWidth │Dimension │dynamic │CSG │
120 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
121 │XmNcellShadowThickness │XmCShadowThickness │Dimension │2 │CSG │
122 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
123 │XmNcellShadowType │XmCShadowType │unsigned char │XmSHADOW_OUT │CSG │
124 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
125 │XmNcellShadowTypes │XmCCellShadowTypes │unsigned char **│NULL │CSG │
126 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
127 │XmNcellUserData │XmCCellUserData │XtPointer ** │NULL │CSG │
128 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
129 │XmNclipWindow │XmCClipWindow │Widget │NULL │G │
130 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
131 │XmNcells │XmCCells │CellTable │NULL │CSG │
132 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
133 │XmNcolors │XmCColors │PixelTable │NULL │CSG │
134 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
135 │XmNcolumnAlignments │XmCAlignments │AlignmentArray │dynamic │CSG │
136 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
137 │XmNcolumnButtonLabels │XmCButtonLabels │BooleanArray │NULL │CSG │
138 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
139 │XmNcolumnLabelAlignments │XmCAlignments │AlignmentArray │dynamic │CSG │
140 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
141 │XmNcolumnLabelColor │XmCColor │Pixel │dynamic │CSG │
142 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
143 │XmNcolumnLabels │XmCLabels │StringArray │NULL │CSG │
144 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
145 │XmNcolumnMaxLengths │XmCColumnMaxLengths │MaxLengthArray │NULL │CSG │
146 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
147 │XmNcolumnShadowTypes │XmCShadowTypes │unsigned char * │NULL │CSG │
148 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
149 │XmNcolumnUserData │XmCUserDatas │XtPointer * │NULL │CSG │
150 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
151 │XmNcolumnWidthInPixels │XmCColumnWidthInPixels│Boolean │False │CSG │
152 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
153 │XmNcolumnWidths │XmCColumnWidths │WidthArray │NULL │CSG │
154 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
155 │XmNcolumns │XmCColumns │int │0 │CSG │
156 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
157 │XmNdefaultActionCallback │XmCCallback │XtCallbackList │NULL │CSG │
158 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
159 │XmNdoubleClickInterval │XmCDoubleClickInterval│int │dynamic │CSG │
160 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
161 │XmNdrawCellCallback │XmCCallback │Callback │NULL │CSG │
162 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
163 │XmNenterCellCallback │XmCCallback │Callback │NULL │CSG │
164 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
165 │XmNevenRowBackground │XmCBackground │Pixel │dynamic │CSG │
166 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
167 │XmNfill │XmCFill │Boolean │False │CSG │
168 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
169 │XmNhorzFill │XmCHorzFill │Boolean │False │CSG │
170 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
171 │XmNvertFill │XmCVertFill │Boolean │False │CSG │
172 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
173 │XmNfixedColumns │XmCFixedColumns │Dimension │0 │CSG │
174 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
175 │XmNfixedRows │XmCFixedRows │Dimension │0 │CSG │
176 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
177 │XmNfontList │XmCFontList │FontList │fixed │CSG │
178 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
179 │XmNgridLineColor │XmCColor │Pixel │dynamic │CSG │
180 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
181 │XmNgridType │XmCGridType │GridType │XmGRID_CELL_LINE│CSG │
182 ├────────────────────────┼─────────────────────┼───────────────┼───────────────┼─────┤
183 └────────────────────────┴─────────────────────┴───────────────┴───────────────┴─────┘
184 ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────┐
185 │ XbaeMatrix Resource Set (continued) │
186 ├──────────────────────────────────┬──────────────────────────────┬───────────────┬──────────────────┬─────┤
187 │Name │Class │Type │Default │Access│
188 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
189 │XmNhighlightedCells │XmCHighlightedCells │HighlightTable *│dynamic │CSG │
190 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
191 │XmNhorizontalScrollBar │XmCHorizontalScrollBar │Widget │NULL │G │
192 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
193 │XmNhorizontalScrollBarDisplayPolicy│XmCMatrixScrollBarDisplayPolicy│unsigned char │XmDISPLAY_AS_NEEDED│CSG │
194 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
195 │XmNlabelActivateCallback │XmCCallback │Callback │NULL │CSG │
196 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
197 │XmNlabelFont │XmCFontList │FontList │dynamic │CSG │
198 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
199 │XmNleaveCellCallback │XmCCallback │Callback │NULL │CSG │
200 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
201 │XmNleftColumn │XmCLeftColumn │int │0 │CSG │
202 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
203 │XmNmodifyVerifyCallback │XmCCallback │Callback │NULL │CSG │
204 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
205 │XmNmultiLineCell │XmCMultiLineCell │Boolean │False │CSG │
206 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
207 │XmNnonFixedDetachedLeft │XmCNonFixedDetachedLeft │Boolean │False │CSG │
208 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
209 │XmNnonFixedDetachedTop │XmCNonFixedDetachedTop │Boolean │False │CSG │
210 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
211 │XmNoddRowBackground │XmCBackground │Pixel │dynamic │CSG │
212 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
213 │XmNprocessDragCallback │XmCCallback │Callback │NULL │CSG │
214 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
215 │XmNrenderTable │XmCRenderTable │RenderTable │NULL │CSG │
216 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
217 │XmNresizeCallback │XmCCallback │Callback │NULL │CSG │
218 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
219 │XmNresizeColumnCallback │XmCCallback │Callback │NULL │CSG │
220 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
221 │XmNreverseSelect │XmCReverseSelect │Boolean │False │CSG │
222 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
223 │XmNrowButtonLabels │XmCButtonLabels │BooleanArray │NULL │CSG │
224 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
225 │XmNrowHeightInPixels │XmCRowHeightInPixels │Boolean │True │CSG │
226 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
227 │XmNrowHeights │XmCColumnWidths │WidthArray │NULL │CSG │
228 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
229 │XmNrowLabelAlignment │XmCAlignment │Alignment │XmALIGNMENT_END │CSG │
230 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
231 │XmNrowLabelColor │XmCColor │Pixel │dynamic │CSG │
232 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
233 │XmNrowLabelWidth │XmCRowLabelWidth │Short │dynamic │CSG │
234 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
235 │XmNrowLabels │XmCLabels │StringArray │NULL │CSG │
236 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
237 │XmNrowShadowTypes │XmCShadowTypes │unsigned char * │NULL │CSG │
238 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
239 │XmNrowUserData │XmCUserDatas │XtPointer * │NULL │CSG │
240 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
241 │XmNrows │XmCRows │int │0 │CSG │
242 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
243 │XmNscrollBarPlacement │XmCScrollBarPlacement │unsigned char │XmBOTTOM_RIGHT │CSG │
244 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
245 │XmNselectCellCallback │XmCCallback │Callback │NULL │CSG │
246 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
247 │XmNselectScrollVisible │XmCSelectScrollVisible │Boolean │True │CSG │
248 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
249 │XmNselectedBackground │XmCColor │Pixel │dynamic │CSG │
250 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
251 │XmNselectedCells │XmCSelectedCells │BooleanTable │dynamic │CSG │
252 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
253 │XmNselectedForeground │XmCColor │Pixel │dynamic │CSG │
254 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
255 │XmNshadowType │XmCShadowType │unsigned char │XmSHADOW_IN │CSG │
256 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
257 │XmNshowArrows │XmCShowArrows │Boolean │False │CSG │
258 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
259 │XmNspace │XmCSpace │Dimension │dynamic │CSG │
260 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
261 │XmNtextBackground │XmCBackground │Pixel │XmUNSPECIFIED_PIXEL│CSG │
262 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
263 │XmNtextBackgroundIsCell │XmCTextBackgroundIsCell │Boolean │False │CSG │
264 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
265 │XmNtextField │XmCTextField │Widget │NULL │G │
266 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
267 │XmNtextShadowThickness │XmCTextShadowThickness │Dimension │0 │CSG │
268 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
269 │XmNtextTranslations │XmCTranslations │TranslationTable│dynamic │CSG │
270 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
271 │XmNtopRow │XmCTopRow │int │0 │CSG │
272 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
273 │XmNtrackcellCallback │XmCCallback │Callback │NULL │CSG │
274 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
275 │XmNtrailingAttachedBottom │XmCTrailingAttachedBottom │Boolean │False │CSG │
276 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
277 │XmNtrailingAttachedRight │XmCTrailingAttachedRight │Boolean │False │CSG │
278 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
279 │XmNtrailingFixedColumns │XmCTrailingFixedColumns │Dimension │0 │CSG │
280 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
281 │XmNtrailingFixedRows │XmCTrailingFixedRows │Dimension │0 │CSG │
282 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
283 │XmNtraverseCellCallback │XmCCallback │Callback │NULL │CSG │
284 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
285 │XmNtraverseFixedCells │XmCTraverseFixedCells │Boolean │False │CSG │
286 ├──────────────────────────────────┼──────────────────────────────┼───────────────┼──────────────────┼─────┤
287 └──────────────────────────────────┴──────────────────────────────┴───────────────┴──────────────────┴─────┘
288 ┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
289 │ XbaeMatrix Resource Set (continued) │
290 ├────────────────────────────────┬──────────────────────────────┬────────────┬──────────────────┬─────┤
291 │Name │Class │Type │Default │Access│
292 ├────────────────────────────────┼──────────────────────────────┼────────────┼──────────────────┼─────┤
293 │XmNuseXbaeInput │XmCUseXbaeInput │Boolean │False │CSG │
294 ├────────────────────────────────┼──────────────────────────────┼────────────┼──────────────────┼─────┤
295 │XmNvalueChangedCallback │XmCCallback │Callback │NULL │CSG │
296 ├────────────────────────────────┼──────────────────────────────┼────────────┼──────────────────┼─────┤
297 │XmNverticalScrollBar │XmCVerticalScrollBar │Widget │NULL │G │
298 ├────────────────────────────────┼──────────────────────────────┼────────────┼──────────────────┼─────┤
299 │XmNverticalScrollBarDisplayPolicy│XmCMatrixScrollBarDisplayPolicy│unsigned char│XmDISPLAY_AS_NEEDED│CSG │
300 ├────────────────────────────────┼──────────────────────────────┼────────────┼──────────────────┼─────┤
301 │XmNvisibleColumns │XmCVisibleColumns │Dimension │0 │CSG │
302 ├────────────────────────────────┼──────────────────────────────┼────────────┼──────────────────┼─────┤
303 │XmNvisibleRows │XmCVisibleRows │Dimension │0 │CSG │
304 ├────────────────────────────────┼──────────────────────────────┼────────────┼──────────────────┼─────┤
305 │XmNwrapType │XmCWrapType │Boolean │XbaeWrapNone │CSG │
306 ├────────────────────────────────┼──────────────────────────────┼────────────┼──────────────────┼─────┤
307 │XmNwriteCellCallback │XmCCallback │Callback │NULL │CSG │
308 ├────────────────────────────────┼──────────────────────────────┼────────────┼──────────────────┼─────┤
309 │XmNxmColumnLabels │XmCXmLabels │XmString * │NULL │CSG │
310 ├────────────────────────────────┼──────────────────────────────┼────────────┼──────────────────┼─────┤
311 │XmNxmRowLabels │XmCXmLabels │XmString * │NULL │CSG │
312 ├────────────────────────────────┼──────────────────────────────┼────────────┼──────────────────┼─────┤
313 └────────────────────────────────┴──────────────────────────────┴────────────┴──────────────────┴─────┘
314 This resource cannot be specified in a resource file
315
316 XmNallowColumnResize
317 If True, allows the columns to be dynamically resized via the
318 ResizeColumns() action. The default value is to allow column
319 resizing.
320
321 XmNallowRowResize
322 If True, allows the rows to be dynamically resized via the Resize‐
323 Rows() action. The default value is to allow row resizing.
324
325 XmNaltRowCount
326 Specifies the number of rows to use for each of the XmNevenRow‐
327 Background and XmNoddRowBackround colors. This resource is ignored
328 if XmNevenRowBackground and XmNoddRowBackround are not used.
329
330 XmNboldLabels
331 Overstrikes the row and column labels to create a bold font
332 appearance when True.
333
334 XmNbuttonLabels
335 When set to True, the labels will be drawn with a shadow around
336 them similar to an XmPushButton widget. A ButtonPress event gener‐
337 ated on the labels, when XmNbuttonLabels is True will cause the
338 label to reverse the shadow and take on a pushed in appearance. A
339 ButtonRelease event on the same label will invoke callbacks on the
340 XmNlabelActivateCallback, list. The default value is False.
341
342 XmNbuttonLabelBackground
343 Specifies a Pixel value in which to draw the XmNbuttonLabels.
344
345 XmNcalcCursorPosition
346 If set to True, the insertion position on the text field is calcu‐
347 lated with respect to where the pointer was clicked in the cell.
348 The default value is False. The insertion position will be over‐
349 ridden if the position member of the XbaeEnterCellCallbackStruct
350 is set to a valid position.
351
352 XmNcellBackgrounds
353 Points to an array of pointers to rows. Each row is an array of
354 Pixel values, one for each column in that row. This data structure
355 is the same as that for XmNcells, except each entry is a Pixel
356 instead of a String. The background of a cell will be drawn in
357 the color specified for that cell. If XmNcellBackgrounds is NULL,
358 backgrounds will be drawn using the color specified by XmNback‐
359 ground. This resource is copied. XmNcellBackgrounds may be spec‐
360 ified in a resource file but due to the two dimensional nature of
361 the XbaeMatrix widget, it must be done by terminating each line
362 with a \n character. If the XbaeMatrix widget had XmNrows set to
363 5 and XmNcolumns set to 5, XmNcellBackgrounds would be specified
364 as:
365
366
367
368 *mw.cellBackgrounds: blue, white, blue, white, blue\n\
369 white, blue, white, blue, white\n\
370 blue, white, blue, white, blue\n\
371 white, blue, white, blue, white\n\
372 blue, white, blue, white, blue\n
373 Care must be taken when specifying these values in a resource
374 file as an incorrect format can produce undesirable results.
375
376 XmNcellHighlightThickness
377 Specifies the XmNhighlightThickness resource of the XmText cell
378 edit widget. This resource is also used to compute the size of
379 each cell. See the description of XmNhighlightThickness in
380 XmText(3X).
381
382 XmNcellMarginHeight
383 Specifies the XmNmarginHeight resource of the XmText widget. This
384 resource is also used to compute the size of each cell. See the
385 description of XmNmarginHeight in XmText(3X).
386
387 XmNcellMarginWidth
388 Specifies the XmNmarginWidth resource of the XmText cell edit wid‐
389 get. This resource is also used to compute the size of each cell.
390 See the description of XmNmarginWidth in XmText(3X).
391
392 XmNcellShadowThickness
393 Specifies the XmNshadowThickness resource of the XmText cell edit
394 widget. This resource is also used to compute the size of each
395 cell. See the description of XmNshadowThickness in XmText(3X).
396
397 XmNcellShadowType
398 Specifies the type of shadow drawn around each cell. Possible
399 values for this resource are XmSHADOW_OUT, XmSHADOW_IN,
400 XmSHADOW_ETCHED_OUT, and XmSHADOW_ETCHED_IN. The default shadow
401 type is XmSHADOW_OUT.
402
403 XmNcellShadowTypes
404 Specifies on a per cell basis, the XmNcellShadowType. Values for
405 the resource are the same as for XmNcellShadowType. This resource
406 is copied.
407
408 XmNcellUserData
409 Points to an array of pointers to individual user defined data
410 areas associated with each cell. The data should be set using
411 XbaeMatrixSetCellUserData() and retrieved using XbaeMatrixGetCel‐
412 lUserData(). This resource cannot be specified in a resource file
413 and is copied.
414
415 XmNcells
416 Points to an array of pointers to rows. Each row is an array of
417 String, one for each column in that row. For example, the cells
418 for a 2x3 Matrix could be set up as follows:
419
420
421
422 String rows[2][3] =
423 {
424 "00", "01", "02",
425 "10", "11", "12"
426 };
427
428 String *cells[2];
429 cells[0] = &rows[0][0];
430 cells[1] = &rows[1][0];
431
432
433 Now cells could be used as the XmNcells resource. If XmNcells is
434 NULL, XbaeMatrix will not generate an internal table of empty
435 Strings. This implies that if XmNcells is NULL, no cells have been
436 set. This resource is copied. See the discussion in XmNcellBack‐
437 grounds for how to specify XmNcells in a resource file.
438
439 XmNclipWindow
440 The widget ID of the clip window. The clip window is the widget
441 that contains the non-fixed region of cells. This resource can not
442 be set to a new value.
443
444 XmNcolors
445 Points to an array of pointers to rows. Each row is an array of
446 Pixel values, one for each column in that row. This data structure
447 is the same as that for XmNcells, except each entry is a Pixel
448 instead of a String. The text in a cell will be drawn in the
449 color specified for that cell. If XmNcolors is NULL, text will be
450 drawn using the color specified by XmNforeground. This resource
451 is copied. See the discussion in XmNcellBackgrounds for how to
452 specify XmNcolors in a resource file.
453
454 XmNcolumnAlignments
455 Points to an array of alignments (unsigned char), one for each
456 column. Each element can be one of XmALIGNMENT_BEGINNING, XmA‐
457 LIGNMENT_CENTER or XmALIGNMENT_END. This specifies the alignment
458 of the text or pixmap in each cell of that column. See the
459 description of XmNalignment for XmLabel(3X). If XmNcolumnAlign‐
460 ments is NULL, each column will default to XmALIGNMENT_BEGINNING.
461 This resource is copied.
462
463 XmNcolumnButtonLabels
464 An array of Booleans that tells the XbaeMatrix which column labels
465 should be drawn as a button. Each Boolean can be specified as a
466 Boolean string or integer. In order to use this resource, XmNbut‐
467 tonLabels should be set to False.
468
469 XmNcolumnLabelAlignments
470 Points to an array of alignments (unsigned char), one for each
471 column label. Each element can be one of XmALIGNMENT_BEGINNING,
472 XmALIGNMENT_CENTER or XmALIGNMENT_END. This specifies the align‐
473 ment of the text of each column label. See the description of
474 XmNalignment for XmLabel(3X). If XmNcolumnLabelAlignments is
475 NULL, each column label will default to XmALIGNMENT_BEGINNING.
476 This resource is copied.
477
478 XmNcolumnLabelColor
479 Specifies a Pixel value in which to draw the XmNcolumnLabels.
480
481 XmNcolumnLabels
482 Points to an array of Strings to be drawn above each column. Each
483 String may have embedded newline characters, in which case the
484 label will be drawn on multiple lines. If there is a XmNxmColumn‐
485 Labels defined for this coluumn it will be displayed in place of
486 the XmNcolumnLabels. If XmNcolumnLabels and XmNxmColumnLabels are
487 NULL, no labels will be drawn. This resource is copied.
488
489 XmNcolumnMaxLengths
490 Points to an array of int, one for each column. These specify the
491 maximum length of a String which can be entered in the cells in
492 that column. See the description of the XmText(3X) XmNmaxLength
493 resource. If XmNcolumnMaxLengths is NULL or an element of the
494 array is equal to 0, then the corresponding width from XmNcolumn‐
495 Widths is used. This resource is copied.
496
497 XmNcolumnShadowTypes
498 Specifies on a per column basis, the XmNcellShadowType. Values
499 for the resource are the same as for XmNcellShadowType. This
500 resource is copied.
501
502 XmNcolumnUserData
503 Points to a user defined data area associated with a particular
504 column. The data should be set using XbaeMatrixSetColumnUser‐
505 Data() and retrieved using XbaeMatrixGetColumnUserData(). This
506 resource cannot be specified in a resource file.
507
508 XmNcolumnWidthInPixels
509 Specifies wether the elements of XmNcolumnWidths are measured in
510 pixels or characters.
511
512 XmNcolumnWidths
513 Points to an array of short, one for each column. These specify
514 the visible width of the cells in each column. See the description
515 of the XmText(3X) XmNcolumns resource. This resource is copied.
516
517 XmNcolumns
518 Specifies the total number of columns of cells. XmNcolumns must
519 be at least one. If the number of columns is changed via XtSetVal‐
520 ues, then XmNcolumnMaxLengths must change or be NULL, XmNcolumnLa‐
521 bels must change or be NULL, XmNcolumnAlignments must change or be
522 NULL and XmNcolumnLabelAlignments must change or be NULL. The
523 preferred way to dynamically change the number of columns is to
524 use XbaeMatrixAddColumns() or XbaeMatrixDeleteColumns().
525
526 XmNdefaultActionCallback
527 Specifies a list of callbacks to be called when a double click
528 occurs in a cell. A pointer to an XbaeMatrixDefaultActionCall‐
529 backStruct is passed to the callbacks. Events are reported to the
530 cell in which the double click occurs regardless of whether or not
531 a callback exists. This callback is called by the DefaultAction()
532 action and is NULL by default. The XmNdefaultActionCallback is
533 ideal for popping up a dialog or other window when a double click
534 occurs.
535
536 XmNdoubleClickInterval
537 Specifies the amount of time between mouse clicks before it is
538 considered a double click. A double click is defined to be the
539 time between the realease of the mouse button and subsequent press
540 in the same cell. The default value is inherited from the dis‐
541 play.
542
543 XmNdrawCellCallback
544 Specifies a list of callbacks to be called when a cell needs to be
545 drawn. A pointer to an XbaeMatrixDrawCellCallbackStruct is passed
546 to the callbacks. The application can specify what to put in a
547 cell by modifying the callback struct's data fields. When the
548 application callback returns to the widget code, the type field
549 will determine what the widget draws on the screen. If the value
550 is XbaeString, then the regular string drawing function for the
551 widget will be called with the value the applicaton assigned to
552 the string field in the struct. If the value is XbaeStringFree the
553 widget also calls XtFree on the string when it is not needed any‐
554 more. Else, if the value is XbaePixmap, the widget will do an
555 XCopyPlane(), in the case of a single plane bitmap, or XCopy‐
556 Area(), in the case of a color pixmap. The width and height of
557 cell is passed in the struct so the application can know how big
558 to make the pixmap. In no case will a copy of the string or the
559 pixmap value be made. The widget also uses the XmNcolumnAlignments
560 resource to determine the horizontal alignment of the Pixmap. To
561 have an editable array of data when the XmNdrawCellCallback is
562 used and the cell is of type XbaeString or XbaeStringFree, use the
563 XmNwriteCellCallback.
564
565 XmNenterCellCallback
566 Specifies a list of callbacks to be called immediately before a
567 cell is to be edited. This callback list is called by the Edit‐
568 Cell() action. A pointer to an XbaeMatrixEnterCellCallbackStruct
569 is passed to the callbacks. The application can specify the
570 editability of specific cells using this callback list as well as
571 specifying configuration options for the XmText.
572
573 XmNevenRowBackground
574 Specifies a background cell Pixel value to use on even rows. This
575 allows the matrix to look like computer paper. For wider bands of
576 color, increase the size of XmNaltRowCount.
577
578 XmNfill
579 If True, controls whether the matrix should fill all of its avail‐
580 able space when additional space if available, or if it should
581 simply size itself as large as necessary, regardless of any addi‐
582 tonal available space.
583
584 XmNhorzFill
585 If True, controls whether the matrix should highlight available
586 space on the right of the selected cell(s) when the selected
587 cell(s) are in the last column of the matrix.
588
589 XmNvertFill
590 If True, controls whether the matrix should highlight available
591 space below the selected cell(s) when the selected cell(s) are in
592 the last row of the Matrix.
593
594 XmNfixedColumns
595 Specifies the number of leading columns (starting from the left
596 column) which should not be horizontally scrollable. XmNfixed‐
597 Columns must be less than XmNcolumns-XmNtrailingFixedColumns.
598 Cells in fixed columns are not editable unless XmNtraverseFixed‐
599 Cells is set to True.
600
601 XmNfixedRows
602 Specifies the number of leading rows (starting from the top row)
603 which should not be vertically scrollable. XmNfixedRows must be
604 less than XmNrows-XmNtrailingFixedRows. Cells in fixed rows are
605 not editable unless XmNtraverseFixedCells is set to True.
606
607 XmNfontList
608 If the value of XmNrenderTable is NULL this resource specifies the
609 font list to be used for the text displayed in the cells and the
610 XmText cell edit widget. See XmFontListCreate(3X) to create a font
611 list. This resource is copied. The preferred way of specifying a
612 font for the table is in a resource file.
613
614 When drawing a cell, the matrix uses the first entry with the tag
615 XmFONTLIST_DEFAULT_TAG if no tag has been set on the cell using
616 XbaeMatrixSetCellTag. If a tag has been set on the cell the first
617 entry with a matching tag is used.
618
619 XmNgridLineColor
620 Specifies the color in which the grid line should be drawn if XmN‐
621 gridType is set to XmGRID_CELL_LINE, XmGRID_ROW_LINE or
622 XmGRID_COLUMN_LINE. The default is that of XmNforeground.
623
624 XmNgridType
625 Sets the way the matrix grid is drawn. The grid types available
626 include XmGRID_NONE, XmGRID_CELL_LINE, XmGRID_CELL_SHADOW,
627 XmGRID_ROW_LINE, XmGRID_ROW_SHADOW, XmGRID_COLUMN_LINE and
628 XmGRID_COLUMN_SHADOW. All of the grid types vary the way the
629 shadow or line is drawn around the cell. XmGRID_ROW_LINE,
630 XmGRID_ROW_SHADOW, XmGRID_COLUMN_LINE, and XmGRID_COLUMN_SHADOW
631 only draw a border around the rows and columns, giving a more tab‐
632 ular rather than spreadsheet appearance. The default is
633 XmGRID_CELL_LINE which draws a solid line around the cells.
634
635 XmNhighlightedCells
636 Points to an array of pointers to rows. Each row is an array of
637 unsigned char values, one for each column in that row. This data
638 structure is the same as that for XmNcells, except each entry is
639 an unsigned char instead of a String. Each entry in the array will
640 have a value that is either HighlightNone, HighlightCell, High‐
641 lightRow, HighlightColumn, HighlightOther or the bitwise OR of
642 those values, depending on the value of XmNgridType and which call
643 was used to highlight the cell. A cell will be drawn as high‐
644 lighted if the corresponding unsigned char does not have the value
645 HighlightNone. If XmNhighlightedCells is NULL, XbaeMatrix then no
646 cells have been highlighted. This resource is copied, and cannot
647 be specified in a resource file.
648
649 XmNhorizontalScrollBar
650 The widget ID of the horizontal XmScrollBar. This resource exists
651 only for those applications that need to tie another scrollbar to
652 the matrix's for synchronized scrolling. This resource can not be
653 set to a new value.
654
655 XmNhorizontalScrollBarDisplayPolicy
656 Determines when to display a horizontal scrollbar in the matrix.
657 Possible values are XmDISPLAY_NONE, which makes the matrix never
658 display the scrollbar, XmDISPLAY_AS_NEEDED, which makes the matrix
659 display the scrollbar when the list is too large, and XmDIS‐
660 PLAY_STATIC, which makes the matrix always display the scrollbar.
661
662 XmNlabelFont
663 If the value of XmNrenderTable is NULL this resource specifies the
664 font list to be used for the text displayed in row and column
665 labels. If XmNlabelFont is not specified, the value of XmNfontList
666 is used for the label fonts. See XmFontListCreate(3X) to create a
667 font list. This resource is copied. The preferred way of specify‐
668 ing a font for the labels is in a resource file.
669
670 When drawing a label, the matrix uses the first entry with the tag
671 XmFONTLIST_DEFAULT_TAG.
672
673
674 XmNlabelActivateCallback
675 Specifies a list of callbacks to be called after a button label
676 has been pressed. A pointer to an XbaeMatrixLabelActivateCall‐
677 backStruct is passed to the callbacks on this list.
678
679 XmNleaveCellCallback
680 Specifies a list of callbacks to be called immediately after a
681 cell has been edited. This callback list is called by the Edit‐
682 Cell() and CommitEdit() actions. A pointer to an XbaeMatrixLeave‐
683 CellCallbackStruct is passed to the callbacks. The application can
684 perform cell specific data checks using this callback list.
685
686 XmNleftColumn
687 Allows the programmer to specify the first non fixed column to
688 appear on the leftmost side of the matrix. This resource compli‐
689 ments the XmNtopRow resource. See the discussion of XmNtopRow for
690 more details.
691
692 XmNmodifyVerifyCallback
693 Specifies a list of callbacks to be called before text is deleted
694 from or inserted into the XmText cell edit widget. A pointer to an
695 XbaeMatrixModifyVerifyCallbackStruct is passed to the callbacks.
696 See the description of the XmText(3X) XmNmodifyVerifyCallback
697 resource.
698
699 XmNmultiLineCell
700 is a boolean (default False) which specifies whether the matrix
701 displays more than one line of text in a cell, when appropriate.
702
703 XmNnonFixedDetachedLeft
704 Indicated that empty space should be displayed after the fixed
705 rows. This resource only has effect when XmNfill is true and XmN‐
706 fixedRows is greater than zero.
707
708 XmNnonFixedDetachedTop
709 Indicated that empty space should be displayed after the fixed
710 columns. This resource only has effect when XmNfill is true and
711 XmNfixedColumns is greater than zero.
712
713 XmNoddRowBackground
714 Specifies a background cell color to use on odd rows. This allows
715 the matrix to look like computer paper. For wider bands of color,
716 increase the size of XmNaltRowCount.
717
718 XmNprocessDragCallback
719 Specifies a list of callbacks to be called from the ProcessDrag()
720 action A pointer to an XbaeMatrixProcessDragCallbackStruct will be
721 passed to the callbacks. The application can use this callback
722 list to perform particular processing during a drag.
723
724 XmNrenderTable
725 Specifies the render table used to derive a font set or a font to
726 draw the text displayed in the cells, the XmText cell edit widget
727 and the labels.
728
729 When drawing a cell, the matrix uses the first entry with the tag
730 _MOTIF_DEFAULT_LOCALE if no tag has been set on the cell using
731 XbaeMatrixSetCellTag. If a tag has been set on the cell the first
732 entry with a matching tag is used.
733
734 When drawing a label, the matrix uses the first entry with the tag
735 "labels". If there is no such entry the first entry with the tag
736 _MOTIF_DEFAULT_LOCALE is used.
737
738
739 XmNresizeCallback
740 Specifies a list of callbacks to be called when the matrix is
741 resized.
742
743 XmNresizeColumnCallback
744 Specifies a list of callbacks to be called when a column is dynam‐
745 ically resized by the user.
746
747 XmNreverseSelect
748 Overrides the default XmNselectedForeground and XmNselectedBack‐
749 ground and draws a selected cell in the colours specified by XmN‐
750 cellBackgrounds and XmNcolors for the particular cell. If these
751 values are not set then the default colours will be used.
752
753 XmNrowButtonLabels
754 An array of Booleans that tells the XbaeMatrix which row labels
755 should be drawn as a button. Each Boolean can be specified as a
756 Boolean string or integer. In order to use this resource, XmNbut‐
757 tonLabels should be set to False.
758
759 XmNrowLabelAlignment
760 Specifies the alignment of the row labels. It can be one of XmA‐
761 LIGNMENT_BEGINNING, XmALIGNMENT_CENTER or XmALIGNMENT_END. See
762 the description of XmNalignment for XmLabel(3X). XmNrowLa‐
763 belAlignment defaults to XmALIGNMENT_END.
764
765 XmNrowLabelColor
766 Specifies a Pixel value in which to draw the XmNrowLabels.
767
768 XmNrowLabelWidth
769 Specifies the width of the row labels. XmNrowLabelWidth defaults
770 to the width of the longest row label.
771
772 XmNrowLabels
773 Points to an array of Strings to be drawn to the left of each row.
774 Each String may have embedded newline characters, in which case
775 the label will be drawn on multiple lines. If there is a XmNxm‐
776 RowLabels defined for this row it will be displayed in place of
777 the XmNrowLabels. If XmNrowLabels and XmNxmRowLabels are NULL, no
778 labels will be drawn. This resource is copied.
779
780 XmNrowHeightInPixels
781 Specifies wether the elements of XmNrowHeights are measured in
782 pixels or lines.
783
784 XmNrowHeights
785 Points to an array of short, one for each row. These specify the
786 visible height of the cells in each row. This resource is copied.
787
788 XmNrowShadowTypes
789 Specifies on a per row basis, the XmNcellShadowType. Values for
790 the resource are the same as for XmNcellShadowType. This resource
791 is copied.
792
793 XmNrowUserData
794 Points to a user defined data area associated with a particular
795 row. The data should be set using XbaeMatrixSetRowUserData() and
796 retrieved using XbaeMatrixGetRowUserData(). This resource cannot
797 be specified in a resource file.
798
799 XmNrows
800 Specifies the total number of rows of cells. XmNrows must be at
801 least one. If the number of rows is changed via XtSetValues, then
802 XmNrowLabels must change or be NULL. The preferred way to dynami‐
803 cally change the number of rows is to use XbaeMatrixAddRows() or
804 XbaeMatrixDeleteRows().
805
806 XmNscrollBarPlacement
807 Determines where the scrollbars will be drawn. See the discussion
808 of XmNscrollBarPlacement in XmScrolledWindow(3) for a complete
809 discussion on this resource.
810
811 XmNselectCellCallback
812 Specifies a list of callbacks to be called from the SelectCell()
813 action. A pointer to an XbaeMatrixSelectCellCallbackStruct will
814 be passed to the callbacks. The application can use this callback
815 list to perform selection/deselection of cells using the provided
816 widget methods.
817
818 XmNselectScrollVisible
819 Specifies whether the matrix will scroll to make the selected cell
820 visible. This flag is only checked when cells are selected pro‐
821 grammatically, as when the user selects a cell with the mouse, it
822 will already be visible.
823
824 XmNselectedBackground
825 Allows the background of selected cells in XmNselectedCells to be
826 specified.
827
828 XmNselectedCells
829 Points to an array of pointers to rows. Each row is an array of
830 Boolean values, one for each column in that row. This data struc‐
831 ture is the same as that for XmNcells, except each entry is a
832 Boolean instead of a String. A cell will be drawn as selected if
833 the corresponding Boolean is True. If XmNselectedCells is NULL,
834 then no cells have been selected. This resource is copied. It
835 cannot be specified in a resource file.
836
837 XmNselectedForeground
838 Allows the foreground of selected cells in XmNselectedCells to be
839 specified.
840
841 XmNshadowType
842 Specifies the type of shadow drawn around the border of the
843 matrix. Possible values for this resource are XmSHADOW_OUT,
844 XmSHADOW_IN, XmSHADOW_ETCHED_OUT, and XmSHADOW_ETCHED_IN. The
845 default shadow type is XmSHADOW_OUT.
846
847 XmNshowArrows
848 Specifies whether arrows should be drawn when data in a cell has
849 been obscured due to the value of XmNcolumnWidths.
850
851 XmNspace
852 Specifies the distance that separates the ScrollBars from the cell
853 grid. The default value is 4 pixels.
854
855 XmNtextBackground
856 Specifies the background of the XmText cell edit widget. This can
857 be used to make the XmText stand out against a uniformly colored
858 matrix.
859
860 XmNtextBackgroundIsCell
861 Specifies if the background of the XmText cell edit widget
862 defaults to the core background of the matrix or the background of
863 the cell being edited when XmNtextBackground has the value XmUN‐
864 SPECIFIED_PIXEL.
865
866 XmNtextField
867 The widget ID of the XmText. This resource cannot be set to a new
868 value.
869
870 XmNtextShadowThickness
871 Specifies the XmNshadowThickness of the XmText. Interesting
872 effects can be achieved by setting the XmNcellHighlightThickness
873 to 0 and replacing the highlight with an indented shadow.
874
875 XmNtextTranslations
876 Specifies the XmNtranslations resource of the XmText cell edit
877 widget. See the description of XmNtranslations in XmText(3X).
878
879 XmNtopRow
880 Specifies the row which should be displayed at the top of the non-
881 fixed rows. XmNtopRow is specified relative to the first non-
882 fixed row, so (XmNfixedRows + XmNtopRow) is the actual row number
883 which will be moved to the top. If (XmNtopRow > (XmNrows - (<num‐
884 ber of rows visible> + XmNfixedRows), then the actual row which
885 will be moved to the top is (XmNrows - (<number of rows visible> +
886 XmNfixedRows).
887
888 XmNtrackCellCallback
889 specifies a list of callbacks to be called when the mouse pointer
890 is being moved.
891
892 XmNtrailingAttachedBottom
893 Indicated that any trailing fixed rows should be attached to the
894 bottom of the matrix. This resource only has effect when XmNfill
895 is true and XmNtrailingFixedRows is greater than zero.
896
897 XmNtrailingAttachedRight
898 Indicated that any trailing fixed columns should be attached to
899 the right of the matrix. This resource only has effect when XmN‐
900 fill is true and XmNtrailingFixedColumns is greater than zero.
901
902 XmNtrailingFixedColumns
903 Specifies the number of trailing columns (starting from the right
904 column) which should not be horizontally scrollable. XmNtrailing‐
905 FixedColumns must be less than XmNcolumns-XmNfixedColumns. Cells
906 in trailing fixed columns are not editable unless XmNtraverse‐
907 FixedCells is set to True.
908
909 XmNtrailingFixedRows
910 Specifies the number of trailing rows (starting from the bottom
911 row) which should not be vertically scrollable. XmNtrailing‐
912 FixedRows must be less than XmNrows-XmNfixedRows. Cells in trail‐
913 ing fixed rows are not editable unless XmNtraverseFixedCells is
914 set to True.
915
916 XmNtraverseCellCallback
917 Specifies a list of callbacks to be called before a new cell is
918 edited. These callbacks are called by the EditCell() action and
919 when XbaeMatrix receives or looses focus. A pointer to an XbaeMa‐
920 trixTraverseCellCallbackStruct is passed to the callbacks. The
921 application can specify the next cell which should be edited via
922 this callback list, thereby performing custom traversal.
923
924 XmNtraverseFixedCells
925 If True, this resource allows fixed cells and columns to be
926 edited. The default is to not allow fixed rows or columns to be
927 edited.
928
929 XmNuseXbaeInput
930 This boolean value determines whether to use XbaeInput or
931 XmTextField as the widget used for editing cells. Default is not
932 to use XbaeInput.
933
934 XmNvalueChangedCallback
935 Specifies a list of callbacks to be called after text is deleted
936 from or inserted into the XmText cell edit widget. A pointer to an
937 XbaeMatrixValueChangedCallbackStruct is passed to the callbacks.
938 See the description of the XmText(3X) XmNvalueChangedCallback
939 resource.
940
941 XmNverticalScrollBar
942 The widget ID of the vertical XmScrollBar. This resource exists
943 only for those applications that need to tie another scrollbar to
944 the matrix's for synchronized scrolling. This resource can not be
945 set to a new value.
946
947 XmNverticalScrollBarDisplayPolicy
948 Determines when to display a horizontal scrollbar in the matrix.
949 Possible values and their effects are listed under XmNhorizon‐
950 talScrollBarDisplayPolicy.
951
952 XmNvisibleColumns
953 Specifies the number of non-fixed columns which should be visible.
954 The widget will request a size which will allow XmNvisibleColumns
955 columns to be displayed. The programmer should take into
956 allowance any XmNfixedColumns that are specified. This feature
957 becomes even more apparent if the number of XmNfixedColumns
958 changes at runtime as the value may need to be adjusted to avoid a
959 warning.
960
961 XmNvisibleRows
962 Specifies the number of rows which should be visible at any one
963 time. The widget will request a size which will allow XmNvisi‐
964 bleRows rows to be displayed.
965
966 XmNwrapType
967 When XmNmultiLineCell is true this resource specifies how to break
968 the lines. When set to XbaeWrapNone, lines are broken on newlines
969 only. When set to XbaeWrapContinuous, long lines are further bro‐
970 ken up so they fit in their cell. When set to XbaeWrapWord the
971 breaking of long lines occures preferably on spaces.
972
973 XmNwriteCellCallback
974 Specifies a list of callbacks to be called when a cell value
975 changes and an XmNdrawCellCallback is defined. A pointer to an
976 XbaeMatrixWriteCellCallbackStruct is passed to the callbacks. The
977 XmNwriteCellCallback allows data to be written back into the
978 application's data structure and must be defined for an editable
979 XbaeMatrix with an XmNdrawCellCallback.
980
981 XmNxmRowLabels
982 Points to an array of XmStrings to be drawn to the left of each
983 row. If XmNxmRowLabels is NULL, XmNrowLabels will be used. This
984 resource is copied.
985
986 XmNxmColumnLabels
987 Points to an array of XmStrings to be drawn above each column. If
988 XmNxmColumnLabels is NULL, XmNcolumnLabels will be used. This
989 resource is copied.
990
992 The following table lists the resources which XbaeMatrix inherits from
993 it's superclasses XmManager, Compositeand Core. For a complete
994 description of each resource, refer to the man page for that super‐
995 class. The codes in the ``Access'' column indicate whether the given
996 resource can be set at creation time (C), or set by using XtSetValues
997 (S), or retrieved by using XtGetValues (G).
998
999 ┌────────────────────────────────────────────────────────────────────────────────────┐
1000 │ XmManager Resource Set │
1001 ├────────────────────┬────────────────────┬────────────────┬───────────────────┬─────┤
1002 │Name │Class │Type │Default │Access│
1003 ├────────────────────┼────────────────────┼────────────────┼───────────────────┼─────┤
1004 │XmNbottomShadowColor │XmCBottomShadowColor │Pixel │dynamic │CSG │
1005 ├────────────────────┼────────────────────┼────────────────┼───────────────────┼─────┤
1006 │XmNbottomShadowPixmap│XmCBottomShadowPixmap│Pixmap │XmUNSPECIFIED_PIXMAP│CSG │
1007 ├────────────────────┼────────────────────┼────────────────┼───────────────────┼─────┤
1008 │XmNforeground │XmCForeground │Pixel │dynamic │CSG │
1009 ├────────────────────┼────────────────────┼────────────────┼───────────────────┼─────┤
1010 │XmNhighlightColor │XmCHighlightColor │Pixel │dynamic │CSG │
1011 ├────────────────────┼────────────────────┼────────────────┼───────────────────┼─────┤
1012 │XmNhighlightPixmap │XmCHighlightPixmap │Pixmap │dynamic │CSG │
1013 ├────────────────────┼────────────────────┼────────────────┼───────────────────┼─────┤
1014 │XmNinitialFocus │XmCInitialFocus │Widget │NULL │CSG │
1015 ├────────────────────┼────────────────────┼────────────────┼───────────────────┼─────┤
1016 │XmNnavigationType │XmCNavigationType │XmNavigationType │XmTAB_GROUP │CSG │
1017 ├────────────────────┼────────────────────┼────────────────┼───────────────────┼─────┤
1018 │XmNshadowThickness │XmCShadowThickness │Dimension │dynamic │CSG │
1019 ├────────────────────┼────────────────────┼────────────────┼───────────────────┼─────┤
1020 │XmNstringDirection │XmCStringDirection │XmStringDirection│dynamic │CG │
1021 ├────────────────────┼────────────────────┼────────────────┼───────────────────┼─────┤
1022 │XmNtopShadowColor │XmCTopShadowColor │Pixel │dynamic │CSG │
1023 ├────────────────────┼────────────────────┼────────────────┼───────────────────┼─────┤
1024 │XmNtopShadowPixmap │XmCTopShadowPixmap │Pixmap │dynamic │CSG │
1025 ├────────────────────┼────────────────────┼────────────────┼───────────────────┼─────┤
1026 │XmNtraversalOn │XmCTraversalOn │Boolean │True │CSG │
1027 ├────────────────────┼────────────────────┼────────────────┼───────────────────┼─────┤
1028 │XmNunitType │XmCUnitType │unsigned char │dynamic │CSG │
1029 ├────────────────────┼────────────────────┼────────────────┼───────────────────┼─────┤
1030 │XmNuserData │XmCUserData │XtPointer │NULL │CSG │
1031 └────────────────────┴────────────────────┴────────────────┴───────────────────┴─────┘
1032 ┌──────────────────────────────────────────────────────────────────────┐
1033 │ Composite Resource Set │
1034 ├──────────────────┬───────────────────┬─────────────┬─────────┬───────┤
1035 │Name │ Class │Type │Default │Access │
1036 ├──────────────────┼───────────────────┼─────────────┼─────────┼───────┤
1037 │XmNchildren │ XmCReadOnly │WidgetList │NULL │G │
1038 ├──────────────────┼───────────────────┼─────────────┼─────────┼───────┤
1039 │XmNinsertPosition │ XmCInsertPosition │XtOrderProc │NULL │CSG │
1040 ├──────────────────┼───────────────────┼─────────────┼─────────┼───────┤
1041 │XmNnumChildren │ XmCReadOnly │Cardinal │0 │G │
1042 └──────────────────┴───────────────────┴─────────────┴─────────┴───────┘
1043 ┌─────────────────────────────────────────────────────────────────────────────────────────────────┐
1044 │ Core Resource Set │
1045 ├────────────────────────────┬────────────────────────────┬─────────────┬───────────────────┬─────┤
1046 │Name │Class │Type │Default │Access│
1047 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1048 │XmNaccelerators │XmCAccelerators │XtAccelerators│NULL │CSG │
1049 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1050 │XmNancestorSensitive │XmCSensitive │Boolean │dynamic │G │
1051 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1052 │XmNbackground │XmCBackground │Pixel │dynamic │CSG │
1053 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1054 │XmNbackgroundPixmap │XmCPixmap │Pixmap │XmUNSPECIFIED_PIXMAP│CSG │
1055 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1056 │XmNborderColor │XmCBorderColor │Pixel │XtDefaultForeground │CSG │
1057 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1058 │XmNborderPixmap │XmCPixmap │Pixmap │XmUNSPECIFIED_PIXMAP│CSG │
1059 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1060 │XmNborderWidth │XmCBorderWidth │Dimension │1 │CSG │
1061 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1062 │XmNcolormap │XmCColormap │Colormap │dynamic │CG │
1063 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1064 │XmNdepth │XmCDepth │int │dynamic │CG │
1065 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1066 │XmNdestroyCallback │XmCCallback │XtCallbackList│NULL │C │
1067 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1068 │XmNheight │XmCHeight │Dimension │dynamic │CSG │
1069 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1070 │XmNinitialResourcesPersistent│XmCInitialResourcesPersistent│Boolean │True │C │
1071 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1072 │XmNmappedWhenManaged │XmCMappedWhenManaged │Boolean │True │CSG │
1073 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1074 │XmNscreen │XmCScreen │Screen │dynamic │CG │
1075 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1076 │XmNsensitive │XmCSensitive │Boolean │True │CSG │
1077 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1078 │XmNtranslations │XmCTranslations │XtTranslations│dynamic │CSG │
1079 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1080 │XmNwidth │XmCWidth │Dimension │dynamic │CSG │
1081 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1082 │XmNx │XmCPosition │Position │0 │CSG │
1083 ├────────────────────────────┼────────────────────────────┼─────────────┼───────────────────┼─────┤
1084 │XmNy │XmCPosition │Position │0 │CSG │
1085 └────────────────────────────┴────────────────────────────┴─────────────┴───────────────────┴─────┘
1087 XbaeMatrixAnyCallbackStruct
1088 A callback struct that is suitable for all callbacks that require
1089 the reason, event, row and column to be available. Any callback
1090 called may therefore cast the third parameter to the following
1091 struct in XbaeMatrix and can rest assured that evrything in it
1092 will be available.
1093
1094
1095 typedef struct
1096 {
1097 XbaeReasonType reason;
1098 int row;
1099 int column;
1100 XEvent *event;
1101 } XbaeMatrixAnyCallbackStruct;
1102
1103 Each of the members are set to the appropriate struct for the
1104 callback.
1105
1106 If this idea is a little foreign to you, recommended reading is
1107 K&R II page 213.
1108
1109 XmNdefaultActionCallback
1110 Callbacks on the XmNdefaultActionCallback list are called when the
1111 DefaultAction() action occurs. The application can bind the
1112 DefaultAction() action to any pointer based event. When a double
1113 click occurs on this pointer event, DefaultAction() will call the
1114 callbacks on the XmNdefaultActionCallback list. A pointer to the
1115 following structure is passed to each callback on the XmNdefault‐
1116 ActionCallback list:
1117
1118
1119 typedef struct
1120 {
1121 XbaeReasonType reason;
1122 XEvent *event;
1123 int row;
1124 int column;
1125 } XbaeMatrixDefaultActionCallbackStruct;
1126
1127
1128 reason Set to XbaeDefaultActionReason .
1129
1130 event The event that invoked this callback.
1131
1132 row The row number of the cell in which the double click
1133 occurred.
1134
1135 column The column number of the cell in which the double click
1136 occurred.
1137
1138 event
1139
1140 If an application has an XmNdefaultActionCallback, then the call‐
1141 backs on the list will be called when the user clicks twice in a
1142 cell within XmNdoubleClickInterval, enabling some action to occur
1143 for the particular cell.
1144
1145 XmNdrawCellCallback
1146 Callbacks on the XmNdrawCellCallback list are called when the wid‐
1147 get needs to draw a cell. A pointer to the following structure is
1148 passed to each callback on the XmNdrawCellCallback list:
1149
1150
1151 typedef struct
1152 {
1153 XbaeReasonType reason;
1154 XEvent *event;
1155 int row;
1156 int column;
1157 int width;
1158 int height;
1159 XbaeCellType type;
1160 String string;
1161 Pixmap pixmap;
1162 Pixmap mask;
1163 Pixel foreground;
1164 Pixel background;
1165 int depth;
1166 } XbaeMatrixDrawCellCallbackStruct;
1167
1168
1169 reason Set to XbaeDrawCellReason.
1170
1171 event Always set to NULL
1172
1173 row The row number of the cell that needs to be drawn.
1174
1175 column The column number of the cell that needs to be drawn.
1176
1177 width The width of the cell that needs to be drawn.
1178
1179 height The height of the cell that needs to be drawn.
1180
1181 type The type of ``data'' the programmer wants drawn in the
1182 cell, or which field should be looked at for data to
1183 draw: string or pixmap.
1184
1185 string The string to draw if type is set to XbaeString or
1186 XbaeStringFree.
1187
1188 pixmap The pixmap to copy if type is set to XbaePixmap. It
1189 will be clipped to width by height if necessary.
1190
1191 mask A mask for the pixmap as obtained from the XPM library.
1192 mask is only necessary when pixmap has a depth greater
1193 than one.
1194
1195 foreground
1196 The foreground color of the cell.
1197
1198 background
1199 The background color of the cell.
1200
1201 depth The depth of the pixmap image (in bits per pixel).
1202
1203 If the application adds this callback, when the XbaeMatrix deter‐
1204 mines that a cell at (row, column) needs to be redrawn, the normal
1205 cell drawing mechanism will be skipped and this callback called so
1206 the application can tell the widget what to put in the cell.
1207
1208 The type field is defaulted to XbaeString and no cacheing or sav‐
1209 ing of the string or pixmap is done.
1210
1211 If the application sets type to XbaePixmap, the width, height and
1212 depth of the returned pixmap will be calculated with a call to
1213 XGetGeometry(). If the programmer wishes to supply the width,
1214 height and depth there is a marked improvement as a round trip to
1215 the X server is avoided. Note that all geometry parameters must
1216 be supplied to ensure successful display of the pixmap.
1217
1218 If a mask is also provided, it will be used to display the pixmap
1219 transparently. Pixmaps drawn in cells also respect the value of
1220 XmNcolumnAlignments.
1221
1222 By defining an XmNdrawCellCallback the need for the storage of the
1223 XbaeMatrix data within the matrix is eliminated and can prove to
1224 be advantageous for memory usage.
1225
1226 To write the data back to the application, use the XmNwriteCell‐
1227 Callback described below.
1228
1229 XmNenterCellCallback
1230 Callbacks on the XmNenterCellCallback list are called from the
1231 EditCell() action just before a cell is edited to determine it's
1232 editability. A pointer to the following structure is passed to
1233 each callback on the XmNenterCellCallback list:
1234
1235
1236 typedef struct
1237 {
1238 XbaeReasonType reason;
1239 XEvent *event;
1240 int row;
1241 int column;
1242 int position;
1243 String pattern;
1244 Boolean auto_fill;
1245 Boolean convert_case;
1246 Boolean overwrite_mode;
1247 Boolean select_text;
1248 Boolean map;
1249 Cardinal num_params;
1250 String *params;
1251 Boolean doit;
1252 } XbaeMatrixEnterCellCallbackStruct;
1253
1254
1255 reason Set to XbaeEnterCellReason.
1256
1257 event The event that invoked the callback.
1258
1259 row The row number of the cell about to be edited.
1260
1261 column The column number of the cell about to be edited.
1262
1263 position The location of the cursor in the text field. The
1264 default is to place the cursor at the end of the string
1265 in the cell.
1266
1267 pattern A pattern for the XbaeInput widget (see XbaeInput(3)).
1268 The default is to not specify a pattern.
1269
1270 auto_fill Used in conjunction with the setting of the pattern to
1271 allow literals in the pattern to be automatically
1272 inserted.
1273
1274 convert_case
1275 If the pattern specifies an upper or lower case letter,
1276 the character typed in the position can automatically be
1277 converted to the appropriate case when set to True. The
1278 default is to not convert the case of the typed letter.
1279
1280 overwrite_mode
1281 Normally, the cursor appears as the familiar I caret.
1282 By setting overwrite_mode to True, the text field will
1283 go into overwrite mode where keystrokes replace the
1284 character underneath the block cursor.
1285
1286 select_text
1287 Indicates whether the text in the cell should be high‐
1288 lighted (only valid if doit is set to True also.
1289
1290 map Tells the matrix if the XmText should be mapped onto the
1291 cell. Only makes sense if doit is set to False.
1292
1293 num_params
1294 The number of String parameters passed to the EditCell()
1295 action.
1296
1297 params An array containing the num_params String parameters
1298 passed to the EditCell() action.
1299
1300 doit Indicates whether or not this cell is editable. Setting
1301 doit to False will make this cell not editable. The
1302 default value is True.
1303
1304 If the application determines that the cell at (row, column) is
1305 not editable, it should set the doit flag to False. If the map
1306 flag is also set to False, XbaeMatrix will not place the XmText
1307 cell editor on the cell. If map is left as True, the XmText will
1308 be placed on the cell but the user will not be able to add or
1309 delete characters from it. If the application leaves doit as True,
1310 then the TextField will be editable. In addition, if select_text
1311 is set to True, the text in the cell will be selected via
1312 XmTextSetSelection. Assuming XmNpendingDelete for the XmText is
1313 also True, the selected text will be deleted as soon as the next
1314 text insertion occurs.
1315
1316 XmNlabelActivateCallback
1317 Callbacks on the XmNlabelActivateCallback list are called after a
1318 button label has been activated via a mouse click. A pointer to
1319 the following structure is passed to each callback on the XmNla‐
1320 belActivateCallback list:
1321
1322
1323 typedef struct
1324 {
1325 XbaeReasonType reason;
1326 XEvent *event;
1327 int row;
1328 int column;
1329 Boolean row_label;
1330 String label;
1331 } XbaeMatrixLabelActivateCallbackStruct;
1332
1333
1334 reason Set to XbaeLabelActivateReason.
1335
1336 event The event that invoked this callback.
1337
1338 row The row number of the button label or -1 if the button
1339 was a column label.
1340
1341 column The column number of the button label or -1 if the but‐
1342 ton was a row label.
1343
1344 row_label If the button label that invoked the callback is a row
1345 label, then this value is set to True. If it was a col‐
1346 umn label then it is set to False.
1347
1348 label The label on the button that was pressed.
1349
1350 When the XbaeMatrix receives a ButtonRelease event on the same
1351 button label that it received a ButtonPress event, the XmNlabelAc‐
1352 tivateCallback is called to allow the programmer to respond to the
1353 event. The callback has been provided to emulate some popular
1354 spreadsheets on the market.
1355
1356 XmNleaveCellCallback
1357 Callbacks on the XmNleaveCellCallback list are called from the
1358 EditCell() and CommitEdit() actions just before the edit to the
1359 current cell is committed. The application can validate the
1360 changes made to the cell, and allow or disallow them. A pointer to
1361 the following structure is passed to each callback on the XmN‐
1362 leaveCellCallback list:
1363
1364
1365 typedef struct
1366 {
1367 XbaeReasonType reason;
1368 XEvent *event;
1369 int row, column;
1370 String value;
1371 Boolean doit;
1372
1373 } XbaeMatrixLeaveCellCallbackStruct;
1374
1375
1376 reason Set to XbaeLeaveCellReason.
1377
1378 event The event that invoked this callback.
1379
1380 row The row number of the cell being edited.
1381
1382 column The column number of the cell being edited.
1383
1384 value Contains the new data which will be stored in this cell
1385 if doit is True. The memory pointed to by value may be
1386 modified, or if the new contents are larger than the
1387 current contents, then value should be set to point to a
1388 larger piece of allocated memory.
1389
1390 doit Indicates whether the edits applied to this cell should
1391 actually be stored into XbaeMatrix. Setting doit to
1392 False will cause the changes to be discarded and the
1393 cell will retain its original value. The default value
1394 is True.
1395
1396 If the application determines that the value entered in the cell
1397 at (row, column) is not valid, it should set the doit flag to
1398 False. This will prevent the changes from being stored in the
1399 cell. The TextField edit widget will remain on the current cell.
1400 If the application leaves doit as True, then the changes made to
1401 the cell will be committed and the TextField will move to the next
1402 cell or be unmapped. The application can also modify the String in
1403 value, e.g. to force a String to be all upper case.
1404
1405 XmNmodifyVerifyCallback
1406 Callbacks on the XmNmodifyVerifyCallback list are called while a
1407 cell is being edited. The callbacks are called before text is
1408 inserted into or deleted from the TextField edit widget. A pointer
1409 to the following structure is passed to each callback on the XmN‐
1410 modifyVerifyCallback list:
1411
1412
1413 typedef struct
1414 {
1415 XbaeReasonType reason;
1416 XEvent *event;
1417 int row;
1418 int column;
1419 XmTextVerifyCallbackStruct *verify;
1420 const char *prev_text;
1421 } XbaeMatrixModifyVerifyCallbackStruct;
1422
1423
1424 reason Set to XbaeModifyVerifyReason.
1425
1426 event Always set to NULL.
1427
1428 row The row number of the cell being edited.
1429
1430 column The column number of the cell being edited.
1431
1432 verify The contents of this structure and its use are docu‐
1433 mented in the XmText(3X) man page.
1434
1435 prev_text The contents of the cell as seen by this user before the
1436 new text. If other text has already been entered, this
1437 value will not match the official XbaeMatrix value of
1438 the cell. This pointer and the string should not be
1439 modified.
1440
1441 XmNprocessDragCallback
1442 Callbacks on the XmNprocessDragCallback list are called from the
1443 ProcessDrag() action. The application can bind the ProcessDrag()
1444 action to any pointer based event, though by default it is bound
1445 to the Button2Down event. When this event occurs, ProcessDrag()
1446 will call the callbacks on the XmNprocessDragCallback list. A
1447 pointer to the following structure is passed to each callback on
1448 the XmNprocessDragCallback list:
1449
1450
1451 typedef struct
1452 {
1453 XbaeReasonType reason;
1454 XEvent *event;
1455 int row;
1456 int column;
1457 String string;
1458 XbaeCellType type;
1459 Pixmap pixmap;
1460 Pixmap mask;
1461 Cardinal num_params;
1462 String *params;
1463 } XbaeMatrixProcessDragCallbackStruct;
1464
1465
1466 reason Set to XbaeProcessDragReason.
1467
1468 event The XEvent which invoked the ProcessDrag() action.
1469
1470 row The row number of the cell where the drag was initi‐
1471 ated..
1472
1473 column The column number of the cell where the drag was initi‐
1474 ated..
1475
1476 string The string in the cell where the drag was initiated if
1477 type is XbaeString or XbaeStringFree. This is provided
1478 as a convenience to the application.
1479
1480 type The type of the cell in which the drag was initiated.
1481
1482 pixmap The pixmap in the cell where the drag was initiated if
1483 type is XbaePixmap. This is provided as a convenience
1484 to the application.
1485
1486 mask A mask for the pixmap as obtained from the XPM library.
1487 mask is only necessary when pixmap has a depth greater
1488 than one. Also provided as a convenience to the appli‐
1489 cation.
1490
1491 num_params
1492 The number of String parameters passed to the Process‐
1493 Drag() action.
1494
1495 params An array containing the num_params String parameters
1496 passed to the ProcessDrag() action.
1497
1498 The application can use the XmNprocessDragCallback list to imple‐
1499 ment particular processing for Motif's drag-and-drop.
1500
1501 XmNresizeCallback
1502 Callbacks on the XmNresizeCallback list are called when the Xbae‐
1503 Matrix widget is resized. A pointer to the following structure is
1504 passed to
1505 each callback on the XmNresizeCallback list:
1506
1507
1508 typedef struct
1509 {
1510 XbaeReasonType reason;
1511 XEvent *event;
1512 int row;
1513 int column;
1514 Dimension width;
1515 Dimension height;
1516 } XbaeMatrixResizeCallbackStruct;
1517
1518
1519 reason Set to XbaeResizeReason.
1520
1521 event Always set to NULL
1522
1523 row Set to the number of rows in the matrix (provided for
1524 convenience).
1525
1526 column Set to the number of colums in the matrix (provided for
1527 convenience).
1528
1529 width The new width of the XbaeMatrix widget.
1530
1531 height The new height of the XbaeMatrix widget.
1532
1533 The application can use the XmNresizeCallback to adjust such
1534 resources as XmNcolumnWidths, XmNvisibleColumns and XmNvisibleRows
1535 when the widget containing an XbaeMatrix widget is resized.
1536
1537 XmNresizeColumnCallback
1538 Callbacks on the XmNresizeColumnCallback list are called when a
1539 column of the XbaeMatrix widget is dynamically resized by the
1540 user. A pointer to the following structure is passed to each
1541 callback on the XmNresizeColumnCallback list:
1542
1543
1544 typedef struct
1545 {
1546 XbaeReasonType reason;
1547 XEvent *event;
1548 int row;
1549 int column;
1550 int which;
1551 int columns;
1552 short *column_widths;
1553 } XbaeMatrixResizeColumnCallbackStruct;
1554
1555
1556 reason Set to XbaeResizeColumnReason.
1557
1558 event The XEvent that ended the resize. The event will be of
1559 type XButtonReleasedEvent.
1560
1561 row The row in which the ResizeColumn() action began.
1562
1563 column The column in which the ResizeColumn() action began (and
1564 ended).
1565
1566 which The column that was resized in the ResizeColumn()
1567 action.
1568
1569 columns The number of columns in the XbaeMatrix widget.
1570
1571 column_widths
1572 The widths of each column as they stand after the
1573 ResizeColumn() action.
1574
1575 The application can use the XmNresizeColumnCallback to perform
1576 post processing after a column has been resized. By adjusting the
1577 values contained in column_widths the XbaeMatrix widget will use
1578 the values upon return from the callback. Changing the number of
1579 columns in the matrix in the XmNresizeColumnCallback should be
1580 used carefully as it may cause unexpected results.
1581
1582
1583
1584 XmNselectCellCallback
1585 Callbacks on the XmNselectCellCallback list are called from the
1586 SelectCell() action. The application can bind the SelectCell()
1587 action to any pointer based event. When this event occurs, Select‐
1588 Cell() will call the callbacks on the XmNselectCellCallback list.
1589 A pointer to the following structure is passed to each callback on
1590 the XmNselectCellCallback list:
1591
1592
1593 typedef struct
1594 {
1595 XbaeReasonType reason;
1596 XEvent *event;
1597 int row;
1598 int column;
1599 Boolean **selected_cells;
1600 String **cells;
1601 Cardinal num_params;
1602 String *params;
1603 } XbaeMatrixSelectCellCallbackStruct;
1604
1605
1606 reason Set to XbaeSelectCellReason.
1607
1608 event The XEvent which invoked the SelectCell() action.
1609
1610 row The row number of the cell which was selected.
1611
1612 column The column number of the cell which was selected.
1613
1614 selected_cells
1615 The value of the XmNselectedCells resource. This is pro‐
1616 vided as a convenience to the application and will be
1617 NULL if no cells have yet been selected.
1618
1619 cells The value of the XmNcells resource. This is provided as
1620 a convenience to the application and will be NULL if no
1621 cells have been specified or the XmNdrawCellCallback is
1622 being used.
1623
1624 num_params
1625 The number of String parameters passed to the Select‐
1626 Cell() action.
1627
1628 params An array containing the num_params String parameters
1629 passed to the SelectCell() action.
1630
1631 The application can use the XmNselectCellCallback list to imple‐
1632 ment it's own selection model. The XbaeMatrixSelectCellCallback‐
1633 Struct contains the array of String parameters passed to the
1634 SelectCell() action which invoked this callback. By binding the
1635 SelectCell() action to various events via the translation manager,
1636 and using String action parameters to distinguish them, the appli‐
1637 cation can implement various selection models. For example, the
1638 following translations could be used to implement a model in which
1639 a modifier key indicates whether a single cell or an entire row
1640 should be selected. The callbacks on the XmNselectCellCallback
1641 list would examine the parameter and take the appropriate action.
1642
1643 #override\n\
1644 Shift<Btn1Down>: SelectCell(cell)\n\
1645 Ctrl<Btn1Down>: SelectCell(row)
1646
1647 The callbacks on the XmNselectCellCallback list can also be used
1648 in other ways, e.g. to pop up a cell specific menu.
1649
1650 NOTE: If no cells have been selected, the value of selected_cells
1651 will be NULL. The same applies for cells. Care must be taken so
1652 as not to dereference these members of the callback struct.
1653
1654 XmNtrackCellCallback
1655 Callbacks on the XmNtrackCellCallback list are being called by the
1656 HandleTracking() action, which is triggered by pointer motion.
1657 One of the purposes of this callback list is to figure out from
1658 which cell to which cell the pointer is being moved. A pointer to
1659 the XbaeMatrixTrackCellCallbackStruct structure is being passed.
1660 Its fields are defined as :
1661
1662
1663 typedef struct _XbaeMatrixTrackCellCallbackStruct
1664 {
1665 XbaeReasonType reason;
1666 XEvent *event;
1667 int row, column;
1668 int prev_row, prev_column;
1669 Position pointer_x, pointer_y;
1670 } XbaeMatrixTrackCellCallbackStruct;
1671
1672
1673 reason Set to XbaeSelectCellReason.
1674
1675 event The XEvent which invoked the HandleTracking() action.
1676
1677 row This is the row number that the pointer is currently in.
1678
1679 column This is the column number that the pointer is currently
1680 in.
1681
1682 prev_row The row that the pointer was previously in.
1683
1684 prev_column
1685 The column that the pointer was previously in.
1686
1687 pointer_x The x position of the pointer.
1688
1689 pointer_y The y position of the pointer.
1690
1691
1692 XmNtraverseCellCallback
1693 Callbacks on the XmNtraverseCellCallback list are called from the
1694 EditCell() action and when XbaeMatrix receives or looses focus.
1695 The application can customize cell traversal using these call‐
1696 backs. XbaeMatrix has a default traversal order, outlined below,
1697 which the application can override. A pointer to the following
1698 structure is passed to each callback on the XmNtraverseCellCall‐
1699 back list:
1700
1701
1702 typedef struct
1703 {
1704 XbaeReasonType reason;
1705 XEvent *event;
1706 int row;
1707 int column;
1708 int next_row;
1709 int next_column;
1710 int fixed_rows;
1711 int fixed_columns;
1712 int trailing_fixed_rows;
1713 int trailing_fixed_columns;
1714 int num_rows;
1715 int num_columns;
1716 String param;
1717 XrmQuark qparam;
1718 } XbaeMatrixTraverseCellCallbackStruct;
1719
1720 reason Set to XbaeTraverseCellReason.
1721
1722 event The event that invoked this callback.
1723
1724 row The row number of the cell currently being edited.
1725
1726 column The column number of the cell currently being edited.
1727
1728 next_row The row number of the next cell to be edited, this can
1729 be changed by the application.
1730
1731 next_column
1732 The column number of the next cell to be edited, this
1733 can be changed by the application.
1734
1735 fixed_rows
1736 The value of the XmNfixedRows resource. This is provided
1737 as a convenience for the application in calculating the
1738 next_row and next_column fields.
1739
1740 fixed_columns
1741 The value of the XmNfixedColumns resource. This is pro‐
1742 vided as a convenience for the application in calculat‐
1743 ing the next_row and next_column fields.
1744
1745 trailing_fixed_rows
1746 The value of the XmNtrailingFixedRows resource. This is
1747 provided as a convenience for the application in calcu‐
1748 lating the next_row and next_column fields.
1749
1750 trailing_fixed_columns
1751 The value of the XmNtrailingFixedColumns resource. This
1752 is provided as a convenience for the application in cal‐
1753 culating the next_row and next_column fields.
1754
1755 num_rows The value of the XmNrows resource. This is provided as a
1756 convenience for the application in calculating the
1757 next_row and next_column fields.
1758
1759 num_columns
1760 The value of the XmNcolumns resource. This is provided
1761 as a convenience for the application in calculating the
1762 next_row and next_column fields.
1763
1764 param The String value of the parameter passed to the Edit‐
1765 Cell() action.
1766
1767 qparam The XrmQuark value of the parameter passed to the Edit‐
1768 Cell() action.
1769
1770 The EditCell() action takes an arbitrary parameter which it passes
1771 through to the callbacks on the XmNtraverseCellCallback list in
1772 both String and XrmQuark forms. The EditCell() action recognizes
1773 five special parameters which it uses to implement it's default
1774 cell traversal. These parameters and their corresponding traversal
1775 results are:
1776
1777 Pointer Set next_row and next_column to the cell underneath the
1778 mouse pointer.
1779
1780 Left If we are currently editing cell (XmNfixedRows, XmN‐
1781 fixedColumns), then do not move. Otherwise move one col‐
1782 umn to the left, if that column is less than XmNfixed‐
1783 Columns , then move up to the last column of the row
1784 above.
1785
1786 Right If we are currently editing cell (XmNrows - 1, XmN‐
1787 columns - 1), then do not move. Otherwise move one col‐
1788 umn to the right, if that column is greater than or
1789 equal to XmNcolumns , then move down to column XmNfixed‐
1790 Columns of the row below.
1791
1792 Up Move up one row. If that row is less than XmNfixedRows ,
1793 then move to the last row.
1794
1795 Down Move down one row. If that row is greater than or equal
1796 to XmNrows , then move to row XmNfixedRows.
1797
1798 If the EditCell() action recognizes one of these special parame‐
1799 ters, it calculates the new cell to be edited accordingly and
1800 stores the results in the next_row and next_column fields of the
1801 XbaeMatrixTraverseCellCallbackStruct. If EditCell() does not rec‐
1802 ognize it's parameter, it sets next_row and next_column to the
1803 current row and column. It also stores a String and XrmQuark ver‐
1804 sion of it's parameter in the param and qparam fields. EditCell()
1805 then calls the callbacks on the XmNtraverseCellCallback list.
1806 These callbacks can examine the parameter and recalculate the
1807 next_row and next_column fields appropriately. The application
1808 can override the default calculation for the special parameters,
1809 or it can define an entirely new parameter with a corresponding
1810 new calculation. It would do this by binding EditCell() with a
1811 new application specific parameter to an event in a translation
1812 table. It is expected that application callbacks will use the
1813 XrmQuark version of the parameter for efficiency reasons (by stat‐
1814 ically creating the new XrmQuarks and comparing them against the
1815 incoming qparam).
1816
1817 When XbaeMatrix receives the focus it will also call the XmNtra‐
1818 verseCellCallback callbacks before returning to the current cell
1819 or the upper left most visible cell if no cell is currently
1820 edited. The XbaeMatrixTraverseCellCallbackStruct will have param
1821 and qparm set to Focus. If there is no current cell row and col‐
1822 umn will be set to -1.
1823
1824 When XbaeMatrix looses the focus it will also call the XmNtraver‐
1825 seCellCallback with param and qparm set to LoosingFocus.
1826
1827 XmNvalueChangedCallback
1828 Callbacks on the XmNvalueChangedCallback list are called while a
1829 cell is being edited. The callbacks are called after text is
1830 inserted into or deleted from the TextField edit widget. A pointer
1831 to the following structure is passed to each callback on the XmN‐
1832 valueChangedCallback list:
1833
1834
1835 typedef struct
1836 {
1837 XbaeReasonType reason;
1838 XEvent *event;
1839 int row;
1840 int column;
1841 } XbaeMatrixValueChangedCallbackStruct;
1842
1843
1844 reason Set to XbaeValueChangedReason.
1845
1846 event The event that triggered this callback.
1847
1848 row The row number of the cell being edited.
1849
1850 column The column number of the cell being edited.
1851
1852 XmNwriteCellCallback
1853 Callbacks (although it probably only makes sense to have one) on
1854 the XmNwriteCellCallback list are called when the widget needs to
1855 write data to a cell, but only when XmNdrawCellCallback is
1856 defined. A pointer to the following structure is passed to each
1857 callback on the XmNwriteCellCallback list:
1858
1859
1860 typedef struct
1861 {
1862 XbaeReasonType reason;
1863 XEvent *event;
1864 int row;
1865 int column;
1866 XbaeCellType type;
1867 String string;
1868 Pixmap pixmap;
1869 Pixmap mask;
1870 } XbaeMatrixWriteCellCallbackStruct;
1871
1872
1873 reason Set to XbaeWriteCellReason.
1874
1875 event Always set to NULL
1876
1877 row The row number of the cell that needs to be written.
1878
1879 column The column number of the cell that needs to be written.
1880
1881 type The type of ``data'' contained in the cell, either
1882 XbaeString or XbaePixmap.
1883
1884 string The string to store if type is set to XbaeString.
1885
1886 pixmap The pixmap to store if type is set to XbaePixmap.
1887 (maybe a little meaningless unless you can edit a pixmap
1888 in a cell)
1889
1890 mask A mask for the pixmap as obtained from the XPM library.
1891 mask is only necessary when pixmap has a depth greater
1892 than one.
1893
1894 If the application adds this callback, when the XbaeMatrix is
1895 editable and has been assigned an XmNdrawCellCallback, data on the
1896 widget can be edited and stored back in the application's data
1897 structure. Only if an XmNdrawCellCallback has been assigned to
1898 the XbaeMatrix widget, will the XmNwriteCellCallback be called.
1899
1900 At the moment, pixmap and mask will be sent to the XmNwriteCell‐
1901 Callback as NULL.
1902
1904 XbaeMatrix inherits translations from XmManager. In addition, XbaeMa‐
1905 trix uses the following translation:
1906
1907 :<Btn1Up>: DefaultAction()\n\
1908 :<Btn1Down>: DefaultAction() EditCell(Pointer)\n\
1909 :Shift<Btn2Down>: ResizeColumns()\n\
1910 :<Btn2Down>: ProcessDrag()\n\
1911 :<Btn1Motion>: HandleMotion() HandleTracking()()\n\
1912 :<Motion>: HandleTracking()()\n\
1913 :<Btn4Down>: ScrollRows(-50)()\n\
1914 :<Btn5Down>: ScrollRows( 50)()
1915
1916
1917 XbaeMatrix installs the following default XmNtextTranslations on the
1918 TextField edit widget:
1919
1920 #override\n\
1921 Shift ~Ctrl ~Meta ~Alt <Key>Tab: EditCell(Left)\n\
1922 ~Ctrl ~Meta ~Alt <Key>Tab: EditCell(Right)\n\
1923 <Key>osfUp: EditCell(Up)\n\
1924 <Key>osfDown: EditCell(Down)\n\
1925 <Key>osfActivate: CommitEdit(False)\n\
1926 ~Shift ~Meta ~Alt <Key>Return: CommitEdit(False)\n\
1927 <Key>osfCancel: CommitEdit(False)\n\
1928 Shift Ctrl ~Meta ~Alt <Key>Tab: TraversePrev()\n\
1929 Ctrl ~Meta ~Alt <Key>Tab: TraverseNext()\n\
1930 <Key>osfPageDown: PageDown()\n\
1931 <Key>osfPageUp: PageUp()\n
1932
1933
1935 CancelEdit()
1936 If the single parameter to CancelEdit() is the String True, then
1937 it unmaps the edit TextField, discarding any changes which were
1938 made to the cell being edited. If the parameter is False, then
1939 CancelEdit() restores the edit TextField to the original con‐
1940 tents of the cell, discarding any changes made to the cell being
1941 edited. The TextField is not unmapped.
1942
1943 CommitEdit()
1944 CommitEdit() first calls any callbacks on the XmNleaveCellCall‐
1945 back list to determine if the changes made to the current cell
1946 are valid. If they are, it then saves any changes made to the
1947 cell into the cell. If the callbacks on the XmNleaveCellCallback
1948 list return that the changes are not valid, CommitEdit() does
1949 nothing.
1950
1951 If the changes are valid, CommitEdit() examines it's one parame‐
1952 ter, which must be the string True or False. If the parameter is
1953 True, then the edit TextField is unmapped. If it is False, then
1954 the TextField is not unmapped.
1955
1956 DefaultAction()
1957 DefaultAction() sets up a mechanism for determining whether two
1958 successive mouse clicks form a double click. The DefaultAc‐
1959 tion() should normally be used in conjunction with other pointer
1960 based events and provides a mechanism for acting on double
1961 clicks in a cell.
1962
1963 EditCell()
1964 EditCell() edits a new cell. EditCell() first calculates the new
1965 cell to edit based on it's single parameter. It then calls the
1966 callbacks on the XmNtraverseCellCallback list to allow them to
1967 specify a different cell to edit (see the discussion of XmNtra‐
1968 verseCellCallback above). EditCell() then calls the callbacks
1969 on the XmNleaveCellCallback list to determine if the changes
1970 made to the current cell are valid. If they are, it then saves
1971 any changes made to the cell into the cell. If the changes are
1972 not valid, EditCell() does nothing further.
1973
1974 If the changes are valid, EditCell() attempts to scroll the new
1975 cell to be edited so that it is fully visible. If the new cell
1976 is in a fixed row or column, EditCell() returns and does nothing
1977 further (these cells are not editable). Otherwise, EditCell()
1978 calls the callbacks on the XmNenterCellCallback list to deter‐
1979 mine if the new cell is editable. It then moves the XmText edit
1980 widget to the new cell, setting it's editability based on the
1981 return from the XmNenterCellCallback callbacks.
1982
1983 ProcessDrag()
1984 ProcessDrag() calls the callbacks on the XmNprocessDragCallback
1985 list, passing them a pointer to a XbaeMatrixProcessDragCallback‐
1986 Struct.
1987
1988 ResizeColumns()
1989 Allows the user to dynamically resize the column widths, pro‐
1990 vided that XmNallowColumnResize is True.
1991
1992 ScrollRows()
1993 ScrollRows() makes the rows of the matrix scroll by the pixel
1994 amount specified by it's argument.
1995
1996 ScrollColumns()
1997 ScrollColumns() makes the columns of the matrix scroll by the
1998 pixel amount specified by it's argument.
1999
2000 SelectCell()
2001 SelectCell() calls the callbacks on the XmNselectCellCallback
2002 list, passing them a pointer to a XbaeMatrixSelectCellCallback‐
2003 Struct. This structure will contain the String parameters
2004 passed to the SelectCell() action, among other things (see the
2005 discussion of XmNselectCellCallback above).
2006
2007 TraverseNext()
2008 TraverseNext() will traverse out of the Matrix and into the next
2009 tab group.
2010
2011 TraversePrev()
2012 TraversePrev() will traverse out of the Matrix and into the pre‐
2013 vious tab group.
2014
2015 PageDown()
2016 PageDown() causes the Matrix to scroll down a full page. The
2017 text widget is placed on the first non fixed row of the new
2018 page.
2019
2020 PageUp()
2021 PageUp() causes the Matrix to scroll up a full page. The text
2022 widget is placed on the first non fixed row of the new page.
2023
2025 In addition to the standard type converters registered by Xt and Motif,
2026 XbaeMatrix registers the following additional type converters:
2027
2028 CvtStringToStringArray()
2029 Converts a comma separated list of Strings to an array of String
2030 pointers, one for each substring. Commas in the list may be
2031 escaped with the character `\'. This converter allows the XmN‐
2032 rowLabels and XmNcolumnLabels resources to be specified in
2033 resource files.
2034
2035 CvtStringToWidthArray()
2036 Converts a comma separated list of numeric Strings to an array
2037 of short integers. This converter allows the XmNcolumnWidths
2038 resource to be specified in resource files.
2039
2040 CvtStringToMaxLengthArray()
2041 Converts a comma separated list of numeric Strings to an array
2042 of integers. This converter allows the XmNcolumnMaxLengths
2043 resource to be specified in resource files.
2044
2045 CvtStringToAlignmentArray()
2046 Converts a comma separated list of alignments to an array of
2047 unsigned chars. This converter allows the XmNcolumnLabelAlign‐
2048 ments and XmNcolumnAlignments resources to be specified in
2049 resource files.
2050
2051 CvtStringToGridType()
2052 Converts a single string as discussed in XmNgridType to a grid
2053 type value. This converter allows XmNgridType to be specified
2054 in resource files.
2055
2056 CvtStringToMatrixScrollBarDisplayPolicy()
2057 Converts a single string as discussed in XmNhorizontalScroll‐
2058 BarDisplayPolicy and XmNverticalScrollBarDisplayPolicy to a dis‐
2059 play policy value. This converter allows XmNhorizontalScroll‐
2060 BarDisplayPolicy and XmNverticalScrollBarDisplayPolicy to be
2061 specified in resource files.
2062
2063 CvtStringToCellTable()
2064 Converts a comma separated list of Strings with \n delimited
2065 rows to a two dimensional array of String pointers. This con‐
2066 verter allows the XmNcells resource to be specified in resource
2067 files.
2068
2069 CvtStringToPixelTable()
2070 Converts a comma separated list of color names with \n delimited
2071 rows to a two dimensional array of Pixel values. This converter
2072 allows the XmNcellBackgroundsandXmNcolors resources to be speci‐
2073 fied in resource files.
2074
2075 CvtStringToBooleanArray()
2076 Converts a comma separated list of string or numeric values to
2077 an array of Booleans. The converter recongnises a comma sepa‐
2078 rated list of values. Each value is parsed such that if the
2079 first character is This converter allows the XmNcolumnButtonLa‐
2080 bels and XmNrowButtonLabels resources to be specified in
2081 resource files.
2082
2084 The following external entry points to XbaeMatrix class methods are
2085 defined:
2086
2087 XbaeCreateMatrix()
2088
2089 Widget XbaeCreateMatrix()
2090 Widget parent;
2091 String name;
2092 ArgList arglist;
2093 Cardinal argcount;
2094
2095
2096 parent Specifies the parent widget ID.
2097
2098 name Specifies the name of the created widget
2099
2100 arglist Specifies the argument list
2101
2102 argcount Specifies the number of attribute/value pairs in the
2103 argument list (arglist)
2104
2105 XbaeCreateMatrix() creates an unmanaged instance of an XbaeMa‐
2106 trix widget and returns the associated widget ID.
2107
2108 XbaeMatrixAddColumns()
2109
2110 void XbaeMatrixAddColumns()
2111 Widget w;
2112 int position;
2113 String *columns;
2114 String *labels;
2115 short *widths;
2116 int *max_lengths;
2117 unsigned char *alignments;
2118 unsigned char *label_alignments;
2119 Pixel *colors;
2120 int num_columns;
2121
2122
2123 w An XbaeMatrix widget.
2124
2125 position The column position before which to add the new col‐
2126 umns. Must be greater than or equal to zero, and less
2127 than or equal to XmNcolumns.
2128
2129 columns Points to an ordinary two dimensional array of String,
2130 or NULL. These Strings will be used to modify the
2131 XmNcells resource to populate the new columns. Each
2132 row in the array must have XmNrows elements and repre‐
2133 sents one of the new columns. columns must have
2134 num_columns rows. If columns is NULL, empty columns
2135 will be added.
2136
2137 labels Points to an array of String, or NULL. These Strings
2138 will be used as the XmNcolumnLabels for the new col‐
2139 umns. The labels array must have num_columns elements.
2140 If labels is NULL, and XmNcolumnLabels is set, then
2141 blank column labels will be used.
2142
2143 widths Points to an array of short or NULL. These values
2144 will be used as the XmNcolumnWidths for the new col‐
2145 umns. The widths array must have num_columns elements.
2146 if widths is NULL then a default width will be used
2147 for the new columns.
2148
2149 max_lengths
2150 Points to an array of int, or NULL. These values will
2151 be used as the XmNcolumnMaxLengths for the new col‐
2152 umns. The max_lengths array must have num_columns ele‐
2153 ments. If max_lengths is NULL, then the corresponding
2154 value from widths will be used.
2155
2156 alignments
2157 Points to an array of unsigned char, or NULL. These
2158 values will be used as the XmNcolumnAlignments for the
2159 new columns. The alignments array must have num_col‐
2160 umns elements. If alignments is NULL, then XmALIGN‐
2161 MENT_BEGINNING will be used.
2162
2163 label_alignments
2164 Points to an array of unsigned char, or NULL. These
2165 values will be used as the XmNcolumnLabelAlignments
2166 for the new column labels. The label_alignments array
2167 must have num_columns elements. If label_alignments is
2168 NULL, then XmALIGNMENT_BEGINNING will be used.
2169
2170 colors Points to an array of Pixel, or NULL. These values
2171 will be used to set the corresponding columns in the
2172 XmNcolors table for the new columns. The colors array
2173 must have num_columns elements. If colors is NULL,
2174 then XmNforeground will be used.
2175
2176 num_columns
2177 The number of columns which are being added to the
2178 widget.
2179
2180 XbaeMatrixAddColumns() allows the application developer to
2181 dynamically add new columns anywhere in the Matrix. The columns
2182 will be added before the column specified in position. Columns
2183 are numbered starting at zero. To append new columns onto the
2184 end of the Matrix, specify position as the total number of col‐
2185 umns. Most of the arguments to XbaeMatrixAddColumns() may be
2186 specified as NULL. Default values will be used by the widget.
2187
2188 If the programmer attempts to add columns using XbaeMatrixAdd‐
2189 Columns() when there are no rows, it will result in a warning
2190 message. There must be at least one row in the XbaeMatrix wid‐
2191 get to add columns.
2192
2193 To maintain backward compatability, the cell backgrounds cannot
2194 be set in a call to XbaeMatrixAddColumns() and must be set (if
2195 so desired) in a separate call to XtVaSetValues().
2196
2197 XbaeMatrixAddRows()
2198
2199 void XbaeMatrixAddRows()
2200 Widget w;
2201 int position;
2202 String *rows;
2203 String *labels;
2204 Pixel *colors;
2205 int num_rows;
2206
2207
2208 w An XbaeMatrix widget.
2209
2210 position The row position before which to add the new rows.
2211 Must be greater than or equal to zero, and less than
2212 or equal to XmNrows.
2213
2214 rows Points to an ordinary two dimensional array of String,
2215 or NULL. These Strings will be used to modify the
2216 XmNcells resource to populate the new rows. Each row
2217 in the array must have XmNcolumns elements and repre‐
2218 sents one of the new rows. rows must have num_rows
2219 rows. If rows is NULL, empty rows will be added.
2220
2221 labels Points to an array of String, or NULL. These Strings
2222 will be used as the XmNrowLabels for the new rows. The
2223 labels array must have num_rows elements. If labels is
2224 NULL, and XmNrowLabels is set, then blank row labels
2225 will be used
2226
2227 colors Points to an array of Pixel, or NULL. These values
2228 will be used to set the corresponding rows in the XmN‐
2229 colors table for the new rows. The colors array must
2230 have num_rows elements. If colors is NULL, then XmN‐
2231 foreground will be used.
2232
2233 num_rows The number of rows which are being added to the wid‐
2234 get.
2235
2236 XbaeMatrixAddRows() allows the application developer to dynami‐
2237 cally add new rows anywhere in the Matrix. The rows will be
2238 added before the row specified in position. Rows are numbered
2239 starting at zero. To append new rows onto the end of the Matrix,
2240 specify position as the total number of rows.
2241
2242 To maintain backward compatability, the cell backgrounds cannot
2243 be set in a call to XbaeMatrixAddRows() and must be set (if so
2244 desired) in a separate call to XtVaSetValues().
2245
2246 XbaeMatrixCancelEdit()
2247
2248 void XbaeMatrixCancelEdit()
2249 Widget w;
2250 Boolean unmap;
2251
2252
2253 w An XbaeMatrix widget.
2254
2255 unmap Specifies whether the TextField cell edit widget
2256 should be unmapped after the edit is canceled.
2257
2258 XbaeMatrixCancelEdit() allows the application developer to pro‐
2259 grammatically cancel a cell edit in progress, discarding any
2260 changes made by the user. This function unmaps the TextField
2261 edit widget if the unmap flag is True. If unmap is False, the
2262 contents of the TextField are restored to their original value,
2263 and the TextField is not unmapped.
2264
2265 XbaeMatrixCommitEdit()
2266
2267 Boolean XbaeMatrixCommitEdit()
2268 Widget w;
2269 Boolean unmap;
2270
2271
2272 w An XbaeMatrix widget.
2273
2274 unmap Specifies whether the TextField cell edit widget
2275 should be unmapped after an edit is successfully com‐
2276 mitted.
2277
2278 XbaeMatrixCommitEdit() can be used by the application developer
2279 to programmatically commit an edit, saving any changes made by
2280 the user. This will cause the callbacks on the XmNleaveCell‐
2281 Callback list to be called to verify that the changes the user
2282 made are valid. If the changes are valid, then they are saved
2283 into the cell and if the unmap flag is True, the TextField wid‐
2284 get will be unmapped.
2285
2286 XbaeMatrixDeleteColumns()
2287
2288 void XbaeMatrixDeleteColumns()
2289 Widget w;
2290 int position;
2291 int num_columns;
2292
2293
2294 w An XbaeMatrix widget.
2295
2296 position The column position at which to begin deleting col‐
2297 umns. Must be greater than or equal to zero, and
2298 (position + num_columns) must be less than or equal to
2299 XmNcolumns.
2300
2301 num_columns
2302 The number of columns to delete from the widget.
2303
2304 XbaeMatrixDeleteColumns() allows the application developer to
2305 dynamically delete columns from anywhere in the Matrix. Columns
2306 will be deleted starting at the column specified by position.
2307
2308 XbaeMatrixDeleteRows()
2309
2310 void XbaeMatrixDeleteRows()
2311 Widget w;
2312 int position;
2313 int num_rows;
2314
2315
2316 w An XbaeMatrix widget.
2317
2318 position The row position at which to begin deleting rows. Must
2319 be greater than or equal to zero, and (position +
2320 num_rows) must be less than or equal to XmNrows.
2321
2322 num_rows The number of rows to delete from the widget.
2323
2324 XbaeMatrixDeleteRows() allows the application developer to
2325 dynamically delete rows from anywhere in the Matrix. Rows will
2326 be deleted starting at the row specified by position.
2327
2328 XbaeMatrixDeselectAll()
2329
2330 void XbaeMatrixDeselectAll()
2331 Widget w;
2332
2333
2334 w An XbaeMatrix widget.
2335
2336 XbaeMatrixDeselectAll() allows the application developer to pro‐
2337 grammatically deselect all cells. XbaeMatrixDeselectAll()
2338 redraws the cells in normal video. All Booleans in the XmNse‐
2339 lectedCells array will be set to False.
2340
2341 XbaeMatrixDeselectCell()
2342
2343 void XbaeMatrixDeselectCell()
2344 Widget w;
2345 int row;
2346 int column;
2347
2348
2349 w An XbaeMatrix widget.
2350
2351 row The row of the cell to deselect.
2352
2353 column The column of the cell to deselect.
2354
2355 XbaeMatrixDeselectCell() allows the application developer to
2356 programmatically deselect a cell. XbaeMatrixDeselectCell()
2357 redraws the cell in normal video. The corresponding Boolean in
2358 the XmNselectedCells array will be set to False.
2359
2360 XbaeMatrixDeselectColumn()
2361
2362 void XbaeMatrixDeselectColumn()
2363 Widget w;
2364 int column;
2365
2366
2367 w An XbaeMatrix widget.
2368
2369 column The column to deselect.
2370
2371 XbaeMatrixDeselectColumn() allows the application developer to
2372 programmatically deselect a column. XbaeMatrixDeselectColumn()
2373 draws the column in normal video. The corresponding Booleans in
2374 the XmNselectedCells array will be set to False.
2375
2376 XbaeMatrixDeselectRow()
2377
2378 void XbaeMatrixDeselectRow()
2379 Widget w;
2380 int row;
2381
2382
2383 w An XbaeMatrix widget.
2384
2385 row The row to deselect.
2386
2387 XbaeMatrixDeselectRow() allows the application developer to pro‐
2388 grammatically deselect a row. XbaeMatrixDeselectRow() draws the
2389 row in reverse video (or selectedForeground / selectedBackground
2390 if set). The corresponding Booleans in the XmNselectedCells
2391 array will be set to False.
2392
2393 XbaeMatrixDisableRedisplay()
2394
2395 int XbaeMatrixDisableRedisplay()
2396 Widget w;
2397
2398
2399 w An XbaeMatrix widget.
2400
2401 XbaeMatrixDisableRedisplay() and XbaeMatrixEnableRedisplay()
2402 allow an application to make multiple changes to a matrix with‐
2403 out immediate visual updates. When multiple changes are made
2404 with redisplay enabled, visual flashing often occurs. These
2405 routines help eliminate this problem.
2406
2407 XbaeMatrixEditCell()
2408
2409 void XbaeMatrixEditCell()
2410 Widget w;
2411 int row;
2412 int column;
2413
2414
2415 w An XbaeMatrix widget.
2416
2417 row The row of the cell to be edited.
2418
2419 column The column of the cell to be edited.
2420
2421 XbaeMatrixEditCell()
2422
2423 allows the application developer to programmatically force a
2424 specific cell to be edited. This function will first attempt to
2425 commit the edit in the current cell. If the XmNleaveCellCallback
2426 callbacks disallow this commit, then XbaeMatrixEditCell() will
2427 return. Otherwise the specified cell is scrolled until it is
2428 visible. If the specified cell is in a fixed row or column, it
2429 cannot be edited and XbaeMatrixEditCell() will return. Next, the
2430 callbacks on the XmNenterCellCallback callback list are called
2431 for the specified cell to determine it's editability. Then the
2432 TextField edit widget is mapped on top of the specified cell.
2433
2434 XbaeMatrixEnableRedisplay()
2435
2436 int XbaeMatrixEnableRedisplay()
2437 Widget w;
2438 Boolean redisplay;
2439
2440
2441 w An XbaeMatrix widget.
2442
2443 redisplay Force the matrix to redisplay if True and no other
2444 calls to XbaeMatrixDisableRedisplay() have been made.
2445
2446 XbaeMatrixDisableRedisplay() and XbaeMatrixEnableRedisplay()
2447 allow an application to make multiple changes to a matrix with‐
2448 out immediate visual updates. When multiple changes are made
2449 with redisplay enabled, visual flashing often occurs. These
2450 routines help eliminate this problem.
2451
2452 XbaeMatrixEventToXY()
2453
2454 Boolean XbaeMatrixEventToXY()
2455 Widget w;
2456 XEvent *event;
2457 int *x;
2458 int *y;
2459
2460
2461 w An XbaeMatrix widget.
2462
2463 event An X event structure pointer, usually from an XEven‐
2464 tHandler function.
2465
2466 x The translated x coordinate.
2467
2468 y The translated y coordinate.
2469
2470 XbaeMatrixEventToXY enables the programmer to determine the x
2471 and y values of a given event with respect to the XbaeMatrix
2472 widget. The returned values are also adjusted to allow for the
2473 XbaeClip widget.
2474
2475 XbaeMatrixFirstSelectedCell()
2476
2477 void XbaeMatrixFirstSelectedCell()
2478 Widget w;
2479 int *row;
2480 int *column;
2481
2482
2483 w An XbaeMatrix widget.
2484
2485 row The first selected row.
2486
2487 column The first selected column.
2488
2489 XbaeMatrixFirstSelectedCell() allows the application developer
2490 to find out which cell is the first selected. The function tra‐
2491 verses the XbaeMatrix widget in a left to right, top to bottom
2492 manner to determine this value. If no cell is selected, row and
2493 column are set to -1.
2494
2495 XbaeMatrixFirstSelectedColumn()
2496
2497 int XbaeMatrixFirstSelectedColumn()
2498 Widget w;
2499
2500
2501 w An XbaeMatrix widget.
2502
2503 XbaeMatrixFirstSelectedColumn() returns the column number of the
2504 first selected column in the XbaeMatrix widget. The function
2505 traverses the matrix from column 0. A column must be entirely
2506 selected for the column to be considered selected. If no column
2507 is selected then -1 is returned.
2508
2509 XbaeMatrixFirstSelectedRow()
2510
2511 int XbaeMatrixFirstSelectedRow()
2512 Widget w;
2513
2514
2515 w An XbaeMatrix widget.
2516
2517 XbaeMatrixFirstSelectedRow() returns the row number of the first
2518 selected row in the XbaeMatrix widget. The function traverses
2519 the matrix from row 0. A row must be entirely selected for the
2520 row to be considered selected. If no row is selected then -1 is
2521 returned.
2522
2523 XbaeMatrixGetCell()
2524
2525 String XbaeMatrixGetCell()
2526 Widget w;
2527 int row;
2528 int column;
2529
2530
2531 w An XbaeMatrix widget.
2532
2533 row The row of the cell whose value should be retrieved.
2534
2535 column The column of the cell whose value should be
2536 retrieved.
2537
2538 XbaeMatrixGetCell() returns the String value stored in the spec‐
2539 ified cell. This String should not be freed. To examine many
2540 cells, it is more efficient to do an XtGetValues() on XmNcells
2541 and examine the values in that array.
2542
2543 XbaeMatrixGetCellBackground()
2544
2545 Pixel XbaeMatrixGetCellBackground()
2546 Widget w;
2547 int row;
2548 int column;
2549
2550
2551 w A XbaeMatrix widget.
2552
2553 row The row of the cell whose background color should be
2554 retrieved.
2555
2556 column The column of the cell whose background color should
2557 be retrieved.
2558
2559 XbaeMatrixGetCellColor()
2560
2561 Pixel XbaeMatrixGetCellColor()
2562 Widget w;
2563 int row;
2564 int column;
2565
2566
2567 w A XbaeMatrix widget.
2568
2569 row The row of the cell whose foreground color should be
2570 retrieved.
2571
2572 column The column of the cell whose foreground color should
2573 be retrieved.
2574
2575 XbaeMatrixGetCellPixmap()
2576
2577 int XbaeMatrixGetCellPixmap()
2578 Widget w;
2579 int row;
2580 int column;
2581 Pixmap *pixmap;
2582 Pixmap *mask;
2583
2584
2585 w A XbaeMatrix widget.
2586
2587 row The row of the cell whose pixmap and mask should be
2588 retrieved.
2589
2590 column The column of the cell whose pixmap and mask should be
2591 retrieved.
2592
2593 pixmap A pointer to a Pixmap variable, in which the function
2594 will store the cell's pixmap.
2595
2596 mask A pointer to a Pixmap variable, in which the function
2597 will store the cell's pixmap mask.
2598
2599 XbaeMatrixGetCellTag()
2600
2601 XmStringTag XbaeMatrixGetCellTag()
2602 Widget w;
2603 int row;
2604 int column;
2605
2606
2607 w A XbaeMatrix widget.
2608
2609 row The row of the cell whose tag should be retrieved.
2610
2611 column The column of the cell tag should be retrieved.
2612
2613 XbaeMatrixGetCellTag returns the font tag of the indicated cell.
2614 The application should not modify or free the returned value.
2615 XbaeMatrixGetCellUserData()
2616
2617 XtPointer XbaeMatrixGetCellUserData()
2618 Widget w;
2619 int row;
2620 int column;
2621
2622
2623 w An XbaeMatrix widget.
2624
2625 row The row of the cell whose data should be retrieved.
2626
2627 column The column of the cell whose data should be retrieved.
2628
2629 XbaeMatrixGetCellUserData() returns a pointer to the data
2630 assigned to the cell in the given coordinates. The data should
2631 be set using XbaeMatrixSetCellUserData(). If no data is found
2632 to be associated with the particular cell, NULL is returned.
2633
2634 XbaeMatrixGetColumnWidth()
2635
2636 int XbaeMatrixGetColumnWidth()
2637 Widget w;
2638 int column;
2639
2640
2641 w An XbaeMatrix widget.
2642
2643 column The column whose width we're querying.
2644
2645 XbaeMatrixGetColumnWidth() is a convenient way to query a column
2646 width.
2647
2648 XbaeMatrixGetColumnLabel()
2649
2650 String XbaeMatrixGetColumnLabel()
2651 Widget w;
2652 int column;
2653
2654
2655 w An XbaeMatrix widget.
2656
2657 column The column of the label that should be retrieved.
2658
2659 XbaeMatrixGetColumnLabel() returns a pointer to the label of the
2660 given column. If no column labels exist or the given column is
2661 not a valid column NULL is returned. If no data is found to be
2662 associated with the particular column, NULL is returned.
2663
2664 XbaeMatrixGetColumnUserData()
2665
2666 XtPointer XbaeMatrixGetColumnUserData()
2667 Widget w;
2668 int column;
2669
2670
2671 w An XbaeMatrix widget.
2672
2673 column The column of the cell whose data should be retrieved.
2674
2675 XbaeMatrixGetColumnUserData() returns a pointer to the data
2676 assigned to the given column. The data should be set using
2677 XbaeMatrixSetColumnUserData(). If no data is found to be asso‐
2678 ciated with the particular column, NULL is returned.
2679
2680 XbaeMatrixGetCurrentCell()
2681
2682 void XbaeMatrixGetCurrentCell()
2683 Widget w;
2684 int *row;
2685 int *column;
2686
2687
2688 w An XbaeMatrix widget.
2689
2690 row The row of the cell the ``cursor'' or TextField is in.
2691
2692 column The column of the cell the ``cursor'' or TextField is
2693 in.
2694
2695 XbaeMatrixGetCurrentCell() allows the application developer to
2696 determine what cell is being edited or has focus.
2697
2698 XbaeMatrixGetEventRowColumn()
2699
2700 int XbaeMatrixGetEventRowColumn()
2701 Widget w;
2702 XEvent *event;
2703 int *row;
2704 int *column;
2705
2706
2707 w An XbaeMatrix widget.
2708
2709 event An X event structure pointer. This is usually from an
2710 XEventHandler function. It can be either a button or
2711 a key event.
2712
2713 row The row of the cell the ``cursor'' or TextField is in.
2714
2715 column The column of the cell the ``cursor'' or TextField is
2716 in.
2717
2718 XbaeMatrixGetEventRowColumn() allows the application developer
2719 to determine what cell corresponds to an (x, y) in an event. If
2720 the (x, y) of the event is a legal cell, row and column are set
2721 and True is returned. However, if the (x, y) is not over a
2722 cell, False is returned, and row and column will have undefined
2723 values.
2724
2725 XbaeMatrixGetNumSelected()
2726
2727 int XbaeMatrixGetNumSelected()
2728 Widget w;
2729
2730
2731 w An XbaeMatrix widget.
2732
2733 XbaeMatrixGetNumSelected() returns the number of cells that are
2734 currently selected in the given matrix. The widget maintains an
2735 internal variable as cells are selected and deselected so a com‐
2736 plete traversal of the widget is avoided.
2737
2738 XbaeMatrixGetRowHeight()
2739
2740 int XbaeMatrixGetRowHeight()
2741 Widget w;
2742 int row;
2743
2744
2745 w An XbaeMatrix widget.
2746
2747 row The row whose height we query.
2748
2749 XbaeMatrixGetRowHeight() is a convenient way to query a row
2750 height.
2751
2752 XbaeMatrixGetRowLabel()
2753
2754 String XbaeMatrixGetRowLabel()
2755 Widget w;
2756 int row;
2757
2758
2759 w An XbaeMatrix widget.
2760
2761 row The row of the label that should be retrieved.
2762
2763 XbaeMatrixGetRowLabel() returns a pointer to the label of the
2764 given row. If no row labels exist or the given row is not a
2765 valid row NULL is returned.
2766
2767 XbaeMatrixGetRowUserData()
2768
2769 XtPointer XbaeMatrixGetRowUserData()
2770 Widget w;
2771 int row;
2772
2773
2774 w An XbaeMatrix widget.
2775
2776 row The row of the cell whose data should be retrieved.
2777
2778 XbaeMatrixGetRowUserData() returns a pointer to the data
2779 assigned to the given row. The data should be set using XbaeMa‐
2780 trixSetRowUserData(). If no data is found to be associated with
2781 the particular row, NULL is returned.
2782
2783 XbaeMatrixGetXmColumnLabel()
2784
2785 XmString XbaeMatrixGetXmColumnLabel()
2786 Widget w;
2787 int column;
2788
2789
2790 w An XbaeMatrix widget.
2791
2792 column The column of the xmLabel that should be retrieved.
2793
2794 XbaeMatrixGetXmColumnLabel() returns a pointer to the xmLabel of
2795 the given column. If no xmColumnLabels exist or the given col‐
2796 umn is not a valid column NULL is returned. If no data is found
2797 to be associated with the particular column, NULL is returned.
2798
2799 XbaeMatrixGetXmRowLabel()
2800
2801 XmString XbaeMatrixGetXmRowLabel()
2802 Widget w;
2803 int row;
2804
2805
2806 w An XbaeMatrix widget.
2807
2808 row The row of the xmLabel that should be retrieved.
2809
2810 XbaeMatrixGetXmRowLabel() returns a pointer to the xmLabel of
2811 the given row. If no xmRowLabels exist or the given row is not
2812 a valid row NULL is returned. If no data is found to be associ‐
2813 ated with the particular row, NULL is returned.
2814
2815 XbaeMatrixHighlightCell()
2816
2817 void XbaeMatrixHighlightCell()
2818 Widget w;
2819 int row;
2820 int column;
2821
2822
2823 w An XbaeMatrix widget.
2824
2825 row The row of the cell to highlight.
2826
2827 column The column of the cell to highlight.
2828
2829 XbaeMatrixHighlightCell() allows the application developer to
2830 programmatically highlight a cell. XbaeMatrixHighlightCell()
2831 draws the highlight around the cell. The corresponding unsigned
2832 char in the XmNhighlightedCells array will be have its High‐
2833 lightCell bit set.
2834
2835 XbaeMatrixHighlightColumn()
2836
2837 void XbaeMatrixHighlightColumn()
2838 Widget w;
2839 int column;
2840
2841
2842 w An XbaeMatrix widget.
2843
2844 column The column to highlight.
2845
2846 XbaeMatrixHighlightColumn() allows the application developer to
2847 programmatically highlight a column. XbaeMatrixHighlightCol‐
2848 umn() draws the highlight around the column if XmNgridType is
2849 XmGRID_COLUMN_SHADOW or from around each cell in the column oth‐
2850 erwise. The corresponding unsigned chars in the XmNhighlighted‐
2851 Cells array will be have its HighlightColumn or HighlightOther
2852 bit set, depending on whether XmNgridType is set to XmGRID_COL‐
2853 UMN_SHADOW or not.
2854
2855 XbaeMatrixHighlightRow()
2856
2857 void XbaeMatrixHighlightRow()
2858 Widget w;
2859 int row;
2860
2861
2862 w An XbaeMatrix widget.
2863
2864 row The row to highlight.
2865
2866 XbaeMatrixHighlightRow() allows the application developer to
2867 programmatically highlight a row. XbaeMatrixHighlightRow()
2868 draws the highlight around the row if XmNgridType is
2869 XmGRID_ROW_SHADOW or from around each cell in the row otherwise.
2870 The corresponding unsigned chars in the XmNhighlightedCells
2871 array will be have its HighlightRow or HighlightOther bit set,
2872 depending on whether XmNgridType is set to XmGRID_ROW_SHADOW or
2873 not.
2874
2875 XbaeMatrixIsCellSelected()
2876
2877 Boolean XbaeMatrixIsCellSelected()
2878 Widget w;
2879 int row;
2880 int column;
2881
2882
2883 w An XbaeMatrix widget.
2884
2885 row The row of the cell to check.
2886
2887 column The column of the cell to check.
2888
2889 XbaeMatrixIsCellSelected() allows the application developer to
2890 determine whether or not a particular cell is selected. The
2891 function returns True if the cell is selected and False other‐
2892 wise.
2893
2894 XbaeMatrixIsCellVisible()
2895
2896 Boolean XbaeMatrixIsCellVisible()
2897 Widget w;
2898 int row;
2899 int column;
2900
2901
2902 w An XbaeMatrix widget.
2903
2904 row The row of the cell to check.
2905
2906 column The column of the cell to check.
2907
2908 XbaeMatrixIsCellVisible() allows the application developer to
2909 determine whether or not a particular cell is in the visible
2910 area of the XbaeMatrix widget. The function returns True if the
2911 cell is visible and False otherwise.
2912
2913 XbaeMatrixIsColumnSelected()
2914
2915 Boolean XbaeMatrixIsColumnSelected()
2916 Widget w;
2917 int column;
2918
2919
2920 w An XbaeMatrix widget.
2921
2922 column The column of the matrix to check.
2923
2924 XbaeMatrixIsColumnSelected() allows the application developer to
2925 determine whether or not a particular column is selected. The
2926 function returns True if the column is selected and False other‐
2927 wise. A column must be selected in its entirety for XbaeMatrix‐
2928 IsColumnSelected() to return True.
2929
2930 XbaeMatrixIsColumnVisible()
2931
2932 Boolean XbaeMatrixIsColumnVisible()
2933 Widget w;
2934 int column;
2935
2936
2937 w An XbaeMatrix widget.
2938
2939 column The column of the matrix to check.
2940
2941 XbaeMatrixIsColumnVisible() allows the application developer to
2942 determine whether or not a particular column is in the visible
2943 area of the XbaeMatrix widget. The function returns True if the
2944 column is visible and False otherwise.
2945
2946 XbaeMatrixIsRowSelected()
2947
2948 Boolean XbaeMatrixIsRowSelected()
2949 Widget w;
2950 int row;
2951
2952
2953 w An XbaeMatrix widget.
2954
2955 row The row of the matrix to check.
2956
2957 XbaeMatrixIsRowSelected() allows the application developer to
2958 determine whether or not a particular row is selected. The func‐
2959 tion returns True if the row is selected and False otherwise. A
2960 row must be selected in its entirety for XbaeMatrixIsRowSe‐
2961 lected() to return True.
2962
2963 XbaeMatrixIsRowVisible()
2964
2965 Boolean XbaeMatrixIsRowVisible()
2966 Widget w;
2967 int row;
2968
2969
2970 w An XbaeMatrix widget.
2971
2972 row The row of the matrix to check.
2973
2974 XbaeMatrixIsRowVisible() allows the application developer to
2975 determine whether or not a particular row is in the visible area
2976 of the XbaeMatrix widget. The function returns True if the row
2977 is visible and False otherwise.
2978
2979 XbaeMatrixMakeCellVisible()
2980
2981 int XbaeMatrixMakeCellVisible()
2982 Widget w;
2983 int row;
2984 int column;
2985
2986
2987 w An XbaeMatrix widget.
2988
2989 row The row to scroll into the visible area of the matrix.
2990
2991 column The column to scroll into the visible area of the
2992 matrix.
2993
2994 XbaeMatrixMakeCellVisible() allows a cell to be programatically
2995 scrolled into the visible area of the XbaeMatrix widget. By
2996 calling this function, the XmNselectScrollVisible resource is
2997 ignored. For a more accurate cell location after scrolling, the
2998 programmer should use the XmNleftColumnandXmNtopRow resources.
2999
3000 XbaeMatrixNumRows()
3001
3002 int XbaeMatrixNumRows()
3003 Widget w;
3004
3005
3006 w An XbaeMatrix widget.
3007
3008 XbaeMatrixNumRows() returns the number of rows in the given
3009 matrix.
3010
3011
3012 XbaeMatrixNumColumns()
3013
3014 int XbaeMatrixNumColumns()
3015 Widget w;
3016
3017
3018 w An XbaeMatrix widget.
3019
3020 XbaeMatrixNumColumns() returns the number of columns in the
3021 given matrix.
3022
3023 XbaeMatrixNumRows()
3024
3025 int XbaeMatrixNumRows()
3026 Widget w;
3027
3028
3029 w An XbaeMatrix widget.
3030
3031 XbaeMatrixNumRows() returns the number of rows in the given
3032 matrix.
3033
3034 XbaeMatrixRefresh()
3035
3036 void XbaeMatrixRefresh()
3037 Widget w;
3038
3039
3040 w An XbaeMatrix widget.
3041
3042 XbaeMatrixRefresh() allows the application developer to force
3043 the widget to redraw itself. This might be used when the pro‐
3044 grammer knows the widget's values have changed, but the widget
3045 has not detected the change. For example, the quickest way to
3046 swap the values of 2 rows would be to do an XtGetValues on XmN‐
3047 cells, swap the values of the 2 rows, and then do an XtSetValues
3048 on XmNcells with the same StringTable variable. Because of the
3049 way the Intrinsics work, the widget will not see this change and
3050 will display the old values until a redraw is preformed because
3051 of a resize or scroll event (assuming no other change in the
3052 XtSetValues caused a redraw). Calling XbaeMatrixRefresh() will
3053 cause the correct values to be drawn and overcome this limita‐
3054 tion in the Intrinsics. While this function should rarely be
3055 needed, it is provided ``just in case''.
3056
3057 XbaeMatrixRefreshCell()
3058
3059 void XbaeMatrixRefreshCell()
3060 Widget w;
3061 int row;
3062 int column;
3063
3064
3065 w An XbaeMatrix widget.
3066
3067 row The row of the cell to redraw.
3068
3069 column The column of the cell to redraw.
3070
3071 XbaeMatrixRefreshCell() allows the application developer to
3072 redraw a specific cell of the matrix. This function is particu‐
3073 larly useful when used with the XbaeMatrixDrawCellCallback as it
3074 allows updates of the data without an explicit expose event.
3075
3076 XbaeMatrixRefreshColumn()
3077
3078 void XbaeMatrixRefreshColumn()
3079 Widget w;
3080 int column;
3081
3082
3083 w An XbaeMatrix widget.
3084
3085 column The column of the matrix to redraw.
3086
3087 XbaeMatrixRefreshColumn() allows the application developer to
3088 efficiently redraw a specific column
3089 of the matrix.
3090
3091 XbaeMatrixRefreshRow()
3092
3093 void XbaeMatrixRefreshRow()
3094 Widget w;
3095 int row;
3096
3097
3098 w An XbaeMatrix widget.
3099
3100 row The row of the matrix to redraw.
3101
3102 XbaeMatrixRefreshRow() allows the application developer to effi‐
3103 ciently redraw a specific row
3104 of the matrix.
3105
3106 XbaeMatrixRowColToXY()
3107
3108 int XbaeMatrixRowColToXY()
3109 Widget w;
3110 int row;
3111 int column;
3112 int *x;
3113 int *y;
3114
3115
3116 w An XbaeMatrix widget.
3117
3118 row The row the of the cell in question.
3119
3120 column The column the of the cell in question.
3121
3122 x The x coordinate returned that represents the left
3123 coordinates of the given cell.
3124
3125 y The y coordinate returned that represents the upper
3126 coordinates of the given cell.
3127
3128 XbaeMatrixRowColToXY() allows the application developer to
3129 determine the coordinates of the upper left corner of a given
3130 cell. If the given widget is not an XbaeMatrix widget, False
3131 will be returned and the values of x and y will be undefined.
3132 This function is useful for drag and drop calculations.
3133
3134 XbaeMatrixSelectAll()
3135
3136 void XbaeMatrixSelectAll()
3137 Widget w;
3138
3139
3140 w An XbaeMatrix widget.
3141
3142 XbaeMatrixSelectAll() allows the application developer to pro‐
3143 grammatically select all cells. XbaeMatrixSelectAll() redraws
3144 the cells in reverse video. All Booleans in the XmNselectedCells
3145 array will be set to True.
3146
3147 XbaeMatrixSelectCell()
3148
3149 void XbaeMatrixSelectCell()
3150 Widget w;
3151 int row;
3152 int column;
3153
3154
3155 w An XbaeMatrix widget.
3156
3157 row The row of the cell to select.
3158
3159 column The column of the cell to select.
3160
3161 XbaeMatrixSelectCell() allows the application developer to pro‐
3162 grammatically select a cell. XbaeMatrixSelectCell() first
3163 scrolls the specified cell until it is visible, and then draws
3164 the cell in reverse video (or selectedForeground / selectedBack‐
3165 ground if set).
3166 The corresponding Boolean in the XmNselectedCells array will be
3167 set to True.
3168
3169 XbaeMatrixSelectColumn()
3170
3171 void XbaeMatrixSelectColumn()
3172 Widget w;
3173 int column;
3174
3175
3176 w An XbaeMatrix widget.
3177
3178 column The column to select.
3179
3180 XbaeMatrixSelectColumn() allows the application developer to
3181 programmatically select a column. XbaeMatrixSelectColumn()
3182 first scrolls the specified column until it is visible, and then
3183 draws the column in reverse video (or selectedForeground /
3184 selectedBackground if set). The corresponding Booleans in the
3185 XmNselectedCells array will be set to True.
3186
3187 XbaeMatrixSelectRow()
3188
3189 void XbaeMatrixSelectRow()
3190 Widget w;
3191 int row;
3192
3193
3194 w An XbaeMatrix widget.
3195
3196 row The row to select.
3197
3198 XbaeMatrixSelectRow() allows the application developer to pro‐
3199 grammatically select a row. XbaeMatrixSelectRow() first scrolls
3200 the specified row until it is visible, and then draws the row in
3201 reverse video (or selectedForeground / selectedBackground if
3202 set). The corresponding Booleans in the XmNselectedCells array
3203 will be set to True.
3204
3205 XbaeMatrixSetCell()
3206
3207 void XbaeMatrixSetCell()
3208 Widget w;
3209 int row;
3210 int column;
3211 const String value;
3212
3213
3214 w An XbaeMatrix widget.
3215
3216 row The row of the cell whose value should be set.
3217
3218 column The column of the cell whose value should be set.
3219
3220 value The new value to set this cell to.
3221
3222 XbaeMatrixSetCell() allows the application developer to program‐
3223 matically set the value of the specified cell. To set the values
3224 of many cells, it may be more efficient to do an XtSetValues()
3225 on the XmNcells resource.
3226
3227 XbaeMatrixSetCellBackground()
3228
3229 void XbaeMatrixSetCellBackground()
3230 Widget w;
3231 int row;
3232 int column;
3233 Pixel color;
3234
3235
3236 w An XbaeMatrix widget.
3237
3238 row The row of the cell whose backgroundshould be set.
3239
3240 column The column of the cell whose background should be set.
3241
3242 color The new color to which to set this cell's background.
3243
3244 XbaeMatrixSetCellBackground() is a convenient way to specify and
3245 modify the XmNcellBackgrounds resource when changing the back‐
3246 ground of a single cell. If XmNcellBackgrounds is NULL, then
3247 XbaeMatrixSetCellBackground() will create a Pixel table initial‐
3248 ized to XmNforeground except for the cell specified in it's
3249 arguments. If XmNcellBackgrounds is not NULL, then XbaeMa‐
3250 trixSetCellBackground() will changed the specified cell in that
3251 resource to the specified color.
3252
3253 XbaeMatrixSetCellColor()
3254
3255 void XbaeMatrixSetCellColor()
3256 Widget w;
3257 int row;
3258 int column;
3259 Pixel color;
3260
3261
3262 w An XbaeMatrix widget.
3263
3264 row The row of the cell whose color should be set.
3265
3266 column The column of the cell whose color should be set.
3267
3268 color The new color to which to set this cell.
3269
3270 XbaeMatrixSetCellColor() is a convenient way to specify and mod‐
3271 ify the XmNcolors resource when changing the color of a single
3272 cell. If XmNcolors is NULL, then XbaeMatrixSetCellColor() will
3273 create a Pixel table initialized to XmNforeground except for the
3274 cell specified in it's arguments. If XmNcolors is not NULL, then
3275 XbaeMatrixSetCellColor() will changed the specified cell in that
3276 resource to the specified color.
3277
3278 XbaeMatrixSetCellPixmap()
3279
3280 void XbaeMatrixSetCellPixmap()
3281 Widget w;
3282 int row;
3283 int column;
3284 Pixmap pixmap;
3285 Pixmap mask;
3286
3287
3288 w A XbaeMatrix widget.
3289
3290 row The row of the cell whose pixmap and mask should be
3291 set.
3292
3293 column The column of the cell whose pixmap and mask should be
3294 set.
3295
3296 pixmap the function will store the contents of this Pixmap
3297 variable
3298
3299 mask the function will store the contents of this variable
3300 as the pixmap mask
3301
3302 XbaeMatrixSetCellPixmap will set the pixmap and the associated
3303 mask of the indicated cell. If the row or column are out of
3304 bounds, or the widget is not an XbaeMatrix widget, then nothing
3305 is changed; this erroneous condition is silently ignored.
3306
3307 XbaeMatrixSetCellShadow()
3308
3309 void XbaeMatrixSetCellShadow()
3310 Widget w;
3311 int row;
3312 int column;
3313 unsigned char shadow_type;
3314
3315
3316 w An XbaeMatrix widget.
3317
3318 row The row of the cell whose shadow should be set.
3319
3320 column The column of the cell whose shadow should be set.
3321
3322 shadow_type
3323 The value to which to set the cells shadow
3324
3325 XbaeMatrixSetShadow() allows the application developer to pro‐
3326 grammatically set the shadow of a specified cell.
3327
3328 XbaeMatrixSetCellTag()
3329
3330 void XbaeMatrixSetCellTag()
3331 Widget w;
3332 int row;
3333 int column;
3334 XmStringTag tag;
3335
3336
3337 w An XbaeMatrix widget.
3338
3339 row The row of the cell whose tag should be set.
3340
3341 column The column of the cell whose tag should be set.
3342
3343 tag The value to which to set the cells tag
3344
3345 XbaeMatrixSetTag() allows the application developer to program‐
3346 matically set the font tag of a specified cell. This value is
3347 copied (quarkified).
3348
3349 XbaeMatrixSetCellUserData()
3350
3351 void XbaeMatrixSetCellUserData()
3352 Widget w;
3353 int row;
3354 int column;
3355 XtPointer data;
3356
3357
3358 w An XbaeMatrix widget.
3359
3360 row The row of the cell whose value should be set.
3361
3362 column The column of the cell whose value should be set.
3363
3364 data A pointer to a user defined data area.
3365
3366 XbaeMatrixSetCellUserData() allows the application developer to
3367 programmatically set the user data of a specified cell. To set
3368 the data value of many cells, it may be more efficient to do an
3369 XtSetValues() on the XmNcellUserData resource. This resource is
3370 copied.
3371
3372 XbaeMatrixSetCellWidget()
3373
3374 void XbaeMatrixSetCellWidget(w, row, column, widget)
3375 Widget w;
3376 int row;
3377 int column;
3378 Widget widget;
3379
3380 XbaeMatrixSetCellWidget() is a function to attach a widget to a
3381 matrix cell. The cell is selected by specifying its row and
3382 column , widget is the cell widget to be associated with that
3383 cell. XbaeMatrix will manage the cell widget's position and
3384 size so it is displayed inside the cell at all times, including
3385 when scrolling.
3386
3387 Using a NULL widget removes the link between a widget and its
3388 cell. Only one widget can be in a cell, a widget should also be
3389 in only one cell at a time.
3390
3391 XbaeMatrixSetCellWidget()
3392
3393 void XbaeMatrixSetCellWidget(w, row, column, widget)
3394 Widget w;
3395 int row;
3396 int column;
3397 Widget widget;
3398
3399 XbaeMatrixSetCellWidget() is a function to attach a widget to a
3400 matrix cell. The cell is selected by specifying its row and
3401 column , widget is the cell widget to be associated with that
3402 cell. XbaeMatrix will manage the cell widget's position and
3403 size so it is displayed inside the cell at all times, including
3404 when scrolling.
3405
3406 Using a NULL widget removes the link between a widget and its
3407 cell. Only one widget can be in a cell, a widget should also be
3408 in only one cell at a time.
3409
3410 XbaeMatrixSetColumnBackgrounds()
3411
3412 void XbaeMatrixSetColumnBackgrounds()
3413 Widget w;
3414 int position;
3415 Pixel *colors;
3416 int num_colors;
3417
3418
3419 w An XbaeMatrix widget.
3420
3421 position The column position at which to begin applying the new
3422 backgrounds. Must be greater than or equal to zero,
3423 and (position + num_colors) must be less than or equal
3424 to XmNcolumns.
3425
3426 colors Points to an array of Pixel. These specify the back‐
3427 grounds for the cells in the specified columns. The
3428 colors array must have num_colors elements.
3429
3430 num_colors
3431 The number of colors in the colors array.
3432
3433 XbaeMatrixSetColumnBackgrounds() is a convenient way to specify
3434 and modify the XmNcellBackgrounds resource when setting the
3435 background of an entire column or columns. If XmNcellBackgrounds
3436 is NULL, then XbaeMatrixSetColumnBackgrounds() will create a
3437 Pixel table initialized to XmNforeground except for the columns
3438 specified in it's arguments. If XmNcellBackgrounds is not NULL,
3439 then XbaeMatrixSetColumnBackgrounds() will changed the specified
3440 columns in that resource to the specified colors.
3441
3442 XbaeMatrixSetColumnColors()
3443
3444 void XbaeMatrixSetColumnColors()
3445 Widget w;
3446 int position;
3447 Pixel *colors;
3448 int num_colors;
3449
3450
3451 w An XbaeMatrix widget.
3452
3453 position The column position at which to begin applying the new
3454 colors. Must be greater than or equal to zero, and
3455 (position + num_colors) must be less than or equal to
3456 XmNcolumns.
3457
3458 colors Points to an array of Pixel. These specify the colors
3459 for the cells in the specified columns. The colors
3460 array must have num_colors elements.
3461
3462 num_colors
3463 The number of colors in the colors array.
3464
3465 XbaeMatrixSetColumnColors() is a convenient way to specify and
3466 modify the XmNcolors resource when setting the color of an
3467 entire column or columns. If XmNcolors is NULL, then XbaeMa‐
3468 trixSetColumnColors() will create a Pixel table initialized to
3469 XmNforeground except for the columns specified in it's argu‐
3470 ments. If XmNcolors is not NULL, then XbaeMatrixSetColumnCol‐
3471 ors() will changed the specified columns in that resource to the
3472 specified colors.
3473
3474 XbaeMatrixSetColumnWidth()
3475
3476 void XbaeMatrixSetColumnWidth()
3477 Widget w;
3478 int column;
3479 int width;
3480
3481
3482 w An XbaeMatrix widget.
3483
3484 column The column whose width we'll be changing.
3485
3486 width The new width of this column. A column width can be 0
3487 to hide a column.
3488
3489 XbaeMatrixSetColumnWidth() is a convenient way to change the
3490 width of a column without the need to allocate an array with
3491 column width numbers. Passing -1 as the new width will reset
3492 the column width to the default value.
3493
3494 XbaeMatrixSetColumnLabel()
3495
3496 void XbaeMatrixSetColumnLabel()
3497 Widget w;
3498 int column;
3499 String value;
3500
3501
3502 w An XbaeMatrix widget.
3503
3504 column The column of the label is to be set.
3505
3506 value The new value of the label.
3507
3508 XbaeMatrixSetColumnLabel() allows the application developer to
3509 programmatically change the label of a specified column.
3510
3511
3512 XbaeMatrixSetColumnShadow()
3513
3514 void XbaeMatrixSetColumnShadow()
3515 Widget w;
3516 int column;
3517 unsidned char shadow_type;
3518
3519
3520 w An XbaeMatrix widget.
3521
3522 column The column for which the shadow to be set.
3523
3524 shadow_type
3525 The new value of the shadow.
3526
3527 XbaeMatrixSetColumnShadow() allows the application developer to
3528 programmatically change the shadow of a specified column.
3529
3530 XbaeMatrixSetColumnUserData()
3531
3532 void XbaeMatrixSetColumnUserData()
3533 Widget w;
3534 int column;
3535 XtPointer data;
3536
3537
3538 w An XbaeMatrix widget.
3539
3540 column The column whose value should be set.
3541
3542 data A pointer to a user defined data area.
3543
3544 XbaeMatrixSetColumnUserData() allows the application developer
3545 to programmatically associate user data for the specified col‐
3546 umn.
3547
3548 XbaeMatrixSetRowBackgrounds()
3549
3550 void XbaeMatrixSetRowBackgrounds()
3551 Widget w;
3552 int position;
3553 Pixel *colors;
3554 int num_colors;
3555
3556
3557 w An XbaeMatrix widget.
3558
3559 position The row position at which to begin applying the new
3560 colors. Must be greater than or equal to zero, and
3561 (position + num_colors) must be less than or equal to
3562 XmNrows.
3563
3564 colors Points to an array of Pixel. These specify the back‐
3565 grounds for the cells in the specified rows. The col‐
3566 ors array must have num_colors elements.
3567
3568 num_colors
3569 The number of colors in the colors array.
3570
3571 XbaeMatrixSetRowBackgrounds() is a convenient way to specify and
3572 modify the XmNcellBackgrounds resource when setting the back‐
3573 ground of an entire row or rows. If XmNcellBackgrounds is NULL,
3574 then XbaeMatrixSetRowBackgrounds() will create a Pixel table
3575 initialized to XmNforeground except for the rows specified in
3576 it's arguments. If XmNcellBackgrounds is not NULL, then XbaeMa‐
3577 trixSetRowBackgrounds() will changed the specified rows in that
3578 resource to the specified colors.
3579
3580 XbaeMatrixSetRowColors()
3581
3582 void XbaeMatrixSetRowColors()
3583 Widget w;
3584 int position;
3585 Pixel *colors;
3586 int num_colors;
3587
3588
3589 w An XbaeMatrix widget.
3590
3591 position The row position at which to begin applying the new
3592 colors. Must be greater than or equal to zero, and
3593 (position + num_colors) must be less than or equal to
3594 XmNrows.
3595
3596 colors Points to an array of Pixel. These specify the colors
3597 for the cells in the specified rows. The colors array
3598 must have num_colors elements.
3599
3600 num_colors
3601 The number of colors in the colors array.
3602
3603 XbaeMatrixSetRowColors() is a convenient way to specify and mod‐
3604 ify the XmNcolors resource when setting the color of an entire
3605 row or rows. If XmNcolors is NULL, then XbaeMatrixSetRowColors()
3606 will create a Pixel table initialized to XmNforeground except
3607 for the rows specified in it's arguments. If XmNcolors is not
3608 NULL, then XbaeMatrixSetRowColors() will changed the specified
3609 rows in that resource to the specified colors.
3610
3611 XbaeMatrixSetRowHeight()
3612
3613 void XbaeMatrixSetRowHeight()
3614 Widget w;
3615 int row;
3616 int height;
3617
3618
3619 w An XbaeMatrix widget.
3620
3621 row The row whose height we'll be changing.
3622
3623 height The new height of this row. A row height can be 0 to
3624 hide a row.
3625
3626 XbaeMatrixSetRowHeight() is a convenient way to change the
3627 height of a row without the need to allocate an array with row
3628 height numbers. Passing -1 as the new height will reset the
3629 row's height to the default value.
3630
3631 XbaeMatrixSetRowLabel()
3632
3633 void XbaeMatrixSetRowLabel()
3634 Widget w;
3635 int row;
3636 String value;
3637
3638
3639 w An XbaeMatrix widget.
3640
3641 row The row of the label is to be set.
3642
3643 value The new value of the label.
3644
3645 XbaeMatrixSetRowLabel() allows the application developer to pro‐
3646 grammatically change the label of the specified row.
3647
3648 XbaeMatrixSetRowShadow()
3649
3650 void XbaeMatrixSetRowShadow()
3651 Widget w;
3652 int column;
3653 unsigned char shadow_type;
3654
3655
3656 w An XbaeMatrix widget.
3657
3658 row The row whose shadow should be set.
3659
3660 shadow_type
3661 The value of the new shadow.
3662
3663 XbaeMatrixSetRowShadow() allows the application developer to
3664 programmatically change the shadow for the specified row.
3665
3666 XbaeMatrixSetRowUserData()
3667
3668 void XbaeMatrixSetRowUserData()
3669 Widget w;
3670 int column;
3671 XtPointer data;
3672
3673
3674 w An XbaeMatrix widget.
3675
3676 row The row whose value should be set.
3677
3678 data A pointer to a user defined data area.
3679
3680 XbaeMatrixSetRowUserData() allows the application developer to
3681 programmatically associate user data for the specified row.
3682
3683 XbaeMatrixSetXmColumnLabel()
3684
3685 void XbaeMatrixSetXmColumnLabel()
3686 Widget w;
3687 int column;
3688 XmString value;
3689
3690
3691 w An XbaeMatrix widget.
3692
3693 column The column of the xmLabel is to be set.
3694
3695 value The new value of the xmLabel.
3696
3697 XbaeMatrixSetXmColumnLabel() allows the application developer to
3698 programmatically change the xmLabel of a specified column.
3699
3700
3701 XbaeMatrixSetXmRowLabel()
3702
3703 void XbaeMatrixSetXmRowLabel()
3704 Widget w;
3705 int row;
3706 XmString value;
3707
3708
3709 w An XbaeMatrix widget.
3710
3711 row The row of the xmLabel is to be set.
3712
3713 value The new value of the xmLabel.
3714
3715 XbaeMatrixSetXmRowLabel() allows the application developer to
3716 programmatically change the xmLabel of a specified row.
3717
3718 XbaeMatrixSortColumns()
3719
3720 void XbaeMatrixSortColumns()
3721 Widget w;
3722 int (*proc)(Widget, int, int, void *);
3723 void *user_data;
3724
3725
3726 w An XbaeMatrix widget.
3727
3728 proc a pointer to a function that can compare columns.
3729
3730 user_data a pointer the application can use for its own needs.
3731
3732 XbaeMatrixSortColumns allows you to sort the columns in the
3733 XbaeMatrix widget according to criteria determined by the proc
3734 function. The proc function should have the above signature and
3735 functionality as demanded by the qsort(3) function. It will be
3736 called with a the matrix being sorted, the indices of two col‐
3737 umns to compare and the user_data pointer XbaeMatrixSortColumns
3738 was called with. It should return -1, 0, or 1 as appropriate. It
3739 is guaranteed that the matrix does not change while sorting and
3740 the necessary reordering will only take place after the last
3741 call to proc has been made.
3742
3743 XbaeMatrixSortRows()
3744
3745 void XbaeMatrixSortRows()
3746 Widget w;
3747 int (*proc)(Widget, int, int, void *);
3748 void *user_data;
3749
3750
3751 w An XbaeMatrix widget.
3752
3753 proc a pointer to a function that can compare rows.
3754
3755 user_data a pointer the application can use for its own needs.
3756
3757 XbaeMatrixSortRows allows you to sort the rows in the XbaeMatrix
3758 widget according to criteria determined by the proc function.
3759 The proc function should have the above signature and function‐
3760 ality as demanded by the qsort(3) function. It will be called
3761 with the matrix being sorted, the indices of two rows to compare
3762 and the user_data pointer XbaeMatrixSortRows was called with. It
3763 should return -1, 0, or 1 as appropriate. It is guaranteed that
3764 the matrix does not change while sorting and the necessary
3765 reordering will only take place after the last call to proc has
3766 been made.
3767
3768 XbaeMatrixUnhighlightAll()
3769
3770 void XbaeMatrixUnhighlightAll()
3771 Widget w;
3772
3773
3774 w An XbaeMatrix widget.
3775
3776 XbaeMatrixUnhighlightAll() allows the application developer to
3777 programmatically unhighlight all cells. XbaeMatrixUnhighligh‐
3778 tAll() erases the highlight from all cells. All unsigned chars
3779 in the XmNhighlightedCells array will be set to HighlightNone.
3780
3781 XbaeMatrixUnhighlightCell()
3782
3783 void XbaeMatrixUnhighlightCell()
3784 Widget w;
3785 int row;
3786 int column;
3787
3788
3789 w An XbaeMatrix widget.
3790
3791 row The row of the cell to unhighlight.
3792
3793 column The column of the cell to unhighlight.
3794
3795 XbaeMatrixUnhighlightCell() allows the application developer to
3796 programmatically unhighlight a cell. XbaeMatrixUnhighlight‐
3797 Cell() erases the highlight from the cell. The corresponding
3798 unsigned char in the XmNhighlightedCells array will be have its
3799 HighlightCell bit cleared.
3800
3801 XbaeMatrixUnhighlightColumn()
3802
3803 void XbaeMatrixUnhighlightColumn()
3804 Widget w;
3805 int column;
3806
3807
3808 w An XbaeMatrix widget.
3809
3810 column The column to unhighlight.
3811
3812 XbaeMatrixUnhighlightColumn() allows the application developer
3813 to programmatically unhighlight a column. XbaeMatrixUnhigh‐
3814 lightColumn() erases the highlight from around the column if
3815 XmNgridType is XmGRID_COLUMN_SHADOW or from around each cell in
3816 the column otherwise. The corresponding unsigned chars in the
3817 XmNhighlightedCells array will be have its HighlightColumn or
3818 HighlightOther bit cleared, depending on whether XmNgridType is
3819 set to XmGRID_COLUMN_SHADOW or not.
3820
3821 XbaeMatrixUnhighlightRow()
3822
3823 void XbaeMatrixUnhighlightRow()
3824 Widget w;
3825 int row;
3826
3827
3828 w An XbaeMatrix widget.
3829
3830 row The row to unhighlight.
3831
3832 XbaeMatrixUnhighlightRow() allows the application developer to
3833 programmatically unhighlight a row. XbaeMatrixUnhighlightRow()
3834 erases the highlight from around the row if XmNgridType is
3835 XmGRID_ROW_SHADOW or from around each cell in the row otherwise.
3836 The corresponding unsigned chars in the XmNhighlightedCells
3837 array will be have its HighlightRow or HighlightOther bit
3838 cleared, depending on whether XmNgridType is set to
3839 XmGRID_ROW_SHADOW or not.
3840
3841 XbaeMatrixVisibleCells()
3842
3843 int XbaeMatrixVisibleCells()
3844 Widget w;
3845 int *top_row;
3846 int *bottom_row;
3847 int *left_column;
3848 int *right_column;
3849
3850
3851 w An XbaeMatrix widget.
3852
3853 top_row The first row that is currently visible in the matrix.
3854
3855 bottom_row
3856 The last row that is currently visible in the matrix.
3857
3858 left_column
3859 The leftmost column that is currently visible in the
3860 matrix.
3861
3862 right_column
3863 The rightmost column that is currently visible in the
3864 matrix.
3865
3866 XbaeMatrixVisibleCells() allows the the application developer to
3867 obtain the currently visible portion of the XbaeMatrix w.
3868
3869 XbaeMatrixVisibleColumns()
3870
3871 int XbaeMatrixVisibleColumns()
3872 Widget w;
3873
3874
3875 w An XbaeMatrix widget.
3876
3877 XbaeMatrixVisibleColumns() allows the the application developer
3878 to programmatically check how many columns are currently dis‐
3879 played in the XbaeMatrix w. A partially visible column will be
3880 declared an entire column.
3881
3882 XbaeMatrixVisibleRows()
3883
3884 int XbaeMatrixVisibleRows()
3885 Widget w;
3886
3887
3888 w An XbaeMatrix widget.
3889
3890 XbaeMatrixVisibleRows() allows the the application developer to
3891 programmatically check how many rows are currently displayed in
3892 the XbaeMatrix w. A partially visible row will be declared an
3893 entire row.
3894
3895 XbaeGetVersionNum()
3896
3897 int XbaeGetVersionNum()
3898
3899
3900 XbaeGetVersionNum() is a function that returns the numeric rep‐
3901 resentation of the version of the Xbae library that your program
3902 is working with. This is the run-time version of the Xbae wid‐
3903 gets, where XbaeVersion is a macro that represents the compile-
3904 time version.
3905
3906 The numeric representation is a simple calculation based on the
3907 major, minor, and pico numbers representing an Xbae widget
3908 release. E.g. version 4.8.1 would be represented as 40801.
3909
3910 Releases prior to 4.8.0 didn't have this functionality.
3911
3912 XbaeGetVersionText()
3913
3914 char * XbaeGetVersionText()
3915
3916
3917 XbaeGetVersionText() is a function that returns the textual rep‐
3918 resentation of the version of the Xbae library that your program
3919 is working with. This is the run-time version of the Xbae wid‐
3920 gets, where XbaeVersionTxt is a macro that represents the com‐
3921 pile-time version.
3922
3924 Using XtSetValues to set the Matrix's XmNwidth resource to 0 will cause
3925 it to recompute it's horizontal size. It will request a new size which
3926 results in XmNvisibleColumns columns being displayed. If XmNvisi‐
3927 bleColumns is 0, then it will request a new size such that it does not
3928 need a horizontal ScrollBar (full horizontal size).
3929
3930 Using XtSetValues to set the Matrix's XmNheight resource to 0 will
3931 cause it to recompute it's vertical size. It will request a new size
3932 which results in XmNvisibleRows rows being displayed. If XmNvisibleRows
3933 is 0, then it will request a new size such that it does not need a ver‐
3934 tical ScrollBar (full vertical size).
3935
3936 An XtSetValues on XmNvisibleRows will cause the Matrix to request a new
3937 size which results in XmNvisibleRows non-fixed rows being displayed,
3938 only if the new value is different than the old one.
3939
3940 An XtSetValues on XmNvisibleColumns will cause the Matrix to request a
3941 new size which results in the first XmNvisibleColumns non-fixed columns
3942 being displayed, only if the new value is different than the old one.
3943
3944 An XtSetValues on any other resource will not result in a request for a
3945 new size. Setting other resources in conjunction with setting XmNwidth
3946 and/or XmNheight to 0 allows for more control of the Matrix's geometry.
3947
3948 An XtSetValues setting XmNrowLabelWidth to 0 will cause XmNrowLabel‐
3949 Width to be set to the width of the longest row label.
3950
3951
3953 The bindings for virtual keys are vendor specific. For information
3954 about bindings for virtual buttons and keys, see VirtualBindings(3X).
3955
3957 Andrew Wason (aw@bae.bellcore.com) of Bellcore, Piscataway NJ, wrote
3958 the original version of the Xbae widgets. His final release of the
3959 widgets was version 3.8.
3960
3961 Kevin Brannen (kbrannen@metronet.com) took over maintainership follow‐
3962 ing Andrew Wason's departure and released version 4.0.
3963
3964 Andrew Lister (lister@db.com) maintained from 1995 to 1999.
3965
3967 Andrew Wason for the original idea and source code.
3968 Jay Schmidgall for his contributions.
3969 Nick Banyard for providing the multibyte extensions.
3970 Callum Gibson for the pattern parsing in the XbaeInput widget.
3971 Sascha Goebel for debugging the scroll-per-pixel code.
3972 Tobias Oed for lots of code cleanup and debugging.
3973 The people from Arcad Systemhaus for code submission for XbaeMatrixSort
3974 and a couple of related functionalities, and easier pixmap support.
3975
3977 This document describes XbaeMatrix, version 4.60.4.
3978
3980 Core(3X), Composite(3X), XmManager(3X), XmScrollBar(3X), XbaeInput(3X),
3981 XmText(3X)
3982
3984 Bellcore, previous and current maintainers of the Xbae widgets (collec‐
3985 tively 'authors') provide this information solely to professionals who
3986 have the appropriate degree of experience to understand and interpret
3987 its contents in accordance with generally accepted engineering or other
3988 professional standards and applicable regulations. No recommendations
3989 as to products or vendors is made or should be implied.
3990
3991 While the information contained herein has been prepared from sources
3992 deemed to be reliable, the authors reserve the right to revise the
3993 information without notice, but has no obligation to do so. Unless the
3994 recipient has been expressly granted a license by Bellcore under sepa‐
3995 rate applicable written agreement with Bellcore, no license, expressed
3996 or implied, is granted under any patents, copyrights or other intellec‐
3997 tual property rights. Use of the information is at your discretion and
3998 shall not be deemed an inducement by Bellcore to infringe any existing
3999 or later-issued patent, copyrights or other intellectual property
4000 right.
4001
4002 THE AUTHORS MAKE NO REPRESENTATIONS AND EXTENDS NO WARRANTIES, EXPRESS
4003 OR IMPLIED, WITH RESPECT TO THE INFORMATION, INCLUDING, BUT NOT LIMITED
4004 TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ANY PAR‐
4005 TICULAR PURPOSE, AND THE WARRANTY AGAINST INFRINGEMENT OF PATENTS OR
4006 OTHER INTELLECTUAL PROPERTY RIGHTS. THE INFORMATION IS PROVIDED ``AS
4007 IS'', AND IN NO EVENT SHALL THE AUTHORS OR ANY OF ITS AFFILIATES BE
4008 LIABLE FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS OR OTHER INCIDENTAL
4009 OR CONSEQUENTIAL DAMAGES RELATING TO THE INFORMATION.
4010
4011 Copyright 1991, 1992 Bellcore.
4012 Copyright 1995-99 Andrew Lister All Rights Reserved.
4013 Copyright 1999-2002 LessTif Developers
4014
4015
4016
4017 The above no warranty extends to all additions and contributions. No
4018 contributor shall be held liable; this work is provided ``as is''. If
4019 this is a problem for you, then don't use this software.
4020
4021
4022
40234.60.4 2020-01-31 XbaeMatrix(3x)