BTRFS: Implement BTree::Path and change _Find.
[haiku.git] / src / apps / icon-o-matic / generic / selection / Selection.h
blob64af760c6e2fd002541b34a7a1db5f26cc009f79
1 /*
2 * Copyright 2006, Haiku.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Stephan Aßmus <superstippi@gmx.de>
7 */
9 #ifndef SELECTION_H
10 #define SELECTION_H
12 #include <List.h>
14 #include "Observable.h"
16 class Selectable;
18 class Selection : public Observable {
19 public:
20 Selection();
21 virtual ~Selection();
23 // modify selection
24 bool Select(Selectable* object,
25 bool extend = false);
26 void Deselect(Selectable* object);
27 void DeselectAll();
29 // query selection
30 Selectable* SelectableAt(int32 index) const;
31 Selectable* SelectableAtFast(int32 index) const;
32 int32 CountSelected() const;
34 private:
35 void _DeselectAllExcept(Selectable* object);
37 BList fSelected;
40 #endif // SELECTION_H