Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / Behavior / SelectionGlyphBase.cs / 1 / SelectionGlyphBase.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.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms.Design; ////// /// This is the base class for all the selection Glyphs: GrabHandle, /// Hidden, Locked, Selection, and Tray Glyphs. This class includes /// all like-operations for the Selection glyphs. /// internal abstract class SelectionGlyphBase : Glyph { protected Rectangle bounds;//defines the bounds of the selection glyph protected Rectangle hitBounds;//defines the bounds used for hittest - it could be different than the bounds of the glyph itself protected Cursor hitTestCursor;//the cursor returned if hit test is positive protected SelectionRules rules;//the selection rules - defining how the control can change ////// /// Standard constructor. /// internal SelectionGlyphBase(Behavior behavior) : base(behavior) { } ////// /// Read-only property describing the SelecitonRules for these Glyphs. /// public SelectionRules SelectionRules { get { return rules; } } ////// /// Simple hit test rule: if the point is contained within the bounds - /// then it is a positive hit test. /// public override Cursor GetHitTest(Point p) { if (hitBounds.Contains(p)) { return hitTestCursor; } return null; } ////// /// Returns the HitTestCursor for this glyph. /// public Cursor HitTestCursor { get { return hitTestCursor; } } ////// /// The Bounds of this glyph. /// public override Rectangle Bounds { get { return bounds; } } ////// /// There's no paint logic on this base class. /// public override void Paint(PaintEventArgs pe) { } } } // 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
- OraclePermissionAttribute.cs
- AtomPub10ServiceDocumentFormatter.cs
- SmiMetaDataProperty.cs
- DataTableCollection.cs
- EventRoute.cs
- XmlArrayAttribute.cs
- VideoDrawing.cs
- XmlNode.cs
- RegexMatchCollection.cs
- InputReferenceExpression.cs
- InkCanvas.cs
- StrokeNode.cs
- TrackingValidationObjectDictionary.cs
- _SecureChannel.cs
- RegexCaptureCollection.cs
- BaseUriHelper.cs
- WindowsImpersonationContext.cs
- EdmScalarPropertyAttribute.cs
- WebRequestModuleElement.cs
- GlyphsSerializer.cs
- ThicknessAnimationBase.cs
- DataGridDetailsPresenter.cs
- CroppedBitmap.cs
- XmlSchemaAnnotated.cs
- Filter.cs
- ObjectConverter.cs
- DataConnectionHelper.cs
- HandlerWithFactory.cs
- DynamicDiscoSearcher.cs
- InkPresenter.cs
- TraceSection.cs
- ClientSideProviderDescription.cs
- TemplateInstanceAttribute.cs
- AlphabeticalEnumConverter.cs
- TextDecorationCollection.cs
- NewItemsContextMenuStrip.cs
- MDIControlStrip.cs
- ExpressionVisitor.cs
- BindingCollectionElement.cs
- ResXResourceSet.cs
- SpnEndpointIdentityExtension.cs
- MergeFailedEvent.cs
- InlineCategoriesDocument.cs
- TrustExchangeException.cs
- ZipFileInfoCollection.cs
- RequestTimeoutManager.cs
- JournalNavigationScope.cs
- ControlDesignerState.cs
- EncodingInfo.cs
- HtmlButton.cs
- CultureMapper.cs
- CheckoutException.cs
- sqlnorm.cs
- EditorBrowsableAttribute.cs
- BlurEffect.cs
- ModelFactory.cs
- DynamicValidatorEventArgs.cs
- Geometry3D.cs
- OleDbWrapper.cs
- PrefixHandle.cs
- HtmlControlPersistable.cs
- DataViewSettingCollection.cs
- DynamicControl.cs
- Baml2006ReaderFrame.cs
- CookieHandler.cs
- SymDocumentType.cs
- COM2ComponentEditor.cs
- PageAsyncTaskManager.cs
- SqlTypesSchemaImporter.cs
- GlobalId.cs
- WmlImageAdapter.cs
- XmlSchemaAny.cs
- wmiprovider.cs
- Message.cs
- CngKeyBlobFormat.cs
- DesignParameter.cs
- DataGridColumnHeaderCollection.cs
- InputProcessorProfilesLoader.cs
- SqlMethodAttribute.cs
- PeekCompletedEventArgs.cs
- ValidationService.cs
- CodeMemberField.cs
- FileSystemInfo.cs
- PerformanceCounterCategory.cs
- X509ScopedServiceCertificateElementCollection.cs
- TypeSystemProvider.cs
- TextDataBindingHandler.cs
- BroadcastEventHelper.cs
- RevocationPoint.cs
- _SafeNetHandles.cs
- SchemaMapping.cs
- AdapterUtil.cs
- InstanceView.cs
- TokenFactoryBase.cs
- SafeViewOfFileHandle.cs
- StaticContext.cs
- SplitterCancelEvent.cs
- WebPartZone.cs
- AttachmentCollection.cs
- ObjectAnimationUsingKeyFrames.cs