Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Core / CSharp / MS / Internal / Shaping / Item.cs / 1 / Item.cs
//+------------------------------------------------------------------------ // // Microsoft Windows Client Platform // Copyright (C) Microsoft Corporation, 2001 // // File: Item.cs // // Contents: Avalon item description & script system // // Created: 12-17-2001 Worachai Chaoweeraprasit (wchao) // //----------------------------------------------------------------------- using System; using System.Collections; using System.Globalization; namespace MS.Internal.Shaping { ////// Run sharing the same character properties and glyph variation. /// ////// Generated by itemizer and consumed by shaping engine /// internal struct Item { internal Item( ScriptID script, ItemFlags flags ) { _script = script; _flags = flags; _digitCulture = null; } public static bool operator ==( Item left, Item right ) { return left._script == right._script && left._flags == right._flags; } public static bool operator !=( Item left, Item right ) { return !(left == right); } public override bool Equals(object o) { if (o == null) return false; if (o is Item) return this == (Item)o; return false; } public override int GetHashCode() { return (int)_script ^ (int)Flags; } ////// Shaping engine script identifier /// internal ScriptID Script { get { return _script; } set { _script = value; } } ////// Character-based flags for the item /// internal ItemFlags Flags { get { return _flags; } set { _flags = value; } } ////// Digit culture if it's a ScriptID.Digit item and we're doing number /// substitution. Otherwise, null. /// internal CultureInfo DigitCulture { get { return _digitCulture; } set { _digitCulture = value; } } private ScriptID _script; private ItemFlags _flags; private CultureInfo _digitCulture; } [Flags] internal enum ItemFlags : ushort { Default = 0, ////// Display glyph using vertical glyph form /// VerticalForm = 0x0001, ////// Display glyph using glyph of the mirrored code point form /// PairMirrorForm = 0x0002, ////// Display glyph using mirrored glyph form /// SingleMirrorForm = 0x0004, ////// The OR of both variants /// GlyphVariant = VerticalForm, ////// Item displays sideway to the baseline /// DisplaySideway = 0x0008, ////// Item containing combining marks that need precomposition /// HasCombiningMark = 0x0010, ////// Item containing extended character /// HasExtendedCharacter = 0x0020, ////// Set if the previous item ended with ZWJ /// LeadingJoin = 0x0040, } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //+------------------------------------------------------------------------ // // Microsoft Windows Client Platform // Copyright (C) Microsoft Corporation, 2001 // // File: Item.cs // // Contents: Avalon item description & script system // // Created: 12-17-2001 Worachai Chaoweeraprasit (wchao) // //----------------------------------------------------------------------- using System; using System.Collections; using System.Globalization; namespace MS.Internal.Shaping { ////// Run sharing the same character properties and glyph variation. /// ////// Generated by itemizer and consumed by shaping engine /// internal struct Item { internal Item( ScriptID script, ItemFlags flags ) { _script = script; _flags = flags; _digitCulture = null; } public static bool operator ==( Item left, Item right ) { return left._script == right._script && left._flags == right._flags; } public static bool operator !=( Item left, Item right ) { return !(left == right); } public override bool Equals(object o) { if (o == null) return false; if (o is Item) return this == (Item)o; return false; } public override int GetHashCode() { return (int)_script ^ (int)Flags; } ////// Shaping engine script identifier /// internal ScriptID Script { get { return _script; } set { _script = value; } } ////// Character-based flags for the item /// internal ItemFlags Flags { get { return _flags; } set { _flags = value; } } ////// Digit culture if it's a ScriptID.Digit item and we're doing number /// substitution. Otherwise, null. /// internal CultureInfo DigitCulture { get { return _digitCulture; } set { _digitCulture = value; } } private ScriptID _script; private ItemFlags _flags; private CultureInfo _digitCulture; } [Flags] internal enum ItemFlags : ushort { Default = 0, ////// Display glyph using vertical glyph form /// VerticalForm = 0x0001, ////// Display glyph using glyph of the mirrored code point form /// PairMirrorForm = 0x0002, ////// Display glyph using mirrored glyph form /// SingleMirrorForm = 0x0004, ////// The OR of both variants /// GlyphVariant = VerticalForm, ////// Item displays sideway to the baseline /// DisplaySideway = 0x0008, ////// Item containing combining marks that need precomposition /// HasCombiningMark = 0x0010, ////// Item containing extended character /// HasExtendedCharacter = 0x0020, ////// Set if the previous item ended with ZWJ /// LeadingJoin = 0x0040, } } // 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
- TypeDescriptorContext.cs
- DataGridCommandEventArgs.cs
- IndividualDeviceConfig.cs
- Column.cs
- UniqueID.cs
- ThicknessKeyFrameCollection.cs
- TextInfo.cs
- EventLogPermissionEntry.cs
- SystemIcons.cs
- LeftCellWrapper.cs
- PassportAuthenticationModule.cs
- DataTemplateSelector.cs
- DbParameterCollection.cs
- HttpListenerException.cs
- EntityDataSourceContextCreatedEventArgs.cs
- MessageProtectionOrder.cs
- URL.cs
- HMAC.cs
- FunctionUpdateCommand.cs
- EdmProviderManifest.cs
- WCFServiceClientProxyGenerator.cs
- WindowsListBox.cs
- VisualTreeHelper.cs
- ImportContext.cs
- GeometryGroup.cs
- DropSource.cs
- SafeBitVector32.cs
- FilterEventArgs.cs
- DocumentPaginator.cs
- SpotLight.cs
- List.cs
- FloaterBaseParaClient.cs
- PassportIdentity.cs
- ClassHandlersStore.cs
- ActivityCodeDomReferenceService.cs
- ErrorProvider.cs
- DateTimeFormatInfoScanner.cs
- TextContainer.cs
- BitmapEffectInput.cs
- XmlAttributes.cs
- RequestCachePolicyConverter.cs
- TimeSpanFormat.cs
- DocumentViewerBase.cs
- KeyValueConfigurationCollection.cs
- XmlCharCheckingReader.cs
- ResourceManagerWrapper.cs
- IBuiltInEvidence.cs
- DrawToolTipEventArgs.cs
- ObjectDataSourceEventArgs.cs
- TemplateControlParser.cs
- LassoHelper.cs
- VoiceInfo.cs
- FormatStringEditor.cs
- __ConsoleStream.cs
- IntegerValidatorAttribute.cs
- FixUp.cs
- Rijndael.cs
- TreeViewHitTestInfo.cs
- SoundPlayer.cs
- DesignColumnCollection.cs
- Inflater.cs
- MsmqNonTransactedPoisonHandler.cs
- ValueSerializer.cs
- SerializationEventsCache.cs
- FileEnumerator.cs
- SerializationStore.cs
- CachingHintValidation.cs
- ScrollChrome.cs
- RemotingConfiguration.cs
- BooleanProjectedSlot.cs
- HtmlElementEventArgs.cs
- Update.cs
- ParameterCollection.cs
- IndicShape.cs
- HtmlWindowCollection.cs
- ForeignKeyConstraint.cs
- NavigationProgressEventArgs.cs
- PrintPreviewDialog.cs
- TargetConverter.cs
- VirtualDirectoryMapping.cs
- IssuedSecurityTokenProvider.cs
- ConfigXmlReader.cs
- StringCollectionMarkupSerializer.cs
- ResourceSetExpression.cs
- DataColumnMapping.cs
- DrawListViewItemEventArgs.cs
- EntityCollection.cs
- DictionaryEntry.cs
- DataBoundControlAdapter.cs
- InstanceDescriptor.cs
- ServiceContractAttribute.cs
- ExpressionVisitor.cs
- PermissionRequestEvidence.cs
- EncoderReplacementFallback.cs
- BamlLocalizableResource.cs
- XmlCompatibilityReader.cs
- Wildcard.cs
- SettingsProperty.cs
- InheritanceUI.cs
- DoubleIndependentAnimationStorage.cs