btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / apps / webpositive / autocompletion / TextViewCompleter.h
blob1a2955f6d7cc8afb2ae58a874532f758f1da2015
1 /*
2 * Copyright 2002-2006, project beam (http://sourceforge.net/projects/beam).
3 * All rights reserved. Distributed under the terms of the MIT License.
5 * Authors:
6 * Oliver Tappe <beam@hirschkaefer.de>
7 */
8 #ifndef TEXT_CONTROL_COMPLETER_H
9 #define TEXT_CONTROL_COMPLETER_H
11 #include <MessageFilter.h>
13 #include "AutoCompleter.h"
16 class BTextView;
18 class TextViewCompleter : protected BAutoCompleter, public BMessageFilter {
19 public:
20 TextViewCompleter(BTextView* textView,
21 ChoiceModel* choiceModel = NULL,
22 PatternSelector* patternSelector = NULL);
23 virtual ~TextViewCompleter();
25 void SetModificationsReported(bool reported);
26 void TextModified(bool updateChoices);
28 private:
29 virtual filter_result Filter(BMessage* message, BHandler** target);
31 class TextViewWrapper : public EditView {
32 public:
33 TextViewWrapper(BTextView* textView);
34 virtual BRect GetAdjustmentFrame();
35 virtual void GetEditViewState(BString& text,
36 int32* caretPos);
37 virtual void SetEditViewState(const BString& text,
38 int32 caretPos, int32 selectionLength = 0);
39 private:
40 BTextView* fTextView;
43 private:
44 BTextView* fTextView;
45 bool fModificationsReported;
48 #endif // TEXT_CONTROL_COMPLETER_H