internal WindowsRichEditRange(ITextRange range, WindowsRichEdit pattern) { Debug.Assert(range != null); Debug.Assert(pattern != null); _range = range; _pattern = pattern; }
// Static Create method called by the event tracker system internal static void RaiseEvents(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) { if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) { WindowsRichEdit wtv = new WindowsRichEdit(hwnd, null, 0); // If this event means the selection may have changed, raise that event // here instead of relying on the generic DispatchEvents mechanism below. // The RichTextEdit provider needs to handle this event specially. if (eventId == NativeMethods.EventObjectLocationChange && idObject == NativeMethods.OBJID_CARET) { wtv.RaiseTextSelectionEvent(eventId, idProp, idObject, idChild); } else { wtv.DispatchEvents(eventId, idProp, idObject, idChild); } } }
// Static Create method called by the event tracker system internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) { if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL) { WindowsRichEdit wtv = new WindowsRichEdit (hwnd, null, 0); // If this event means the selection may have changed, raise that event // here instead of relying on the generic DispatchEvents mechanism below. // The RichTextEdit provider needs to handle this event specially. if (eventId == NativeMethods.EventObjectLocationChange && idObject == NativeMethods.OBJID_CARET) { wtv.RaiseTextSelectionEvent(eventId, idProp, idObject, idChild); } else { wtv.DispatchEvents(eventId, idProp, idObject, idChild); } } }