2 * Copyright 2003-2013 Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
7 * Axel Dörfler, axeld@pinc-software.de
9 #ifndef SCREEN_CORNER_SELECTOR_H
10 #define SCREEN_CORNER_SELECTOR_H
16 #include "ScreenSaverSettings.h"
19 class ScreenCornerSelector
: public BControl
{
21 ScreenCornerSelector(BRect frame
,
22 const char *name
, BMessage
* message
,
25 virtual void Draw(BRect updateRect
);
26 virtual void MouseDown(BPoint point
);
27 virtual void MouseUp(BPoint point
);
28 virtual void MouseMoved(BPoint where
, uint32 transit
,
29 const BMessage
* dragMessage
);
30 virtual void KeyDown(const char* bytes
, int32 numBytes
);
32 virtual void SetValue(int32 value
);
33 virtual int32
Value();
35 void SetCorner(screen_corner corner
);
36 screen_corner
Corner() const;
39 BRect
_MonitorFrame() const;
40 BRect
_InnerFrame(BRect monitorFrame
) const;
41 BRect
_CenterFrame(BRect innerFrame
) const;
42 void _DrawStop(BRect innerFrame
);
43 void _DrawArrow(BRect innerFrame
);
44 screen_corner
_ScreenCorner(BPoint point
,
45 screen_corner previous
) const;
47 screen_corner fCurrentCorner
;
48 int32 fPreviousCorner
;
52 #endif // SCREEN_CORNER_SELECTOR_H