Struct xpcom::interfaces::nsISelectionController [] [src]

#[repr(C)]
pub struct nsISelectionController { /* fields omitted */ }

interface nsISelectionController : nsISelectionDisplay

Methods

impl nsISelectionController
[src]

[src]

Cast this nsISelectionController to one of its base interfaces.

impl nsISelectionController
[src]

SELECTION_NONE: i64 = 0

SELECTION_NORMAL: i64 = 1

SELECTION_SPELLCHECK: i64 = 2

SELECTION_IME_RAWINPUT: i64 = 3

SELECTION_IME_SELECTEDRAWTEXT: i64 = 4

SELECTION_IME_CONVERTEDTEXT: i64 = 5

SELECTION_IME_SELECTEDCONVERTEDTEXT: i64 = 6

SELECTION_ACCESSIBILITY: i64 = 7

SELECTION_FIND: i64 = 8

SELECTION_URLSECONDARY: i64 = 9

SELECTION_URLSTRIKEOUT: i64 = 10

NUM_SELECTIONTYPES: i64 = 11

SELECTION_ANCHOR_REGION: i64 = 0

SELECTION_FOCUS_REGION: i64 = 1

SELECTION_WHOLE_SELECTION: i64 = 2

NUM_SELECTION_REGIONS: i64 = 3

SELECTION_OFF: i64 = 0

SELECTION_HIDDEN: i64 = 1

SELECTION_ON: i64 = 2

SELECTION_DISABLED: i64 = 3

SELECTION_ATTENTION: i64 = 4

SCROLL_SYNCHRONOUS: i64 = 2

SCROLL_FIRST_ANCESTOR_ONLY: i64 = 4

SCROLL_CENTER_VERTICALLY: i64 = 16

SCROLL_OVERFLOW_HIDDEN: i64 = 32

SCROLL_FOR_CARET_MOVE: i64 = 64

MOVE_LEFT: i64 = 0
/**
    * nsFrameSelection::PhysicalMove depends on the ordering of these values;
    * do not change without checking there!
    */

MOVE_RIGHT: i64 = 1

MOVE_UP: i64 = 2

MOVE_DOWN: i64 = 3

[src]

/**
   * SetDisplaySelection will set the display mode for the selection. OFF,ON,DISABLED
   */

void setDisplaySelection (in short toggle);

[src]

/**
   * GetDisplaySelection will get the display mode for the selection. OFF,ON,DISABLED
   */

short getDisplaySelection ();

[src]

/**
   * GetSelection will return the selection that the presentation
   *  shell may implement.
   *
   * @param aType This will hold the type of selection.  This value must be one
   *              of RawSelectionType values.
   * @param _return will hold the return value
   */

nsISelection getSelection (in short type);

[src]

/**
   * ScrollSelectionIntoView scrolls a region of the selection,
   * so that it is visible in the scrolled view.
   *
   * @param aType the selection to scroll into view.  This value must be one
   *              of RawSelectionType values.
   * @param aRegion the region inside the selection to scroll into view. //SelectionRegion
   * @param aFlags the scroll flags.  Valid bits include:
   * SCROLL_SYNCHRONOUS: when set, scrolls the selection into view
   * before returning. If not set, posts a request which is processed
   * at some point after the method returns.
   * SCROLL_FIRST_ANCESTOR_ONLY: if set, only the first ancestor will be scrolled
   * into view.
   * SCROLL_OVERFLOW_HIDDEN: if set, scrolls even if the overflow is specified
   * as hidden.
   * SCROLL_FOR_CARET_MOVE: set to indicate whether scrolling is in response
   * to the caret being moved. Does not affect behavior (used for telemetry
   * purposes only).
   *
   * Note that if isSynchronous is true, then this might flush the pending
   * reflow. It's dangerous for some objects. See bug 418470 comment 12.
   */

void scrollSelectionIntoView (in short type, in short region, in short flags);

[src]

/**
   * RepaintSelection repaints the selection specified by aType.
   *
   * @param aType specifies the selection to repaint.
   */

void repaintSelection (in short type);

[src]

/**
   * Set the caret as enabled or disabled. An enabled caret will
   * draw or blink when made visible. A disabled caret will never show up.
   * Can be called any time.
   * @param aEnable PR_TRUE to enable caret.  PR_FALSE to disable.
   * @return always NS_OK
   */

