/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * 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 Netscape are * Copyright (C) 1998 Netscape Communications Corporation. All * Rights Reserved. * * Contributor(s): * Sammy Ford */ #include "nsISupports.idl" [scriptable, uuid(D2D1D179-85A7-11d3-9932-00108301233C)] interface nsISelectionController : nsISupports { /** CharacterMove will move the selection one character forward/backward in the document. * this will also have the effect of collapsing the selection if the aExtend = PR_FALSE * the "point" of selection that is extended is considered the "focus" point. * or the last point adjusted by the selection. * @param aForward forward or backward if PR_FALSE * @param aExtend should it collapse the selection of extend it? */ void characterMove(in boolean aForward, in boolean aExtend); /** WordMove will move the selection one word forward/backward in the document. * this will also have the effect of collapsing the selection if the aExtend = PR_FALSE * the "point" of selection that is extended is considered the "focus" point. * or the last point adjusted by the selection. * @param aForward forward or backward if PR_FALSE * @param aExtend should it collapse the selection of extend it? */ void wordMove(in boolean aForward, in boolean aExtend); /** LineMove will move the selection one line forward/backward in the document. * this will also have the effect of collapsing the selection if the aExtend = PR_FALSE * the "point" of selection that is extended is considered the "focus" point. * or the last point adjusted by the selection. * @param aForward forward or backward if PR_FALSE * @param aExtend should it collapse the selection of extend it? */ void lineMove(in boolean aForward, in boolean aExtend); /** IntraLineMove will move the selection to the front of the line or end of the line * in the document. * this will also have the effect of collapsing the selection if the aExtend = PR_FALSE * the "point" of selection that is extended is considered the "focus" point. * or the last point adjusted by the selection. * @param aForward forward or backward if PR_FALSE * @param aExtend should it collapse the selection of extend it? */ void intraLineMove(in boolean aForward, in boolean aExtend); /** PageMove will move the selection one page forward/backward in the document. * this will also have the effect of collapsing the selection if the aExtend = PR_FALSE * the "point" of selection that is extended is considered the "focus" point. * or the last point adjusted by the selection. * @param aForward forward or backward if PR_FALSE * @param aExtend should it collapse the selection of extend it? */ void pageMove(in boolean aForward, in boolean aExtend); /** CompleteScroll will move page view to the top or bottom of the document * @param aForward forward or backward if PR_FALSE */ void completeScroll(in boolean aForward); /** CompleteMove will move page view to the top or bottom of the document * this will also have the effect of collapsing the selection if the aExtend = PR_FALSE * the "point" of selection that is extended is considered the "focus" point. * or the last point adjusted by the selection. * @param aForward forward or backward if PR_FALSE * @param aExtend should it collapse the selection of extend it? */ void completeMove(in boolean aForward, in boolean aExtend); /** ScrollPage will scroll the page without affecting the selection. * @param aForward scroll forward or backwards in selection */ void scrollPage(in boolean aForward); /** ScrolLine will scroll line up or down dependent on the boolean * @param aForward scroll forward or backwards in selection */ void scrollLine(in boolean aForward); /** ScrolHorizontal will scroll left or right dependent on the boolean * @param aLeft if true will scroll left. if not will scroll right. */ void scrollHorizontal(in boolean aLeft); /** SelectAll will select the whole page */ void selectAll(); }; %{ C++ #define NS_ISELECTIONCONTROLLER_CID \ { 0xd2d1d179, 0x85a7, 0x11d3, \ { 0x99, 0x32, 0x0, 0x10, 0x83, 0x1, 0x23, 0x3c }} %}