2017-10-27 17:33:53 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
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___
|
2017-07-06 12:00:35 +00:00
|
|
|
|
2001-12-11 05:39:36 +00:00
|
|
|
#include "nsIFormControlFrame.h"
|
1999-11-19 07:24:15 +00:00
|
|
|
|
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
|
|
|
|
2017-06-19 14:47:02 +00:00
|
|
|
namespace mozilla {
|
|
|
|
class TextEditor;
|
|
|
|
} // namespace mozilla
|
|
|
|
|
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
|
|
|
|
};
|
|
|
|
|
2017-06-19 14:47:02 +00:00
|
|
|
NS_IMETHOD_(already_AddRefed<mozilla::TextEditor>) GetTextEditor() = 0;
|
2001-11-16 02:38:10 +00:00
|
|
|
|
2017-03-09 19:44:45 +00:00
|
|
|
NS_IMETHOD SetSelectionRange(uint32_t aSelectionStart,
|
|
|
|
uint32_t aSelectionEnd,
|
2011-07-28 17:51:22 +00:00
|
|
|
SelectionDirection aDirection = eNone) = 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
|
|
|
|
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
|