fe::IEditorFacade Class Reference
[Ferry Core library]

Main editor interface. More...

Inheritance diagram for fe::IEditorFacade:

fe::EditorFacadePeerBase< nothrow >

List of all members.

Public Types

enum  ScrollAction {
  saNextPos, saPrevPos, saNextPage, saPrevPage,
  saFirstPos, saLastPos
}

Public Member Functions

Configuration
virtual void UC_DLL_CALL addDecoratorFilter (IDecoratorFilter *decorator)=0
virtual void UC_DLL_CALL addListener (IEditorFacadeListener *listener)=0
virtual void UC_DLL_CALL delDecoratorFilter (IDecoratorFilter *decorator)=0
virtual void UC_DLL_CALL delListener (IEditorFacadeListener *listener)=0
virtual IDecorator *UC_DLL_CALL getDecorator () const =0
virtual IFontMapper *UC_DLL_CALL getFontMapper () const =0
virtual
PlatformTypes::wnd_handle_type
UC_DLL_CALL 
getHScroller () const =0
virtual
PlatformTypes::graphics_handle_type
UC_DLL_CALL 
getOffscreenGraphics () const =0
virtual
PlatformTypes::wnd_handle_type
UC_DLL_CALL 
getPeer () const =0
EditorFacadePolicy getPolicy () const
virtual
PlatformTypes::wnd_handle_type
UC_DLL_CALL 
getVScroller () const =0
virtual bool UC_DLL_CALL hasDecoratorFilter (IDecoratorFilter *decorator) const =0
virtual bool UC_DLL_CALL hasListener (IEditorFacadeListener *listener) const =0
virtual void UC_DLL_CALL initScrollers (PlatformTypes::wnd_handle_type hScrollerPeer, PlatformTypes::wnd_handle_type vScrollerPeer)=0
virtual bool UC_DLL_CALL isSharedOffscreenBufferAttached () const =0
virtual void UC_DLL_CALL setDecorator (IDecorator *decorator)=0
virtual void UC_DLL_CALL setFontMapper (IFontMapper *fontMapper)=0
virtual void UC_DLL_CALL setPolicy (EditorFacadePolicy policy)=0
Text modification
virtual void UC_DLL_CALL backspace ()=0
virtual void UC_DLL_CALL clearText ()=0
virtual void UC_DLL_CALL del ()=0
virtual void UC_DLL_CALL insertText (unsigned byteIdx, IStringSource *ss, int eol)=0
virtual void UC_DLL_CALL splitLine ()=0
Text access
virtual unsigned UC_DLL_CALL byteCount () const =0
virtual ITextIterator *UC_DLL_CALL createTextIterator ()=0
virtual unsigned UC_DLL_CALL lineCount () const =0
Undo/redo
virtual unsigned UC_DLL_CALL canRedo () const =0
virtual unsigned UC_DLL_CALL canUndo () const =0
virtual void UC_DLL_CALL clearActions ()=0
virtual unsigned UC_DLL_CALL closeActionGroup ()=0
virtual unsigned UC_DLL_CALL groupActionsCounter () const =0
virtual unsigned UC_DLL_CALL openActionGroup (bool noRedraw)=0
virtual unsigned UC_DLL_CALL redo (unsigned count)=0
virtual unsigned UC_DLL_CALL undo (unsigned count)=0
Clipboard
virtual void UC_DLL_CALL copyToClipboard (ClipboardId id)=0
virtual void UC_DLL_CALL cutToClipboard (ClipboardId id)=0
virtual void UC_DLL_CALL emptyClipboard (ClipboardId id)=0
virtual void UC_DLL_CALL pasteFromClipboard (ClipboardId id)=0
Visual presentation
virtual void UC_DLL_CALL disableRedraw ()=0
virtual void UC_DLL_CALL enableRedraw ()=0
virtual unsigned UC_DLL_CALL firstVisibleLine () const =0
CellInfo getCellInfo (unsigned byteIdx) const
virtual
PlatformTypes::font_handle_type
UC_DLL_CALL 
getDefaultFont () const =0
LineInfo getLineInfoFromByteIdx (unsigned byteIdx) const
LineInfo getLineInfoFromWrappedLine (unsigned lineIdx, unsigned wrappedLineIdx) const
LineInfo getLineInfoFromY (unsigned lineIdx, unsigned y) const
virtual HitTest UC_DLL_CALL getPointHitTest (int x, int y) const
virtual unsigned UC_DLL_CALL getTabWidth () const =0
virtual unsigned UC_DLL_CALL getTextLineY (unsigned lineIdx) const =0
virtual bool UC_DLL_CALL isRedrawDisabled () const =0
virtual void UC_DLL_CALL notifyDecorationChange (unsigned lineIdx, unsigned count, bool decorMetricsOnly)=0
virtual unsigned UC_DLL_CALL visibleLineCount () const =0
Cursor
virtual unsigned UC_DLL_CALL getCursorPos () const =0
virtual void UC_DLL_CALL moveCursorBeginLine (bool keepSel)=0
virtual void UC_DLL_CALL moveCursorBeginText (bool keepSel)=0
virtual void UC_DLL_CALL moveCursorEndLine (bool keepSel)=0
virtual void UC_DLL_CALL moveCursorEndText (bool keepSel)=0
virtual void UC_DLL_CALL moveCursorNextChar (bool keepSel)=0
virtual void UC_DLL_CALL moveCursorNextLine (bool keepSel)=0
virtual void UC_DLL_CALL moveCursorNextPage (bool keepSel)=0
virtual void UC_DLL_CALL moveCursorNextWord (bool keepSel)=0
virtual void UC_DLL_CALL moveCursorPrevChar (bool keepSel)=0
virtual void UC_DLL_CALL moveCursorPrevLine (bool keepSel)=0
virtual void UC_DLL_CALL moveCursorPrevPage (bool keepSel)=0
virtual void UC_DLL_CALL moveCursorPrevWord (bool keepSel)=0
virtual void UC_DLL_CALL moveCursorToChar (unsigned byteIdx, bool keepSel)=0
Text scroll
virtual unsigned UC_DLL_CALL getHorizontalScroll () const =0
virtual void UC_DLL_CALL scrollHorizontal (ScrollAction sa)=0
virtual void UC_DLL_CALL scrollVertical (ScrollAction sa)=0

