vfs: check userland buffers before reading them.
[haiku.git] / src / preferences / appearance / FakeScrollBar.h
blobc02571ed82c937f150b0f71f8063be6b3d741419
1 /*
2 * Copyright 2010-2012 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT license.
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
13 #include <Control.h>
16 class FakeScrollBar : public BControl {
17 public:
18 FakeScrollBar(bool drawArrows, bool doubleArrows,
19 BMessage* message);
20 ~FakeScrollBar(void);
22 virtual void MouseDown(BPoint point);
23 virtual void MouseMoved(BPoint point, uint32 transit,
24 const BMessage *message);
25 virtual void MouseUp(BPoint point);
27 virtual void Draw(BRect updateRect);
29 virtual void SetValue(int32 value);
31 void SetDoubleArrows(bool doubleArrows);
32 void SetKnobStyle(uint32 knobStyle);
34 void SetFromScrollBarInfo(const scroll_bar_info &info);
36 private:
37 void _DrawArrowButton(int32 direction, BRect r,
38 const BRect& updateRect);
40 bool fDrawArrows;
41 bool fDoubleArrows;
42 int32 fKnobStyle;
45 #endif // FAKE_SCROLL_BAR_H