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> 13*a682d981SStephan Aßmus #include <TextView.h> 14b31b14e0SStefano Ceccherini 15b31b14e0SStefano Ceccherini struct clause; 16*a682d981SStephan Aßmus 17*a682d981SStephan Aßmus class BTextView::InlineInput { 18b31b14e0SStefano Ceccherini public: 19*a682d981SStephan Aßmus InlineInput(BMessenger); 20*a682d981SStephan Aßmus ~InlineInput(); 21b31b14e0SStefano Ceccherini 22b31b14e0SStefano Ceccherini const BMessenger *Method() const; 23b31b14e0SStefano Ceccherini 24b31b14e0SStefano Ceccherini bool IsActive() const; 25b31b14e0SStefano Ceccherini void SetActive(bool active); 26b31b14e0SStefano Ceccherini 27b31b14e0SStefano Ceccherini int32 Length() const; 28b31b14e0SStefano Ceccherini void SetLength(int32 length); 29b31b14e0SStefano Ceccherini 30b31b14e0SStefano Ceccherini int32 Offset() const; 31b31b14e0SStefano Ceccherini void SetOffset(int32 offset); 32b31b14e0SStefano Ceccherini 33b31b14e0SStefano Ceccherini int32 SelectionLength() const; 34b31b14e0SStefano Ceccherini void SetSelectionLength(int32); 35b31b14e0SStefano Ceccherini 36b31b14e0SStefano Ceccherini int32 SelectionOffset() const; 37b31b14e0SStefano Ceccherini void SetSelectionOffset(int32 offset); 38b31b14e0SStefano Ceccherini 390d4fbcc8SStefano Ceccherini bool AddClause(int32, int32); 40b31b14e0SStefano Ceccherini bool GetClause(int32 index, int32 *start, int32 *end) const; 41b31b14e0SStefano Ceccherini int32 CountClauses() const; 42b31b14e0SStefano Ceccherini 43b31b14e0SStefano Ceccherini void ResetClauses(); 44b31b14e0SStefano Ceccherini 45b31b14e0SStefano Ceccherini private: 46b31b14e0SStefano Ceccherini const BMessenger fMessenger; 47b31b14e0SStefano Ceccherini 48b31b14e0SStefano Ceccherini bool fActive; 49b31b14e0SStefano Ceccherini 50b31b14e0SStefano Ceccherini int32 fOffset; 51b31b14e0SStefano Ceccherini int32 fLength; 52b31b14e0SStefano Ceccherini 53b31b14e0SStefano Ceccherini int32 fSelectionOffset; 54b31b14e0SStefano Ceccherini int32 fSelectionLength; 55b31b14e0SStefano Ceccherini 56b31b14e0SStefano Ceccherini int32 fNumClauses; 57b31b14e0SStefano Ceccherini clause *fClauses; 58b31b14e0SStefano Ceccherini }; 59b31b14e0SStefano Ceccherini 60b31b14e0SStefano Ceccherini #endif //__INLINEINPUT_H 61