void setCaretEnabled (in boolean enabled);

[src]

/**
   * Set the caret readonly or not. An readonly caret will
   * draw but not blink when made visible.
   * @param aReadOnly PR_TRUE to enable caret.  PR_FALSE to disable.
   * @return always NS_OK
   */

void setCaretReadOnly (in boolean readOnly);

[src]

/**
   * Gets the current state of the caret.
   * @param aEnabled  [OUT] set to the current caret state, as set by SetCaretEnabled
   * @return   if aOutEnabled==null, returns NS_ERROR_INVALID_ARG
   *           else NS_OK
   */

boolean getCaretEnabled ();

[src]

/**
    * This is true if the caret is enabled, visible, and currently blinking.
    * This is still true when the caret is enabled, visible, but in its "off"
    * blink cycle.
    */

readonly attribute boolean caretVisible;

[src]

/**
   * Show the caret even in selections. By default the caret is hidden unless the
   * selection is collapsed. Use this function to show the caret even in selections.
   * @param aVisibility PR_TRUE to show the caret in selections.  PR_FALSE to hide.
   * @return always NS_OK
   */

void setCaretVisibilityDuringSelection (in boolean visibility);

[src]

/** 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 forward, in boolean extend);

[src]

/** PhysicalMove will move the selection one "unit" in a given direction
   *  within 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 aDirection
   *  @param aAmount    character/line; word/lineBoundary
   *  @param aExtend    should it collapse the selection of extend it?
   */

void physicalMove (in short direction, in short amount, in boolean extend);

[src]

/**
    * CharacterExtendForDelete will extend the selection one character cell
    * forward in the document.
    * this method is used internally for handling del key.
    */

[noscript] void characterExtendForDelete ();

[src]

/**
    * CharacterExtendForBackspace will extend the selection one character cell
    * backward in the document.
    * this method is used internally for handling backspace key only when we're
    * after UTF-16 surrogates.
    */

[noscript] void characterExtendForBackspace ();

[src]

/** 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 forward, in boolean extend);

[src]

/** wordExtendForDelete will extend the selection one word forward/backward in the document.
   *  this method is used internally for handling ctrl[option]-backspace and ctrl[option]-del.
   *  @param aForward forward or backward if PR_FALSE
   */

[noscript] void wordExtendForDelete (in boolean forward);

[src]

/** 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 forward, in boolean extend);

[src]

/** 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 forward, in boolean extend);

[src]

/** 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 forward, in boolean extend);

[src]

/** 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 forward);

[src]

/** 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 forward, in boolean extend);

[src]

/** ScrollPage will scroll the page without affecting the selection.
   *  @param aForward scroll forward or backwards in selection
   */

void scrollPage (in boolean forward);

[src]

/** ScrollLine will scroll line up or down dependent on the boolean
   *  @param aForward scroll forward or backwards in selection
   */

void scrollLine (in boolean forward);

[src]

/** ScrollCharacter will scroll right or left dependent on the boolean
   *  @param aRight if true will scroll right. if not will scroll left.
   */

void scrollCharacter (in boolean right);

[src]

/** SelectAll will select the whole page
   */

void selectAll ();

[src]

/** CheckVisibility will return true if textnode and offsets are actually rendered
   *  in the current precontext.
   *  @param aNode textNode to test
   *  @param aStartOffset  offset in dom to first char of textnode to test
   *  @param aEndOffset    offset in dom to last char of textnode to test
   *  @param aReturnBool   boolean returned TRUE if visible FALSE if not
   */

boolean checkVisibility (in nsIDOMNode node, in short startOffset, in short endOffset);

Methods from Deref<Target = nsISelectionDisplay>

[src]

Cast this nsISelectionDisplay to one of its base interfaces.

[src]

void setSelectionFlags (in short toggle);

[src]

short getSelectionFlags ();

Trait Implementations

impl XpCom for nsISelectionController
[src]

IID: nsIID = nsID(939641300, 36457, 19452, [158, 219, 181, 130, 120, 98, 31, 143])

[src]

Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more

impl RefCounted for nsISelectionController
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsISelectionController
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.