Protected Member Functions

virtual void UC_DLL_CALL getCellInfoImpl (unsigned byteIdx, CellInfo &res) const =0
virtual void UC_DLL_CALL getLineInfoFromByteIdxImpl (unsigned byteIdx, LineInfo &res) const =0
virtual void UC_DLL_CALL getLineInfoFromWrappedLineImpl (unsigned lineIdx, unsigned wrappedLineIdx, LineInfo &res) const =0
virtual void UC_DLL_CALL getLineInfoFromYImpl (unsigned lineIdx, unsigned y, LineInfo &res) const =0
virtual void UC_DLL_CALL getPointHitTestImpl (int x, int y, HitTest &res) const =0
virtual void UC_DLL_CALL getPolicyImpl (EditorFacadePolicy &res) const =0


Detailed Description

Main editor interface.

Note:
This class is declared with UC_DLL_INTERFACE_DECLARE

Member Enumeration Documentation

Scroll action type.

See also:
scrollVertical()

scrollHorizontal()

Enumerator:
saNextPos  scroll to the next position
saPrevPos  scroll to the previous position
saNextPage  scroll to the next page
saPrevPage  scroll to the previous page
saFirstPos  scroll to the first position
saLastPos  scroll to the last position


Member Function Documentation

virtual void UC_DLL_CALL fe::IEditorFacade::getPolicyImpl ( EditorFacadePolicy res  )  const [protected, pure virtual]

virtual void UC_DLL_CALL fe::IEditorFacade::getCellInfoImpl ( unsigned  byteIdx,
CellInfo res 
) const [protected, pure virtual]

virtual void UC_DLL_CALL fe::IEditorFacade::getLineInfoFromByteIdxImpl ( unsigned  byteIdx,
LineInfo res 
) const [protected, pure virtual]

virtual void UC_DLL_CALL fe::IEditorFacade::getLineInfoFromYImpl ( unsigned  lineIdx,
unsigned  y,
LineInfo res 
) const [protected, pure virtual]

virtual void UC_DLL_CALL fe::IEditorFacade::getLineInfoFromWrappedLineImpl ( unsigned  lineIdx,
unsigned  wrappedLineIdx,
LineInfo res 
) const [protected, pure virtual]

virtual void UC_DLL_CALL fe::IEditorFacade::getPointHitTestImpl ( int  x,
int  y,
HitTest res 
) const [protected, pure virtual]

