xref: /haiku/src/preferences/appearance/FakeScrollBar.h (revision a3e794ae459fec76826407f8ba8c94cd3535f128)
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, BRect r,
38 								const BRect& updateRect);
39 
40 			bool			fDrawArrows;
41 			bool			fDoubleArrows;
42 			int32			fKnobStyle;
43 };
44 
45 #endif	// FAKE_SCROLL_BAR_H
46