Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #ifndef nsITextControlFrame_h___ |
michael@0 | 7 | #define nsITextControlFrame_h___ |
michael@0 | 8 | |
michael@0 | 9 | #include "nsIFormControlFrame.h" |
michael@0 | 10 | |
michael@0 | 11 | class nsIEditor; |
michael@0 | 12 | class nsISelectionController; |
michael@0 | 13 | class nsFrameSelection; |
michael@0 | 14 | |
michael@0 | 15 | class nsITextControlFrame : public nsIFormControlFrame |
michael@0 | 16 | { |
michael@0 | 17 | public: |
michael@0 | 18 | NS_DECL_QUERYFRAME_TARGET(nsITextControlFrame) |
michael@0 | 19 | |
michael@0 | 20 | enum SelectionDirection { |
michael@0 | 21 | eNone, |
michael@0 | 22 | eForward, |
michael@0 | 23 | eBackward |
michael@0 | 24 | }; |
michael@0 | 25 | |
michael@0 | 26 | NS_IMETHOD GetEditor(nsIEditor **aEditor) = 0; |
michael@0 | 27 | |
michael@0 | 28 | NS_IMETHOD SetSelectionStart(int32_t aSelectionStart) = 0; |
michael@0 | 29 | NS_IMETHOD SetSelectionEnd(int32_t aSelectionEnd) = 0; |
michael@0 | 30 | |
michael@0 | 31 | NS_IMETHOD SetSelectionRange(int32_t aSelectionStart, |
michael@0 | 32 | int32_t aSelectionEnd, |
michael@0 | 33 | SelectionDirection aDirection = eNone) = 0; |
michael@0 | 34 | NS_IMETHOD GetSelectionRange(int32_t* aSelectionStart, |
michael@0 | 35 | int32_t* aSelectionEnd, |
michael@0 | 36 | SelectionDirection* aDirection = nullptr) = 0; |
michael@0 | 37 | |
michael@0 | 38 | NS_IMETHOD GetOwnedSelectionController(nsISelectionController** aSelCon) = 0; |
michael@0 | 39 | virtual nsFrameSelection* GetOwnedFrameSelection() = 0; |
michael@0 | 40 | |
michael@0 | 41 | virtual nsresult GetPhonetic(nsAString& aPhonetic) = 0; |
michael@0 | 42 | |
michael@0 | 43 | /** |
michael@0 | 44 | * Ensure editor is initialized with the proper flags and the default value. |
michael@0 | 45 | * @throws NS_ERROR_NOT_INITIALIZED if mEditor has not been created |
michael@0 | 46 | * @throws various and sundry other things |
michael@0 | 47 | */ |
michael@0 | 48 | virtual nsresult EnsureEditorInitialized() = 0; |
michael@0 | 49 | |
michael@0 | 50 | virtual nsresult ScrollSelectionIntoView() = 0; |
michael@0 | 51 | }; |
michael@0 | 52 | |
michael@0 | 53 | #endif |