Builder for the metric names, values and icons attributes of a pin.
More...
Builder for the metric names, values and icons attributes of a pin.
The lists map to AttributeIdMetricNames, AttributeIdMetricValues and AttributeIdMetricIcons.
◆ MetricGroup
Metric names, values and icons being built.
| Data Fields |
|
Uint32List * |
icons |
Metric icons, as TimelineResourceId. |
|
size_t |
max_item_string_size |
Maximum size of a name or value string. |
|
int |
max_num_items |
Capacity, in metrics. |
|
struct pbl_string_list * |
names |
Metric names. |
|
int |
num_items |
Number of metrics added. |
|
struct pbl_string_list * |
values |
Metric values. |
◆ metric_group_add_item()
| bool metric_group_add_item |
( |
MetricGroup * |
metric_group, |
|
|
const char * |
name_i18n, |
|
|
const char * |
value, |
|
|
TimelineResourceId |
icon, |
|
|
void * |
i18n_owner |
|
) |
| |
Add a metric to a group.
- Parameters
-
| metric_group | Group. |
| name_i18n | i18n key of the name. |
| value | Value string. |
| icon | Icon. |
| i18n_owner | Owner of the translated name. |
- Returns
- true if added, false if the group is full.
◆ metric_group_create()
| MetricGroup * metric_group_create |
( |
int |
max_num_items, |
|
|
size_t |
max_item_string_size |
|
) |
| |
Create a metric group.
- Parameters
-
| max_num_items | Maximum number of metrics. |
| max_item_string_size | Maximum size of any name or value string. |
- Returns
- New group, allocated on the calling task's heap.
◆ metric_group_destroy()
| void metric_group_destroy |
( |
MetricGroup * |
metric_group | ) |
|
Destroy a metric group.
- Parameters
-
| metric_group | Group to destroy, may be NULL. |