#include "SaPopCalls.h" SaCallbackStruct* SaMakeCbsStartStopCol(SaCallbackStruct *cbs, int start, int stop);
SaCallbackStruct
callback structure.cbs
is used as the starting column from which to make the return callback structure.cbs
is used as the stopping column from which to make the return SaCallbackStruct
callback structure.start
and stop
arguments. A NULL pointer is returned if cbs is NULL or if the column specification is invalid.SaCallbackStruct
given a callback structure. The start
parameter specifies which columns of the first group of cbs
is used as the starting column from which to make the return SaCallbackStruct
. The stop
parameter specifies which column of cbs
is used as the stopping column to make the return SaCallbackStruct. If stop
is less than start,
then the returned SaCallbackStruct
will have columns in reverse order from that of cbs
.
Both parameters are limited to 0 and the number of columns in the first group of cbs
to - 1. If the range of columns specified by start
and stop
does not overlap 0 to the number of columns in the first group of cbs
- 1, then the column specification is invalid. If cbs
is NULL or an invalid column specification is used, a NULL pointer is returned. Use SaFreeCbs() to deallocate this memory when it is no longer needed. The returned structure should be considered read-only data. Also, the actual data values in the structure should only be used while the underlying data is valid. This is usually after the Population callback function returns, although it may extend beyond that if the data is cached and not overwritten.
#include "SaConsoleCalls.h" void SaPopulateFields(list, client_data, cbs) Widget list; XtPointer client_data; SaCallbackStruct *cbs; { SaCallbackStruct *pcbs; pcbs = SaMakeCbsStartStopCol(cbs, 0, 5); SaPopulateTextFieldByCol(UxGetWidget(textField3),0,pcbs); SaPopulateTextFieldByCol(UxGetWidget(textField4),1,pcbs); SaPopulateTextFieldByCol(UxGetWidget(textField6),2,pcbs); SaPopulateTextFieldByCol(UxGetWidget(textField5),3,pcbs); SaPopulateTextFieldByCol(UxGetWidget(textField8),4,pcbs); SaPopulateTextFieldByCol(UxGetWidget(textField7),5,pcbs); SaFreeCbs(pcbs); pcbs = SaMakeCbsByCol(cbs, 2); SaPopulateTitleAndIcon(UxGetWidget(topLevelShell1), NULL,pcbs); SaFreeCbs(pcbs); pcbs = SaMakeCbsByGroup(cbs, 0); SaPopulateList(UxGetWidget(scrolledList1), NULL, pcbs); SaFreeCbs(pcbs); pcbs = SaMakeCbsStartColRange(cbs, 6, 1); SaPopulateTextField(UxGetWidget(textField7), NULL,pcbs); SaFreeCbs(pcbs); }