xref: /haiku/src/preferences/appearance/FakeScrollBar.h (revision 99d027cd0238c1d86da86d7c3f4200509ccc61a6)
1 /*
2  *  Copyright 2010-2012 Haiku, Inc. All rights reserved.
3  *  Distributed under the terms of the MIT license.
4  *
5  *	Authors:
6  *		DarkWyrm <bpmagic@columbus.rr.com>
7  *		John Scipione <jscipione@gmail.com>
8  */
9 #ifndef FAKE_SCROLL_BAR_H
10 #define FAKE_SCROLL_BAR_H
11 
12 
13 #include <Control.h>
14 
15 
16 class FakeScrollBar : public BControl {
17 public:
18 							FakeScrollBar(bool drawArrows, bool doubleArrows,
19 								BMessage* message);
20 							~FakeScrollBar(void);
21 
22 	virtual	void			MouseDown(BPoint point);
23 	virtual	void			MouseMoved(BPoint point, uint32 transit,
24 								const BMessage *message);
25 	virtual	void			MouseUp(BPoint point);
26 
27 	virtual	void			Draw(BRect updateRect);
28 
29 	virtual	void			SetValue(int32 value);
30 
31 			void			SetDoubleArrows(bool doubleArrows);
32 			void			SetKnobStyle(uint32 knobStyle);
33 
34 			void			SetFromScrollBarInfo(const scroll_bar_info &info);
35 
36 private:
37 			void			_DrawArrowButton(int32 direction,
38 								bool doubleArrows, BRect r,
39 								const BRect& updateRect);
40 
41 			bool			fDrawArrows;
42 			bool			fDoubleArrows;
43 			int32			fKnobStyle;
44 };
45 
46 #endif	// FAKE_SCROLL_BAR_H
47