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
- SaveFileDialog.cs
- RawTextInputReport.cs
- ControlPersister.cs
- CodeCommentStatement.cs
- SrgsDocument.cs
- SimpleApplicationHost.cs
- AstNode.cs
- IsolatedStorageSecurityState.cs
- ObsoleteAttribute.cs
- NumericUpDown.cs
- MemoryPressure.cs
- BamlResourceDeserializer.cs
- InputLangChangeRequestEvent.cs
- RegionInfo.cs
- MonthChangedEventArgs.cs
- CancelRequestedQuery.cs
- Char.cs
- TypeSemantics.cs
- EventBuilder.cs
- OdbcConnectionStringbuilder.cs
- GraphicsPathIterator.cs
- MouseEvent.cs
- RangeValuePattern.cs
- ZoomPercentageConverter.cs
- SortKey.cs
- TouchEventArgs.cs
- FrameworkElement.cs
- DropDownList.cs
- MessageQueueException.cs
- ObjRef.cs
- RegexEditorDialog.cs
- UncommonField.cs
- BStrWrapper.cs
- DesignerDataConnection.cs
- Main.cs
- WebHttpBehavior.cs
- XmlHierarchicalEnumerable.cs
- XomlCompilerError.cs
- FixUp.cs
- DescendantOverDescendantQuery.cs
- GeometryModel3D.cs
- FormViewPageEventArgs.cs
- UnsafeNativeMethods.cs
- EnumerableRowCollection.cs
- ButtonPopupAdapter.cs
- ColumnHeaderConverter.cs
- IntegerValidatorAttribute.cs
- WindowsListViewGroup.cs
- DataServiceHost.cs
- Ref.cs
- RecordsAffectedEventArgs.cs
- XmlDeclaration.cs
- CryptoKeySecurity.cs
- RedirectionProxy.cs
- HandleCollector.cs
- DragAssistanceManager.cs
- ItemCheckedEvent.cs
- SQLGuidStorage.cs
- WindowClosedEventArgs.cs
- OdbcInfoMessageEvent.cs
- TemplateBindingExtensionConverter.cs
- CompilerState.cs
- safex509handles.cs
- CqlLexerHelpers.cs
- WebCategoryAttribute.cs
- SpellerHighlightLayer.cs
- EntityContainerRelationshipSetEnd.cs
- ServiceDescription.cs
- SecUtil.cs
- GridViewDeleteEventArgs.cs
- GridViewRowPresenter.cs
- EditorPart.cs
- InvokePattern.cs
- WithStatement.cs
- ConditionalBranch.cs
- MembershipSection.cs
- Light.cs
- ClientSideQueueItem.cs
- ComponentChangingEvent.cs
- OdbcError.cs
- EditorResources.cs
- AuthenticationModuleElement.cs
- ProcessHostConfigUtils.cs
- AspNetSynchronizationContext.cs
- TabControl.cs
- GestureRecognitionResult.cs
- OleDbSchemaGuid.cs
- SiteMap.cs
- CultureSpecificCharacterBufferRange.cs
- UInt16Storage.cs
- WSSecureConversation.cs
- DockAndAnchorLayout.cs
- ItemsControl.cs
- Comparer.cs
- DnsEndPoint.cs
- DoubleAnimationUsingPath.cs
- XmlWrappingReader.cs
- QilChoice.cs
- Stream.cs
- GridViewCommandEventArgs.cs