EditorFacadePolicy fe::IEditorFacade::getPolicy (  )  const [inline]

Returns a policy assigned to the editor.

See also:
setPolicy()

Fe_GetDefaultPolicy()

virtual void UC_DLL_CALL fe::IEditorFacade::setPolicy ( EditorFacadePolicy  policy  )  [pure virtual]

Assigns new policy to the editor.

Parameters:
policy policy to assign.
See also:
getPolicy()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::setDecorator ( IDecorator decorator  )  [pure virtual]

Assigns new decorator to the editor. Use 0 to force editor use default decorator. Caller should guarantee that passed in decorator is valid as long as editor exists or until another decorator is assigned to the editor with the setDecorator() call.

Note:
If the passed in decorator has been added already with the addDecoratorFilter() nothing is done.
Parameters:
decorator decorator to assign.
See also:
getDecorator()

hasDecoratorFilter()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual IDecorator* UC_DLL_CALL fe::IEditorFacade::getDecorator (  )  const [pure virtual]

Returns a decorator assigned to the editor.

See also:
setDecorator

Fe_CreateDefaultDecorator

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::addDecoratorFilter ( IDecoratorFilter decorator  )  [pure virtual]

Adds filter decorator to the editor. If the passed in decorator is already added or it is 0 nothing is done.

If the passed in decorator has been already assigned with the setDecorator() nothing is done.

Every just added filter decorator filters ouput of the last added filter decorator.

Parameters:
decorator filter decorator to add.
See also:
delDecoratorFilter()

hasDecoratorFilter()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::delDecoratorFilter ( IDecoratorFilter decorator  )  [pure virtual]

Deletes filter decorator from the editor. If the passed in decorator has not been added to the editor or it is 0 nothing is done.

Parameters:
decorator filter decorator to delete.
See also:
addDecoratorFilter()

hasDecoratorFilter()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual bool UC_DLL_CALL fe::IEditorFacade::hasDecoratorFilter ( IDecoratorFilter decorator  )  const [pure virtual]

Returns true if the passed in filter decorator is added to the editor.

Parameters:
decorator filter decorator to test.
See also:
addDecoratorFilter()

delDecoratorFilter()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::setFontMapper ( IFontMapper fontMapper  )  [pure virtual]

Assignes new font mapper to the editor. Use 0 to force editor not to use font mapper. Caller should guarantee that passed in fontMapper is valid as long as editor exists or until another font mapper is assigned to the editor with the setFontMapper() call.

Parameters:
fontMapper font mapper to assigne.
See also:
getFontMapper()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual IFontMapper* UC_DLL_CALL fe::IEditorFacade::getFontMapper (  )  const [pure virtual]

Returns a font mapper assigned to the editor.

See also:
setFontMapper()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::addListener ( IEditorFacadeListener listener  )  [pure virtual]

Adds listener to the editor. If the passed in listener is already added or it is 0 nothing is done.

Note:
Listeners receive notifications in the same order they were registered with the editor.
Parameters:
listener listener to add.
See also:
delListener()

hasListener()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::delListener ( IEditorFacadeListener listener  )  [pure virtual]

Deletes listener from the editor. If the passed in listener has not been added to the editor or it is 0 nothing is done.

Parameters:
listener listener to delete.
See also:
addListener()

hasListener()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual bool UC_DLL_CALL fe::IEditorFacade::hasListener ( IEditorFacadeListener listener  )  const [pure virtual]

Returns true if the passed in listener is added to the editor.

Parameters:
listener listener to test.
See also:
addListener()

delListener()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::initScrollers ( PlatformTypes::wnd_handle_type  hScrollerPeer,
PlatformTypes::wnd_handle_type  vScrollerPeer 
) [pure virtual]

Initializes horizontal and vertical scroll bars of the editor. Every argument of the method can have three values:

  • getPeer() - editor will use default built in scroll bar;
  • 0 - editor will not use scroll bar;
  • some_handle - editor will use scroll bar addressed by the some_handle; this allows to associate external scroll bar control with the editor.

Parameters:
hScrollerPeer new horizontal scrollbar to use;
vScrollerPeer new vertical scrollbar to use.
See also:
getVScroller()

getHScroller()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual PlatformTypes::wnd_handle_type UC_DLL_CALL fe::IEditorFacade::getVScroller (  )  const [pure virtual]

Returns platform specific handle addressing vertical scroll bar associated with the editor.

See also:
getHScroller()

