Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / Behavior / Glyph.cs / 1 / Glyph.cs
namespace System.Windows.Forms.Design.Behavior { using System; using System.Collections; using System.ComponentModel; using System.ComponentModel.Design; using System.Design; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Drawing; using System.Windows.Forms.Design; ////// /// A Glyph represents a single UI entity managed by an Adorner. A Glyph /// does not have an HWnd - and is rendered on the BehaviorService's /// AdornerWindow control. Each Glyph can have a Behavior associated with /// it - the idea here is that a successfully Hit-Tested Glyph has the /// opportunity to 'push' a new/different Behavior onto the BehaviorService's /// BehaviorStack. Note that all Glyphs really do is paint and hit test. /// public abstract class Glyph { private Behavior behavior;//the Behaivor associated with the Glyph - can be null. ////// /// Glyph's default constructor takes a Behavior. /// protected Glyph(Behavior behavior) { this.behavior = behavior; } ////// /// This read-only property will return the Behavior associated with /// this Glyph. The Behavior can be null. /// public virtual Behavior Behavior{ get { return behavior; } } ////// /// This read-only property will return the Bounds associated with /// this Glyph. The Bounds can be empty. /// public virtual Rectangle Bounds { get { return Rectangle.Empty; } } ////// /// Abstract method that forces Glyph implementations to provide /// hit test logic. Given any point - if the Glyph has decided to /// be involved with that location, the Glyph will need to return /// a valid Cursor. Otherwise, returning null will cause the /// the BehaviorService to simply ignore it. /// public abstract Cursor GetHitTest(Point p); ////// /// Abstract method that forces Glyph implementations to provide /// paint logic. The PaintEventArgs object passed into this method /// contains the Graphics object related to the BehaviorService's /// AdornerWindow. /// public abstract void Paint(PaintEventArgs pe); ////// /// This method is called by inheriting classes to change the /// Behavior object associated with the Glyph. /// [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] protected void SetBehavior(Behavior behavior) { this.behavior = behavior; } } } // 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
- FileDataSourceCache.cs
- PointHitTestParameters.cs
- HttpChannelBindingToken.cs
- FilterableAttribute.cs
- TreeViewEvent.cs
- Semaphore.cs
- NumberFunctions.cs
- DataGridViewSelectedCellCollection.cs
- ControlParser.cs
- StringFormat.cs
- SimpleWebHandlerParser.cs
- XmlNamedNodeMap.cs
- TemplatePropertyEntry.cs
- COMException.cs
- ChildrenQuery.cs
- DecodeHelper.cs
- glyphs.cs
- NavigationEventArgs.cs
- ManagementScope.cs
- UserInitiatedNavigationPermission.cs
- PackagingUtilities.cs
- Point3DCollectionConverter.cs
- SimpleRecyclingCache.cs
- CollectionBuilder.cs
- GeneratedCodeAttribute.cs
- SerialStream.cs
- DbgUtil.cs
- ActivityPreviewDesigner.cs
- CqlLexerHelpers.cs
- Membership.cs
- ErrorProvider.cs
- _IPv4Address.cs
- versioninfo.cs
- StorageConditionPropertyMapping.cs
- DataGrid.cs
- TextSelectionProcessor.cs
- FileDataSourceCache.cs
- ExpressionBinding.cs
- EntityCodeGenerator.cs
- TraceHandler.cs
- ResourceDescriptionAttribute.cs
- Renderer.cs
- OpenTypeLayoutCache.cs
- XmlAnyAttributeAttribute.cs
- MenuBase.cs
- OrCondition.cs
- BinaryFormatter.cs
- ReflectTypeDescriptionProvider.cs
- SingleAnimation.cs
- SharedMemory.cs
- DataGridCell.cs
- ProfileGroupSettings.cs
- PopupEventArgs.cs
- ProcessThreadDesigner.cs
- SqlClientWrapperSmiStreamChars.cs
- DockPanel.cs
- PartialArray.cs
- GenericWebPart.cs
- AutomationElement.cs
- FileLogRecord.cs
- EntityContainerEmitter.cs
- MarshalDirectiveException.cs
- CellTreeNodeVisitors.cs
- SQLDateTimeStorage.cs
- DynamicRendererThreadManager.cs
- CodeNamespaceImport.cs
- WindowsTooltip.cs
- BrowserCapabilitiesCodeGenerator.cs
- SchemaTypeEmitter.cs
- SectionRecord.cs
- HttpMethodConstraint.cs
- SafeProcessHandle.cs
- AssignDesigner.xaml.cs
- XmlReturnWriter.cs
- SerializationSectionGroup.cs
- Animatable.cs
- ReachFixedPageSerializerAsync.cs
- StorageMappingItemCollection.cs
- QilPatternFactory.cs
- XmlByteStreamWriter.cs
- CodeGotoStatement.cs
- LinqDataSourceStatusEventArgs.cs
- CriticalFinalizerObject.cs
- XpsS0ValidatingLoader.cs
- TwoPhaseCommitProxy.cs
- TemplateManager.cs
- CompatibleIComparer.cs
- SchemaConstraints.cs
- XmlSchemaChoice.cs
- RemotingServices.cs
- TextCompositionManager.cs
- FontFamilyValueSerializer.cs
- CallTemplateAction.cs
- Solver.cs
- DataTemplate.cs
- ZipIOLocalFileBlock.cs
- ProxyGenerator.cs
- DbParameterHelper.cs
- TextInfo.cs
- EntityDataReader.cs