Oma_Ot_Template_Column_Add()
Abstract
Adds a new column to a template.
Syntax
Oma_Ot_Template_Column_Add (template_ptr, column_tag, column_title, format_string, value_type, options)
| Argument | Type | Description |
|---|---|---|
template_ptr |
OmaT_Ot_Template * |
Template to receive the new column. |
column_tag |
const char * |
Unique string identifying the column. |
column_title |
const char * |
Name for the column (need not be unique). |
format_string |
const char * |
Format for displaying column values (such as “%.12g”, “0x%lX”), or PRGC_NIL. |
value_type |
OmaT_Ot_Value_Type |
Type of value the column can hold. See Table 175 for valid symbolic constants. |
options |
int |
OR’ed value of supported column options. See Details. |
Return Type
int
Index of the new column; PRGC_NIL or -1 if the operation fails.
Header
oma_ot.h
Details
options must be 0 or an OR’ed combination of the following symbolic constants:
OMAC_OT_TABLE_COLUMN_OPT_MULTIPLE_VALUES_PER_CELL— when set, collects to the column are put together into a dynamically grown array. (Normally, collects to a column between row writes cause the former value to be overwritten by the new one.)OMAC_OT_TABLE_COLUMN_OPT_INHERIT_PREVIOUS_VALUE—if this column has an undefined value, it should inherit a defined value from the closest preceding row.OMAC_OT_TABLE_COLUMN_OPT_PREFORMATTED_TEXT—this column contains a preformatted text string.