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 Ma‐
31 trix. When traversing from another tab group into the Matrix, the fo‐
32 cus 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 at‐
65 tempts 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 al‐
77 lows 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 re‐
91 trieved 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 Re‐
318 sizeColumns() action. The default value is to allow column resiz‐
319 ing.
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 ap‐
332 pearance 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 in‐
356 stead of a String. The background of a cell will be drawn in the
357 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 Xm‐
380 Text(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 ar‐
410 eas associated with each cell. The data should be set using Xbae‐
411 MatrixSetCellUserData() and retrieved using XbaeMatrixGetCellUser‐
412 Data(). This resource cannot be specified in a resource file and
413 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 in‐
448 stead of a String. The text in a cell will be drawn in the color
449 specified for that cell. If XmNcolors is NULL, text will be drawn
450 using the color specified by XmNforeground. This resource is
451 copied. See the discussion in XmNcellBackgrounds for how to spec‐
452 ify 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 de‐
459 scription of XmNalignment for XmLabel(3X). If XmNcolumnAlignments
460 is NULL, each column will default to XmALIGNMENT_BEGINNING. This
461 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 Xm‐
474 Nalignment for XmLabel(3X). If XmNcolumnLabelAlignments is NULL,
475 each column label will default to XmALIGNMENT_BEGINNING. This re‐
476 source 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 la‐
484 bel will be drawn on multiple lines. If there is a XmNxmColumnLa‐
485 bels defined for this coluumn it will be displayed in place of the
486 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 ar‐
494 ray 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 re‐
500 source 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 oc‐
528 curs in a cell. A pointer to an XbaeMatrixDefaultActionCallback‐
529 Struct is passed to the callbacks. Events are reported to the cell
530 in which the double click occurs regardless of whether or not a
531 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 ap‐
548 plication callback returns to the widget code, the type field will
549 determine what the widget draws on the screen. If the value is
550 XbaeString, then the regular string drawing function for the wid‐
551 get will be called with the value the applicaton assigned to the
552 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 ed‐
570 itability 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 Xm‐
622 GRID_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, Xm‐
627 GRID_ROW_LINE, XmGRID_ROW_SHADOW, XmGRID_COLUMN_LINE and Xm‐
628 GRID_COLUMN_SHADOW. All of the grid types vary the way the shadow
629 or line is drawn around the cell. XmGRID_ROW_LINE, Xm‐
630 GRID_ROW_SHADOW, XmGRID_COLUMN_LINE, and XmGRID_COLUMN_SHADOW only
631 draw a border around the rows and columns, giving a more tabular
632 rather than spreadsheet appearance. The default is Xm‐
633 GRID_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 la‐
665 bels. 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 ap‐
688 pear 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 re‐
697 source.
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 re‐
741 sized.
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 ma‐
843 trix. Possible values for this resource are XmSHADOW_OUT,
844 XmSHADOW_IN, XmSHADOW_ETCHED_OUT, and XmSHADOW_ETCHED_IN. The de‐
845 fault 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 de‐
862 faults 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 ef‐
872 fects can be achieved by setting the XmNcellHighlightThickness to
873 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 ap‐
921 plication 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 Xm‐
931 TextField as the widget used for editing cells. Default is not to
932 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 re‐
939 source.
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 al‐
956 lowance any XmNfixedColumns that are specified. This feature be‐
957 comes even more apparent if the number of XmNfixedColumns changes
958 at runtime as the value may need to be adjusted to avoid a warn‐
959 ing.
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 ap‐
978 plication'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 re‐
989 source is copied.
990
992 The following table lists the resources which XbaeMatrix inherits from
993 it's superclasses XmManager, Compositeand Core. For a complete de‐
994 scription of each resource, refer to the man page for that superclass.
995 The codes in the ``Access'' column indicate whether the given resource
996 can be set at creation time (C), or set by using XtSetValues (S), or
997 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 De‐
1112 faultAction() 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 oc‐
1133 curred.
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 Ed‐
1231 itCell() action just before a cell is edited to determine it's ed‐
1232 itability. A pointer to the following structure is passed to each
1233 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 de‐
1264 fault is to place the cursor at the end of the string in
1265 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 in‐
1272 serted.
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 de‐
1302 fault 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 Xm‐
1312 TextSetSelection. 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 Ed‐
1358 itCell() and CommitEdit() actions just before the edit to the cur‐
1359 rent cell is committed. The application can validate the changes
1360 made to the cell, and allow or disallow them. A pointer to the
1361 following structure is passed to each callback on the XmNleave‐
1362 CellCallback 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 in‐
1408 serted 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 re‐
1534 sources 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() ac‐
1567 tion.
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 Re‐
1573 sizeColumn() 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() ac‐
1587 tion 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 Se‐
1634 lectCell() action which invoked this callback. By binding the Se‐
1635 lectCell() 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 Xr‐
1813 mQuark version of the parameter for efficiency reasons (by stati‐
1814 cally 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 in‐
1830 serted 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 de‐
1856 fined. 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 ed‐
1895 itable 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 es‐
2031 caped with the character `\'. This converter allows the XmN‐
2032 rowLabels and XmNcolumnLabels resources to be specified in re‐
2033 source 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 re‐
2038 source 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 re‐
2043 source to be specified in resource files.
2044
2045 CvtStringToAlignmentArray()
2046 Converts a comma separated list of alignments to an array of un‐
2047 signed chars. This converter allows the XmNcolumnLabelAlignments
2048 and XmNcolumnAlignments resources to be specified in resource
2049 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 re‐
2081 source files.
2082
2084 The following external entry points to XbaeMatrix class methods are de‐
2085 fined:
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 Xm‐
2131 Ncells resource to populate the new columns. Each row
2132 in the array must have XmNrows elements and represents
2133 one of the new columns. columns must have num_columns
2134 rows. If columns is NULL, empty columns will be added.
2135
2136 labels Points to an array of String, or NULL. These Strings
2137 will be used as the XmNcolumnLabels for the new col‐
2138 umns. The labels array must have num_columns elements.
2139 If labels is NULL, and XmNcolumnLabels is set, then
2140 blank column labels will be used.
2141
2142 widths Points to an array of short or NULL. These values
2143 will be used as the XmNcolumnWidths for the new col‐
2144 umns. The widths array must have num_columns elements.
2145 if widths is NULL then a default width will be used
2146 for the new columns.
2147
2148 max_lengths
2149 Points to an array of int, or NULL. These values will
2150 be used as the XmNcolumnMaxLengths for the new col‐
2151 umns. The max_lengths array must have num_columns ele‐
2152 ments. If max_lengths is NULL, then the corresponding
2153 value from widths will be used.
2154
2155 alignments
2156 Points to an array of unsigned char, or NULL. These
2157 values will be used as the XmNcolumnAlignments for the
2158 new columns. The alignments array must have num_col‐
2159 umns elements. If alignments is NULL, then XmALIGN‐
2160 MENT_BEGINNING will be used.
2161
2162 label_alignments
2163 Points to an array of unsigned char, or NULL. These
2164 values will be used as the XmNcolumnLabelAlignments
2165 for the new column labels. The label_alignments array
2166 must have num_columns elements. If label_alignments is
2167 NULL, then XmALIGNMENT_BEGINNING will be used.
2168
2169 colors Points to an array of Pixel, or NULL. These values
2170 will be used to set the corresponding columns in the
2171 XmNcolors table for the new columns. The colors array
2172 must have num_columns elements. If colors is NULL,
2173 then XmNforeground will be used.
2174
2175 num_columns
2176 The number of columns which are being added to the
2177 widget.
2178
2179 XbaeMatrixAddColumns() allows the application developer to dy‐
2180 namically add new columns anywhere in the Matrix. The columns
2181 will be added before the column specified in position. Columns
2182 are numbered starting at zero. To append new columns onto the
2183 end of the Matrix, specify position as the total number of col‐
2184 umns. Most of the arguments to XbaeMatrixAddColumns() may be
2185 specified as NULL. Default values will be used by the widget.
2186
2187 If the programmer attempts to add columns using XbaeMatrixAdd‐
2188 Columns() when there are no rows, it will result in a warning
2189 message. There must be at least one row in the XbaeMatrix wid‐
2190 get to add columns.
2191
2192 To maintain backward compatability, the cell backgrounds cannot
2193 be set in a call to XbaeMatrixAddColumns() and must be set (if
2194 so desired) in a separate call to XtVaSetValues().
2195
2196 XbaeMatrixAddRows()
2197
2198 void XbaeMatrixAddRows()
2199 Widget w;
2200 int position;
2201 String *rows;
2202 String *labels;
2203 Pixel *colors;
2204 int num_rows;
2205
2206
2207 w An XbaeMatrix widget.
2208
2209 position The row position before which to add the new rows.
2210 Must be greater than or equal to zero, and less than
2211 or equal to XmNrows.
2212
2213 rows Points to an ordinary two dimensional array of String,
2214 or NULL. These Strings will be used to modify the Xm‐
2215 Ncells resource to populate the new rows. Each row in
2216 the array must have XmNcolumns elements and represents
2217 one of the new rows. rows must have num_rows rows. If
2218 rows is NULL, empty rows will be added.
2219
2220 labels Points to an array of String, or NULL. These Strings
2221 will be used as the XmNrowLabels for the new rows. The
2222 labels array must have num_rows elements. If labels is
2223 NULL, and XmNrowLabels is set, then blank row labels
2224 will be used
2225
2226 colors Points to an array of Pixel, or NULL. These values
2227 will be used to set the corresponding rows in the XmN‐
2228 colors table for the new rows. The colors array must
2229 have num_rows elements. If colors is NULL, then XmN‐
2230 foreground will be used.
2231
2232 num_rows The number of rows which are being added to the wid‐
2233 get.
2234
2235 XbaeMatrixAddRows() allows the application developer to dynami‐
2236 cally add new rows anywhere in the Matrix. The rows will be
2237 added before the row specified in position. Rows are numbered
2238 starting at zero. To append new rows onto the end of the Matrix,
2239 specify position as the total number of rows.
2240
2241 To maintain backward compatability, the cell backgrounds cannot
2242 be set in a call to XbaeMatrixAddRows() and must be set (if so
2243 desired) in a separate call to XtVaSetValues().
2244
2245 XbaeMatrixCancelEdit()
2246
2247 void XbaeMatrixCancelEdit()
2248 Widget w;
2249 Boolean unmap;
2250
2251
2252 w An XbaeMatrix widget.
2253
2254 unmap Specifies whether the TextField cell edit widget
2255 should be unmapped after the edit is canceled.
2256
2257 XbaeMatrixCancelEdit() allows the application developer to pro‐
2258 grammatically cancel a cell edit in progress, discarding any
2259 changes made by the user. This function unmaps the TextField
2260 edit widget if the unmap flag is True. If unmap is False, the
2261 contents of the TextField are restored to their original value,
2262 and the TextField is not unmapped.
2263
2264 XbaeMatrixCommitEdit()
2265
2266 Boolean XbaeMatrixCommitEdit()
2267 Widget w;
2268 Boolean unmap;
2269
2270
2271 w An XbaeMatrix widget.
2272
2273 unmap Specifies whether the TextField cell edit widget
2274 should be unmapped after an edit is successfully com‐
2275 mitted.
2276
2277 XbaeMatrixCommitEdit() can be used by the application developer
2278 to programmatically commit an edit, saving any changes made by
2279 the user. This will cause the callbacks on the XmNleaveCell‐
2280 Callback list to be called to verify that the changes the user
2281 made are valid. If the changes are valid, then they are saved
2282 into the cell and if the unmap flag is True, the TextField wid‐
2283 get will be unmapped.
2284
2285 XbaeMatrixDeleteColumns()
2286
2287 void XbaeMatrixDeleteColumns()
2288 Widget w;
2289 int position;
2290 int num_columns;
2291
2292
2293 w An XbaeMatrix widget.
2294
2295 position The column position at which to begin deleting col‐
2296 umns. Must be greater than or equal to zero, and (po‐
2297 sition + num_columns) must be less than or equal to
2298 XmNcolumns.
2299
2300 num_columns
2301 The number of columns to delete from the widget.
2302
2303 XbaeMatrixDeleteColumns() allows the application developer to
2304 dynamically delete columns from anywhere in the Matrix. Columns
2305 will be deleted starting at the column specified by position.
2306
2307 XbaeMatrixDeleteRows()
2308
2309 void XbaeMatrixDeleteRows()
2310 Widget w;
2311 int position;
2312 int num_rows;
2313
2314
2315 w An XbaeMatrix widget.
2316
2317 position The row position at which to begin deleting rows. Must
2318 be greater than or equal to zero, and (position +
2319 num_rows) must be less than or equal to XmNrows.
2320
2321 num_rows The number of rows to delete from the widget.
2322
2323 XbaeMatrixDeleteRows() allows the application developer to dy‐
2324 namically delete rows from anywhere in the Matrix. Rows will be
2325 deleted starting at the row specified by position.
2326
2327 XbaeMatrixDeselectAll()
2328
2329 void XbaeMatrixDeselectAll()
2330 Widget w;
2331
2332
2333 w An XbaeMatrix widget.
2334
2335 XbaeMatrixDeselectAll() allows the application developer to pro‐
2336 grammatically deselect all cells. XbaeMatrixDeselectAll() re‐
2337 draws the cells in normal video. All Booleans in the XmNselect‐
2338 edCells array will be set to False.
2339
2340 XbaeMatrixDeselectCell()
2341
2342 void XbaeMatrixDeselectCell()
2343 Widget w;
2344 int row;
2345 int column;
2346
2347
2348 w An XbaeMatrix widget.
2349
2350 row The row of the cell to deselect.
2351
2352 column The column of the cell to deselect.
2353
2354 XbaeMatrixDeselectCell() allows the application developer to
2355 programmatically deselect a cell. XbaeMatrixDeselectCell() re‐
2356 draws the cell in normal video. The corresponding Boolean in the
2357 XmNselectedCells array will be set to False.
2358
2359 XbaeMatrixDeselectColumn()
2360
2361 void XbaeMatrixDeselectColumn()
2362 Widget w;
2363 int column;
2364
2365
2366 w An XbaeMatrix widget.
2367
2368 column The column to deselect.
2369
2370 XbaeMatrixDeselectColumn() allows the application developer to
2371 programmatically deselect a column. XbaeMatrixDeselectColumn()
2372 draws the column in normal video. The corresponding Booleans in
2373 the XmNselectedCells array will be set to False.
2374
2375 XbaeMatrixDeselectRow()
2376
2377 void XbaeMatrixDeselectRow()
2378 Widget w;
2379 int row;
2380
2381
2382 w An XbaeMatrix widget.
2383
2384 row The row to deselect.
2385
2386 XbaeMatrixDeselectRow() allows the application developer to pro‐
2387 grammatically deselect a row. XbaeMatrixDeselectRow() draws the
2388 row in reverse video (or selectedForeground / selectedBackground
2389 if set). The corresponding Booleans in the XmNselectedCells ar‐
2390 ray will be set to False.
2391
2392 XbaeMatrixDisableRedisplay()
2393
2394 int XbaeMatrixDisableRedisplay()
2395 Widget w;
2396
2397
2398 w An XbaeMatrix widget.
2399
2400 XbaeMatrixDisableRedisplay() and XbaeMatrixEnableRedisplay() al‐
2401 low an application to make multiple changes to a matrix without
2402 immediate visual updates. When multiple changes are made with
2403 redisplay enabled, visual flashing often occurs. These routines
2404 help eliminate this problem.
2405
2406 XbaeMatrixEditCell()
2407
2408 void XbaeMatrixEditCell()
2409 Widget w;
2410 int row;
2411 int column;
2412
2413
2414 w An XbaeMatrix widget.
2415
2416 row The row of the cell to be edited.
2417
2418 column The column of the cell to be edited.
2419
2420 XbaeMatrixEditCell()
2421
2422 allows the application developer to programmatically force a
2423 specific cell to be edited. This function will first attempt to
2424 commit the edit in the current cell. If the XmNleaveCellCallback
2425 callbacks disallow this commit, then XbaeMatrixEditCell() will
2426 return. Otherwise the specified cell is scrolled until it is
2427 visible. If the specified cell is in a fixed row or column, it
2428 cannot be edited and XbaeMatrixEditCell() will return. Next, the
2429 callbacks on the XmNenterCellCallback callback list are called
2430 for the specified cell to determine it's editability. Then the
2431 TextField edit widget is mapped on top of the specified cell.
2432
2433 XbaeMatrixEnableRedisplay()
2434
2435 int XbaeMatrixEnableRedisplay()
2436 Widget w;
2437 Boolean redisplay;
2438
2439
2440 w An XbaeMatrix widget.
2441
2442 redisplay Force the matrix to redisplay if True and no other
2443 calls to XbaeMatrixDisableRedisplay() have been made.
2444
2445 XbaeMatrixDisableRedisplay() and XbaeMatrixEnableRedisplay() al‐
2446 low an application to make multiple changes to a matrix without
2447 immediate visual updates. When multiple changes are made with
2448 redisplay enabled, visual flashing often occurs. These routines
2449 help eliminate this problem.
2450
2451 XbaeMatrixEventToXY()
2452
2453 Boolean XbaeMatrixEventToXY()
2454 Widget w;
2455 XEvent *event;
2456 int *x;
2457 int *y;
2458
2459
2460 w An XbaeMatrix widget.
2461
2462 event An X event structure pointer, usually from an XEven‐
2463 tHandler function.
2464
2465 x The translated x coordinate.
2466
2467 y The translated y coordinate.
2468
2469 XbaeMatrixEventToXY enables the programmer to determine the x
2470 and y values of a given event with respect to the XbaeMatrix
2471 widget. The returned values are also adjusted to allow for the
2472 XbaeClip widget.
2473
2474 XbaeMatrixFirstSelectedCell()
2475
2476 void XbaeMatrixFirstSelectedCell()
2477 Widget w;
2478 int *row;
2479 int *column;
2480
2481
2482 w An XbaeMatrix widget.
2483
2484 row The first selected row.
2485
2486 column The first selected column.
2487
2488 XbaeMatrixFirstSelectedCell() allows the application developer
2489 to find out which cell is the first selected. The function tra‐
2490 verses the XbaeMatrix widget in a left to right, top to bottom
2491 manner to determine this value. If no cell is selected, row and
2492 column are set to -1.
2493
2494 XbaeMatrixFirstSelectedColumn()
2495
2496 int XbaeMatrixFirstSelectedColumn()
2497 Widget w;
2498
2499
2500 w An XbaeMatrix widget.
2501
2502 XbaeMatrixFirstSelectedColumn() returns the column number of the
2503 first selected column in the XbaeMatrix widget. The function
2504 traverses the matrix from column 0. A column must be entirely
2505 selected for the column to be considered selected. If no column
2506 is selected then -1 is returned.
2507
2508 XbaeMatrixFirstSelectedRow()
2509
2510 int XbaeMatrixFirstSelectedRow()
2511
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 re‐
2536 trieved.
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 as‐
2630 signed to the cell in the given coordinates. The data should be
2631 set using XbaeMatrixSetCellUserData(). If no data is found to
2632 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 as‐
2676 signed to the given column. The data should be set using Xbae‐
2677 MatrixSetColumnUserData(). If no data is found to be associated
2678 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 as‐
2779 signed 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 Xm‐
2869 GRID_ROW_SHADOW or from around each cell in the row otherwise.
2870 The corresponding unsigned chars in the XmNhighlightedCells ar‐
2871 ray will be have its HighlightRow or HighlightOther bit set, de‐
2872 pending 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 de‐
2975 termine 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 ma‐
2992 trix.
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 ma‐
3009 trix.
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 ma‐
3032 trix.
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 re‐
3072 draw 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 co‐
3123 ordinates 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 de‐
3129 termine 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 / se‐
3184 lectedBackground 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 ar‐
3249 guments. If XmNcellBackgrounds is not NULL, then XbaeMatrixSet‐
3250 CellBackground() will changed the specified cell in that re‐
3251 source 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
3379 Widget widget;
3380
3381 XbaeMatrixSetCellWidget() is a function to attach a widget to a
3382 matrix cell. The cell is selected by specifying its row and
3383 column , widget is the cell widget to be associated with that
3384 cell. XbaeMatrix will manage the cell widget's position and
3385 size so it is displayed inside the cell at all times, including
3386 when scrolling.
3387
3388 Using a NULL widget removes the link between a widget and its
3389 cell. Only one widget can be in a cell, a widget should also be
3390 in only one cell at a time.
3391
3392 XbaeMatrixSetCellWidget()
3393
3394 void XbaeMatrixSetCellWidget(w, row, column, widget)
3395 Widget w;
3396 int row;
3397 int column;
3398 Widget widget;
3399
3400 XbaeMatrixSetCellWidget() is a function to attach a widget to a
3401 matrix cell. The cell is selected by specifying its row and
3402 column , widget is the cell widget to be associated with that
3403 cell. XbaeMatrix will manage the cell widget's position and
3404 size so it is displayed inside the cell at all times, including
3405 when scrolling.
3406
3407 Using a NULL widget removes the link between a widget and its
3408 cell. Only one widget can be in a cell, a widget should also be
3409 in only one cell at a time.
3410
3411 XbaeMatrixSetColumnBackgrounds()
3412
3413 void XbaeMatrixSetColumnBackgrounds()
3414 Widget w;
3415 int position;
3416 Pixel *colors;
3417 int num_colors;
3418
3419
3420 w An XbaeMatrix widget.
3421
3422 position The column position at which to begin applying the new
3423 backgrounds. Must be greater than or equal to zero,
3424 and (position + num_colors) must be less than or equal
3425 to XmNcolumns.
3426
3427 colors Points to an array of Pixel. These specify the back‐
3428 grounds for the cells in the specified columns. The
3429 colors array must have num_colors elements.
3430
3431 num_colors
3432 The number of colors in the colors array.
3433
3434 XbaeMatrixSetColumnBackgrounds() is a convenient way to specify
3435 and modify the XmNcellBackgrounds resource when setting the
3436 background of an entire column or columns. If XmNcellBackgrounds
3437 is NULL, then XbaeMatrixSetColumnBackgrounds() will create a
3438 Pixel table initialized to XmNforeground except for the columns
3439 specified in it's arguments. If XmNcellBackgrounds is not NULL,
3440 then XbaeMatrixSetColumnBackgrounds() will changed the specified
3441 columns in that resource to the specified colors.
3442
3443 XbaeMatrixSetColumnColors()
3444
3445 void XbaeMatrixSetColumnColors()
3446 Widget w;
3447 int position;
3448 Pixel *colors;
3449 int num_colors;
3450
3451
3452 w An XbaeMatrix widget.
3453
3454 position The column position at which to begin applying the new
3455 colors. Must be greater than or equal to zero, and
3456 (position + num_colors) must be less than or equal to
3457 XmNcolumns.
3458
3459 colors Points to an array of Pixel. These specify the colors
3460 for the cells in the specified columns. The colors ar‐
3461 ray must have num_colors elements.
3462
3463 num_colors
3464 The number of colors in the colors array.
3465
3466 XbaeMatrixSetColumnColors() is a convenient way to specify and
3467 modify the XmNcolors resource when setting the color of an en‐
3468 tire column or columns. If XmNcolors is NULL, then XbaeMa‐
3469 trixSetColumnColors() will create a Pixel table initialized to
3470 XmNforeground except for the columns specified in it's argu‐
3471 ments. If XmNcolors is not NULL, then XbaeMatrixSetColumnCol‐
3472 ors() will changed the specified columns in that resource to the
3473 specified colors.
3474
3475 XbaeMatrixSetColumnWidth()
3476
3477 void XbaeMatrixSetColumnWidth()
3478 Widget w;
3479 int column;
3480 int width;
3481
3482
3483 w An XbaeMatrix widget.
3484
3485 column The column whose width we'll be changing.
3486
3487 width The new width of this column. A column width can be 0
3488 to hide a column.
3489
3490 XbaeMatrixSetColumnWidth() is a convenient way to change the
3491 width of a column without the need to allocate an array with
3492 column width numbers. Passing -1 as the new width will reset
3493 the column width to the default value.
3494
3495 XbaeMatrixSetColumnLabel()
3496
3497 void XbaeMatrixSetColumnLabel()
3498 Widget w;
3499 int column;
3500 String value;
3501
3502
3503 w An XbaeMatrix widget.
3504
3505 column The column of the label is to be set.
3506
3507 value The new value of the label.
3508
3509 XbaeMatrixSetColumnLabel() allows the application developer to
3510 programmatically change the label of a specified column.
3511
3512
3513 XbaeMatrixSetColumnShadow()
3514
3515 void XbaeMatrixSetColumnShadow()
3516 Widget w;
3517 int column;
3518 unsidned char shadow_type;
3519
3520
3521 w An XbaeMatrix widget.
3522
3523 column The column for which the shadow to be set.
3524
3525 shadow_type
3526 The new value of the shadow.
3527
3528 XbaeMatrixSetColumnShadow() allows the application developer to
3529 programmatically change the shadow of a specified column.
3530
3531 XbaeMatrixSetColumnUserData()
3532
3533 void XbaeMatrixSetColumnUserData()
3534 Widget w;
3535 int column;
3536 XtPointer data;
3537
3538
3539 w An XbaeMatrix widget.
3540
3541 column The column whose value should be set.
3542
3543 data A pointer to a user defined data area.
3544
3545 XbaeMatrixSetColumnUserData() allows the application developer
3546 to programmatically associate user data for the specified col‐
3547 umn.
3548
3549 XbaeMatrixSetRowBackgrounds()
3550
3551 void XbaeMatrixSetRowBackgrounds()
3552 Widget w;
3553 int position;
3554 Pixel *colors;
3555 int num_colors;
3556
3557
3558 w An XbaeMatrix widget.
3559
3560 position The row position at which to begin applying the new
3561 colors. Must be greater than or equal to zero, and
3562 (position + num_colors) must be less than or equal to
3563 XmNrows.
3564
3565 colors Points to an array of Pixel. These specify the back‐
3566 grounds for the cells in the specified rows. The col‐
3567 ors array must have num_colors elements.
3568
3569 num_colors
3570 The number of colors in the colors array.
3571
3572 XbaeMatrixSetRowBackgrounds() is a convenient way to specify and
3573 modify the XmNcellBackgrounds resource when setting the back‐
3574 ground of an entire row or rows. If XmNcellBackgrounds is NULL,
3575 then XbaeMatrixSetRowBackgrounds() will create a Pixel table
3576 initialized to XmNforeground except for the rows specified in
3577 it's arguments. If XmNcellBackgrounds is not NULL, then XbaeMa‐
3578 trixSetRowBackgrounds() will changed the specified rows in that
3579 resource to the specified colors.
3580
3581 XbaeMatrixSetRowColors()
3582
3583 void XbaeMatrixSetRowColors()
3584 Widget w;
3585 int position;
3586 Pixel *colors;
3587 int num_colors;
3588
3589
3590 w An XbaeMatrix widget.
3591
3592 position The row position at which to begin applying the new
3593 colors. Must be greater than or equal to zero, and
3594 (position + num_colors) must be less than or equal to
3595 XmNrows.
3596
3597 colors Points to an array of Pixel. These specify the colors
3598 for the cells in the specified rows. The colors array
3599 must have num_colors elements.
3600
3601 num_colors
3602 The number of colors in the colors array.
3603
3604 XbaeMatrixSetRowColors() is a convenient way to specify and mod‐
3605 ify the XmNcolors resource when setting the color of an entire
3606 row or rows. If XmNcolors is NULL, then XbaeMatrixSetRowColors()
3607 will create a Pixel table initialized to XmNforeground except
3608 for the rows specified in it's arguments. If XmNcolors is not
3609 NULL, then XbaeMatrixSetRowColors() will changed the specified
3610 rows in that resource to the specified colors.
3611
3612 XbaeMatrixSetRowHeight()
3613
3614 void XbaeMatrixSetRowHeight()
3615 Widget w;
3616 int row;
3617 int height;
3618
3619
3620 w An XbaeMatrix widget.
3621
3622 row The row whose height we'll be changing.
3623
3624 height The new height of this row. A row height can be 0 to
3625 hide a row.
3626
3627 XbaeMatrixSetRowHeight() is a convenient way to change the
3628 height of a row without the need to allocate an array with row
3629 height numbers. Passing -1 as the new height will reset the
3630 row's height to the default value.
3631
3632 XbaeMatrixSetRowLabel()
3633
3634 void XbaeMatrixSetRowLabel()
3635 Widget w;
3636 int row;
3637 String value;
3638
3639
3640 w An XbaeMatrix widget.
3641
3642 row The row of the label is to be set.
3643
3644 value The new value of the label.
3645
3646 XbaeMatrixSetRowLabel() allows the application developer to pro‐
3647 grammatically change the label of the specified row.
3648
3649 XbaeMatrixSetRowShadow()
3650
3651 void XbaeMatrixSetRowShadow()
3652 Widget w;
3653 int column;
3654 unsigned char shadow_type;
3655
3656
3657 w An XbaeMatrix widget.
3658
3659 row The row whose shadow should be set.
3660
3661 shadow_type
3662 The value of the new shadow.
3663
3664 XbaeMatrixSetRowShadow() allows the application developer to
3665 programmatically change the shadow for the specified row.
3666
3667 XbaeMatrixSetRowUserData()
3668
3669 void XbaeMatrixSetRowUserData()
3670 Widget w;
3671 int column;
3672 XtPointer data;
3673
3674
3675 w An XbaeMatrix widget.
3676
3677 row The row whose value should be set.
3678
3679 data A pointer to a user defined data area.
3680
3681 XbaeMatrixSetRowUserData() allows the application developer to
3682 programmatically associate user data for the specified row.
3683
3684 XbaeMatrixSetXmColumnLabel()
3685
3686 void XbaeMatrixSetXmColumnLabel()
3687 Widget w;
3688 int column;
3689 XmString value;
3690
3691
3692 w An XbaeMatrix widget.
3693
3694 column The column of the xmLabel is to be set.
3695
3696 value The new value of the xmLabel.
3697
3698 XbaeMatrixSetXmColumnLabel() allows the application developer to
3699 programmatically change the xmLabel of a specified column.
3700
3701
3702 XbaeMatrixSetXmRowLabel()
3703
3704 void XbaeMatrixSetXmRowLabel()
3705 Widget w;
3706 int row;
3707 XmString value;
3708
3709
3710 w An XbaeMatrix widget.
3711
3712 row The row of the xmLabel is to be set.
3713
3714 value The new value of the xmLabel.
3715
3716 XbaeMatrixSetXmRowLabel() allows the application developer to
3717 programmatically change the xmLabel of a specified row.
3718
3719 XbaeMatrixSortColumns()
3720
3721 void XbaeMatrixSortColumns()
3722 Widget w;
3723 int (*proc)(Widget, int, int, void *);
3724 void *user_data;
3725
3726
3727 w An XbaeMatrix widget.
3728
3729 proc a pointer to a function that can compare columns.
3730
3731 user_data a pointer the application can use for its own needs.
3732
3733 XbaeMatrixSortColumns allows you to sort the columns in the
3734 XbaeMatrix widget according to criteria determined by the proc
3735 function. The proc function should have the above signature and
3736 functionality as demanded by the qsort(3) function. It will be
3737 called with a the matrix being sorted, the indices of two col‐
3738 umns to compare and the user_data pointer XbaeMatrixSortColumns
3739 was called with. It should return -1, 0, or 1 as appropriate. It
3740 is guaranteed that the matrix does not change while sorting and
3741 the necessary reordering will only take place after the last
3742 call to proc has been made.
3743
3744 XbaeMatrixSortRows()
3745
3746 void XbaeMatrixSortRows()
3747 Widget w;
3748 int (*proc)(Widget, int, int, void *);
3749 void *user_data;
3750
3751
3752 w An XbaeMatrix widget.
3753
3754 proc a pointer to a function that can compare rows.
3755
3756 user_data a pointer the application can use for its own needs.
3757
3758 XbaeMatrixSortRows allows you to sort the rows in the XbaeMatrix
3759 widget according to criteria determined by the proc function.
3760 The proc function should have the above signature and function‐
3761 ality as demanded by the qsort(3) function. It will be called
3762 with the matrix being sorted, the indices of two rows to compare
3763 and the user_data pointer XbaeMatrixSortRows was called with. It
3764 should return -1, 0, or 1 as appropriate. It is guaranteed that
3765 the matrix does not change while sorting and the necessary re‐
3766 ordering will only take place after the last call to proc has
3767 been made.
3768
3769 XbaeMatrixUnhighlightAll()
3770
3771 void XbaeMatrixUnhighlightAll()
3772 Widget w;
3773
3774
3775 w An XbaeMatrix widget.
3776
3777 XbaeMatrixUnhighlightAll() allows the application developer to
3778 programmatically unhighlight all cells. XbaeMatrixUnhighligh‐
3779 tAll() erases the highlight from all cells. All unsigned chars
3780 in the XmNhighlightedCells array will be set to HighlightNone.
3781
3782 XbaeMatrixUnhighlightCell()
3783
3784 void XbaeMatrixUnhighlightCell()
3785 Widget w;
3786 int row;
3787 int column;
3788
3789
3790 w An XbaeMatrix widget.
3791
3792 row The row of the cell to unhighlight.
3793
3794 column The column of the cell to unhighlight.
3795
3796 XbaeMatrixUnhighlightCell() allows the application developer to
3797 programmatically unhighlight a cell. XbaeMatrixUnhighlight‐
3798 Cell() erases the highlight from the cell. The corresponding
3799 unsigned char in the XmNhighlightedCells array will be have its
3800 HighlightCell bit cleared.
3801
3802 XbaeMatrixUnhighlightColumn()
3803
3804 void XbaeMatrixUnhighlightColumn()
3805 Widget w;
3806 int column;
3807
3808
3809 w An XbaeMatrix widget.
3810
3811 column The column to unhighlight.
3812
3813 XbaeMatrixUnhighlightColumn() allows the application developer
3814 to programmatically unhighlight a column. XbaeMatrixUnhigh‐
3815 lightColumn() erases the highlight from around the column if Xm‐
3816 NgridType is XmGRID_COLUMN_SHADOW or from around each cell in
3817 the column otherwise. The corresponding unsigned chars in the
3818 XmNhighlightedCells array will be have its HighlightColumn or
3819 HighlightOther bit cleared, depending on whether XmNgridType is
3820 set to XmGRID_COLUMN_SHADOW or not.
3821
3822 XbaeMatrixUnhighlightRow()
3823
3824 void XbaeMatrixUnhighlightRow()
3825 Widget w;
3826 int row;
3827
3828
3829 w An XbaeMatrix widget.
3830
3831 row The row to unhighlight.
3832
3833 XbaeMatrixUnhighlightRow() allows the application developer to
3834 programmatically unhighlight a row. XbaeMatrixUnhighlightRow()
3835 erases the highlight from around the row if XmNgridType is Xm‐
3836 GRID_ROW_SHADOW or from around each cell in the row otherwise.
3837 The corresponding unsigned chars in the XmNhighlightedCells ar‐
3838 ray will be have its HighlightRow or HighlightOther bit cleared,
3839 depending on whether XmNgridType is set to XmGRID_ROW_SHADOW or
3840 not.
3841
3842 XbaeMatrixVisibleCells()
3843
3844 int XbaeMatrixVisibleCells()
3845 Widget w;
3846 int *top_row;
3847 int *bottom_row;
3848 int *left_column;
3849 int *right_column;
3850
3851
3852 w An XbaeMatrix widget.
3853
3854 top_row The first row that is currently visible in the matrix.
3855
3856 bottom_row
3857 The last row that is currently visible in the matrix.
3858
3859 left_column
3860 The leftmost column that is currently visible in the
3861 matrix.
3862
3863 right_column
3864 The rightmost column that is currently visible in the
3865 matrix.
3866
3867 XbaeMatrixVisibleCells() allows the the application developer to
3868 obtain the currently visible portion of the XbaeMatrix w.
3869
3870 XbaeMatrixVisibleColumns()
3871
3872 int XbaeMatrixVisibleColumns()
3873 Widget w;
3874
3875
3876 w An XbaeMatrix widget.
3877
3878 XbaeMatrixVisibleColumns() allows the the application developer
3879 to programmatically check how many columns are currently dis‐
3880 played in the XbaeMatrix w. A partially visible column will be
3881 declared an entire column.
3882
3883 XbaeMatrixVisibleRows()
3884
3885 int XbaeMatrixVisibleRows()
3886 Widget w;
3887
3888
3889 w An XbaeMatrix widget.
3890
3891 XbaeMatrixVisibleRows() allows the the application developer to
3892 programmatically check how many rows are currently displayed in
3893 the XbaeMatrix w. A partially visible row will be declared an
3894 entire row.
3895
3896 XbaeGetVersionNum()
3897
3898 int XbaeGetVersionNum()
3899
3900
3901 XbaeGetVersionNum() is a function that returns the numeric rep‐
3902 resentation of the version of the Xbae library that your program
3903 is working with. This is the run-time version of the Xbae wid‐
3904 gets, where XbaeVersion is a macro that represents the compile-
3905 time version.
3906
3907 The numeric representation is a simple calculation based on the
3908 major, minor, and pico numbers representing an Xbae widget re‐
3909 lease. E.g. version 4.8.1 would be represented as 40801.
3910
3911 Releases prior to 4.8.0 didn't have this functionality.
3912
3913 XbaeGetVersionText()
3914
3915 char * XbaeGetVersionText()
3916
3917
3918 XbaeGetVersionText() is a function that returns the textual rep‐
3919 resentation of the version of the Xbae library that your program
3920 is working with. This is the run-time version of the Xbae wid‐
3921 gets, where XbaeVersionTxt is a macro that represents the com‐
3922 pile-time version.
3923
3925 Using XtSetValues to set the Matrix's XmNwidth resource to 0 will cause
3926 it to recompute it's horizontal size. It will request a new size which
3927 results in XmNvisibleColumns columns being displayed. If XmNvisi‐
3928 bleColumns is 0, then it will request a new size such that it does not
3929 need a horizontal ScrollBar (full horizontal size).
3930
3931 Using XtSetValues to set the Matrix's XmNheight resource to 0 will
3932 cause it to recompute it's vertical size. It will request a new size
3933 which results in XmNvisibleRows rows being displayed. If XmNvisibleRows
3934 is 0, then it will request a new size such that it does not need a ver‐
3935 tical ScrollBar (full vertical size).
3936
3937 An XtSetValues on XmNvisibleRows will cause the Matrix to request a new
3938 size which results in XmNvisibleRows non-fixed rows being displayed,
3939 only if the new value is different than the old one.
3940
3941 An XtSetValues on XmNvisibleColumns will cause the Matrix to request a
3942 new size which results in the first XmNvisibleColumns non-fixed columns
3943 being displayed, only if the new value is different than the old one.
3944
3945 An XtSetValues on any other resource will not result in a request for a
3946 new size. Setting other resources in conjunction with setting XmNwidth
3947 and/or XmNheight to 0 allows for more control of the Matrix's geometry.
3948
3949 An XtSetValues setting XmNrowLabelWidth to 0 will cause XmNrowLabel‐
3950 Width to be set to the width of the longest row label.
3951
3952
3954 The bindings for virtual keys are vendor specific. For information
3955 about bindings for virtual buttons and keys, see VirtualBindings(3X).
3956
3958 Andrew Wason (aw@bae.bellcore.com) of Bellcore, Piscataway NJ, wrote
3959 the original version of the Xbae widgets. His final release of the
3960 widgets was version 3.8.
3961
3962 Kevin Brannen (kbrannen@metronet.com) took over maintainership follow‐
3963 ing Andrew Wason's departure and released version 4.0.
3964
3965 Andrew Lister (lister@db.com) maintained from 1995 to 1999.
3966
3968 Andrew Wason for the original idea and source code.
3969 Jay Schmidgall for his contributions.
3970 Nick Banyard for providing the multibyte extensions.
3971 Callum Gibson for the pattern parsing in the XbaeInput widget.
3972 Sascha Goebel for debugging the scroll-per-pixel code.
3973 Tobias Oed for lots of code cleanup and debugging.
3974 The people from Arcad Systemhaus for code submission for XbaeMatrixSort
3975 and a couple of related functionalities, and easier pixmap support.
3976
3978 This document describes XbaeMatrix, version 4.60.4.
3979
3981 Core(3X), Composite(3X), XmManager(3X), XmScrollBar(3X), XbaeInput(3X),
3982 XmText(3X)
3983
3985 Bellcore, previous and current maintainers of the Xbae widgets (collec‐
3986 tively 'authors') provide this information solely to professionals who
3987 have the appropriate degree of experience to understand and interpret
3988 its contents in accordance with generally accepted engineering or other
3989 professional standards and applicable regulations. No recommendations
3990 as to products or vendors is made or should be implied.
3991
3992 While the information contained herein has been prepared from sources
3993 deemed to be reliable, the authors reserve the right to revise the in‐
3994 formation without notice, but has no obligation to do so. Unless the
3995 recipient has been expressly granted a license by Bellcore under sepa‐
3996 rate applicable written agreement with Bellcore, no license, expressed
3997 or implied, is granted under any patents, copyrights or other intellec‐
3998 tual property rights. Use of the information is at your discretion and
3999 shall not be deemed an inducement by Bellcore to infringe any existing
4000 or later-issued patent, copyrights or other intellectual property
4001 right.
4002
4003 THE AUTHORS MAKE NO REPRESENTATIONS AND EXTENDS NO WARRANTIES, EXPRESS
4004 OR IMPLIED, WITH RESPECT TO THE INFORMATION, INCLUDING, BUT NOT LIMITED
4005 TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ANY PAR‐
4006 TICULAR PURPOSE, AND THE WARRANTY AGAINST INFRINGEMENT OF PATENTS OR
4007 OTHER INTELLECTUAL PROPERTY RIGHTS. THE INFORMATION IS PROVIDED ``AS
4008 IS'', AND IN NO EVENT SHALL THE AUTHORS OR ANY OF ITS AFFILIATES BE LI‐
4009 ABLE FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS OR OTHER INCIDENTAL OR
4010 CONSEQUENTIAL DAMAGES RELATING TO THE INFORMATION.
4011
4012 Copyright 1991, 1992 Bellcore.
4013 Copyright 1995-99 Andrew Lister All Rights Reserved.
4014 Copyright 1999-2002 LessTif Developers
4015
4016
4017
4018 The above no warranty extends to all additions and contributions. No
4019 contributor shall be held liable; this work is provided ``as is''. If
4020 this is a problem for you, then don't use this software.
4021
4022
4023
40244.60.4 2021-01-29 XbaeMatrix(3x)