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
- EnvironmentPermission.cs
- CaseInsensitiveHashCodeProvider.cs
- GZipStream.cs
- WindowsListViewGroup.cs
- RsaSecurityKey.cs
- TextSelectionProcessor.cs
- SerializationStore.cs
- OleDbConnection.cs
- EntityAdapter.cs
- SqlServices.cs
- CodeMethodReturnStatement.cs
- UICuesEvent.cs
- MediaTimeline.cs
- RegexCapture.cs
- Vector3DValueSerializer.cs
- IFlowDocumentViewer.cs
- NumericUpDown.cs
- MouseCaptureWithinProperty.cs
- DragEvent.cs
- ListItemParagraph.cs
- UrlPropertyAttribute.cs
- ToolStripDesignerUtils.cs
- SqlFunctionAttribute.cs
- OleDbRowUpdatingEvent.cs
- VersionPair.cs
- DocumentPaginator.cs
- ByteKeyFrameCollection.cs
- Metafile.cs
- DropShadowEffect.cs
- EdmScalarPropertyAttribute.cs
- Fonts.cs
- LambdaCompiler.ControlFlow.cs
- SslStream.cs
- AddInBase.cs
- SessionStateSection.cs
- COM2PictureConverter.cs
- Rotation3DKeyFrameCollection.cs
- RewritingSimplifier.cs
- XsdBuilder.cs
- SharedPersonalizationStateInfo.cs
- ToolStripItemBehavior.cs
- MenuItemStyle.cs
- OleTxTransaction.cs
- ExtendedProtectionPolicyTypeConverter.cs
- FlowLayoutSettings.cs
- ResourceManager.cs
- Maps.cs
- DesignColumn.cs
- XmlSignatureProperties.cs
- Stroke2.cs
- NativeMethods.cs
- QuaternionAnimationBase.cs
- RenderContext.cs
- DataGridItemEventArgs.cs
- SubclassTypeValidator.cs
- DependencyPropertyAttribute.cs
- ReaderOutput.cs
- FontInfo.cs
- DescendantOverDescendantQuery.cs
- EntityDataSourceWizardForm.cs
- TextWriterTraceListener.cs
- CodeBinaryOperatorExpression.cs
- ToolStripItemCollection.cs
- DesignSurfaceCollection.cs
- EntityProviderFactory.cs
- PageHandlerFactory.cs
- ParameterToken.cs
- SqlDataReader.cs
- IndependentAnimationStorage.cs
- NoClickablePointException.cs
- HttpHostedTransportConfiguration.cs
- AliasedSlot.cs
- Menu.cs
- HuffCodec.cs
- ZoneIdentityPermission.cs
- DSGeneratorProblem.cs
- WebServiceBindingAttribute.cs
- RenderContext.cs
- LinqDataSourceHelper.cs
- CodeDomSerializerBase.cs
- CodeNamespace.cs
- StoryFragments.cs
- PixelFormatConverter.cs
- KnownIds.cs
- TemplateApplicationHelper.cs
- HashStream.cs
- FlowDocumentPaginator.cs
- DataGridTableCollection.cs
- _SslSessionsCache.cs
- SystemIPv6InterfaceProperties.cs
- CircleHotSpot.cs
- TcpTransportSecurityElement.cs
- BuildTopDownAttribute.cs
- TextWriterTraceListener.cs
- SynchronousChannelMergeEnumerator.cs
- AxisAngleRotation3D.cs
- DiagnosticTraceRecords.cs
- WebPartZone.cs
- Char.cs
- XmlSchemaFacet.cs