Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- PrintingPermission.cs
- PolyBezierSegmentFigureLogic.cs
- WorkflowRuntimeServiceElementCollection.cs
- ping.cs
- ListViewDesigner.cs
- ToolBarTray.cs
- WindowsAuthenticationEventArgs.cs
- MetadataException.cs
- ReferenceCountedObject.cs
- Attribute.cs
- EntityDataSource.cs
- DataSet.cs
- Stack.cs
- TextProperties.cs
- ControlUtil.cs
- ConstraintEnumerator.cs
- HashStream.cs
- WebPartConnectionsCancelVerb.cs
- ScriptingWebServicesSectionGroup.cs
- ConfigXmlSignificantWhitespace.cs
- CustomCategoryAttribute.cs
- HtmlButton.cs
- IPAddress.cs
- HttpGetServerProtocol.cs
- SHA384Cng.cs
- XmlAttributeCache.cs
- TextEndOfLine.cs
- TextShapeableCharacters.cs
- ReferenceAssemblyAttribute.cs
- StructureChangedEventArgs.cs
- DataGridViewRowStateChangedEventArgs.cs
- Console.cs
- ActivityPropertyReference.cs
- ObjectConverter.cs
- Attributes.cs
- _ChunkParse.cs
- PageAsyncTask.cs
- WeakReference.cs
- DataGridSortCommandEventArgs.cs
- Span.cs
- CalendarAutoFormatDialog.cs
- MarshalByValueComponent.cs
- IconBitmapDecoder.cs
- exports.cs
- ReflectionTypeLoadException.cs
- invalidudtexception.cs
- XmlTypeAttribute.cs
- PropertyPanel.cs
- SimpleWorkerRequest.cs
- ServerIdentity.cs
- DeviceSpecificDialogCachedState.cs
- InkCanvasInnerCanvas.cs
- PropertyEmitter.cs
- OdbcInfoMessageEvent.cs
- QilXmlReader.cs
- DurableDispatcherAddressingFault.cs
- ButtonFieldBase.cs
- AssemblyHash.cs
- ResourcePool.cs
- Visual3D.cs
- CallbackValidatorAttribute.cs
- ViewKeyConstraint.cs
- WorkflowViewManager.cs
- CodeFieldReferenceExpression.cs
- RegexMatch.cs
- MimePart.cs
- ObjectNavigationPropertyMapping.cs
- DrawListViewSubItemEventArgs.cs
- BaseDataListComponentEditor.cs
- SspiNegotiationTokenProviderState.cs
- DataViewListener.cs
- NetworkAddressChange.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- RootBuilder.cs
- NullReferenceException.cs
- SQLDecimal.cs
- OleDbSchemaGuid.cs
- MemberRelationshipService.cs
- PageFunction.cs
- ToolTipAutomationPeer.cs
- ContentPosition.cs
- AuthenticatingEventArgs.cs
- ComplexTypeEmitter.cs
- SystemSounds.cs
- StylusPointDescription.cs
- ProviderUtil.cs
- CustomValidator.cs
- Identity.cs
- DatatypeImplementation.cs
- QuaternionRotation3D.cs
- NegotiateStream.cs
- QueryResponse.cs
- SqlProcedureAttribute.cs
- PinnedBufferMemoryStream.cs
- KnownColorTable.cs
- EdmItemError.cs
- XmlQueryContext.cs
- TemplatePropertyEntry.cs
- PassportPrincipal.cs
- FormatterServices.cs