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
- Point3DCollection.cs
- SmiRequestExecutor.cs
- SqlCacheDependencyDatabase.cs
- BitmapDownload.cs
- LiteralText.cs
- TryCatch.cs
- GeneralTransform.cs
- Unit.cs
- Int16KeyFrameCollection.cs
- DataStorage.cs
- HttpModuleActionCollection.cs
- OleDbCommandBuilder.cs
- SelectionEditingBehavior.cs
- uribuilder.cs
- RequestQueue.cs
- EventLogEntry.cs
- OdbcEnvironmentHandle.cs
- AddressHeaderCollection.cs
- BrowserCapabilitiesFactory.cs
- dbenumerator.cs
- DbInsertCommandTree.cs
- GetWinFXPath.cs
- PriorityQueue.cs
- SyndicationSerializer.cs
- AssemblyHash.cs
- DbParameterCollection.cs
- DefaultEvaluationContext.cs
- WebResourceUtil.cs
- MergeLocalizationDirectives.cs
- Rect3D.cs
- DataKeyCollection.cs
- UMPAttributes.cs
- ContextMenu.cs
- ContextMenu.cs
- WeakHashtable.cs
- TextProperties.cs
- SoapServerMessage.cs
- EventWaitHandleSecurity.cs
- UdpSocket.cs
- HtmlInputImage.cs
- XPathConvert.cs
- EntryPointNotFoundException.cs
- TextParagraph.cs
- QilPatternFactory.cs
- TokenDescriptor.cs
- TableItemPattern.cs
- MultiViewDesigner.cs
- ObjectDataSourceStatusEventArgs.cs
- HtmlWindowCollection.cs
- MethodRental.cs
- ServiceOperationWrapper.cs
- Latin1Encoding.cs
- KnownTypesHelper.cs
- SizeChangedInfo.cs
- SegmentInfo.cs
- CopyNamespacesAction.cs
- AsymmetricSignatureDeformatter.cs
- NamespaceEmitter.cs
- CompressEmulationStream.cs
- DelegateArgumentValue.cs
- ArgumentReference.cs
- PeerSecurityManager.cs
- QueryOptionExpression.cs
- MemberPathMap.cs
- TypeForwardedToAttribute.cs
- DecoderExceptionFallback.cs
- MetadataUtil.cs
- ComponentResourceKey.cs
- X509SubjectKeyIdentifierClause.cs
- BufferedWebEventProvider.cs
- DispatchWrapper.cs
- EmptyCollection.cs
- DataGridViewComboBoxEditingControl.cs
- ChangePassword.cs
- RegionInfo.cs
- CodeTypeParameterCollection.cs
- CheckBoxStandardAdapter.cs
- CodeGenerator.cs
- MemberDomainMap.cs
- FileEnumerator.cs
- DynamicValueConverter.cs
- MemberRelationshipService.cs
- ProxyFragment.cs
- GetIndexBinder.cs
- BufferBuilder.cs
- XmlSchemaFacet.cs
- PropertyDescriptor.cs
- RuntimeResourceSet.cs
- TransactionProtocolConverter.cs
- LocalizabilityAttribute.cs
- Metadata.cs
- ServiceModelEnumValidatorAttribute.cs
- DataGridViewButtonColumn.cs
- ImportRequest.cs
- SqlDataSourceCommandParser.cs
- DataGridTextBox.cs
- DesignerAdapterUtil.cs
- WebUtil.cs
- TextLineResult.cs
- PrivilegeNotHeldException.cs