C# Class SIL.FieldWorks.Common.RootSites.SimpleRootSite

Base class for hosting a view in an application.
Inheritance: System.Windows.Forms.UserControl, IVwRootSite, IRootSite, IxCoreColleague, IEditingCallbacks, IReceiveSequentialMessages, IMessageFilter, IFWDisposable
Mostra file Open project: sillsdev/FieldWorks Class Usage Examples

Protected Properties

Property Type Description
m_Dpi Point
m_Zoom float
m_dxdLayoutWidth int
m_dyHeader int
m_editingHelper EditingHelper
m_fAllowLayout bool
m_fInLayout bool
m_fInPaint bool
m_fIsTextBox bool
m_fMakeRootWhenHandleIsCreated bool
m_fRefreshPending bool
m_fRootboxMade bool
m_fShowRangeSelAfterLostFocus bool
m_graphicsManager GraphicsManager
m_mediator Mediator
m_rootSiteEventHandler object
m_rootb IVwRootBox
m_styleSheet IVwStylesheet
m_wsPending int
m_wsf ILgWritingSystemFactory
s_vstrDrawErrMsgs List

Private Properties

Property Type Description
CallInvalidateRect void
ContainingXWindow XCore.IxWindow
ConvertKeyValue int
DefaultWantBothEnds bool
IVwRootSite IVwGraphics
InitGraphics void
InitializeComponent void
LresultFromObject System.IntPtr
ModifyOverlay void
OnContextMenu void
Print void
SetupVc void
SubscribeToRootSiteEventHandlerEvents void
SwitchFocusHere void
UninitGraphics void
UpdateSelectionEnabledState void

Public Methods

Method Description
AboutToDiscard ( ) : void

In DetailViews there are some root boxes which are created but (because scrolled out of view) never made visible. In certain circumstances, as their containers are disposed, something gets called that may cause calls to methods like OnLoad or OnHandleCreated. When we know a root site is about to become garbage, we want these methods to do as little as possible, both for performance and to prevent possible crashes as windows are created for (e.g.) objects that have been deleted.

AdjustPrintDialog ( System.Windows.Forms.PrintDialog dlg ) : void

By default this does nothing. Override to, for example, enable the 'Selection' button. See XmlSeqView for an example.

AdjustScrollRange ( IVwRootBox prootb, int dxdSize, int dxdPosition, int dydSize, int dydPosition ) : bool

Adjust the scroll range when some lazy box got expanded. Needs to be done for both panes if we have more than one.

AllRootBoxes ( ) : List

Return the internal rootbox as a list, or an empty list.

BeginSequentialBlock ( ) : void

Begin a block of code which, even though it is not itself a message handler, should not be interrupted by other messages that need to be sequential. This may be called from within a message handler. EndSequentialBlock must be called without fail (use try...finally) at the end of the block that needs protection.

CastAsIVwRootSite ( ) : IVwRootSite

Allows the IRootSite to be cast as an IVwRootSite

ChangeOrMakeRoot ( int hvoRoot, IVwViewConstructor vc, int frag, IVwStylesheet styleSheet ) : void

This method is designed to be used by classes whose root object may be determined after the window's handle is created (when MakeRoot is normally called) and may be subsequently changed. It is passed the required arguments for SetRootObject, and if the root box already exists, all it does is call SetRootObject. If the root box does not already exist, it calls MakeRoot immediately, and arranges for the root box so created to be laid out, since it is possible that we have 'missed our chance' to have this happen when the window gets its initial OnSizeChanged message.

CheckDisposed ( ) : void

Throw if the IsDisposed property is true

ClientToScreen ( IVwRootBox prootb, System &pt ) : void

Member ClientToScreen

CloseRootBox ( ) : void

Subclasses should override CloseRootBox if something else is still using it after the window closes. In that case the subclass should do nothing.

ComplexKeyBehavior ( int chw, VwShiftStatus ss ) : EditingHelper.CkBehavior

Return an indication of the behavior of some of the special keys (arrows, home, end).

Physical behavior means that left arrow key goes to the left regardless of the direction of the text; logical behavior means that left arrow key always moves the IP one character (possibly plus diacritics, etc.) in the underlying text, in the direction that is to the left for text in the main paragraph direction. So, in a normal LTR paragraph, left arrow decrements the IP position; in an RTL paragraph, it increments it. Both produce a movement to the left in text whose direction matches the paragraph ("downstream" text). But where there is a segment of upstream text, logical behavior will jump almost to the other end of the segment and then move the 'wrong' way through it.

DoUpdates ( IVwRootBox prootb ) : void

Cause the immediate update of the display of the root box. This should cause all pending paint operations to be done immediately, at least for the screen area occupied by the root box. It is typically called after processing key strokes, to ensure that the updated text is displayed before trying to process any subsequent keystrokes.

EndSequentialBlock ( ) : void

See BeginSequentialBlock.

GetAndClearPendingWs ( IVwRootBox prootb ) : int

If there is a pending writing system that should be applied to typing, return it; also clear the state so that subsequent typing will not have a pending writing system until something sets it again. (This is mainly used so that keyboard-change commands can be applied while the selection is a range.)

GetAvailWidth ( IVwRootBox prootb ) : int

Get the width available for laying things out in the view. Return the layout width for the window, depending on whether or not there is a scroll bar. If there is no scroll bar, we pretend that there is, so we don't have to keep adjusting the width back and forth based on the toggling on and off of vertical and horizontal scroll bars and their interaction. The return result is in pixels. The only common reason to override this is to answer instead a very large integer, which has the effect of turning off line wrap, as everything apparently fits on a line. N.B. If it is necessary to override this, it is not advisable to use Int32.MaxValue for fear of overflow caused by VwSelection::InvalidateSel() adjustments.

GetGraphics ( IVwRootBox prootb, IVwGraphics &pvg, Rect &rcSrcRoot, Rect &rcDstRoot ) : void

Get a graphics object in an appropriate state for drawing and measuring in the view. The calling method should pass the IVwGraphics back to ReleaseGraphics() before it returns. In particular, problems will arise if OnPaint() gets called before the ReleaseGraphics() method.

REVIEW JohnT(?): We probably need a better way to handle this. Most likely: make the VwGraphics object we cache a true COM object so its reference count is meaningful; have this method create a new one. Problem: a useable VwGraphics object has a device context that is linked to a particular window; if the window closes, the VwGraphics is not useable, whatever its reference count says. It may therefore be that we just need to allocate a copy in this method, leaving the member variable alone. Or, the current strategy may prove adequate.

GetMessageTargets ( ) : XCore.IxCoreColleague[]

Gets objects known to this site that can handle xCore command messages. For rootsite, the only such object it knows about is itself.

GetPrimarySelRect ( IVwSelection sel ) : Rect

Get the primary rectangle occupied by a selection (relative to the top left of the client rectangle).

GetSelectionAtPoint ( Point position, bool fInstall ) : IVwSelection

Get a selection at the indicated point (as in MouseEventArgs.Location). If fInstall is true make it the active selection.

GetSelectionAtViewPoint ( Point position, bool fInstall ) : IVwSelection

Get a selection at the indicated point.

GetTransformAtDst ( IVwRootBox root, Point pt, Rect &rcSrcRoot, Rect &rcDstRoot ) : void

Get a transform for a given destination point...same for all points in this simple case.

GetTransformAtSrc ( IVwRootBox root, Point pt, Rect &rcSrcRoot, Rect &rcDstRoot ) : void

Get a transform for a given layout point...same for all points in this simple case.

GetTsStringForClipboard ( IVwSelection vwsel ) : ITsString

If a particular rootsite needs to do something special for putting the current selection on the keyboard, implement this method to do it, and have it return the filled-in ITsString object. See LT-9475 for justification.

GetWritingSystemForHvo ( int hvo ) : int

Gets the writing system for the HVO. This could either be the vernacular or analysis writing system.

GoToEnd ( ) : void

Use this method instead of ScrollToEnd if you need to go to the end of the view programmatically (not in response to a Ctrl-End). The code for handling Ctrl-End uses CallOnExtendedKey() in OnKeyDown() to handle setting the IP.

HandleKeyboardChange ( IVwSelection vwsel, int wsMatch ) : void

When the user has selected a keyboard from the system tray, adjust the language of the selection to something that matches, if possible.

IPDistanceFromWindowTop ( IVwSelection sel ) : int

Finds the distance between the scroll position and the IP (i.e. the distance between the top of the window and the IP).

Init ( XCore mediator, System configurationParameters ) : void

Allows xCore-specific initialization. We don't need any.

InvalidateForLazyFix ( ) : void

Invalidate the pane because some lazy box expansion messed up the scroll position. Made a separate method so we can override.

InvalidateRect ( IVwRootBox root, int xsLeft, int ysTop, int xsWidth, int ysHeight ) : void

Invalidate rectangle

IsIgnoredKey ( KeyPressEventArgs e, Keys modifiers ) : bool

Checks input characters to see if they should be processsed. Static to allow function to be shared with PublicationControl.

IsOkToMakeLazy ( IVwRootBox prootb, int ydTop, int ydBottom ) : bool

Answer whether boxes in the specified range of destination coordinates may usefully be converted to lazy boxes. Should at least answer false if any part of the range is visible. The default implementation avoids converting stuff within about a screen's height of the visible part(s).

IsSelectionVisible ( IVwSelection sel ) : bool