initScrollers()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual PlatformTypes::wnd_handle_type UC_DLL_CALL fe::IEditorFacade::getHScroller (  )  const [pure virtual]

Returns platform specific handle addressing horizontal scroll bar associated with the editor.

See also:
getVScroller()

initScrollers()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual PlatformTypes::wnd_handle_type UC_DLL_CALL fe::IEditorFacade::getPeer (  )  const [pure virtual]

Returns platform specific handle addressing the editor.

See also:
Fe_GetPeer()

Fe_GetEditorHandle()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual PlatformTypes::graphics_handle_type UC_DLL_CALL fe::IEditorFacade::getOffscreenGraphics (  )  const [pure virtual]

Returns platform specific handle addressing an offscreen graphics context associated with the editor.

Offscreen graphics context is an abstraction of a bitmap where editor draws its window contents.

Several editors running their event loops in the same thread share single offscreen graphics context.

Only one editor can own shared offscreen graphics context at a time. When editor takes ownership of a shared offscreen graphics context the underlying bitmap is resized to fulfil size of the owner editor window.

If editor doesn't own shared offscreen graphics context it uses private offscreen graphics context refering to a very small (1px x 1px) bitmap. Thus getOffscreenGraphics() always return valid value.

Use isSharedOffscreenBufferAttached() to check if the editor uses shared or private offscreen graphics context at the moment.

Warning:
When size of editor's window that owns shared offscreen graphics context changes or when editor looses ownership of the shared offscreen graphics context handle returned from the previous getOffscreenGraphics() call becomes invalid and shouldn't be used any more because of undefined behavior.
Note:
Register listener with the editor using addListener() to track offscreen graphics context changes with the particular editor with IEditorFacadeListener::onSharedOffscreenBufferAttached() and IEditorFacadeListener::onSharedOffscreenBufferDetached().

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual bool UC_DLL_CALL fe::IEditorFacade::isSharedOffscreenBufferAttached (  )  const [pure virtual]

Returns true if the editor ownes shared offscreen graphics context at the moment. Refer to getOffscreenGraphics() documentation for more info about offscreen graphics contexts.

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::cutToClipboard ( ClipboardId  id  )  [pure virtual]

Deletes currently selected text in the editor and copies it to a clipboard. If selection is empty nothing is done.

See also:
fe::EditorFacadePolicy::eolClipboardCopy
Parameters:
id id of a clipboard where to copy text

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::copyToClipboard ( ClipboardId  id  )  [pure virtual]

Copies currently selected text in the editor to a clipboard. If selection is empty nothing is done.

See also:
fe::EditorFacadePolicy::eolClipboardCopy
Parameters:
id id of a clipboard where to copy text

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::emptyClipboard ( ClipboardId  id  )  [pure virtual]

Empties a clipboard.

Parameters:
id id of a clipboard to empty

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::pasteFromClipboard ( ClipboardId  id  )  [pure virtual]

Copies text from a clipboard at the cursor position. If selection is not empty it is deleted at first.

See also:
insertText()

fe::EditorFacadePolicy::eolClipboardPaste

Parameters:
id id of a clipboard from which to copy text

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::del (  )  [pure virtual]

Deletes text. If selection is not empty it is deleted, otherwise the character at the cursor position is deleted. If cursor points to the character after the last character of a text line that text line is merged with the following one (if exists).

Call to this method is equivalent to pressing DEL keyboard key.

See also:
getCursorPos()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::backspace (  )  [pure virtual]

Deletes text. If selection is not empty it is deleted, otherwise the character just before the cursor position is deleted. If cursor points to the first character of a text line that text line is merged with the preceeding one (if exists).

Call to this method is equivalent to pressing BACKSPACE keyboard key.

See also:
getCursorPos()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::splitLine (  )  [pure virtual]

Splits a text line in two text lines at cursor position. If selection is not empty it is deleted at first.

Call to this method is equivalent to pressing ENTER keyboard key.

See also:
getCursorPos()

fe::EditorFacadePolicy::eolSplitLine

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::insertText ( unsigned  byteIdx,
IStringSource ss,
int  eol 
) [pure virtual]

Moves cursor to the byteIdx position and inserts text at the new cursor position. Editor should append line terminator specified with the eol parameter to every text line tokenized from the given text specified with the ss parameter. If (ss == 0) or eol is not a valid value nothing is done and method exits normally. If selection is not empty it is cleared at first.

