xref: /haiku/src/kits/interface/textview_support/InlineInput.h (revision 0d4fbcc8fea16e76c48937dedca56c8ef6774706)
1b31b14e0SStefano Ceccherini /*
2b31b14e0SStefano Ceccherini  * Copyright 2003-2006, Haiku, Inc. All Rights Reserved.
3b31b14e0SStefano Ceccherini  * Distributed under the terms of the MIT License.
4b31b14e0SStefano Ceccherini  *
5b31b14e0SStefano Ceccherini  * Authors:
6b31b14e0SStefano Ceccherini  *		Stefano Ceccherini (burton666@libero.it)
7b31b14e0SStefano Ceccherini  */
8b31b14e0SStefano Ceccherini 
9b31b14e0SStefano Ceccherini #ifndef __INLINEINPUT_H
10b31b14e0SStefano Ceccherini #define __INLINEINPUT_H
11b31b14e0SStefano Ceccherini 
12b31b14e0SStefano Ceccherini #include <Messenger.h>
13b31b14e0SStefano Ceccherini 
14b31b14e0SStefano Ceccherini struct clause;
15b31b14e0SStefano Ceccherini class _BInlineInput_ {
16b31b14e0SStefano Ceccherini public:
17b31b14e0SStefano Ceccherini 	_BInlineInput_(BMessenger);
18b31b14e0SStefano Ceccherini 	~_BInlineInput_();
19b31b14e0SStefano Ceccherini 
20b31b14e0SStefano Ceccherini 	const BMessenger *Method() const;
21b31b14e0SStefano Ceccherini 
22b31b14e0SStefano Ceccherini 	bool IsActive() const;
23b31b14e0SStefano Ceccherini 	void SetActive(bool active);
24b31b14e0SStefano Ceccherini 
25b31b14e0SStefano Ceccherini 	int32 Length() const;
26b31b14e0SStefano Ceccherini 	void SetLength(int32 length);
27b31b14e0SStefano Ceccherini 
28b31b14e0SStefano Ceccherini 	int32 Offset() const;
29b31b14e0SStefano Ceccherini 	void SetOffset(int32 offset);
30b31b14e0SStefano Ceccherini 
31b31b14e0SStefano Ceccherini 	int32 SelectionLength() const;
32b31b14e0SStefano Ceccherini 	void SetSelectionLength(int32);
33b31b14e0SStefano Ceccherini 
34b31b14e0SStefano Ceccherini 	int32 SelectionOffset() const;
35b31b14e0SStefano Ceccherini 	void SetSelectionOffset(int32 offset);
36b31b14e0SStefano Ceccherini 
37*0d4fbcc8SStefano Ceccherini 	bool AddClause(int32, int32);
38b31b14e0SStefano Ceccherini 	bool GetClause(int32 index, int32 *start, int32 *end) const;
39b31b14e0SStefano Ceccherini 	int32 CountClauses() const;
40b31b14e0SStefano Ceccherini 
41b31b14e0SStefano Ceccherini 	void ResetClauses();
42b31b14e0SStefano Ceccherini 
43b31b14e0SStefano Ceccherini private:
44b31b14e0SStefano Ceccherini 	const BMessenger fMessenger;
45b31b14e0SStefano Ceccherini 
46b31b14e0SStefano Ceccherini 	bool fActive;
47b31b14e0SStefano Ceccherini 
48b31b14e0SStefano Ceccherini 	int32 fOffset;
49b31b14e0SStefano Ceccherini 	int32 fLength;
50b31b14e0SStefano Ceccherini 
51b31b14e0SStefano Ceccherini 	int32 fSelectionOffset;
52b31b14e0SStefano Ceccherini 	int32 fSelectionLength;
53b31b14e0SStefano Ceccherini 
54b31b14e0SStefano Ceccherini 	int32 fNumClauses;
55b31b14e0SStefano Ceccherini 	clause *fClauses;
56b31b14e0SStefano Ceccherini };
57b31b14e0SStefano Ceccherini 
58b31b14e0SStefano Ceccherini #endif //__INLINEINPUT_H
59