Checks if selection is visible. For a range selection we check the end of the selection, for an IP the entire selection must be visible.

This version doesn't test the secondary part of the selection if the combined primary and secondary selection is higher or wider then the ClientRectangle.

IsSelectionVisible ( IVwSelection sel, bool fWantOneLineSpace ) : bool

Checks if selection is visible. For a range selection (that is not a picture) we check the end of the selection, otherwise the entire selection must be visible.

IsSelectionVisible ( IVwSelection vwsel, bool fWantOneLineSpace, bool fWantBothEnds ) : bool

Checks if selection is visible, according to the parameters.

This version doesn't test the secondary part of the selection if the combined primary and secondary selection is higher or wider then the ClientRectangle.

This method tests that the selection rectangle is inside of the client rectangle, but it doesn't test if the selection is actually enabled!

MakeRoot ( ) : void

Override this method in your subclass. It should make a root box and initialize it with appropriate data and view constructor, etc.

MapXTo ( int x, Rectangle rcSrc, Rectangle rcDst ) : int

Performs the same coordinate transformation as C++ UtilRect rcSrc.MapXTo(x, rcDst).

MapYTo ( int y, Rectangle rcSrc, Rectangle rcDst ) : int

Performs the same coordinate transformation as C++ UtilRect rcSrc.MapYTo(y, rcDst).

OnDisplayBestStyleName ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

Called (by xcore) to control display params of the Styles menu, e.g. whether it should be enabled

OnDisplayCombinedStylesList ( object parameter, XCore.UIListDisplayProperties &display ) : bool

Called when XCore wants to display something that relies on the list with the id "CombinedStylesList"

OnDisplayWritingSystemHvo ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

Called (by xcore) to control display params of the writing system menu, e.g. whether it should be enabled

OnFilePrint ( object args ) : bool

Handle Print command

OnInsertDiffPara ( IVwRootBox prootb, ITsTextProps ttpDest, ITsTextProps ttpSrc, ITsString tssParas, ITsString tssTrailing ) : VwInsertDiffParaResponse

see OnInsertDiffParas

OnInsertDiffParas ( IVwRootBox prootb, ITsTextProps ttpDest, int cPara, ITsTextProps ttpSrc, ITsString tssParas, ITsString tssTrailing ) : VwInsertDiffParaResponse

OnPrint ( object args ) : bool

This is equivalent. These two names accommodate two conventions for naming commands...xCore labels commands just with what they do, TE includes the menu name.

OnProblemDeletion ( IVwSelection sel, VwDelProbType dpt ) : VwDelProbResponse

The user has attempted to delete something which the system does not inherently know how to delete. The dpt argument indicates the type of problem.

OnPropertyChanged ( string name ) : void

Receives the xcore broadcast message "PropertyChanged"

OriginalOnPaint ( PaintEventArgs e ) : void

Required by interface, but not used, because we don't user the MessageSequencer to sequence OnPaint calls.

OriginalWndProc ( Message &msg ) : void

Processes Windows messages.

OverlayChanged ( IVwRootBox prootb, IVwOverlay vo ) : void

When the state of the overlays changes, it propagates this to its site.

PostponedInvalidate ( object sender, EventArgs e ) : void

Executed on the Application Idle queue, this method invalidates the whole view. It is used when we cannot properly complete a paint because we detect that it is a recursive call, to ensure that the window is eventually painted properly.

PreFilterMessage ( Message &m ) : bool

This is a major kludge to prevent a spurious WM_KEYUP for VK_CONTROL from interrupting a mouse click. If mouse button was pressed elsewhere causing this root site to loose focus, this message filter is installed to throw away the spurious WM_KEYUP for VK_CONTROL that happens as a result of switching to the default keyboard layout. See OnKillFocus for the corresponding code that installs this message filter.

PrePasteProcessing ( ) : void

Perform any processing needed immediately prior to a paste operation. This is very rarely implemented, but always called by EditingHelper.PasteClipboard.

PrintWithErrorHandling ( IPrintRootSite printRootSite, PrintDocument printDoc, Form parentForm ) : void

Helper method to allow for standard error reporting when something goes wrong during printing of the contents of a rootsite.

RefreshDisplay ( ) : bool

Refreshes the Display :)

ReleaseGraphics ( IVwRootBox prootb, IVwGraphics pvg ) : void

Inform the container when done with the graphics object.

REVIEW JohnT(?): could we somehow have this handled by the Release method of the IVwGraphics? But that method does not know anything about the status or source of its hdc.

ReportDrawErrMsg ( Exception e ) : void

An error has occurred during drawing, and the component in which it occurred should have recorded a system error information object describing the problem

RequestSelectionAtEndOfUow ( IVwRootBox rootb, int ihvoRoot, int cvlsi, SelLevInfo rgvsli, int tagTextProp, int cpropPrevious, int ich, int wsAlt, bool fAssocPrev, ITsTextProps selProps ) : void

If we need to make a selection, but we can't because edits haven't been updated in the view, this method requests creation of a selection after the unit of work is complete. Derived classes should implement this if they have any hope of supporting multi- paragraph editing.

RequestVisibleSelectionAtEndOfUow ( SelectionHelper helper ) : void

If we need to make a selection, but we can't because edits haven't been updated in the view, this method requests creation of a selection after the unit of work is complete. It will also scroll the selection into view. Derived classes should implement this if they have any hope of supporting multi- paragraph editing.

RootBoxSizeChanged ( IVwRootBox prootb ) : void

Notifies the site that the size of the root box changed; scroll ranges and/or window size may need to be updated. The standard response is to update the scroll range.

Review JohnT: might this also be the place to make sure the selection is still visible? Should we try to preserve the scroll position (at least the top left corner, say) even if the selection is not visible? Which should take priority?

ScreenToClient ( IVwRootBox prootb, System &pt ) : void

Member ScreenToClient

ScrollSelectionIntoView ( IVwSelection sel, VwScrollSelOpts scrollOption ) : bool

Scrolls the selection into view, positioning it as requested

ScrollSelectionToLocation ( IVwSelection sel, int dyPos ) : bool

Scroll the selection in to the given client position.

ScrollToEnd ( ) : void

Scroll to the bottom. This is somewhat tricky because after scrolling to the bottom of the range as we currently estimate it, expanding a closure may change things. GoToEnd

ScrollToTop ( ) : void

Scroll to the top

SelectAll ( ) : void

Make a selection that includes all the text.

SelectionChanged ( IVwRootBox rootb, IVwSelection vwselNew ) : void

Notifies the site that something about the selection has changed.

Don't you dare make this virtual!

SetAccessibleName ( string name ) : void

Set the accessible name that the root box will return for this root site.

ShowContextMenuAtIp ( IVwRootBox rootb ) : void

Show the context menu for the specified root box at the location of its selection (typically an IP).

SimpleRootSite ( ) : System

WasFocused ( ) : bool

Find out if this RootSite had Focus before being grabbed by some other entity (such as a Windows ComboBox)

get_MakeObjFromText ( string bstrText, IVwSelection _selDst, int &kodt ) : Guid

Needs a cache in order to provide a meaningful implementation. SimpleRootsite does not know how to handle GUIDs so just return an empty GUID which will cause the run to be deleted.

get_ScreenGraphics ( IVwRootBox _Root ) : IVwGraphics

Real drawing VG same as layout one for simple view.

get_SemiTagging ( IVwRootBox prootb ) : bool

Return true if this kind of window uses semi-tagging.

get_TextRepOfObj ( Guid &guid ) : string

Needs a cache in order to provide a meaningful implementation. SimpleRootsite should never have objects cut, copied, pasted.

Protected Methods

Method Description
Activate ( VwSelectionState vss ) : void

AdjustScrollRange1 ( int dxdSize, int dxdPosition, int dydSize, int dydPosition ) : bool

Adjust the scroll range when some lazy box got expanded. This is rather similar to SizeChanged, but is used when the size changed as a result of recomputing something that is invisible (typically about to become visible, but not currently on screen). Thus, the scroll bar range and possibly position need adjusting, but it isn't necessary to actually redraw anything except the scroll bar--unless the scroll position is forced to change, because we were in the process of scrolling to somewhere very close to the end, and the expansion was smaller than predicted, and the total range is now less than the current position.

The ScrollableControl.DisplayRectangle determines the scroll range. To set it, you have to set ScrollableControl.AutoScrollMinSize and do a PerformLayout.

