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
- WindowsContainer.cs
- webeventbuffer.cs
- ValidationEventArgs.cs
- QilTernary.cs
- JsonServiceDocumentSerializer.cs
- WebPartDeleteVerb.cs
- TokenizerHelper.cs
- ColorTransform.cs
- SqlDataSourceStatusEventArgs.cs
- DrawingAttributeSerializer.cs
- VarRemapper.cs
- XDeferredAxisSource.cs
- CmsUtils.cs
- BoundColumn.cs
- AccessorTable.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- File.cs
- PageTheme.cs
- Codec.cs
- SectionRecord.cs
- TreeViewAutomationPeer.cs
- ProxyGenerationError.cs
- ObjectManager.cs
- ZoomPercentageConverter.cs
- InputScopeAttribute.cs
- PngBitmapEncoder.cs
- mil_sdk_version.cs
- MasterPageBuildProvider.cs
- ProcessingInstructionAction.cs
- HttpWriter.cs
- FlowPosition.cs
- SafeFileHandle.cs
- WhitespaceRuleLookup.cs
- ProcessHostConfigUtils.cs
- DirectoryRootQuery.cs
- XhtmlTextWriter.cs
- DispatcherObject.cs
- ParallelTimeline.cs
- ToolStripProgressBar.cs
- FileLogRecord.cs
- _ConnectOverlappedAsyncResult.cs
- TakeOrSkipQueryOperator.cs
- AssemblyCache.cs
- SqlMethodTransformer.cs
- OutputCacheProviderCollection.cs
- WsatServiceAddress.cs
- HyperLinkStyle.cs
- PenContext.cs
- OutOfProcStateClientManager.cs
- ToolZone.cs
- CookieProtection.cs
- TextRange.cs
- BitmapVisualManager.cs
- NegationPusher.cs
- EntryWrittenEventArgs.cs
- WebPartMinimizeVerb.cs
- documentsequencetextpointer.cs
- XamlTreeBuilderBamlRecordWriter.cs
- AttachInfo.cs
- AttributeData.cs
- PagerSettings.cs
- FileCodeGroup.cs
- DictionaryItemsCollection.cs
- Bezier.cs
- _SslState.cs
- ModifierKeysConverter.cs
- SequenceNumber.cs
- CodeBinaryOperatorExpression.cs
- CategoryNameCollection.cs
- ConfigPathUtility.cs
- WindowPattern.cs
- ViewManagerAttribute.cs
- CodeValidator.cs
- CatalogZone.cs
- StaticFileHandler.cs
- SystemIcmpV6Statistics.cs
- OptimizedTemplateContentHelper.cs
- ToolStripControlHost.cs
- ProcessThreadDesigner.cs
- AsyncPostBackTrigger.cs
- XmlAttributeCollection.cs
- RangeValidator.cs
- FormViewPageEventArgs.cs
- ValidateNames.cs
- FlowchartStart.xaml.cs
- ReflectionHelper.cs
- RouteValueExpressionBuilder.cs
- Delay.cs
- SymbolMethod.cs
- CancellationHandlerDesigner.cs
- ReturnEventArgs.cs
- EditingScopeUndoUnit.cs
- XmlKeywords.cs
- MethodImplAttribute.cs
- ConnectionPool.cs
- PermissionSetEnumerator.cs
- ParallelDesigner.cs
- ListViewItemMouseHoverEvent.cs
- DictionaryEditChange.cs
- SystemColors.cs