Subversion Repositories Kolibri OS

Rev

Rev 9628 | Rev 9648 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9628 Rev 9630
Line 79... Line 79...
79
	G.SetColor(canvas, K.colors.line);
79
	G.SetColor(canvas, K.colors.line);
80
	G.Rect(canvas, left, top, right, bottom);
80
	G.Rect(canvas, left, top, right, bottom);
81
END Rect;
81
END Rect;
Line 82... Line 82...
82
 
82
 
83
 
83
 
84
PROCEDURE _paint (scroll: tScroll);
84
PROCEDURE _draw (scroll: tScroll);
85
VAR
85
VAR
86
	canvas: G.tCanvas;
86
	canvas: G.tCanvas;
Line 162... Line 162...
162
		SetColor(canvas, scroll.Inc);
162
		SetColor(canvas, scroll.Inc);
163
		x := x + width - btn - d DIV 2 + 1;
163
		x := x + width - btn - d DIV 2 + 1;
164
		G.Triangle(canvas, x, y1 - 1, x, y2, G.triRight);
164
		G.Triangle(canvas, x, y1 - 1, x, y2, G.triRight);
165
	END;
165
	END;
166
	G.DrawCanvas(scroll.canvas, scroll.left, scroll.top)
166
	G.DrawCanvas(scroll.canvas, scroll.left, scroll.top)
167
END _paint;
167
END _draw;
Line 168... Line 168...
168
 
168
 
169
 
169
 
170
PROCEDURE paint* (scroll: tScroll);
170
PROCEDURE draw* (scroll: tScroll);
171
BEGIN
171
BEGIN
172
	IF scroll.canvas # NIL THEN
172
	IF scroll.canvas # NIL THEN
173
		_paint(scroll)
173
		_draw(scroll)
Line 174... Line 174...
174
	END
174
	END
175
END paint;
175
END draw;
176
 
176
 
177
 
177
 
178
PROCEDURE resize* (VAR scroll: tScroll; width, height: INTEGER);
178
PROCEDURE resize* (VAR scroll: tScroll; width, height: INTEGER);
179
BEGIN
179
BEGIN
180
	G.destroy(scroll.canvas);
180
	G.destroy(scroll.canvas);
181
	scroll.canvas := G.CreateCanvas(width, height);
181
	scroll.canvas := G.CreateCanvas(width, height);
Line 182... Line 182...
182
	scroll.width := width;
182
	scroll.width := width;
183
	scroll.height := height;
183
	scroll.height := height;
Line 224... Line 224...
224
	IF scroll.Inc THEN
224
	IF scroll.Inc THEN
225
		setValue(scroll, scroll.value + 1)
225
		setValue(scroll, scroll.value + 1)
226
	ELSIF scroll.Dec THEN
226
	ELSIF scroll.Dec THEN
227
		setValue(scroll, scroll.value - 1)
227
		setValue(scroll, scroll.value - 1)
228
	END;
228
	END;
229
	paint(scroll)
229
	draw(scroll)
230
END change;
230
END change;
Line 231... Line 231...
231
 
231
 
232
 
232
 
Line 300... Line 300...
300
		c := y - scroll.top
300
		c := y - scroll.top
301
	ELSE
301
	ELSE
302
		c := x - scroll.left
302
		c := x - scroll.left
303
	END;
303
	END;
304
	setPos(scroll, scroll.pos0 + c - scroll.Slider);
304
	setPos(scroll, scroll.pos0 + c - scroll.Slider);
305
	paint(scroll)
305
	draw(scroll)
306
END MouseMove;
306
END MouseMove;
Line 307... Line 307...
307
 
307
 
308
 
308
 
Line 366... Line 366...
366
			SendIPC
366
			SendIPC
367
		ELSE
367
		ELSE
368
			setPos(scroll, c - scroll.btnSize - scroll.sliderSize DIV 2);
368
			setPos(scroll, c - scroll.btnSize - scroll.sliderSize DIV 2);
369
			scroll.pos0 := scroll.pos;
369
			scroll.pos0 := scroll.pos;
370
			scroll.Slider := c;
370
			scroll.Slider := c;
371
			paint(scroll)
371
			draw(scroll)
372
		END
372
		END
373
	END
373
	END
374
END MouseDown;
374
END MouseDown;
Line 386... Line 386...
386
		ELSIF scroll.Slider # -1 THEN
386
		ELSIF scroll.Slider # -1 THEN
387
			MouseMove(scroll, x, y)
387
			MouseMove(scroll, x, y)
388
		END
388
		END
389
	ELSIF scroll.mouse THEN
389
	ELSIF scroll.mouse THEN
390
		MouseUp(scroll);
390
		MouseUp(scroll);
391
		paint(scroll)
391
		draw(scroll)
392
	END
392
	END
393
END mouse;
393
END mouse;
Line 394... Line 394...
394
 
394