1/*
2 * Copyright 2012, Haiku, Inc.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Marc Flerackers (mflerackers@androme.be)
7 *		Stefano Ceccherini (stefano.ceccherini@gmail.com)
8 *		John Scipione (jscipione@gmail.com)
9 */
10#ifndef INLINE_SCROLL_VIEW_H
11#define INLINE_SCROLL_VIEW_H
12
13
14#include <View.h>
15
16
17class BLayout;
18class BPoint;
19class ScrollArrow;
20
21class TInlineScrollView : public BView {
22public:
23								TInlineScrollView(BView* target,
24									enum orientation orientation = B_VERTICAL);
25	virtual						~TInlineScrollView();
26
27	virtual	void				AttachedToWindow();
28	virtual	void				DetachedFromWindow();
29
30	virtual	void				Draw(BRect updateRect);
31
32				void			AttachScrollers();
33				void			DetachScrollers();
34				bool			HasScrollers() const;
35
36				void			SetSmallStep(float step);
37				void			GetSteps(float* _smallStep,
38										 float* _largeStep) const;
39				void			ScrollBy(const float& step);
40
41				bool			Orientation() const { return fOrientation; };
42				void			SetOrientation(int32 orienation)
43									{ fOrientation = orienation; };
44
45private:
46				BView*			fTarget;
47				ScrollArrow*	fBeginScrollArrow;
48				ScrollArrow*	fEndScrollArrow;
49
50				float			fScrollStep;
51				float			fScrollValue;
52				float			fScrollLimit;
53
54				int32			fOrientation;
55};
56
57
58#endif	// INLINE_SCROLL_VIEW_H
59