Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Documents / TextServicesProperty.cs / 1305600 / TextServicesProperty.cs
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
//
// Description: TextServicesProperty implementation.
//
// History:
// 08/01/2003 : yutakas - Ported from dotnet tree.
//
//---------------------------------------------------------------------------
using System.Runtime.InteropServices;
using System.Windows.Threading;
using System.Security;
using System.Security.Permissions;
using System.Collections;
using System.Diagnostics;
using System.Windows.Media;
using System.Windows.Input;
using System.Windows.Documents;
using MS.Win32;
using System;
namespace System.Windows.Documents
{
//-----------------------------------------------------
//
// TextServicesProperty class
//
//-----------------------------------------------------
///
/// This is an internal.
/// This is a holder for Cicero properties.
/// - Reading String.
/// - Input Language.
/// - Display Attribute.
///
///
internal class TextServicesProperty
{
//------------------------------------------------------
//
// Constructors
//
//-----------------------------------------------------
#region Constructors
internal TextServicesProperty(TextStore textstore)
{
_textstore = textstore;
}
#endregion Constructors
//------------------------------------------------------
//
// Internal Methods
//
//------------------------------------------------------
#region Internal Methods
///
/// Calback function for TextEditSink
/// we track all property change here.
///
///
/// Critical - commits changes to edit buffer, might alow input spoofing
///
[SecurityCritical]
internal void OnEndEdit(
UnsafeNativeMethods.ITfContext context,
int ecReadOnly,
UnsafeNativeMethods.ITfEditRecord editRecord)
{
if (_propertyRanges == null)
{
_propertyRanges = new TextServicesDisplayAttributePropertyRanges(_textstore);
}
_propertyRanges.OnEndEdit(context, ecReadOnly, editRecord);
}
// Callback from TextStore.OnLayoutUpdated.
// Updates composition display attribute adorner on-screen location.
internal void OnLayoutUpdated()
{
TextServicesDisplayAttributePropertyRanges displayAttributes = _propertyRanges as TextServicesDisplayAttributePropertyRanges;
if (displayAttributes != null)
{
displayAttributes.OnLayoutUpdated();
}
}
#endregion Internal Methods
//-----------------------------------------------------
//
// Private Fields
//
//------------------------------------------------------
#region Private Fields
private TextServicesPropertyRanges _propertyRanges;
private readonly TextStore _textstore;
#endregion Private Fields
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
//
// Description: TextServicesProperty implementation.
//
// History:
// 08/01/2003 : yutakas - Ported from dotnet tree.
//
//---------------------------------------------------------------------------
using System.Runtime.InteropServices;
using System.Windows.Threading;
using System.Security;
using System.Security.Permissions;
using System.Collections;
using System.Diagnostics;
using System.Windows.Media;
using System.Windows.Input;
using System.Windows.Documents;
using MS.Win32;
using System;
namespace System.Windows.Documents
{
//-----------------------------------------------------
//
// TextServicesProperty class
//
//-----------------------------------------------------
///
/// This is an internal.
/// This is a holder for Cicero properties.
/// - Reading String.
/// - Input Language.
/// - Display Attribute.
///
///
internal class TextServicesProperty
{
//------------------------------------------------------
//
// Constructors
//
//-----------------------------------------------------
#region Constructors
internal TextServicesProperty(TextStore textstore)
{
_textstore = textstore;
}
#endregion Constructors
//------------------------------------------------------
//
// Internal Methods
//
//------------------------------------------------------
#region Internal Methods
///
/// Calback function for TextEditSink
/// we track all property change here.
///
///
/// Critical - commits changes to edit buffer, might alow input spoofing
///
[SecurityCritical]
internal void OnEndEdit(
UnsafeNativeMethods.ITfContext context,
int ecReadOnly,
UnsafeNativeMethods.ITfEditRecord editRecord)
{
if (_propertyRanges == null)
{
_propertyRanges = new TextServicesDisplayAttributePropertyRanges(_textstore);
}
_propertyRanges.OnEndEdit(context, ecReadOnly, editRecord);
}
// Callback from TextStore.OnLayoutUpdated.
// Updates composition display attribute adorner on-screen location.
internal void OnLayoutUpdated()
{
TextServicesDisplayAttributePropertyRanges displayAttributes = _propertyRanges as TextServicesDisplayAttributePropertyRanges;
if (displayAttributes != null)
{
displayAttributes.OnLayoutUpdated();
}
}
#endregion Internal Methods
//-----------------------------------------------------
//
// Private Fields
//
//------------------------------------------------------
#region Private Fields
private TextServicesPropertyRanges _propertyRanges;
private readonly TextStore _textstore;
#endregion Private Fields
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EntityDataSourceContextCreatedEventArgs.cs
- StylusShape.cs
- TrackingWorkflowEventArgs.cs
- DebugTraceHelper.cs
- DependencyObjectType.cs
- SHA1.cs
- Registry.cs
- BindUriHelper.cs
- CLRBindingWorker.cs
- ByteConverter.cs
- DispatcherHookEventArgs.cs
- XmlCharCheckingWriter.cs
- WmfPlaceableFileHeader.cs
- StringUtil.cs
- BindingContext.cs
- Camera.cs
- SoapExtensionImporter.cs
- ResourceDefaultValueAttribute.cs
- HttpCachePolicy.cs
- OracleBinary.cs
- XmlToDatasetMap.cs
- AlternateView.cs
- StylusCollection.cs
- DesignOnlyAttribute.cs
- Configuration.cs
- UnsafeNativeMethods.cs
- ProviderManager.cs
- DataGridViewColumnEventArgs.cs
- _SslStream.cs
- ScriptingSectionGroup.cs
- DesignerTransaction.cs
- PowerStatus.cs
- ImagingCache.cs
- ConfigurationLocationCollection.cs
- UnionExpr.cs
- DesignerCalendarAdapter.cs
- Expressions.cs
- DetailsViewPageEventArgs.cs
- SessionEndedEventArgs.cs
- ProfilePropertySettings.cs
- ResourceExpression.cs
- ExpressionNormalizer.cs
- Overlapped.cs
- BookmarkUndoUnit.cs
- Int32AnimationBase.cs
- PropertyEmitterBase.cs
- AdRotator.cs
- XmlnsPrefixAttribute.cs
- WebMessageEncoderFactory.cs
- VectorValueSerializer.cs
- BinaryFormatterWriter.cs
- DisableDpiAwarenessAttribute.cs
- FixedPage.cs
- RsaKeyIdentifierClause.cs
- TextStore.cs
- HttpResponseInternalWrapper.cs
- ReadOnlyHierarchicalDataSourceView.cs
- PackageRelationship.cs
- TrackingStringDictionary.cs
- Baml2006ReaderContext.cs
- ProcessProtocolHandler.cs
- XmlKeywords.cs
- FontSourceCollection.cs
- SqlDataSourceEnumerator.cs
- CodeChecksumPragma.cs
- Expression.cs
- DataListItemCollection.cs
- UIElementParagraph.cs
- StringDictionaryEditor.cs
- XsdBuilder.cs
- DataGridViewMethods.cs
- BamlLocalizationDictionary.cs
- FixedSOMTable.cs
- ToolboxItemFilterAttribute.cs
- Canvas.cs
- InvokeHandlers.cs
- PeerCustomResolverElement.cs
- DetailsViewPageEventArgs.cs
- Attributes.cs
- GeneralTransformGroup.cs
- RefType.cs
- DefaultEventAttribute.cs
- DataGridView.cs
- Menu.cs
- ToolStripDropDown.cs
- EmptyEnumerator.cs
- ProgressChangedEventArgs.cs
- SymLanguageType.cs
- SerializeAbsoluteContext.cs
- FileSystemEventArgs.cs
- XslTransformFileEditor.cs
- SqlProcedureAttribute.cs
- FormsAuthenticationCredentials.cs
- PrintEvent.cs
- HttpCookie.cs
- DynamicMethod.cs
- ProvidersHelper.cs
- LZCodec.cs
- CompareValidator.cs
- LogRecordSequence.cs