RemoteDrawingEngine: Reduce RP_READ_BITMAP result timeout.
[haiku.git] / src / preferences / mouse / MouseView.h
blobfd5097bab3101e7080f482c275882f0f8f57184f
1 /*
2 * Copyright 2003-2015 Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Jérôme Duval,
7 * Axel Dörfler (axeld@pinc-software.de)
8 * Andrew McCall (mccall@digitalparadise.co.uk)
9 */
10 #ifndef MOUSE_VIEW_H
11 #define MOUSE_VIEW_H
14 #include <Bitmap.h>
15 #include <Picture.h>
16 #include <PopUpMenu.h>
17 #include <View.h>
20 class MouseSettings;
22 class MouseView : public BView {
23 public:
24 MouseView(const MouseSettings& settings);
25 virtual ~MouseView();
27 void SetMouseType(int32 type);
28 void MouseMapUpdated();
29 void UpdateFromSettings();
31 virtual void GetPreferredSize(float* _width, float* _height);
32 virtual void AttachedToWindow();
33 virtual void MouseUp(BPoint where);
34 virtual void MouseDown(BPoint where);
35 virtual void Draw(BRect frame);
37 private:
38 BRect _ButtonsRect() const;
39 BRect _ButtonRect(const int32* offsets,
40 int index) const;
41 int32 _ConvertFromVisualOrder(int32 button);
42 void _CreateButtonsPicture();
44 private:
45 typedef BView inherited;
47 const MouseSettings& fSettings;
49 BPicture fButtonsPicture;
50 int32 fDigitBaseline;
51 int32 fDigitHeight;
52 float fScaling;
54 int32 fType;
55 uint32 fButtons;
56 uint32 fOldButtons;
60 #endif /* MOUSE_VIEW_H */