Parameters:
byteIdx text position at which to insert text;
ss text to insert or 0;
eol line terminator id; should be one of constants from fe::EndOfLine enumeration except of eolKeep.

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::clearText (  )  [pure virtual]

Clears text and empties editing actions stack.

Note:
This function fails if there is unclosed action group.
See also:
openActionGroup()

clearActions()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual unsigned UC_DLL_CALL fe::IEditorFacade::byteCount (  )  const [pure virtual]

Returns number of bytes in text.

Note:
Register listener with the editor using addListener() to track text changes with the IEditorFacadeListener::onTextInsert() and IEditorFacadeListener::onTextErase().

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual unsigned UC_DLL_CALL fe::IEditorFacade::lineCount (  )  const [pure virtual]

Returns number of lines in text.

Note:
Register listener with the editor using addListener() to track text changes with the IEditorFacadeListener::onTextInsert() and IEditorFacadeListener::onTextErase().

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual ITextIterator* UC_DLL_CALL fe::IEditorFacade::createTextIterator (  )  [pure virtual]

Returns heap allocated iterator over editor's text. Returns 0 if there is no enough memory to create text iterator object.

Caller should call delete on the returned value once it is not needed any more.

Returned text iterator enters invalid state when text change event occurs on the editor or when the editor is destroyed. Though the pointer to text iterator itself stays valid and can be safely used until deleted.

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual unsigned UC_DLL_CALL fe::IEditorFacade::visibleLineCount (  )  const [pure virtual]

Returns number of fully visible text lines.

Note:
Register listener with the editor using addListener() to track visible text changes with the IEditorFacadeListener::onVisibleTextChanged().

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual unsigned UC_DLL_CALL fe::IEditorFacade::firstVisibleLine (  )  const [pure virtual]

Returns index of the first visible text line.

Note:
Register listener with the editor using addListener() to track visible text changes with the IEditorFacadeListener::onVisibleTextChanged().

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::disableRedraw (  )  [pure virtual]

Increments internal editor's redrawDisabled counter. If redrawDisabled != 0 editor window is not updated.

Use enableRedraw() to decrement redrawDisabled counter.

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::enableRedraw (  )  [pure virtual]

Decrements internal editor's redrawDisabled counter. When counter falls to 0 editor tests if any window updates were missed and updates it if needed.

Use disableRedraw() to increment redrawDisabled counter.

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual bool UC_DLL_CALL fe::IEditorFacade::isRedrawDisabled (  )  const [pure virtual]

Returns true if editor window update is disabled.

See also:
disableRedraw()

enableRedraw()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual PlatformTypes::font_handle_type UC_DLL_CALL fe::IEditorFacade::getDefaultFont (  )  const [pure virtual]

Returns default font handle. Default font handle is never 0, it never changes and remains valid as long as editor exists.

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual unsigned UC_DLL_CALL fe::IEditorFacade::getTabWidth (  )  const [pure virtual]

Returns current TAB width. Measured in pixels. Returns 0 if editor doesn't interpret TAB character as an indentation control character.

Note:
fe::EditorFacadePolicy::tabIsCtrl controls how TAB character is interpreted. Current TAB width value depends on the following:

Implemented in fe::EditorFacadePeerBase< nothrow >.

CellInfo fe::IEditorFacade::getCellInfo ( unsigned  byteIdx  )  const [inline]

Returns parameters of a text character at the given position.

Parameters:
byteIdx text position addressing text character; byteIdx can point to any element (i.e. not just the first one) of a byte sequence encoding a text character.

LineInfo fe::IEditorFacade::getLineInfoFromByteIdx ( unsigned  byteIdx  )  const [inline]

Returns text line segment parameters.

Parameters:
byteIdx text position addressing text line segment.

LineInfo fe::IEditorFacade::getLineInfoFromY ( unsigned  lineIdx,
unsigned  y 
) const [inline]

Returns text line segment parameters.

Parameters:
lineIdx index of a text line within which to get LineInfo;
y vertical offset of a wrapped line for which to get LineInfo within the text line given with the lineIdx; offset is relative to the top border of the text line bounding box; measured in pixels; use -1 to get LineInfo for the last text line segment.

LineInfo fe::IEditorFacade::getLineInfoFromWrappedLine ( unsigned  lineIdx,
unsigned  wrappedLineIdx 
) const [inline]

Returns text line segment parameters.

