Ember
Loading...
Searching...
No Matches
StatusOverlay.cpp
Go to the documentation of this file.
2
3namespace EmberUI {
4
5// Status values match Protocol::NodeStatus enum:
6// Idle=0, Running=1, Success=2, Failure=3, Halted=4
7
8wxColour StatusColors::IdleFill() { return wxColour(75, 75, 75); }
9wxColour StatusColors::RunningFill() { return wxColour(40, 70, 160); }
10wxColour StatusColors::SuccessFill() { return wxColour(35, 130, 35); }
11wxColour StatusColors::FailureFill() { return wxColour(160, 30, 30); }
12wxColour StatusColors::HaltedFill() { return wxColour(180, 120, 0); }
13
14wxColour StatusColors::GetFillColor(int status) {
15 switch (status) {
16 case 1:
17 return RunningFill();
18 case 2:
19 return SuccessFill();
20 case 3:
21 return FailureFill();
22 case 4:
23 return HaltedFill();
24 default:
25 return IdleFill();
26 }
27}
28
29wxColour StatusColors::GetBorderColor(int status) {
30 switch (status) {
31 case 1:
32 return wxColour(65, 105, 225);
33 case 2:
34 return wxColour(50, 205, 50);
35 case 3:
36 return wxColour(220, 20, 60);
37 case 4:
38 return wxColour(255, 165, 0);
39 default:
40 return wxColour(100, 100, 100);
41 }
42}
43
44wxColour StatusColors::GetTextColor(int status) {
45 switch (status) {
46 case 1:
47 case 2:
48 case 3:
49 case 4:
50 return wxColour(255, 255, 255);
51 default:
52 return wxColour(180, 180, 180);
53 }
54}
55
56wxColour StatusColors::GetExecutionPathColor() { return wxColour(255, 215, 0); }
57
58wxColour StatusColors::GetCurrentNodeColor() { return wxColour(0, 255, 255); }
59
60} // namespace EmberUI
Definition Panel.h:8
static wxColour GetCurrentNodeColor()
Color for the currently executing node.
static wxColour RunningFill()
Fill color for running state.
static wxColour FailureFill()
Fill color for failure state.
static wxColour IdleFill()
Fill color for idle state.
static wxColour GetExecutionPathColor()
Color for nodes in the execution path.
static wxColour GetBorderColor(int status)
Returns border color for the given status code.
static wxColour GetTextColor(int status)
Returns text color for the given status code.
static wxColour GetFillColor(int status)
Returns fill color for the given status code.
static wxColour SuccessFill()
Fill color for success state.
static wxColour HaltedFill()
Fill color for halted state.