File: ProgressBar.cpp

package info (click to toggle)
bullet 3.24%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 15,164 kB
  • sloc: cpp: 246,331; lisp: 12,017; ansic: 11,175; python: 630; makefile: 136; sh: 75
file content (87 lines) | stat: -rw-r--r-- 2,290 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#include "UnitTest.h"
#include "Gwen/Controls/RadioButtonController.h"
#include "Gwen/Controls/ProgressBar.h"

using namespace Gwen;

class ProgressBar : public GUnit
{
public:
	GWEN_CONTROL_INLINE(ProgressBar, GUnit)
	{
		{
			Gwen::Controls::ProgressBar* pb = new Gwen::Controls::ProgressBar(this);
			pb->SetBounds(Gwen::Rect(110, 20, 200, 20));
			pb->SetValue(0.27f);
		}

		{
			Gwen::Controls::ProgressBar* pb = new Gwen::Controls::ProgressBar(this);
			pb->SetBounds(Gwen::Rect(110, 50, 200, 20));
			pb->SetValue(0.66f);
			pb->SetAlignment(Pos::Right | Pos::CenterV);
		}

		{
			Gwen::Controls::ProgressBar* pb = new Gwen::Controls::ProgressBar(this);
			pb->SetBounds(Gwen::Rect(110, 80, 200, 20));
			pb->SetValue(0.88f);
			pb->SetAlignment(Pos::Left | Pos::CenterV);
		}

		{
			Gwen::Controls::ProgressBar* pb = new Gwen::Controls::ProgressBar(this);
			pb->SetBounds(Gwen::Rect(110, 110, 200, 20));
			pb->SetAutoLabel(false);
			pb->SetValue(0.20f);
			pb->SetAlignment(Pos::Right | Pos::CenterV);
			pb->SetText(L"40,245 MB");
		}

		{
			Gwen::Controls::ProgressBar* pb = new Gwen::Controls::ProgressBar(this);
			pb->SetBounds(Gwen::Rect(110, 140, 200, 20));
			pb->SetAutoLabel(false);
			pb->SetValue(1.00f);
		}

		{
			Gwen::Controls::ProgressBar* pb = new Gwen::Controls::ProgressBar(this);
			pb->SetBounds(Gwen::Rect(110, 170, 200, 20));
			pb->SetAutoLabel(false);
			pb->SetValue(0.00f);
		}

		{
			Gwen::Controls::ProgressBar* pb = new Gwen::Controls::ProgressBar(this);
			pb->SetBounds(Gwen::Rect(110, 200, 200, 20));
			pb->SetAutoLabel(false);
			pb->SetValue(0.50f);
		}

		{
			Gwen::Controls::ProgressBar* pb = new Gwen::Controls::ProgressBar(this);
			pb->SetBounds(Gwen::Rect(20, 20, 25, 200));
			pb->SetVertical();
			pb->SetValue(0.25f);
			pb->SetAlignment(Pos::Top | Pos::CenterH);
		}

		{
			Gwen::Controls::ProgressBar* pb = new Gwen::Controls::ProgressBar(this);
			pb->SetBounds(Gwen::Rect(50, 20, 25, 200));
			pb->SetVertical();
			pb->SetValue(0.40f);
		}

		{
			Gwen::Controls::ProgressBar* pb = new Gwen::Controls::ProgressBar(this);
			pb->SetBounds(Gwen::Rect(80, 20, 25, 200));
			pb->SetVertical();
			pb->SetAlignment(Pos::Bottom | Pos::CenterH);
			pb->SetValue(0.65f);
		}
	}
};

DEFINE_UNIT_TEST(ProgressBar, L"ProgressBar");