summaryrefslogtreecommitdiff
path: root/widgetprogressbar.cpp
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2006-08-04 01:04:15 +0000
committerMatt Turner <mattst88@gmail.com>2006-08-04 01:04:15 +0000
commitdfa4a46bb0e6c6df9d07039fda5ef7f4309915b2 (patch)
treeac8b4cc67ff64703b4298f077e87bb4eb4334410 /widgetprogressbar.cpp
parent3582a80243bdd92619e737111ada5b5bf2667cd7 (diff)
git-svn-id: svn://mattst88.com/svn/skygipp/trunk@2 a71248a0-261a-0410-b604-901f7c0bd773
Diffstat (limited to 'widgetprogressbar.cpp')
-rw-r--r--widgetprogressbar.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/widgetprogressbar.cpp b/widgetprogressbar.cpp
new file mode 100644
index 0000000..9b2ff32
--- /dev/null
+++ b/widgetprogressbar.cpp
@@ -0,0 +1,48 @@
+#include <skygi/skygi.h>
+
+#include "widgetprogressbar.h"
+
+CProgressbar::CProgressbar() {
+ this->value = 0;
+ this->maximum = 100;
+ this->color = cGray;
+}
+
+HRESULT CProgressbar::Create(HANDLE parent, char * name, int x, int y, int w, int h, int style) {
+ this->hWnd = GI_WidgetProgressCreate(parent, name, x, y, w, h, style);
+ if (this->hWnd) {
+ return S_OK;
+ }
+ return E_HANDLE;
+}
+
+int CProgressbar::Redraw() {
+ return GI_WidgetProgressForceRedraw(this->hWnd);
+}
+
+int CProgressbar::SetValue(int val) {
+ this->value = val;
+ return GI_WidgetProgressSet(this->hWnd, val);
+}
+
+int CProgressbar::GetValue() {
+ return this->value;
+}
+
+int CProgressbar::SetColor(COLOR Color) {
+ this->color = Color;
+ return GI_WidgetProgressSetColor(this->hWnd, Color);
+}
+
+COLOR CProgressbar::GetColor() {
+ return this->color;
+}
+
+int CProgressbar::SetMax(int max) {
+ this->maximum = max;
+ return GI_WidgetProgressSetMax(this->hWnd, max);
+}
+
+int CProgressbar::GetMax() {
+ return this->maximum;
+}