BTRFS: Implement BTree::Path and change _Find.
[haiku.git] / src / apps / showimage / SelectionBox.h
blobf995bddf0755e7b6316338aaf48d0a4f11150bb7
1 /*
2 * Copyright 2003-2010, Haiku, Inc. All Rights Reserved.
3 * Copyright 2004-2005 yellowTAB GmbH. All Rights Reserverd.
4 * Copyright 2006 Bernd Korz. All Rights Reserved
5 * Distributed under the terms of the MIT License.
7 * Authors:
8 * Fernando Francisco de Oliveira
9 * Michael Wilber
10 * Michael Pfeiffer
11 * yellowTAB GmbH
12 * Bernd Korz
13 * Stephan Aßmus <superstippi@gmx.de>
15 #ifndef SELECTION_BOX_H
16 #define SELECTION_BOX_H
19 #include <View.h>
21 class ShowImageView;
24 class SelectionBox {
25 public:
26 SelectionBox();
27 ~SelectionBox();
29 void SetBounds(ShowImageView* view, BRect bounds);
30 BRect Bounds() const;
32 void MouseDown(ShowImageView* view, BPoint where);
33 void MouseMoved(ShowImageView* view, BPoint where);
34 void MouseUp(ShowImageView* view, BPoint where);
36 void Animate();
37 void Draw(ShowImageView* view,
38 const BRect& updateRect) const;
40 private:
41 void _InitPatterns();
43 BRect _RectInView(ShowImageView* view) const;
45 private:
46 BRect fBounds;
48 // Use patterns to simulate marching ants for selection.
49 pattern fPatternUp;
50 pattern fPatternDown;
51 pattern fPatternLeft;
52 pattern fPatternRight;
55 #endif // SELECTION_BOX_H