2001-09-28 20:14:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00: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 08:34:33 +00:00
|
|
|
|
|
|
|
#ifndef nsITextControlFrame_h___
|
|
|
|
#define nsITextControlFrame_h___
|
1999-11-19 07:24:15 +00:00
|
|
|
|
2001-12-11 05:39:36 +00:00
|
|
|
#include "nsIFormControlFrame.h"
|
1999-11-19 07:24:15 +00:00
|
|
|
|
|
|
|
class nsIEditor;
|
2000-05-11 04:25:43 +00:00
|
|
|
class nsISelectionController;
|
2006-04-26 02:01:07 +00:00
|
|
|
class nsFrameSelection;
|
2000-05-11 04:25:43 +00:00
|
|
|
|
2002-07-26 20:57:24 +00:00
|
|
|
class nsITextControlFrame : public nsIFormControlFrame
|
2000-05-11 04:25:43 +00:00
|
|
|
{
|
|
|
|
public:
|
2009-09-12 16:49:24 +00:00
|
|
|
NS_DECL_QUERYFRAME_TARGET(nsITextControlFrame)
|
2001-12-11 05:39:36 +00:00
|
|
|
|
2011-07-28 17:51:22 +00:00
|
|
|
enum SelectionDirection {
|
|
|
|
eNone,
|
|
|
|
eForward,
|
|
|
|
eBackward
|
|
|
|
};
|
|
|
|
|
2001-11-02 07:40:01 +00:00
|
|
|
NS_IMETHOD GetEditor(nsIEditor **aEditor) = 0;
|
2001-11-16 02:38:10 +00:00
|
|
|
|
2012-08-22 15:56:38 +00:00
|
|
|
NS_IMETHOD SetSelectionStart(int32_t aSelectionStart) = 0;
|
|
|
|
NS_IMETHOD SetSelectionEnd(int32_t aSelectionEnd) = 0;
|
2000-05-11 04:25:43 +00:00
|
|
|
|
2012-08-22 15:56:38 +00:00
|
|
|
NS_IMETHOD SetSelectionRange(int32_t aSelectionStart,
|
|
|
|
int32_t aSelectionEnd,
|
2011-07-28 17:51:22 +00:00
|
|
|
SelectionDirection aDirection = eNone) = 0;
|
2012-08-22 15:56:38 +00:00
|
|
|
NS_IMETHOD GetSelectionRange(int32_t* aSelectionStart,
|
|
|
|
int32_t* aSelectionEnd,
|
2012-07-30 14:20:58 +00:00
|
|
|
SelectionDirection* aDirection = nullptr) = 0;
|
2000-05-11 04:25:43 +00:00
|
|
|
|
2010-04-21 20:17:41 +00:00
|
|
|
NS_IMETHOD GetOwnedSelectionController(nsISelectionController** aSelCon) = 0;
|
2006-04-26 02:01:07 +00:00
|
|
|
virtual nsFrameSelection* GetOwnedFrameSelection() = 0;
|
2008-10-28 00:27:55 +00:00
|
|
|
|
|
|
|
virtual nsresult GetPhonetic(nsAString& aPhonetic) = 0;
|
2010-02-02 04:00:06 +00: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 00:29:29 +00:00
|
|
|
|
|
|
|
virtual nsresult ScrollSelectionIntoView() = 0;
|
1999-11-19 07:24:15 +00:00
|
|
|
};
|
2003-04-02 08:34:33 +00:00
|
|
|
|
|
|
|
#endif
|