Code:
/ FX-1434 / FX-1434 / 1.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
- GroupDescription.cs
- DataGridViewRowHeaderCell.cs
- ElementNotEnabledException.cs
- MULTI_QI.cs
- FormViewDeleteEventArgs.cs
- AttributeUsageAttribute.cs
- RijndaelManaged.cs
- XmlSchemaComplexType.cs
- ServiceAuthorizationElement.cs
- ErrorItem.cs
- EvidenceBase.cs
- TrustLevel.cs
- LocatorManager.cs
- PromptBuilder.cs
- _Connection.cs
- MetabaseSettingsIis7.cs
- SolidColorBrush.cs
- VectorCollectionConverter.cs
- MetadataCache.cs
- HtmlHistory.cs
- ExpressionVisitor.cs
- WebPartConnectionsCloseVerb.cs
- Label.cs
- SqlDataSourceStatusEventArgs.cs
- TemplateEditingService.cs
- Aggregates.cs
- StorageComplexTypeMapping.cs
- PrintDialog.cs
- Membership.cs
- ThemeDictionaryExtension.cs
- IntegerCollectionEditor.cs
- CodeTypeParameterCollection.cs
- remotingproxy.cs
- _NegoStream.cs
- linebase.cs
- BitmapEffectDrawingContextWalker.cs
- AttributeEmitter.cs
- PenCursorManager.cs
- CacheModeValueSerializer.cs
- WindowsListViewScroll.cs
- MsmqIntegrationInputMessage.cs
- InputChannel.cs
- KeyNotFoundException.cs
- WebPartVerb.cs
- CustomErrorsSectionWrapper.cs
- AnonymousIdentificationModule.cs
- HttpModuleCollection.cs
- FileInfo.cs
- TranslateTransform3D.cs
- updatecommandorderer.cs
- LineBreak.cs
- Stacktrace.cs
- PageAdapter.cs
- Misc.cs
- EventKeyword.cs
- MarkedHighlightComponent.cs
- DesignDataSource.cs
- ThousandthOfEmRealDoubles.cs
- SwitchExpression.cs
- FullTextLine.cs
- _NetworkingPerfCounters.cs
- DocumentApplicationJournalEntry.cs
- SelectingProviderEventArgs.cs
- ImageField.cs
- OutputCacheModule.cs
- PtsHelper.cs
- HostExecutionContextManager.cs
- ElementProxy.cs
- DbDeleteCommandTree.cs
- ScalarOps.cs
- StrongNamePublicKeyBlob.cs
- MissingMemberException.cs
- OptimizerPatterns.cs
- LicenseContext.cs
- DataServiceCollectionOfT.cs
- WebZone.cs
- CacheChildrenQuery.cs
- SynchronizedDisposablePool.cs
- PageParserFilter.cs
- DataBoundControlHelper.cs
- MsmqInputSessionChannelListener.cs
- BulletedList.cs
- TabRenderer.cs
- AuthenticationModulesSection.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- ServiceObjectContainer.cs
- DataTableNewRowEvent.cs
- ContextMenu.cs
- MetadataUtil.cs
- BindingCompleteEventArgs.cs
- Propagator.ExtentPlaceholderCreator.cs
- ArrayList.cs
- SystemIPInterfaceStatistics.cs
- SplashScreenNativeMethods.cs
- xsdvalidator.cs
- SelectionEditingBehavior.cs
- ApplicationInterop.cs
- OperationDescription.cs
- TextParagraph.cs
- FontStretch.cs