summaryrefslogtreecommitdiff
path: root/widgetslider.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'widgetslider.cpp')
-rw-r--r--widgetslider.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/widgetslider.cpp b/widgetslider.cpp
new file mode 100644
index 0000000..3b5198b
--- /dev/null
+++ b/widgetslider.cpp
@@ -0,0 +1,34 @@
+#include <skygi/skygi.h>
+
+#include "widgetslider.h"
+
+CSlider::CSlider() {
+ this->maximum = 0;
+ this->hWnd = NULL;
+}
+
+HRESULT CSlider::Create(HANDLE parent, char * name, int x, int y, int w, int h, int style) {
+ this->hWnd = GI_WidgetSliderCreate(parent, name, x, y, w, h, style);
+ if (this->hWnd) {
+ return S_OK;
+ }
+ return E_HANDLE;
+}
+
+HRESULT CSlider::SetValue(int position) {
+ this->pos = position;
+ return GI_WidgetSliderSet(this->hWnd, position);
+}
+
+int CSlider::GetValue() {
+ return this->pos;
+}
+
+HRESULT CSlider::SetMax(int max) {
+ maximum = max;
+ return GI_WidgetSliderSetMax(this->hWnd, max);
+}
+
+int CSlider::GetMax() {
+ return this->maximum;
+}