haiku/src/apps/webpositive/autocompletion/TextViewCompleter.h
stippi 312655fb6f * Renamed TextControlCompleter to TextViewCompleter, since it actually only
works with the BTextView.
* Factored out the URL text handling into a new class URLInputGroup, which is
  used instead of a plain BTextControl, but currently works much the same way.
  It's a BGroupView though and allows easy addition of other controls and items
  into the URL text field.
* Moved baseURL() method into it's own file, since it's used from multiple
  places now.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@402 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:40:11 +02:00

44 lines
1.1 KiB
C++

/*
* Copyright 2002-2006, project beam (http://sourceforge.net/projects/beam).
* All rights reserved. Distributed under the terms of the MIT License.
*
* Authors:
* Oliver Tappe <beam@hirschkaefer.de>
*/
#ifndef TEXT_CONTROL_COMPLETER_H
#define TEXT_CONTROL_COMPLETER_H
#include <MessageFilter.h>
#include "AutoCompleter.h"
class BTextView;
class TextViewCompleter : protected BAutoCompleter, public BMessageFilter {
public:
TextViewCompleter(BTextView* textView,
ChoiceModel* choiceModel = NULL,
PatternSelector* patternSelector = NULL);
virtual ~TextViewCompleter();
private:
virtual filter_result Filter(BMessage* message, BHandler** target);
class TextViewWrapper : public EditView {
public:
TextViewWrapper(BTextView* textView);
virtual BRect GetAdjustmentFrame();
virtual void GetEditViewState(BString& text,
int32* caretPos);
virtual void SetEditViewState(const BString& text,
int32 caretPos, int32 selectionLength = 0);
private:
BTextView* fTextView;
};
private:
BTextView* fTextView;
};
#endif // TEXT_CONTROL_COMPLETER_H