Parameters:
lineIdx index of a text line within which to get LineInfo;
wrappedLineIdx index of a wrapped line for which to get LineInfo within the text line given with the lineIdx; use -1 to get LineInfo for the last text line segment.

virtual HitTest UC_DLL_CALL fe::IEditorFacade::getPointHitTest ( int  x,
int  y 
) const [inline, virtual]

Returns result of a point hit test within the editor's window rectangle.

Parameters:
x X-coordinate of a point relative to the top left corner of the editor's window rectangle; measured in pixels;
y Y-coordinate of a point relative to the top left corner of the editor's window rectangle; measured in pixels.

virtual unsigned UC_DLL_CALL fe::IEditorFacade::getTextLineY ( unsigned  lineIdx  )  const [pure virtual]

Returns vertical offset of the top left corner of a text line bounding box addressed with the lineIdx from the top left corner of the editor's text viewport rectangle. Return value is measured in pixels.

Returns (unsigned)-1 if the given text line is not within the [firstVisibleLine(), firstVisibleLine() + visibleLineCount()) range.

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::notifyDecorationChange ( unsigned  lineIdx,
unsigned  count,
bool  decorMetricsOnly 
) [pure virtual]

Should be called to notify editor that it should update decoration for the [lineIdx, lineIdx + count) range of text lines.

Normally editor automatically updates decoration when text changes, so this method should be called only if decoration should be updated because of any reason other then text change.

Parameters:
lineIdx index of the first text line for which to update decoration;
count number of text lines for which to update decoration;
decorMetricsOnly optimization hint; if false editor should do full decoration update, i.e. it should call IDecorator::decorate() for the given text lines, otherwise editor assumes that is enough just to call IDecorator::getDecorMetrics() to validate decoration.

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual unsigned UC_DLL_CALL fe::IEditorFacade::openActionGroup ( bool  noRedraw  )  [pure virtual]

Increments internal editor's groupActions counter. If groupActions != 0 all subsequent text modifications are recorded as a single action.

Use closeActionGroup() to decrement groupActions counter.

The following example demonstrates that all four del() calls are recorded as a single editing action:

 openActionGroup(true);       // ++groupActions (1)
   openActionGroup(true);     // ++groupActions (2)
     del();
     openActionGroup(true);   // ++groupActions (3)
       del();
     closeActionGroup();      // --groupActions (2)
     del();
   closeActionGroup();        // --groupActions (1)
   del();
 closeActionGroup();          // --groupActions (0)

Note:
undo(), redo(), clearActions() and clearText() functions fail until the editor maintains unclosed action group (groupActions != 0).
Parameters:
noRedraw flag indicating if screen update for the editor should be disabled for all sequential text modifications; if there is an opened group with disabled screen update (i.e. openActionGroup(true) call without corresponding closeActionGroup() called) value of this parameter is ignored and screen update is disabled; if there is an opened group with enabled screen update (i.e. openActionGroup(false) call without corresponding closeActionGroup() called) and this parameter is true screen update is disabled until corresponding closeActionGroup() is called:
 openActionGroup(false);
   ...                        // screen update enabled
   openActionGroup(true);
     ...                      // screen update disabled
     openActionGroup(false);
       ...                    // screen update disabled
     closeActionGroup();
   closeActionGroup();
   ...                        // screen update enabled
 closeActionGroup();
 openActionGroup(true);
   ...                        // screen update disabled
   openActionGroup(false);
   ...                        // screen update disabled
   closeActionGroup();
 closeActionGroup();
Returns:
new value of groupActions counter.
See also:
groupActionsCounter()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual unsigned UC_DLL_CALL fe::IEditorFacade::closeActionGroup (  )  [pure virtual]

Decrements internal editor's groupActions counter.

Use openActionGroup() to increment groupActions counter.

Returns:
new value of groupActions counter.
See also:
groupActionsCounter()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual unsigned UC_DLL_CALL fe::IEditorFacade::groupActionsCounter (  )  const [pure virtual]

Returns current value of internal groupActions counter. Return value other then 0 indicates that the editor maintains unclosed action group.

See also:
openActionGroup()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual unsigned UC_DLL_CALL fe::IEditorFacade::canUndo (  )  const [pure virtual]

Returns number of previous editing actions that can be reversed. Always return 0 if the editor maintains unclosed action group.

See also:
undo()

