gecko-dev/editor/idl/nsIPlaintextEditor.idl
kin%netscape.com 2cc8934aad Partial fix for bug 141900 (Text entry fields in forms excruciatingly slow.)
mozilla/content/base/public/nsISelectionController.idl
  mozilla/content/base/src/nsSelection.cpp
  mozilla/editor/composer/src/nsEditorShell.cpp
  mozilla/editor/idl/nsIPlaintextEditor.idl
  mozilla/editor/libeditor/base/nsEditor.cpp
  mozilla/editor/libeditor/base/nsEditor.h
  mozilla/editor/libeditor/html/nsHTMLDataTransfer.cpp
  mozilla/editor/libeditor/html/nsHTMLEditor.cpp
  mozilla/editor/libeditor/text/nsEditorEventListeners.cpp
  mozilla/editor/libeditor/text/nsPlaintextDataTransfer.cpp
  mozilla/editor/libeditor/text/nsPlaintextEditor.cpp
  mozilla/editor/txtsvc/src/nsTextServicesDocument.cpp
  mozilla/editor/ui/dialogs/content/EdTableProps.js
  mozilla/embedding/components/find/src/nsWebBrowserFind.cpp
  mozilla/extensions/xmlterm/base/mozXMLTermSession.cpp
  mozilla/layout/base/public/nsIFrameSelection.h
  mozilla/layout/html/base/src/nsPresShell.cpp
  mozilla/layout/html/forms/src/nsGfxTextControlFrame2.cpp
  mozilla/mailnews/compose/src/nsMsgCompose.cpp
  mozilla/xpfe/browser/resources/content/viewPartialSource.js

    - Added aIsSynchronous arg to the ScrollSelectionIntoView()
      method of nsISelectionController and nsIFrameSelection.
      Updated all callers to pass new arg.

    - Modified selection to post a plevent to call which does the
      call to ScrollIntoView() in the async ScrollIntoView() case.

    - Edits in text widgets now use asynchronous reflow, paint,
      and scroll processing full time.

    - Removed redundant ScrollSelectionIntoView() calls in the
      editor event listeners.

    - Editor IME code now forced to flush reflows and paints before
      getting caret coordinates.

r=jfrancis@netscape.com  sr=waterson@netscape.com
2002-06-13 20:35:12 +00:00

125 lines
5.1 KiB
Plaintext

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
%{C++
#include "nsIDOMKeyEvent.h"
%}
[ptr] native nsIDOMKeyEvent(nsIDOMKeyEvent);
[scriptable, uuid(b5f39ed4-1dd1-11b2-9d00-fd54d6f54962)]
interface nsIPlaintextEditor : nsISupports
{
/* the bits in an editor behavior mask. */
const short eEditorPlaintextBit = 0; /* only plain text entry is allowed via events */
const short eEditorSingleLineBit = 1; /* enter key and CR-LF handled specially */
const short eEditorPasswordBit = 2; /* text is not entered into content, only a representative character */
const short eEditorReadonlyBit = 3; /* editing events are disabled. Editor may still accept focus. */
const short eEditorDisabledBit = 4; /* all events are disabled (like scrolling). Editor will not accept focus. */
const short eEditorFilterInputBit = 5; /* text input is limited to certain character types, use mFilter */
const short eEditorMailBit = 6; /* use mail-compose editting rules */
const short eEditorUseAsyncUpdatesBit = 7; /* prevent immediate reflows and view refreshes */
const short eEditorEnableWrapHackBit = 8; /* allow the editor to set font: monospace on the root node */
const short eEditorWidgetBit = 9; /* bit for widgets */
const short eEditorNoCSSBit = 10; /* this HTML editor should not create css styles */
const long eEditorPlaintextMask = 1;
const long eEditorSingleLineMask = 2;
const long eEditorPasswordMask = 4;
const long eEditorReadonlyMask = 8;
const long eEditorDisabledMask = 16;
const long eEditorFilterInputMask = 32;
const long eEditorMailMask = 64;
const long eEditorUseAsyncUpdatesMask = 128;
const long eEditorEnableWrapHackMask = 256;
const long eEditorWidgetMask = 512;
const long eEditorNoCSSMask = 1024;
/**
* The length of the contents in characters.
*/
readonly attribute long textLength;
/**
* The maximum number of characters allowed.
*/
attribute long maxTextLength;
/** Get and set the body wrap width.
*
* Special values:
* 0 = wrap to window width
* -1 = no wrap at all
*/
attribute long wrapWidth;
/**
* EditorKeyPress consumes a keyevent.
* @param aKeyEvent key event to consume
*/
[noscript]void handleKeyPress(in nsIDOMKeyEvent aKeyEvent);
/**
* Inserts a string at the current location,
* given by the selection.
* If the selection is not collapsed, the selection is deleted
* and the insertion takes place at the resulting collapsed selection.
*
* @param aString the string to be inserted
*/
void insertText(in DOMString aStringToInsert);
/**
* Insert a line break into the content model.
* The interpretation of a break is up to the implementation:
* it may enter a character, split a node in the tree, etc.
* This may be more efficient than calling InsertText with a newline.
*/
void insertLineBreak();
/**
* Set selection to start of text.
* This will be moved to a different API eventually!
* Should probably be done through the selection controller.
*/
void collapseSelectionToStart();
};