TachyonUI 1.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
gui_progress_types.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <functional>
5#include <string_view>
6
7namespace tachyon
8{
11
13 enum class SpinnerSize : uint8_t
14 {
18 };
19
21 enum class TaskState : uint8_t
22 {
23 Pending,
28 };
29
33 {
34 std::string_view name;
35 float value = -1.0f;
37 std::string_view note;
38 std::string_view detail;
39 std::function<void()> onCancel;
40 std::function<void()> onRetry;
41 std::function<void()> onPause;
42 };
43
44}
SpinnerSize
How large a Spinner is.
Definition gui_progress_types.h:14
TaskState
Where a piece of work is.
Definition gui_progress_types.h:22
@ Small
12px, in a status bar or beside a line of small text
Definition gui_progress_types.h:15
@ Large
18px, a step's glyph, or alone in an empty panel
Definition gui_progress_types.h:17
@ Running
under way
Definition gui_progress_types.h:24
@ Paused
stopped for now, in the warning color
Definition gui_progress_types.h:25
@ Done
finished
Definition gui_progress_types.h:27
@ Medium
Medium (500).
Definition gui_style_text.h:122
@ Failed
anything else; see the message
Definition gui_result.h:15
Definition gui_logging.h:24
A piece of work, as TaskProgress, ProgressSteps, StatusProgress and BackgroundTasks show it.
Definition gui_progress_types.h:33
std::function< void()> onCancel
set: a cancel button while running or paused
Definition gui_progress_types.h:39
TaskState state
Definition gui_progress_types.h:36
std::string_view note
beside the name: "2.1 s", "1,240 / 3,800"; empty shows the percent while running
Definition gui_progress_types.h:37
float value
0 to 1 done; below 0 when not known, shown as a sliding segment
Definition gui_progress_types.h:35
std::string_view name
"Importing character.fbx"
Definition gui_progress_types.h:34
std::function< void()> onRetry
set: a Retry button once failed
Definition gui_progress_types.h:40
std::function< void()> onPause
set, in BackgroundTasks: pause while running, resume while paused
Definition gui_progress_types.h:41
std::string_view detail
under the bar: "12.4 MB of 19.3 MB"; once failed, why
Definition gui_progress_types.h:38