2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2003-04-02 12:34:33 +04:00
|
|
|
|
|
|
|
#ifndef nsITextControlFrame_h___
|
|
|
|
#define nsITextControlFrame_h___
|
1999-11-19 10:24:15 +03:00
|
|
|
|
2001-12-11 08:39:36 +03:00
|
|
|
#include "nsIFormControlFrame.h"
|
1999-11-19 10:24:15 +03:00
|
|
|
|
|
|
|
class nsIEditor;
|
2000-03-11 04:30:04 +03:00
|
|
|
class nsIDocShell;
|
2000-05-11 08:25:43 +04:00
|
|
|
class nsISelectionController;
|
2006-04-26 06:01:07 +04:00
|
|
|
class nsFrameSelection;
|
2000-05-11 08:25:43 +04:00
|
|
|
|
2002-07-27 00:57:24 +04:00
|
|
|
class nsITextControlFrame : public nsIFormControlFrame
|
2000-05-11 08:25:43 +04:00
|
|
|
{
|
|
|
|
public:
|
2009-09-12 20:49:24 +04:00
|
|
|
NS_DECL_QUERYFRAME_TARGET(nsITextControlFrame)
|
2001-12-11 08:39:36 +03:00
|
|
|
|
2011-07-28 21:51:22 +04:00
|
|
|
enum SelectionDirection {
|
|
|
|
eNone,
|
|
|
|
eForward,
|
|
|
|
eBackward
|
|
|
|
};
|
|
|
|
|
2001-11-02 10:40:01 +03:00
|
|
|
NS_IMETHOD GetEditor(nsIEditor **aEditor) = 0;
|
2001-11-16 05:38:10 +03:00
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
NS_IMETHOD SetSelectionStart(int32_t aSelectionStart) = 0;
|
|
|
|
NS_IMETHOD SetSelectionEnd(int32_t aSelectionEnd) = 0;
|
2000-05-11 08:25:43 +04:00
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
NS_IMETHOD SetSelectionRange(int32_t aSelectionStart,
|
|
|
|
int32_t aSelectionEnd,
|
2011-07-28 21:51:22 +04:00
|
|
|
SelectionDirection aDirection = eNone) = 0;
|
2012-08-22 19:56:38 +04:00
|
|
|
NS_IMETHOD GetSelectionRange(int32_t* aSelectionStart,
|
|
|
|
int32_t* aSelectionEnd,
|
2012-07-30 18:20:58 +04:00
|
|
|
SelectionDirection* aDirection = nullptr) = 0;
|
2000-05-11 08:25:43 +04:00
|
|
|
|
2010-04-22 00:17:41 +04:00
|
|
|
NS_IMETHOD GetOwnedSelectionController(nsISelectionController** aSelCon) = 0;
|
2006-04-26 06:01:07 +04:00
|
|
|
virtual nsFrameSelection* GetOwnedFrameSelection() = 0;
|
2008-10-28 03:27:55 +03:00
|
|
|
|
|
|
|
virtual nsresult GetPhonetic(nsAString& aPhonetic) = 0;
|
2010-02-02 07:00:06 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Ensure editor is initialized with the proper flags and the default value.
|
|
|
|
* @throws NS_ERROR_NOT_INITIALIZED if mEditor has not been created
|
|
|
|
* @throws various and sundry other things
|
|
|
|
*/
|
|
|
|
virtual nsresult EnsureEditorInitialized() = 0;
|
2011-02-05 03:29:29 +03:00
|
|
|
|
|
|
|
virtual nsresult ScrollSelectionIntoView() = 0;
|
1999-11-19 10:24:15 +03:00
|
|
|
};
|
2003-04-02 12:34:33 +04:00
|
|
|
|
|
|
|
#endif
|