summaryrefslogtreecommitdiff
path: root/widgetslider.cpp
blob: 3b5198b886107f0c58a11a4662b34c99b9a5c2e3 (plain)
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
#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;
}