CallMouseDblClk ( Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : void

Call MouseDblClk on rootbox

CallMouseDown ( Point point, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : void

Call MouseDown on the rootbox

CallMouseDownExtended ( Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : void

Call MouseDownExtended on the rootbox

CallMouseMoveDrag ( Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : void

Call MouseMoveDrag on the rootbox

CallMouseUp ( Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : void

Call MouseUp on the rootbox

CheckForRecursivePaint ( ) : bool

Return true if a paint needs to be aborted because something like a paint or layout is already in progress. Arranges for a postponed paint if so.

CreateAccessibilityInstance ( ) : System.Windows.Forms.AccessibleObject

Return a wrapper around the COM IAccessible for the root box.

CreateEditingHelper ( ) : EditingHelper

Creates a new EditingHelper of the proper type.

CreateGraphicsManager ( ) : GraphicsManager

Creates the graphics manager.

We do this in a method for testing.

CreateOrientationManager ( ) : OrientationManager

The default creates a normal horizontal orientation manager. Override to create one of the other classes as needed.

CreateSelectionRestorer ( ) : SIL.FieldWorks.Common.RootSites.SelectionRestorer

Creates a new selection restorer.

Overriding this method to return null will keep the selection from being restored

Dispose ( bool disposing ) : void

Clean up any resources being used.

DoContextMenu ( IVwSelection invSel, Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : bool

Overide this to provide a context menu for some subclass.

DoLayout ( ) : bool

Lay out your root box. If nothing significant has changed since the last layout, answer false; if it has, return true. Assumes that m_graphicsManager.VwGraphics is in a valid state (having a DC).

We assume that the VwGraphics object has already been setup for us

Draw ( PaintEventArgs e ) : void

Draw to the given clip rectangle.

OPTIMIZE JohnT: pass clip rect to VwGraphics and make use of it.

EnsureDefaultSelection ( ) : void

Makes a default selection if no selection currently exists in our RootBox.

EnsureDefaultSelection ( bool fMakeSelInEditable ) : void

Makes a default selection if no selection currently exists in our RootBox.

FillInStylesComboList ( XCore.UIListDisplayProperties display, IVwStylesheet stylesheet ) : void

Fill in the list of style names.

GetCoordRects ( Rectangle &rcSrcRoot, Rectangle &rcDstRoot ) : void

Construct coord transformation rectangles. Height and width are dots per inch. src origin is 0, dest origin is controlled by scrolling.

GetExternalLinkSel ( bool &fFoundLinkStyle, IVwSelection &vwselParam, string &strbFile, Point pt ) : bool

This function returns a selection that includes the entire LinkedFile link at the current insertion point. It doesn't actually make the selection active. If the return value is false, none of the paramters should be looked at. If pfFoundLinkStyle is true, ppvwsel will contain the entire LinkedFiles Link string and pbstrFile will contain the filename the LinkedFiles link is pointing to. If pfFoundLinkStyle is false, the selection will still be valid, but it couldn't find any LinkedFiles link at the current insertion point. If ppt is not NULL, it will look for an LinkedFiles Link at that point. Otherwise, the current insertion point will be used.

GetNonFocusedSelectionState ( Control windowGainingFocus ) : VwSelectionState

Unless overridden, this will return a value indicating that range selections should be hidden.

GetPossibleWritingSystemsToSelectByInputLanguage ( ILgWritingSystemFactory wsf ) : int[]

get the writing systems we should consider as candidates to be selected whent the user makes an external choice of keyboard. overridden in root site to use only active ones.

GetPrintInfo ( int &hvo, IVwViewConstructor &vc, int &frag, IVwStylesheet &ss ) : void

Default is to print the exact same thing as displayed in the view, but subclasses (e.g., ConstChartBody) can override.

GetScrollOffsets ( int &dxd, int &dyd ) : void

Returns the scroll position. Values are positive.

GetShiftStatus ( ) : VwShiftStatus

Returns the ShiftStatus that shows if Ctrl and/or Shift keys were pressed

GoToPageBottom ( bool fIsShiftPressed ) : void

Position the insertion point at the page bottom

GoToPageTop ( bool fIsShiftPressed ) : void

Position the insertion point at the page top

HandleContextMenuFromKeyboard ( IVwSelection vwsel, Point center ) : bool

The user has chosen a keyboard combination which requests a context menu. Handle it, given the active selection and a point around the center of it.

IsInputChar ( char charCode ) : bool

This also helps us handle all input keys...the documentation doesn't make very clear the distinction between this and IsInputKey, but failing to override this one can cause typing in the view to invoke buttons in the parent form. If you want to remove this, make sure it doesn't mess up windows that contain both views and buttons, such as the LexText interlinear view.

IsInputChar gets called while processing WM_CHAR or WM_SYSCHAR.

IsInputKey ( Keys keyData ) : bool

Determines whether the specified key is a regular input key or a special key that requires preprocessing. Default implementation always returns true because we want to handle all keys!

IsInputKey gets called while processing WM_KEYDOWN or WM_SYSKEYDOWN.

MakeSelectionVisible ( IVwSelection sel ) : bool

Scroll to make the selection visible. In general, scroll the minimum distance to make it entirely visible. If the selection is higher than the window, scroll the minimum distance to make it fill the window. If the window is too small to show both primary and secondary, show primary.

Note: subclasses for which scrolling is disabled should override. If sel is null, make the current selection visible.

MakeSelectionVisible ( IVwSelection sel, bool fWantOneLineSpace ) : bool

Scroll to make the selection visible. In general, scroll the minimum distance to make it entirely visible. If the selection is higher than the window, scroll the minimum distance to make it fill the window. If the window is too small to show both primary and secondary, show primary. If fWantOneLineSpace is true we make sure that at least 1 line is visible above and below the selection. By default ranges (that are not pictures) are allowed to be only partly visible.

MakeSelectionVisible ( IVwSelection vwsel, bool fWantOneLineSpace, bool fWantBothEnds, bool fForcePrepareToDraw ) : bool

Scroll to make the selection visible. In general, scroll the minimum distance to make it entirely visible. If the selection is higher than the window, scroll the minimum distance to make it fill the window. If the window is too small to show both primary and secondary, show primary. If fWantOneLineSpace is true we make sure that at least 1 line is visible above and below the selection.

Note: subclasses for which scrolling is disabled should override. If the selection is invalid, return false.

MoveChildWindows ( ) : void

This hook provides an opportunity for subclasses to move child windows. For example, InterlinDocChild moves its Sandbox window to correspond to the position of the selected word in the text. It may be important to do this before updating the scroll range...for example, Windows forms may not allow the scroll range to be less than enough to show the whole of the (old position of) the child window.

OnDoubleClick ( EventArgs e ) : void

Process mouse double click

OnEditSelectAll ( object args ) : bool

Handle the Edit/Select All menu command.

OnEditingHelperCreated ( ) : void

Called when the editing helper is created.

OnGotFocus ( EventArgs e ) : void

View is getting focus: Activate the rootbox and set the appropriate keyboard

OnHandleCreated ( EventArgs e ) : void

The window is first being created.

OnHandleDestroyed ( EventArgs e ) : void

Do cleaning up when handle gets destroyed

Formerly AfVwRootSite::OnReleasePtr()

OnKeyDown ( KeyEventArgs e ) : void

User pressed a key.

OnKeyPress ( KeyPressEventArgs e ) : void

Handles OnKeyPress. Passes most things to EditingHelper.OnKeyPress

OnKeyUp ( KeyEventArgs e ) : void

Clean up after page scrolling.

OnKillFocus ( Control newWindow, bool fIsChildWindow ) : void

Called when the focus is lost to another window.

OnLayout ( LayoutEventArgs levent ) : void

Recompute the layout

OnLayoutSizeChanged ( EventArgs e ) : void

Required method to implement the LayoutSizeChanged event.

OnLoad ( EventArgs e ) : void

OnMouseDown ( MouseEventArgs e ) : void

Process left or right mouse button down

OnMouseMove ( MouseEventArgs e ) : void

Process mouse move

OnMouseMoveSetCursor ( Point mousePos ) : void

Allow clients to override cursor type during OnMouseMove.

OnMouseUp ( MouseEventArgs e ) : void

Process mouse button up event

OnPaint ( PaintEventArgs e ) : void

Call Draw() which does all the real painting

OnPaintBackground ( PaintEventArgs e ) : void

Ignore the PaintBackground event because we do it ourself (in the views code).

OnRightMouseUp ( Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : bool

Process right mouse button up (typically show a context menu). Was mouse Down in an earlier life, but we concluded that the usual convention is context menu on mouse up. There may be vestiges.

OnSetFocus ( Message m ) : void

We intercept WM_SETFOCUS in our WndProc and call this because we need the information about the previous focus window, which .NET does not provide.

OnSizeChanged ( EventArgs e ) : void

Size changed. Ensure that the selection is still visible.

OnTimer ( object sender, EventArgs e ) : void

Flash the insertion point.

OnVisibleChanged ( EventArgs e ) : void

When we go visible and we are waiting to refresh the display (do a rebuild) then call RefreshDisplay()

PixelToView ( Point pt ) : Point

Adjust a point to view coords from device coords. This is the translation from a point obtained from a windows message like WM_LBUTTONDOWN to a point that can be passed to the root box. Currently it does nothing, as any conversion is handled by the source and destination rectangles passed to the mouse routines. It is retained for possible future use.

PrepareToDraw ( Rectangle rcSrcRoot, Rectangle rcDstRoot ) : VwPrepDrawResult

Wraps PrepareToDraw calls so as to suppress attempts to paint or any similar re-entrant call we might make while getting ready to do it.

ProcessCmdKey ( Message &msg, Keys keyData ) : bool

Override to provide default handling of Context manu key.

SaveSelectionInfo ( Rectangle rcIdeal, int ydTop ) : void

Save some selection location information if needed.

ScrollDown ( int dy ) : void

Scroll by the specified amount (positive is down, that is, added to the scroll offset). If this would exceed the scroll range, move as far as possible. Update both actual display and scroll bar position. (Can also scroll up, if dy is negative. Name is just to indicate positive direction.)

SelectionRectangle ( IVwSelection vwsel, Rectangle &rcIdeal, bool &fEndBeforeAnchor ) : void

Gets the rectangle of the selection. If it is a split selection we combine the two rectangles.

SetupPrintHelp ( PrintDialog dlg ) : void

If help is available for the print dialog, set ShowHelp to true, and add an event handler that can display some help. See DraftView in TeDll for an example.

UpdateScrollRange ( int dxdRange, int dxdPos, int dydRange, int dydPos ) : bool

Update the scroll range with the new range and position.

UpdateScrollRange ( ) : void

Update your scroll range to reflect current conditions.

WndProc ( Message &m ) : void

Override the WndProc to handle WM_GETOBJECT so we can return the IAccessible implementation from the root box, rather than wrapping it as an AccessibleObject in .NET style. This is important because the test harness wants to be able to get back to the root box. There are a couple of other messages we must handle at this level as well. This override is now delegated through the message sequencer; see OriginalWndProc.

Private Methods

Method Description
CallInvalidateRect ( Rectangle rect, bool fErase ) : void

Some situations lead to invalidating very large rectangles. Something seems to go wrong if they are way bigger than the client rectangle. Finding the intersection makes it more reliable.

ContainingXWindow ( ) : XCore.IxWindow
ConvertKeyValue ( int keyValue ) : int

Allow the orientation manager to convert arrow key codes.

DefaultWantBothEnds ( IVwSelection vwsel ) : bool
IVwRootSite ( IVwRootBox prootb ) : IVwGraphics

Get a graphics object in an appropriate state for drawing and measuring in the view. The calling method should pass the IVwGraphics back to ReleaseGraphics() before it returns. In particular, problems will arise if OnPaint() gets called before the ReleaseGraphics() method.

InitGraphics ( ) : void

Make sure the graphics object has a DC. If it already has, increment a count, so we know when to really free the DC.

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

LresultFromObject ( System.Guid &riid, IntPtr wParam, [ pAcc ) : IntPtr
ModifyOverlay ( bool fApplyTag, IVwOverlay pvo, int itag ) : void
OnContextMenu ( Point pt ) : void
Print ( PrintDocument pd ) : void
SetupVc ( ) : void

This is called in Layout to notify the VC of anything it needs to know.

SubscribeToRootSiteEventHandlerEvents ( ) : void

Creates the root site event handler.

SwitchFocusHere ( ) : void
UninitGraphics ( ) : void

Uninitialize the graphics object by releasing the DC.

UpdateSelectionEnabledState ( Control newWindow ) : void

Updates the state of the selection (enabled/disabled).

Method Details

AboutToDiscard() public method

In DetailViews there are some root boxes which are created but (because scrolled out of view) never made visible. In certain circumstances, as their containers are disposed, something gets called that may cause calls to methods like OnLoad or OnHandleCreated. When we know a root site is about to become garbage, we want these methods to do as little as possible, both for performance and to prevent possible crashes as windows are created for (e.g.) objects that have been deleted.
public AboutToDiscard ( ) : void
return void

Activate() protected method

protected Activate ( VwSelectionState vss ) : void
vss VwSelectionState
return void

AdjustPrintDialog() public method

By default this does nothing. Override to, for example, enable the 'Selection' button. See XmlSeqView for an example.
public AdjustPrintDialog ( System.Windows.Forms.PrintDialog dlg ) : void
dlg System.Windows.Forms.PrintDialog
return void

AdjustScrollRange() public method

Adjust the scroll range when some lazy box got expanded. Needs to be done for both panes if we have more than one.
public AdjustScrollRange ( IVwRootBox prootb, int dxdSize, int dxdPosition, int dydSize, int dydPosition ) : bool
prootb IVwRootBox
dxdSize int
dxdPosition int
dydSize int
dydPosition int
return bool

AdjustScrollRange1() protected method

Adjust the scroll range when some lazy box got expanded. This is rather similar to SizeChanged, but is used when the size changed as a result of recomputing something that is invisible (typically about to become visible, but not currently on screen). Thus, the scroll bar range and possibly position need adjusting, but it isn't necessary to actually redraw anything except the scroll bar--unless the scroll position is forced to change, because we were in the process of scrolling to somewhere very close to the end, and the expansion was smaller than predicted, and the total range is now less than the current position.
The ScrollableControl.DisplayRectangle determines the scroll range. To set it, you have to set ScrollableControl.AutoScrollMinSize and do a PerformLayout.
protected AdjustScrollRange1 ( int dxdSize, int dxdPosition, int dydSize, int dydPosition ) : bool
dxdSize int
dxdPosition int
dydSize int The change (positive means larger) in the overall size of the /// root box
dydPosition int The position where the change happened. In general it may be /// assumed that if this change is above the thumb position, everything that changed /// is above it, and it needs to be increased by dydSize; otherwise, everything is below /// the screen, and no change to the thumb position is needed.
return bool

AllRootBoxes() public method

Return the internal rootbox as a list, or an empty list.
public AllRootBoxes ( ) : List
return List

BeginSequentialBlock() public method

Begin a block of code which, even though it is not itself a message handler, should not be interrupted by other messages that need to be sequential. This may be called from within a message handler. EndSequentialBlock must be called without fail (use try...finally) at the end of the block that needs protection.
public BeginSequentialBlock ( ) : void
return void

CallMouseDblClk() protected method

Call MouseDblClk on rootbox
protected CallMouseDblClk ( Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : void
pt Point
rcSrcRoot System.Drawing.Rectangle
rcDstRoot System.Drawing.Rectangle
return void

CallMouseDown() protected method

Call MouseDown on the rootbox
protected CallMouseDown ( Point point, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : void
point Point
rcSrcRoot System.Drawing.Rectangle
rcDstRoot System.Drawing.Rectangle
return void

CallMouseDownExtended() protected method

Call MouseDownExtended on the rootbox
protected CallMouseDownExtended ( Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : void
pt Point
rcSrcRoot System.Drawing.Rectangle
rcDstRoot System.Drawing.Rectangle
return void

CallMouseMoveDrag() protected method

Call MouseMoveDrag on the rootbox
protected CallMouseMoveDrag ( Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : void
pt Point
rcSrcRoot System.Drawing.Rectangle
rcDstRoot System.Drawing.Rectangle
return void

CallMouseUp() protected method

Call MouseUp on the rootbox
protected CallMouseUp ( Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : void
pt Point
rcSrcRoot System.Drawing.Rectangle
rcDstRoot System.Drawing.Rectangle
return void

CastAsIVwRootSite() public method

Allows the IRootSite to be cast as an IVwRootSite
public CastAsIVwRootSite ( ) : IVwRootSite
return IVwRootSite

ChangeOrMakeRoot() public method

This method is designed to be used by classes whose root object may be determined after the window's handle is created (when MakeRoot is normally called) and may be subsequently changed. It is passed the required arguments for SetRootObject, and if the root box already exists, all it does is call SetRootObject. If the root box does not already exist, it calls MakeRoot immediately, and arranges for the root box so created to be laid out, since it is possible that we have 'missed our chance' to have this happen when the window gets its initial OnSizeChanged message.
public ChangeOrMakeRoot ( int hvoRoot, IVwViewConstructor vc, int frag, IVwStylesheet styleSheet ) : void
hvoRoot int
vc IVwViewConstructor
frag int
styleSheet IVwStylesheet
return void

CheckDisposed() public method

Throw if the IsDisposed property is true
public CheckDisposed ( ) : void
return void

CheckForRecursivePaint() protected method

Return true if a paint needs to be aborted because something like a paint or layout is already in progress. Arranges for a postponed paint if so.
protected CheckForRecursivePaint ( ) : bool
return bool

ClientToScreen() public method

Member ClientToScreen
public ClientToScreen ( IVwRootBox prootb, System &pt ) : void
prootb IVwRootBox
pt System Point to convert
return void

CloseRootBox() public method

Subclasses should override CloseRootBox if something else is still using it after the window closes. In that case the subclass should do nothing.
public CloseRootBox ( ) : void
return void

ComplexKeyBehavior() public method

Return an indication of the behavior of some of the special keys (arrows, home, end).
Physical behavior means that left arrow key goes to the left regardless of the direction of the text; logical behavior means that left arrow key always moves the IP one character (possibly plus diacritics, etc.) in the underlying text, in the direction that is to the left for text in the main paragraph direction. So, in a normal LTR paragraph, left arrow decrements the IP position; in an RTL paragraph, it increments it. Both produce a movement to the left in text whose direction matches the paragraph ("downstream" text). But where there is a segment of upstream text, logical behavior will jump almost to the other end of the segment and then move the 'wrong' way through it.
public ComplexKeyBehavior ( int chw, VwShiftStatus ss ) : EditingHelper.CkBehavior
chw int Key value
ss VwShiftStatus Shift status
return EditingHelper.CkBehavior

CreateAccessibilityInstance() protected method

Return a wrapper around the COM IAccessible for the root box.
protected CreateAccessibilityInstance ( ) : System.Windows.Forms.AccessibleObject
return System.Windows.Forms.AccessibleObject

CreateEditingHelper() protected method

Creates a new EditingHelper of the proper type.
protected CreateEditingHelper ( ) : EditingHelper
return EditingHelper

CreateGraphicsManager() protected method

Creates the graphics manager.
We do this in a method for testing.
protected CreateGraphicsManager ( ) : GraphicsManager
return GraphicsManager

CreateOrientationManager() protected method

The default creates a normal horizontal orientation manager. Override to create one of the other classes as needed.
protected CreateOrientationManager ( ) : OrientationManager
return OrientationManager

CreateSelectionRestorer() protected method

Creates a new selection restorer.
Overriding this method to return null will keep the selection from being restored
protected CreateSelectionRestorer ( ) : SIL.FieldWorks.Common.RootSites.SelectionRestorer
return SIL.FieldWorks.Common.RootSites.SelectionRestorer

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool
return void

DoContextMenu() protected method

Overide this to provide a context menu for some subclass.
protected DoContextMenu ( IVwSelection invSel, Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : bool
invSel IVwSelection
pt Point
rcSrcRoot System.Drawing.Rectangle
rcDstRoot System.Drawing.Rectangle
return bool

DoLayout() protected method

Lay out your root box. If nothing significant has changed since the last layout, answer false; if it has, return true. Assumes that m_graphicsManager.VwGraphics is in a valid state (having a DC).
We assume that the VwGraphics object has already been setup for us
protected DoLayout ( ) : bool
return bool

DoUpdates() public method

Cause the immediate update of the display of the root box. This should cause all pending paint operations to be done immediately, at least for the screen area occupied by the root box. It is typically called after processing key strokes, to ensure that the updated text is displayed before trying to process any subsequent keystrokes.
public DoUpdates ( IVwRootBox prootb ) : void
prootb IVwRootBox
return void

Draw() protected method

Draw to the given clip rectangle.
OPTIMIZE JohnT: pass clip rect to VwGraphics and make use of it.
protected Draw ( PaintEventArgs e ) : void
e PaintEventArgs
return void

EndSequentialBlock() public method

See BeginSequentialBlock.
public EndSequentialBlock ( ) : void
return void

EnsureDefaultSelection() protected method

Makes a default selection if no selection currently exists in our RootBox.
protected EnsureDefaultSelection ( ) : void
return void

EnsureDefaultSelection() protected method

Makes a default selection if no selection currently exists in our RootBox.
protected EnsureDefaultSelection ( bool fMakeSelInEditable ) : void
fMakeSelInEditable bool if true, first try selecting in editable position.
return void

FillInStylesComboList() protected method

Fill in the list of style names.
protected FillInStylesComboList ( XCore.UIListDisplayProperties display, IVwStylesheet stylesheet ) : void
display XCore.UIListDisplayProperties
stylesheet IVwStylesheet
return void

GetAndClearPendingWs() public method

If there is a pending writing system that should be applied to typing, return it; also clear the state so that subsequent typing will not have a pending writing system until something sets it again. (This is mainly used so that keyboard-change commands can be applied while the selection is a range.)
public GetAndClearPendingWs ( IVwRootBox prootb ) : int
prootb IVwRootBox
return int

GetAvailWidth() public method

Get the width available for laying things out in the view. Return the layout width for the window, depending on whether or not there is a scroll bar. If there is no scroll bar, we pretend that there is, so we don't have to keep adjusting the width back and forth based on the toggling on and off of vertical and horizontal scroll bars and their interaction. The return result is in pixels. The only common reason to override this is to answer instead a very large integer, which has the effect of turning off line wrap, as everything apparently fits on a line. N.B. If it is necessary to override this, it is not advisable to use Int32.MaxValue for fear of overflow caused by VwSelection::InvalidateSel() adjustments.
public GetAvailWidth ( IVwRootBox prootb ) : int
prootb IVwRootBox
return int

GetCoordRects() protected method

Construct coord transformation rectangles. Height and width are dots per inch. src origin is 0, dest origin is controlled by scrolling.
protected GetCoordRects ( Rectangle &rcSrcRoot, Rectangle &rcDstRoot ) : void
rcSrcRoot System.Drawing.Rectangle
rcDstRoot System.Drawing.Rectangle
return void

GetExternalLinkSel() protected method

This function returns a selection that includes the entire LinkedFile link at the current insertion point. It doesn't actually make the selection active. If the return value is false, none of the paramters should be looked at. If pfFoundLinkStyle is true, ppvwsel will contain the entire LinkedFiles Link string and pbstrFile will contain the filename the LinkedFiles link is pointing to. If pfFoundLinkStyle is false, the selection will still be valid, but it couldn't find any LinkedFiles link at the current insertion point. If ppt is not NULL, it will look for an LinkedFiles Link at that point. Otherwise, the current insertion point will be used.
protected GetExternalLinkSel ( bool &fFoundLinkStyle, IVwSelection &vwselParam, string &strbFile, Point pt ) : bool
fFoundLinkStyle bool
vwselParam IVwSelection
strbFile string
pt Point
return bool

GetGraphics() public method

Get a graphics object in an appropriate state for drawing and measuring in the view. The calling method should pass the IVwGraphics back to ReleaseGraphics() before it returns. In particular, problems will arise if OnPaint() gets called before the ReleaseGraphics() method.
REVIEW JohnT(?): We probably need a better way to handle this. Most likely: make the VwGraphics object we cache a true COM object so its reference count is meaningful; have this method create a new one. Problem: a useable VwGraphics object has a device context that is linked to a particular window; if the window closes, the VwGraphics is not useable, whatever its reference count says. It may therefore be that we just need to allocate a copy in this method, leaving the member variable alone. Or, the current strategy may prove adequate.
public GetGraphics ( IVwRootBox prootb, IVwGraphics &pvg, Rect &rcSrcRoot, Rect &rcDstRoot ) : void
prootb IVwRootBox
pvg IVwGraphics
rcSrcRoot Rect
rcDstRoot Rect
return void

GetMessageTargets() public method

Gets objects known to this site that can handle xCore command messages. For rootsite, the only such object it knows about is itself.
public GetMessageTargets ( ) : XCore.IxCoreColleague[]
return XCore.IxCoreColleague[]

GetNonFocusedSelectionState() protected method

Unless overridden, this will return a value indicating that range selections should be hidden.
protected GetNonFocusedSelectionState ( Control windowGainingFocus ) : VwSelectionState
windowGainingFocus System.Windows.Forms.Control
return VwSelectionState

GetPossibleWritingSystemsToSelectByInputLanguage() protected method

get the writing systems we should consider as candidates to be selected whent the user makes an external choice of keyboard. overridden in root site to use only active ones.
protected GetPossibleWritingSystemsToSelectByInputLanguage ( ILgWritingSystemFactory wsf ) : int[]
wsf ILgWritingSystemFactory
return int[]

GetPrimarySelRect() public method

Get the primary rectangle occupied by a selection (relative to the top left of the client rectangle).
public GetPrimarySelRect ( IVwSelection sel ) : Rect
sel IVwSelection
return Rect

GetPrintInfo() protected method

Default is to print the exact same thing as displayed in the view, but subclasses (e.g., ConstChartBody) can override.
protected GetPrintInfo ( int &hvo, IVwViewConstructor &vc, int &frag, IVwStylesheet &ss ) : void
hvo int
vc IVwViewConstructor
frag int
ss IVwStylesheet
return void

GetScrollOffsets() protected method

Returns the scroll position. Values are positive.
protected GetScrollOffsets ( int &dxd, int &dyd ) : void
dxd int
dyd int
return void

GetSelectionAtPoint() public method

Get a selection at the indicated point (as in MouseEventArgs.Location). If fInstall is true make it the active selection.
public GetSelectionAtPoint ( Point position, bool fInstall ) : IVwSelection
position Point
fInstall bool
return IVwSelection

GetSelectionAtViewPoint() public method

Get a selection at the indicated point.
public GetSelectionAtViewPoint ( Point position, bool fInstall ) : IVwSelection
position Point Point where the selection is to be made
fInstall bool Indicates whether or not to "install" the seleciton
return IVwSelection

GetShiftStatus() protected method

Returns the ShiftStatus that shows if Ctrl and/or Shift keys were pressed
protected GetShiftStatus ( ) : VwShiftStatus
return VwShiftStatus

GetTransformAtDst() public method

Get a transform for a given destination point...same for all points in this simple case.
public GetTransformAtDst ( IVwRootBox root, Point pt, Rect &rcSrcRoot, Rect &rcDstRoot ) : void
root IVwRootBox
pt Point
rcSrcRoot Rect
rcDstRoot Rect
return void

GetTransformAtSrc() public method

Get a transform for a given layout point...same for all points in this simple case.
public GetTransformAtSrc ( IVwRootBox root, Point pt, Rect &rcSrcRoot, Rect &rcDstRoot ) : void
root IVwRootBox
pt Point
rcSrcRoot Rect
rcDstRoot Rect
return void

GetTsStringForClipboard() public method

If a particular rootsite needs to do something special for putting the current selection on the keyboard, implement this method to do it, and have it return the filled-in ITsString object. See LT-9475 for justification.
public GetTsStringForClipboard ( IVwSelection vwsel ) : ITsString
vwsel IVwSelection
return ITsString

GetWritingSystemForHvo() public method

Gets the writing system for the HVO. This could either be the vernacular or analysis writing system.
public GetWritingSystemForHvo ( int hvo ) : int
hvo int HVO
return int

GoToEnd() public method

Use this method instead of ScrollToEnd if you need to go to the end of the view programmatically (not in response to a Ctrl-End). The code for handling Ctrl-End uses CallOnExtendedKey() in OnKeyDown() to handle setting the IP.
public GoToEnd ( ) : void
return void

GoToPageBottom() protected method

Position the insertion point at the page bottom
protected GoToPageBottom ( bool fIsShiftPressed ) : void
fIsShiftPressed bool True if the shift key is pressed and selection is /// desired
return void

GoToPageTop() protected method

Position the insertion point at the page top
protected GoToPageTop ( bool fIsShiftPressed ) : void
fIsShiftPressed bool True if the shift key is pressed and selection is /// desired
return void

HandleContextMenuFromKeyboard() protected method

The user has chosen a keyboard combination which requests a context menu. Handle it, given the active selection and a point around the center of it.
protected HandleContextMenuFromKeyboard ( IVwSelection vwsel, Point center ) : bool
vwsel IVwSelection
center Point
return bool

HandleKeyboardChange() public method

When the user has selected a keyboard from the system tray, adjust the language of the selection to something that matches, if possible.
public HandleKeyboardChange ( IVwSelection vwsel, int wsMatch ) : void
vwsel IVwSelection Selection
wsMatch int Writing system determined from keyboard change
return void

IPDistanceFromWindowTop() public method

Finds the distance between the scroll position and the IP (i.e. the distance between the top of the window and the IP).
public IPDistanceFromWindowTop ( IVwSelection sel ) : int
sel IVwSelection The selection used to get the IP's location. If /// this value is null, the rootsite's current selection will be used.
return int

Init() public method

Allows xCore-specific initialization. We don't need any.
public Init ( XCore mediator, System configurationParameters ) : void
mediator XCore The mediator
configurationParameters System Not used
return void

InvalidateForLazyFix() public method

Invalidate the pane because some lazy box expansion messed up the scroll position. Made a separate method so we can override.
public InvalidateForLazyFix ( ) : void
return void

InvalidateRect() public method

Invalidate rectangle
public InvalidateRect ( IVwRootBox root, int xsLeft, int ysTop, int xsWidth, int ysHeight ) : void
root IVwRootBox The sender
xsLeft int Relative to top left of root box
ysTop int
xsWidth int
ysHeight int
return void

IsIgnoredKey() public static method

Checks input characters to see if they should be processsed. Static to allow function to be shared with PublicationControl.
public static IsIgnoredKey ( KeyPressEventArgs e, Keys modifiers ) : bool
e System.Windows.Forms.KeyPressEventArgs
modifiers Keys Control.ModifierKeys
return bool

IsInputChar() protected method

This also helps us handle all input keys...the documentation doesn't make very clear the distinction between this and IsInputKey, but failing to override this one can cause typing in the view to invoke buttons in the parent form. If you want to remove this, make sure it doesn't mess up windows that contain both views and buttons, such as the LexText interlinear view.
IsInputChar gets called while processing WM_CHAR or WM_SYSCHAR.
protected IsInputChar ( char charCode ) : bool
charCode char The character to test.
return bool

IsInputKey() protected method

Determines whether the specified key is a regular input key or a special key that requires preprocessing. Default implementation always returns true because we want to handle all keys!
IsInputKey gets called while processing WM_KEYDOWN or WM_SYSKEYDOWN.
protected IsInputKey ( Keys keyData ) : bool
keyData Keys One of the values.
return bool

IsOkToMakeLazy() public method

Answer whether boxes in the specified range of destination coordinates may usefully be converted to lazy boxes. Should at least answer false if any part of the range is visible. The default implementation avoids converting stuff within about a screen's height of the visible part(s).
public IsOkToMakeLazy ( IVwRootBox prootb, int ydTop, int ydBottom ) : bool
prootb IVwRootBox
ydTop int
ydBottom int
return bool

IsSelectionVisible() public method

Checks if selection is visible. For a range selection we check the end of the selection, for an IP the entire selection must be visible.
This version doesn't test the secondary part of the selection if the combined primary and secondary selection is higher or wider then the ClientRectangle.
public IsSelectionVisible ( IVwSelection sel ) : bool
sel IVwSelection The selection
return bool

IsSelectionVisible() public method

Checks if selection is visible. For a range selection (that is not a picture) we check the end of the selection, otherwise the entire selection must be visible.
public IsSelectionVisible ( IVwSelection sel, bool fWantOneLineSpace ) : bool
sel IVwSelection
fWantOneLineSpace bool
return bool

IsSelectionVisible() public method

Checks if selection is visible, according to the parameters.

This version doesn't test the secondary part of the selection if the combined primary and secondary selection is higher or wider then the ClientRectangle.

This method tests that the selection rectangle is inside of the client rectangle, but it doesn't test if the selection is actually enabled!

public IsSelectionVisible ( IVwSelection vwsel, bool fWantOneLineSpace, bool fWantBothEnds ) : bool
vwsel IVwSelection The selection
fWantOneLineSpace bool True if we want at least 1 extra line above or /// below the selection to be considered visible, false otherwise
fWantBothEnds bool true if both ends must be visible; otherwise, it's /// good enough if the end is.
return bool

MakeRoot() public method

Override this method in your subclass. It should make a root box and initialize it with appropriate data and view constructor, etc.
public MakeRoot ( ) : void
return void

MakeSelectionVisible() protected method

Scroll to make the selection visible. In general, scroll the minimum distance to make it entirely visible. If the selection is higher than the window, scroll the minimum distance to make it fill the window. If the window is too small to show both primary and secondary, show primary.
Note: subclasses for which scrolling is disabled should override. If sel is null, make the current selection visible.
protected MakeSelectionVisible ( IVwSelection sel ) : bool
sel IVwSelection Selection
return bool

MakeSelectionVisible() protected method

Scroll to make the selection visible. In general, scroll the minimum distance to make it entirely visible. If the selection is higher than the window, scroll the minimum distance to make it fill the window. If the window is too small to show both primary and secondary, show primary. If fWantOneLineSpace is true we make sure that at least 1 line is visible above and below the selection. By default ranges (that are not pictures) are allowed to be only partly visible.
protected MakeSelectionVisible ( IVwSelection sel, bool fWantOneLineSpace ) : bool
sel IVwSelection The sel.
fWantOneLineSpace bool if set to true [f want one line space].
return bool

MakeSelectionVisible() protected method

Scroll to make the selection visible. In general, scroll the minimum distance to make it entirely visible. If the selection is higher than the window, scroll the minimum distance to make it fill the window. If the window is too small to show both primary and secondary, show primary. If fWantOneLineSpace is true we make sure that at least 1 line is visible above and below the selection.
Note: subclasses for which scrolling is disabled should override. If the selection is invalid, return false.
protected MakeSelectionVisible ( IVwSelection vwsel, bool fWantOneLineSpace, bool fWantBothEnds, bool fForcePrepareToDraw ) : bool
vwsel IVwSelection Selection
fWantOneLineSpace bool True if we want at least 1 extra line above or /// below the selection, false otherwise
fWantBothEnds bool if true, we want to be able to see both ends of /// the selection, if possible; if it is too large, align top to top.
fForcePrepareToDraw bool Pass this as true when the selection was made under program /// control, not from a click. It indicates that even though the selection may be initially /// visible, there might be lazy boxes on screen; and when we come to paint, expanding them /// might make the selection no longer visible. Therefore we should not skip the full /// process just because the selection is already visible.
return bool

MapXTo() public static method

Performs the same coordinate transformation as C++ UtilRect rcSrc.MapXTo(x, rcDst).
public static MapXTo ( int x, Rectangle rcSrc, Rectangle rcDst ) : int
x int
rcSrc System.Drawing.Rectangle
rcDst System.Drawing.Rectangle
return int

MapYTo() public static method

Performs the same coordinate transformation as C++ UtilRect rcSrc.MapYTo(y, rcDst).
public static MapYTo ( int y, Rectangle rcSrc, Rectangle rcDst ) : int
y int
rcSrc System.Drawing.Rectangle
rcDst System.Drawing.Rectangle
return int

MoveChildWindows() protected method

This hook provides an opportunity for subclasses to move child windows. For example, InterlinDocChild moves its Sandbox window to correspond to the position of the selected word in the text. It may be important to do this before updating the scroll range...for example, Windows forms may not allow the scroll range to be less than enough to show the whole of the (old position of) the child window.
protected MoveChildWindows ( ) : void
return void

OnDisplayBestStyleName() public method

Called (by xcore) to control display params of the Styles menu, e.g. whether it should be enabled
public OnDisplayBestStyleName ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
return bool

OnDisplayCombinedStylesList() public method

Called when XCore wants to display something that relies on the list with the id "CombinedStylesList"
public OnDisplayCombinedStylesList ( object parameter, XCore.UIListDisplayProperties &display ) : bool
parameter object
display XCore.UIListDisplayProperties
return bool

OnDisplayWritingSystemHvo() public method

Called (by xcore) to control display params of the writing system menu, e.g. whether it should be enabled
public OnDisplayWritingSystemHvo ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
return bool

OnDoubleClick() protected method

Process mouse double click
protected OnDoubleClick ( EventArgs e ) : void
e EventArgs
return void

OnEditSelectAll() protected method

Handle the Edit/Select All menu command.
protected OnEditSelectAll ( object args ) : bool
args object The arguments
return bool

OnEditingHelperCreated() protected method

Called when the editing helper is created.
protected OnEditingHelperCreated ( ) : void
return void

OnFilePrint() public method

Handle Print command
public OnFilePrint ( object args ) : bool
args object ignored
return bool

OnGotFocus() protected method

View is getting focus: Activate the rootbox and set the appropriate keyboard
protected OnGotFocus ( EventArgs e ) : void
e EventArgs
return void

OnHandleCreated() protected method

The window is first being created.
protected OnHandleCreated ( EventArgs e ) : void
e EventArgs
return void

OnHandleDestroyed() protected method

Do cleaning up when handle gets destroyed
Formerly AfVwRootSite::OnReleasePtr()
protected OnHandleDestroyed ( EventArgs e ) : void
e EventArgs
return void

OnInsertDiffPara() public method

see OnInsertDiffParas
public OnInsertDiffPara ( IVwRootBox prootb, ITsTextProps ttpDest, ITsTextProps ttpSrc, ITsString tssParas, ITsString tssTrailing ) : VwInsertDiffParaResponse
prootb IVwRootBox
ttpDest ITsTextProps
ttpSrc ITsTextProps
tssParas ITsString
tssTrailing ITsString
return VwInsertDiffParaResponse

OnInsertDiffParas() public method

public OnInsertDiffParas ( IVwRootBox prootb, ITsTextProps ttpDest, int cPara, ITsTextProps ttpSrc, ITsString tssParas, ITsString tssTrailing ) : VwInsertDiffParaResponse
prootb IVwRootBox
ttpDest ITsTextProps
cPara int
ttpSrc ITsTextProps
tssParas ITsString
tssTrailing ITsString
return VwInsertDiffParaResponse

OnKeyDown() protected method

User pressed a key.
protected OnKeyDown ( KeyEventArgs e ) : void
e KeyEventArgs
return void

OnKeyPress() protected method

Handles OnKeyPress. Passes most things to EditingHelper.OnKeyPress
protected OnKeyPress ( KeyPressEventArgs e ) : void
e KeyPressEventArgs
return void

OnKeyUp() protected method

Clean up after page scrolling.
protected OnKeyUp ( KeyEventArgs e ) : void
e KeyEventArgs
return void

OnKillFocus() protected method

Called when the focus is lost to another window.
protected OnKillFocus ( Control newWindow, bool fIsChildWindow ) : void
newWindow Control The new window. Might be null.
fIsChildWindow bool true if the is /// a child window of the current application.
return void

OnLayout() protected method

Recompute the layout
protected OnLayout ( LayoutEventArgs levent ) : void
levent LayoutEventArgs
return void

OnLayoutSizeChanged() protected method

Required method to implement the LayoutSizeChanged event.
protected OnLayoutSizeChanged ( EventArgs e ) : void
e EventArgs
return void

OnLoad() protected method

protected OnLoad ( EventArgs e ) : void
e EventArgs
return void

OnMouseDown() protected method

Process left or right mouse button down
protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnMouseMove() protected method

Process mouse move
protected OnMouseMove ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnMouseMoveSetCursor() protected method

Allow clients to override cursor type during OnMouseMove.
protected OnMouseMoveSetCursor ( Point mousePos ) : void
mousePos Point
return void

OnMouseUp() protected method

Process mouse button up event
protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnPaint() protected method

Call Draw() which does all the real painting
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
return void

OnPaintBackground() protected method

Ignore the PaintBackground event because we do it ourself (in the views code).
protected OnPaintBackground ( PaintEventArgs e ) : void
e PaintEventArgs
return void

OnPrint() public method

This is equivalent. These two names accommodate two conventions for naming commands...xCore labels commands just with what they do, TE includes the menu name.
public OnPrint ( object args ) : bool
args object
return bool

OnProblemDeletion() public method

The user has attempted to delete something which the system does not inherently know how to delete. The dpt argument indicates the type of problem.
public OnProblemDeletion ( IVwSelection sel, VwDelProbType dpt ) : VwDelProbResponse
sel IVwSelection The selection
dpt VwDelProbType Problem type
return VwDelProbResponse

OnPropertyChanged() public method

Receives the xcore broadcast message "PropertyChanged"
public OnPropertyChanged ( string name ) : void
name string
return void

OnRightMouseUp() protected method

Process right mouse button up (typically show a context menu). Was mouse Down in an earlier life, but we concluded that the usual convention is context menu on mouse up. There may be vestiges.
protected OnRightMouseUp ( Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : bool
pt Point
rcSrcRoot Rectangle
rcDstRoot Rectangle
return bool

OnSetFocus() protected method

We intercept WM_SETFOCUS in our WndProc and call this because we need the information about the previous focus window, which .NET does not provide.
protected OnSetFocus ( Message m ) : void
m Message
return void

OnSizeChanged() protected method

Size changed. Ensure that the selection is still visible.
protected OnSizeChanged ( EventArgs e ) : void
e EventArgs
return void

OnTimer() protected method

Flash the insertion point.
protected OnTimer ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void

OnVisibleChanged() protected method

When we go visible and we are waiting to refresh the display (do a rebuild) then call RefreshDisplay()
protected OnVisibleChanged ( EventArgs e ) : void
e EventArgs
return void

OriginalOnPaint() public method

Required by interface, but not used, because we don't user the MessageSequencer to sequence OnPaint calls.
public OriginalOnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
return void

OriginalWndProc() public method

Processes Windows messages.
public OriginalWndProc ( Message &msg ) : void
msg Message The Windows Message to process.
return void

OverlayChanged() public method

When the state of the overlays changes, it propagates this to its site.
public OverlayChanged ( IVwRootBox prootb, IVwOverlay vo ) : void
prootb IVwRootBox
vo IVwOverlay
return void

PixelToView() protected method

Adjust a point to view coords from device coords. This is the translation from a point obtained from a windows message like WM_LBUTTONDOWN to a point that can be passed to the root box. Currently it does nothing, as any conversion is handled by the source and destination rectangles passed to the mouse routines. It is retained for possible future use.
protected PixelToView ( Point pt ) : Point
pt Point
return Point

PostponedInvalidate() public method

Executed on the Application Idle queue, this method invalidates the whole view. It is used when we cannot properly complete a paint because we detect that it is a recursive call, to ensure that the window is eventually painted properly.
public PostponedInvalidate ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void

PreFilterMessage() public method

This is a major kludge to prevent a spurious WM_KEYUP for VK_CONTROL from interrupting a mouse click. If mouse button was pressed elsewhere causing this root site to loose focus, this message filter is installed to throw away the spurious WM_KEYUP for VK_CONTROL that happens as a result of switching to the default keyboard layout. See OnKillFocus for the corresponding code that installs this message filter.
public PreFilterMessage ( Message &m ) : bool
m Message The message to be dispatched. You cannot modify this message.
return bool

PrePasteProcessing() public method

Perform any processing needed immediately prior to a paste operation. This is very rarely implemented, but always called by EditingHelper.PasteClipboard.
public PrePasteProcessing ( ) : void
return void

PrepareToDraw() protected method

Wraps PrepareToDraw calls so as to suppress attempts to paint or any similar re-entrant call we might make while getting ready to do it.
protected PrepareToDraw ( Rectangle rcSrcRoot, Rectangle rcDstRoot ) : VwPrepDrawResult
rcSrcRoot Rectangle
rcDstRoot Rectangle
return VwPrepDrawResult

PrintWithErrorHandling() public static method

Helper method to allow for standard error reporting when something goes wrong during printing of the contents of a rootsite.
public static PrintWithErrorHandling ( IPrintRootSite printRootSite, PrintDocument printDoc, Form parentForm ) : void
printRootSite IPrintRootSite The actual rootsite responsible for printing
printDoc PrintDocument The document to print
parentForm Form Used if something goes wrong and a message box needs to be /// shown
return void

ProcessCmdKey() protected method

Override to provide default handling of Context manu key.
protected ProcessCmdKey ( Message &msg, Keys keyData ) : bool
msg Message
keyData Keys
return bool

RefreshDisplay() public method

Refreshes the Display :)
public RefreshDisplay ( ) : bool
return bool

ReleaseGraphics() public method

Inform the container when done with the graphics object.
REVIEW JohnT(?): could we somehow have this handled by the Release method of the IVwGraphics? But that method does not know anything about the status or source of its hdc.
public ReleaseGraphics ( IVwRootBox prootb, IVwGraphics pvg ) : void
prootb IVwRootBox
pvg IVwGraphics
return void

ReportDrawErrMsg() public static method

An error has occurred during drawing, and the component in which it occurred should have recorded a system error information object describing the problem
public static ReportDrawErrMsg ( Exception e ) : void
e Exception
return void

RequestSelectionAtEndOfUow() public method

If we need to make a selection, but we can't because edits haven't been updated in the view, this method requests creation of a selection after the unit of work is complete. Derived classes should implement this if they have any hope of supporting multi- paragraph editing.
public RequestSelectionAtEndOfUow ( IVwRootBox rootb, int ihvoRoot, int cvlsi, SelLevInfo rgvsli, int tagTextProp, int cpropPrevious, int ich, int wsAlt, bool fAssocPrev, ITsTextProps selProps ) : void
rootb IVwRootBox The rootbox
ihvoRoot int Index of root element
cvlsi int count of levels
rgvsli SelLevInfo levels
tagTextProp int tag or flid of property containing the text (TsString)
cpropPrevious int number of previous occurrences of the text property
ich int character offset into the text
wsAlt int The id of the writing system for the selection.
fAssocPrev bool Flag indicating whether to associate the insertion point /// with the preceding character or the following character
selProps ITsTextProps The selection properties.
return void

RequestVisibleSelectionAtEndOfUow() public method

If we need to make a selection, but we can't because edits haven't been updated in the view, this method requests creation of a selection after the unit of work is complete. It will also scroll the selection into view. Derived classes should implement this if they have any hope of supporting multi- paragraph editing.
public RequestVisibleSelectionAtEndOfUow ( SelectionHelper helper ) : void
helper SelectionHelper The selection to restore
return void

RootBoxSizeChanged() public method

Notifies the site that the size of the root box changed; scroll ranges and/or window size may need to be updated. The standard response is to update the scroll range.
Review JohnT: might this also be the place to make sure the selection is still visible? Should we try to preserve the scroll position (at least the top left corner, say) even if the selection is not visible? Which should take priority?
public RootBoxSizeChanged ( IVwRootBox prootb ) : void
prootb IVwRootBox
return void

SaveSelectionInfo() protected method

Save some selection location information if needed.
protected SaveSelectionInfo ( Rectangle rcIdeal, int ydTop ) : void
rcIdeal Rectangle
ydTop int
return void

ScreenToClient() public method

Member ScreenToClient
public ScreenToClient ( IVwRootBox prootb, System &pt ) : void
prootb IVwRootBox
pt System Pont to convert
return void

ScrollDown() protected method

Scroll by the specified amount (positive is down, that is, added to the scroll offset). If this would exceed the scroll range, move as far as possible. Update both actual display and scroll bar position. (Can also scroll up, if dy is negative. Name is just to indicate positive direction.)
protected ScrollDown ( int dy ) : void
dy int
return void

ScrollSelectionIntoView() public method

Scrolls the selection into view, positioning it as requested
public ScrollSelectionIntoView ( IVwSelection sel, VwScrollSelOpts scrollOption ) : bool
sel IVwSelection The selection, or null to use the current selection
scrollOption VwScrollSelOpts The VwScrollSelOpts specification.
return bool

ScrollSelectionToLocation() public method

Scroll the selection in to the given client position.
public ScrollSelectionToLocation ( IVwSelection sel, int dyPos ) : bool
sel IVwSelection The selection
dyPos int Position from top of client window where sel should be scrolled
return bool

ScrollToEnd() public method

Scroll to the bottom. This is somewhat tricky because after scrolling to the bottom of the range as we currently estimate it, expanding a closure may change things. GoToEnd
public ScrollToEnd ( ) : void
return void

ScrollToTop() public method

Scroll to the top
public ScrollToTop ( ) : void
return void

SelectAll() public method

Make a selection that includes all the text.
public SelectAll ( ) : void
return void

SelectionChanged() public method

Notifies the site that something about the selection has changed.
Don't you dare make this virtual!
public SelectionChanged ( IVwRootBox rootb, IVwSelection vwselNew ) : void
rootb IVwRootBox The rootbox whose selection changed
vwselNew IVwSelection The new selection
return void

SelectionRectangle() protected method

Gets the rectangle of the selection. If it is a split selection we combine the two rectangles.
protected SelectionRectangle ( IVwSelection vwsel, Rectangle &rcIdeal, bool &fEndBeforeAnchor ) : void
vwsel IVwSelection Selection
rcIdeal Rectangle Contains the rectangle of the selection on return
fEndBeforeAnchor bool [Out] true if the end is before the anchor, /// otherwise false.
return void

SetAccessibleName() public method

Set the accessible name that the root box will return for this root site.
public SetAccessibleName ( string name ) : void
name string
return void

SetupPrintHelp() protected method

If help is available for the print dialog, set ShowHelp to true, and add an event handler that can display some help. See DraftView in TeDll for an example.
protected SetupPrintHelp ( PrintDialog dlg ) : void
dlg PrintDialog
return void

ShowContextMenuAtIp() public method

Show the context menu for the specified root box at the location of its selection (typically an IP).
public ShowContextMenuAtIp ( IVwRootBox rootb ) : void
rootb IVwRootBox
return void

SimpleRootSite() public method

public SimpleRootSite ( ) : System
return System

UpdateScrollRange() protected method

Update the scroll range with the new range and position.
protected UpdateScrollRange ( int dxdRange, int dxdPos, int dydRange, int dydPos ) : bool
dxdRange int The new horizontal scroll range
dxdPos int The new horizontal scroll position
dydRange int The new vertical scroll range
dydPos int The new vertical scroll position
return bool

UpdateScrollRange() protected method

Update your scroll range to reflect current conditions.
protected UpdateScrollRange ( ) : void
return void

WasFocused() public method

Find out if this RootSite had Focus before being grabbed by some other entity (such as a Windows ComboBox)
public WasFocused ( ) : bool
return bool

WndProc() protected method

Override the WndProc to handle WM_GETOBJECT so we can return the IAccessible implementation from the root box, rather than wrapping it as an AccessibleObject in .NET style. This is important because the test harness wants to be able to get back to the root box. There are a couple of other messages we must handle at this level as well. This override is now delegated through the message sequencer; see OriginalWndProc.
protected WndProc ( Message &m ) : void
m Message
return void

get_MakeObjFromText() public method

Needs a cache in order to provide a meaningful implementation. SimpleRootsite does not know how to handle GUIDs so just return an empty GUID which will cause the run to be deleted.
public get_MakeObjFromText ( string bstrText, IVwSelection _selDst, int &kodt ) : Guid
bstrText string Text representation of object
_selDst IVwSelection Provided for information in case it's needed to generate /// the new object (E.g., footnotes might need it to generate the proper sequence /// letter)
kodt int The object data type to use for embedding the new object ///
return Guid

get_ScreenGraphics() public method

Real drawing VG same as layout one for simple view.
public get_ScreenGraphics ( IVwRootBox _Root ) : IVwGraphics
_Root IVwRootBox
return IVwGraphics

get_SemiTagging() public method

Return true if this kind of window uses semi-tagging.
public get_SemiTagging ( IVwRootBox prootb ) : bool
prootb IVwRootBox
return bool

get_TextRepOfObj() public method

Needs a cache in order to provide a meaningful implementation. SimpleRootsite should never have objects cut, copied, pasted.
public get_TextRepOfObj ( Guid &guid ) : string
guid Guid
return string

Property Details

m_Dpi protected_oe property

Contains horizontal and vertical dpi
protected Point m_Dpi
return Point

m_Zoom protected_oe property

The zoom ratio
protected float m_Zoom
return float

m_dxdLayoutWidth protected_oe property

The width returned by GetAvailWidth() when the root box was last laid out, or a large negative number if it has never been successfully laid out.
protected int m_dxdLayoutWidth
return int

m_dyHeader protected_oe property

height of an optional fixed header at the top of the client window.
protected int m_dyHeader
return int

m_editingHelper protected_oe property

handler for typing and other edit requests
protected EditingHelper m_editingHelper
return EditingHelper

m_fAllowLayout protected_oe property

True to allow layouts to take place, false otherwise (We use this instead of SuspendLayout because SuspendLayout didn't work)
protected bool m_fAllowLayout
return bool

m_fInLayout protected_oe property

This is set true during processing of the OnLayout message. This is used to deal with re-entrant Window messages.
protected bool m_fInLayout
return bool

m_fInPaint protected_oe property

This is set true during processing of the OnPaint message. It serves to suppress certain behavior that ought not to happen during a paint. For example, when this root site is part of a group, and expanding lazy boxes changes the scroll range, we change the AutoScrollMinSize of the RootSiteGroup. This causes a Layout() of the RootSiteGroup, which among other things sends an OnSizeChanged to the original root site, which tries to make the selection visible, and can produce a recursive call to OnPaint.
protected bool m_fInPaint
return bool

m_fIsTextBox protected_oe property

True if this is a "text box" (or "combo box"); false otherwise
protected bool m_fIsTextBox
return bool

m_fMakeRootWhenHandleIsCreated protected_oe property

This tells the rootsite whether to attempt to construct the rootbox automatically when the window handle is created. For simple views, this is generally desirable, but views which are part of synchronously scrolling groups usually have their root objects set explicitly at the same time as the other views in their group.
protected bool m_fMakeRootWhenHandleIsCreated
return bool

m_fRefreshPending protected_oe property

True if we are waiting to do a refresh on the view (will be done when the view becomes visible); false otherwise
protected bool m_fRefreshPending
return bool

m_fRootboxMade protected_oe property

True if MakeRoot was called
protected bool m_fRootboxMade
return bool

m_fShowRangeSelAfterLostFocus protected_oe property

True to show range selections when focus is lost; false otherwise
protected bool m_fShowRangeSelAfterLostFocus
return bool

m_graphicsManager protected_oe property

Manages the VwGraphics creation and useage
protected GraphicsManager m_graphicsManager
return GraphicsManager

m_mediator protected_oe property

The mediator provided by XCoreColleague.Init. Not (currently) used by the root site, but saved and made accessible for clients.
protected Mediator m_mediator
return Mediator

m_rootSiteEventHandler protected_oe property

The keyboarding rootsite event handler
protected object m_rootSiteEventHandler
return object

m_rootb protected_oe property

The root box
protected IVwRootBox m_rootb
return IVwRootBox

m_styleSheet protected_oe property

The style sheet
protected IVwStylesheet m_styleSheet
return IVwStylesheet

m_wsPending protected_oe property

See WsPending.
protected int m_wsPending
return int

m_wsf protected_oe property

A writing system factory used to interpret data in the view. Subclasses of SimpleRootSite should set this before doing much with the root site. The RootSite subclass can obtain one automatically from its FdoCache.
protected ILgWritingSystemFactory m_wsf
return ILgWritingSystemFactory

s_vstrDrawErrMsgs protected_oe static_oe property

list of drawing err messages that have been shown to the user
protected static List s_vstrDrawErrMsgs
return List