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
- AccessDataSource.cs
- PointHitTestParameters.cs
- CssClassPropertyAttribute.cs
- InternalTransaction.cs
- TypeDependencyAttribute.cs
- DrawingGroup.cs
- SafeTimerHandle.cs
- ToolStripContentPanel.cs
- InputScope.cs
- TableStyle.cs
- SelectionRangeConverter.cs
- Duration.cs
- ListCollectionView.cs
- TextEditor.cs
- MasterPageParser.cs
- RoleService.cs
- SerializationFieldInfo.cs
- X500Name.cs
- OdbcErrorCollection.cs
- Int32.cs
- EventLogInternal.cs
- DictionaryContent.cs
- cookiecontainer.cs
- HttpDebugHandler.cs
- Validator.cs
- ManagementOptions.cs
- DBDataPermissionAttribute.cs
- OlePropertyStructs.cs
- WebPartCloseVerb.cs
- Shape.cs
- WebPartMinimizeVerb.cs
- RootBuilder.cs
- DeliveryRequirementsAttribute.cs
- ResolveMatchesCD1.cs
- XmlDataSourceView.cs
- BCLDebug.cs
- Component.cs
- StyleTypedPropertyAttribute.cs
- XmlUtf8RawTextWriter.cs
- TreeViewImageGenerator.cs
- ZoomPercentageConverter.cs
- ControlSerializer.cs
- DependencyPropertyKind.cs
- SchemaNames.cs
- Trace.cs
- CommandBindingCollection.cs
- RequestSecurityToken.cs
- XsdDuration.cs
- EmbeddedMailObjectsCollection.cs
- ComponentDispatcherThread.cs
- ToolStripOverflowButton.cs
- Section.cs
- RunWorkerCompletedEventArgs.cs
- SchemaElementLookUpTableEnumerator.cs
- DataGridViewAccessibleObject.cs
- ExpressionBuilder.cs
- AttachmentCollection.cs
- UrlParameterWriter.cs
- HttpWebResponse.cs
- ItemMap.cs
- SyntaxCheck.cs
- SynchronizedDispatch.cs
- AttributeUsageAttribute.cs
- DrawingAttributesDefaultValueFactory.cs
- DecimalAnimation.cs
- Size.cs
- RequestQueue.cs
- WindowsListViewSubItem.cs
- DrawingGroupDrawingContext.cs
- SafeFileMapViewHandle.cs
- CryptographicAttribute.cs
- OracleException.cs
- LinqDataSourceView.cs
- mediaclock.cs
- TouchesOverProperty.cs
- ComplexTypeEmitter.cs
- _KerberosClient.cs
- XPathScanner.cs
- DBConnection.cs
- NotifyInputEventArgs.cs
- Serializer.cs
- WindowsFormsSectionHandler.cs
- SequenceFullException.cs
- DataBinding.cs
- Hash.cs
- FileVersionInfo.cs
- WebPartCollection.cs
- FrugalList.cs
- TextModifierScope.cs
- WCFServiceClientProxyGenerator.cs
- ContextMenu.cs
- altserialization.cs
- ErrorsHelper.cs
- ErrorProvider.cs
- GeneralTransform2DTo3DTo2D.cs
- LinearKeyFrames.cs
- MessagePartProtectionMode.cs
- TableAutomationPeer.cs
- LookupBindingPropertiesAttribute.cs
- ServiceModelInstallComponent.cs