TaskViewer2D
- Last UpdatedJul 03, 2025
- 4 minute read
The TaskViewer2D node represents a more advanced alternative to the standard Taskviewer node to represent the contents of a TaskManager node.
-
Inherits from RectBase2D.
The major differences are:
-
Visuals: The task description sits directly under the corresponding task title.
-
Functional: Visualization can be restricted to only currently running tasks to be used as a contextual To-Do guide.
-
Technical: As a RectBase2D-derived node, TaskViewer2D supports rendering inside Texture2D. This is useful for immersive virtual reality applications.
Platform support
This node is supported on XR-Windows platform only.
|
XR-WIN |
XR-P-WIN |
XR-P-IOS |
XR-P-AND |
XR-P-WASM |
|---|---|---|---|---|
|
Full support |
No support |
No support |
No support |
No support |
|
|
|
|
|
|
Refreshing contents
Refresh contents in two ways:
-
On demand: Calling refresh field.
-
On time basis: Setting refreshTime parameter to a value different from 0.
It is recommended that you use the On Demand approach to avoid unnecessary texture drawing activities.
Look and feel
This component offers several customization options:
-
You can define the colors for each task state and separate fonts for title and description.
-
The indent can be used to better identify the tasks hierarchy while lineSpacing can improve readibility
-
With mode, it's possible to display all the tasks or just those in running state.
-
Addititionally—the component, through the descriptionMode field, supports two different ways to position the description relative to title: underTitle and afterTitle.
Example—When descriptionMode is underTitle
The indentDescription can be used to better separate title and description.

Example—When descriptionMode is afterTitle
This works when title is a number, a code or a simple word. In this case, the description is displayed at the right of the title and the indentDescription defines the amount of space available for the title. The overall task height will be based on the tallest element between title and description.

Code example
This is a code example for the TaskViewer2D node.
<TaskViewer2D name="tv2d" position="20 20" order="18" size="370 310" visible="true" parent="taskviewer_rct_bg" updateMode="direct" textColorWaiting="0.623 0.627 0.643" textColorSuccess="0 0 0" textColorFail="0.917 0.219 0.21" cursorColor="0.211 0.274 0.325" fontTitle="Arial,Bold|antialias,14" fontDescription="Arial,Regular|antialias,16" taskmanagerNode="currentTaskmanager" mode="running" />
TaskViewer2D fields
These are the fields for TaskViewer2D node. Only the node-specific fields are indicated, not fields obtained by inheritance.
Field inheritance: NodeBase > RectBase2D > TaskViewer2D
|
Fields |
Type |
Use |
Default value |
Description |
|---|---|---|---|---|
|
active |
sbool |
Optional |
true |
When false, the component is not updated. |
|
cursorColor |
svec3 |
Optional |
0 0 1 |
Color of the selection bar visualized under the currently selected task. |
|
descriptionMode |
senum |
Optional |
underTitle |
Allows you to modify the description to title alignment. When is set to underTitle, the description is displayed under the title. When is set to afterTitle, the description is placed at the right of the title whose horizontal space is limited by the indentDescription field. |
|
fontTitle |
sstring |
Optional |
Arial,Regular,20 |
Font used for tasks title. |
|
fontDescription |
sstring |
Optional |
Arial,Regular,16 |
Font used for tasks description. |
|
indent |
sint |
Optional |
20 |
Indent used for task hierarchy. |
|
indentDescription |
sint |
Optional |
0 |
When descriptionMode is set to underTitle, can be used to shift descriptions relative to title. When set to afterTitle, defines the width reserved for the title. |
|
lineSpacing |
sint |
Optional |
5 |
Vertical distance between a task and the following. |
|
mode |
senum |
Optional |
All |
Specifies whether to list all the tasks or only those in running state. |
|
refresh |
sevent |
Optional |
Not set |
When called cause the component to refresh its texture. |
|
refreshTime |
sfloat |
Optional |
0 |
Expressed in seconds. If different from 0 defines the component automatic refresh interval. |
|
selectedIndex |
sint |
Optional |
0 |
Used to move the selector. The component supports keyboard interaction when visible and active. However, the index can also be driven from outside; for example, linked to pressing a button. |
|
selectedTask |
sstring |
Read only |
Internally calculated |
Currently selected task name. |
|
taskmanagerNode |
sstring |
Mandatory |
taskmanagerNode |
Must be set to the name of a taskmanager node. |
|
textColorWaiting |
svec3 |
Optional |
0.5 0.5 0.5 |
Color for the title of tasks in waiting state. |
|
textColorRunning |
svec3 |
Optional |
1 1 1 |
Color for the title of tasks in running state. |
|
textColorSuccess |
svec3 |
Optional |
0 1 0 |
Color for the title of tasks in success state. |
|
textColorFail |
svec3 |
Optional |
1 0 0 |
Color for the title of tasks in fail state. |
