xref: /haiku/src/apps/text_search/GrepListView.h (revision f0d8b55fe6f4f3d437434cb6334118af4c02ca47)
1edf2516dSStephan Aßmus /*
2edf2516dSStephan Aßmus  * Copyright (c) 1998-2007 Matthijs Hollemans
3edf2516dSStephan Aßmus  *
4edf2516dSStephan Aßmus  * Permission is hereby granted, free of charge, to any person obtaining a
5edf2516dSStephan Aßmus  * copy of this software and associated documentation files (the "Software"),
6edf2516dSStephan Aßmus  * to deal in the Software without restriction, including without limitation
7edf2516dSStephan Aßmus  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8edf2516dSStephan Aßmus  * and/or sell copies of the Software, and to permit persons to whom the
9edf2516dSStephan Aßmus  * Software is furnished to do so, subject to the following conditions:
10edf2516dSStephan Aßmus  *
11edf2516dSStephan Aßmus  * The above copyright notice and this permission notice shall be included in
12edf2516dSStephan Aßmus  * all copies or substantial portions of the Software.
13edf2516dSStephan Aßmus  *
14edf2516dSStephan Aßmus  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15edf2516dSStephan Aßmus  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16edf2516dSStephan Aßmus  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17edf2516dSStephan Aßmus  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18edf2516dSStephan Aßmus  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19edf2516dSStephan Aßmus  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20edf2516dSStephan Aßmus  * DEALINGS IN THE SOFTWARE.
21edf2516dSStephan Aßmus  */
22edf2516dSStephan Aßmus #ifndef GREP_LIST_VIEW_H
23edf2516dSStephan Aßmus #define GREP_LIST_VIEW_H
24edf2516dSStephan Aßmus 
25edf2516dSStephan Aßmus #include <Entry.h>
26c891bf22SStephan Aßmus #include <ListItem.h>
27edf2516dSStephan Aßmus #include <OutlineListView.h>
28edf2516dSStephan Aßmus 
29edf2516dSStephan Aßmus 
30edf2516dSStephan Aßmus class ResultItem : public BStringItem {
31edf2516dSStephan Aßmus public:
32edf2516dSStephan Aßmus 								ResultItem(const entry_ref& ref);
33edf2516dSStephan Aßmus 
34edf2516dSStephan Aßmus 			entry_ref			ref;
35edf2516dSStephan Aßmus };
36edf2516dSStephan Aßmus 
37edf2516dSStephan Aßmus 
38edf2516dSStephan Aßmus class GrepListView : public BOutlineListView {
39edf2516dSStephan Aßmus public:
40edf2516dSStephan Aßmus 								GrepListView();
41962a6c67SStephan Aßmus 
42962a6c67SStephan Aßmus 			ResultItem*			FindItem(const entry_ref& ref,
43962a6c67SStephan Aßmus 									int32* _index) const;
44*f0d8b55fSStephan Aßmus 
45*f0d8b55fSStephan Aßmus 			ResultItem*			RemoveResults(const entry_ref& ref,
46*f0d8b55fSStephan Aßmus 									bool completeItem);
47edf2516dSStephan Aßmus };
48edf2516dSStephan Aßmus 
49edf2516dSStephan Aßmus #endif // GREP_LIST_VIEW_H
50