btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / apps / terminal / InlineInput.h
bloba62d3d5198b9eaee518144d040ef5748080a5d49
1 /*
2 * Copyright 2003-2009, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Stefano Ceccherini (stefano.ceccherini@gmail.com)
7 */
9 #ifndef __INLINEINPUT_H
10 #define __INLINEINPUT_H
12 #include <Messenger.h>
13 #include <String.h>
15 struct clause;
17 class InlineInput {
18 public:
19 InlineInput(BMessenger);
20 ~InlineInput();
22 const BMessenger *Method() const;
24 const char *String() const;
25 void SetString(const char *string);
27 bool IsActive() const;
28 void SetActive(bool active);
30 int32 SelectionLength() const;
31 void SetSelectionLength(int32);
33 int32 SelectionOffset() const;
34 void SetSelectionOffset(int32 offset);
36 bool AddClause(int32, int32);
37 bool GetClause(int32 index, int32 *start, int32 *end) const;
38 int32 CountClauses() const;
40 void ResetClauses();
42 private:
43 const BMessenger fMessenger;
44 BString fString;
46 bool fActive;
48 int32 fSelectionOffset;
49 int32 fSelectionLength;
51 int32 fNumClauses;
52 clause *fClauses;
55 #endif //__INLINEINPUT_H