openActionGroup()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual unsigned UC_DLL_CALL fe::IEditorFacade::canRedo (  )  const [pure virtual]

Returns number of previous editing actions that have been reversed. Always return 0 if the editor maintains unclosed action group.

See also:
redo()

openActionGroup()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual unsigned UC_DLL_CALL fe::IEditorFacade::undo ( unsigned  count  )  [pure virtual]

Reverses number of previous editing actions.

Note:
This function fails if there is unclosed action group.
See also:
canUndo()

redo()

openActionGroup()

Parameters:
count number of previous editing actions to reverse;
Returns:
number of previous editing actions actually reversed; the returned value is MIN(canUndo(), count).

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual unsigned UC_DLL_CALL fe::IEditorFacade::redo ( unsigned  count  )  [pure virtual]

Reapplies number of previous editing actions that have been undone.

Note:
This function fails if there is unclosed action group.
See also:
canRedo()

undo()

openActionGroup()

Parameters:
count number of undone previous editing actions to reapply;
Returns:
number of undone previous editing actions actually reapplied; the returned value is MIN(canRedo(), count).

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::clearActions (  )  [pure virtual]

Empties editing actions stack. After this call canUndo() and canRedo() return 0.

Note:
This function fails if there is unclosed action group.
See also:
openActionGroup()

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual unsigned UC_DLL_CALL fe::IEditorFacade::getHorizontalScroll (  )  const [pure virtual]

Returns text lines horizontal scroll value. Return value is measured in pixels.

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::scrollVertical ( ScrollAction  sa  )  [pure virtual]

Scrolls text in the vertical direction.

See also:
scrollHorizontal()
Parameters:
sa scroll action to perform.

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::scrollHorizontal ( ScrollAction  sa  )  [pure virtual]

Scrolls text in the horizontal direction.

See also:
scrollVertical()
Parameters:
sa scroll action to perform.

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual unsigned UC_DLL_CALL fe::IEditorFacade::getCursorPos (  )  const [pure virtual]

Returns cursor position. By default cursor position is visualized with the blinking vertical bar.

Note:
Register listener with the editor using addListener() to track cursor position changes with the IEditorFacadeListener::onCursorPosChanged().

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::moveCursorToChar ( unsigned  byteIdx,
bool  keepSel 
) [pure virtual]

Moves cursor to a new position. It is not an error to specify cursor position which is not character aligned.

Note:
Visual cursor representation (blinking vertical bar) is always displayed character aligned.
Parameters:
byteIdx new cursor position;
keepSel if true selection is updated, otherwise cleared.

Implemented in fe::EditorFacadePeerBase< nothrow >.

virtual void UC_DLL_CALL fe::IEditorFacade::moveCursorNextChar ( bool  keepSel  )  [pure virtual]

virtual void UC_DLL_CALL fe::IEditorFacade::moveCursorPrevChar ( bool  keepSel  )  [pure virtual]

virtual void UC_DLL_CALL fe::IEditorFacade::moveCursorNextWord ( bool  keepSel  )  [pure virtual]

virtual void UC_DLL_CALL fe::IEditorFacade::moveCursorPrevWord ( bool  keepSel  )  [pure virtual]

virtual void UC_DLL_CALL fe::IEditorFacade::moveCursorBeginLine ( bool  keepSel  )  [pure virtual]

virtual void UC_DLL_CALL fe::IEditorFacade::moveCursorEndLine ( bool  keepSel  )  [pure virtual]

virtual void UC_DLL_CALL fe::IEditorFacade::moveCursorBeginText ( bool  keepSel  )  [pure virtual]

virtual void UC_DLL_CALL fe::IEditorFacade::moveCursorEndText ( bool  keepSel  )  [pure virtual]

virtual void UC_DLL_CALL fe::IEditorFacade::moveCursorNextLine ( bool  keepSel  )  [pure virtual]

virtual void UC_DLL_CALL fe::IEditorFacade::moveCursorPrevLine ( bool  keepSel  )  [pure virtual]

virtual void UC_DLL_CALL fe::IEditorFacade::moveCursorNextPage ( bool  keepSel  )  [pure virtual]

virtual void UC_DLL_CALL fe::IEditorFacade::moveCursorPrevPage ( bool  keepSel  )  [pure virtual]


The documentation for this class was generated from the following file:

Generated on Tue Nov 18 21:08:23 2008 for Ferry by doxygen 1.5.7.1
http://sourceforge.net