btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / apps / deskbar / InlineScrollView.h
blob8c57a688ce30d3f59e296bd2d0190cc568c28344
1 /*
2 * Copyright 2012, Haiku, Inc.
3 * Distributed under the terms of the MIT License.
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
14 #include <View.h>
17 class BLayout;
18 class BPoint;
19 class ScrollArrow;
21 class TInlineScrollView : public BView {
22 public:
23 TInlineScrollView(BView* target,
24 enum orientation orientation = B_VERTICAL);
25 virtual ~TInlineScrollView();
27 virtual void AttachedToWindow();
28 virtual void DetachedFromWindow();
30 virtual void Draw(BRect updateRect);
32 void AttachScrollers();
33 void DetachScrollers();
34 bool HasScrollers() const;
36 void SetSmallStep(float step);
37 void GetSteps(float* _smallStep,
38 float* _largeStep) const;
39 void ScrollBy(const float& step);
41 bool Orientation() const { return fOrientation; };
42 void SetOrientation(int32 orienation)
43 { fOrientation = orienation; };
45 private:
46 BView* fTarget;
47 ScrollArrow* fBeginScrollArrow;
48 ScrollArrow* fEndScrollArrow;
50 float fScrollStep;
51 float fScrollValue;
52 float fScrollLimit;
54 int32 fOrientation;
58 #endif // INLINE_SCROLL_VIEW_H