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 class BLayout; 17 class ScrollArrow; 18 class BPoint; 19 20 21 class TInlineScrollView : public BView { 22 public: 23 TInlineScrollView(BRect frame, BView* target); 24 virtual ~TInlineScrollView(); 25 26 virtual void AttachedToWindow(); 27 virtual void DetachedFromWindow(); 28 29 void AttachScrollers(); 30 void DetachScrollers(); 31 bool HasScrollers() const; 32 33 void SetSmallStep(float step); 34 void GetSteps(float* _smallStep, float* _largeStep) const; 35 void ScrollBy(const float& step); 36 37 private: 38 BView* fTarget; 39 ScrollArrow* fUpperScrollArrow; 40 ScrollArrow* fLowerScrollArrow; 41 42 float fScrollStep; 43 float fValue; 44 float fLimit; 45 }; 46 47 48 #endif // INLINE_SCROLL_VIEW_H 49