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
- XmlAnyElementAttributes.cs
- PropagatorResult.cs
- TdsParserStaticMethods.cs
- ApplicationSettingsBase.cs
- TypeUtils.cs
- InternalTypeHelper.cs
- EmptyEnumerable.cs
- SoapObjectWriter.cs
- DecimalAnimation.cs
- RegexFCD.cs
- DiagnosticTrace.cs
- SelectedCellsChangedEventArgs.cs
- XmlReaderSettings.cs
- FontStretchConverter.cs
- DataTrigger.cs
- DataReaderContainer.cs
- XmlDataSourceNodeDescriptor.cs
- DESCryptoServiceProvider.cs
- Itemizer.cs
- UnsupportedPolicyOptionsException.cs
- GridPattern.cs
- Site.cs
- InputBuffer.cs
- XmlIlTypeHelper.cs
- httpstaticobjectscollection.cs
- SkinBuilder.cs
- LicenseProviderAttribute.cs
- RbTree.cs
- MD5.cs
- PermissionSet.cs
- DispatcherProcessingDisabled.cs
- LocationSectionRecord.cs
- ParentQuery.cs
- CodeCatchClauseCollection.cs
- DataBoundControl.cs
- EventProxy.cs
- ChameleonKey.cs
- ValidationHelper.cs
- UInt32.cs
- ParameterCollection.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- RawStylusInputReport.cs
- xdrvalidator.cs
- StatusBarAutomationPeer.cs
- WindowPattern.cs
- WebExceptionStatus.cs
- XmlSchemaAttribute.cs
- SiteMapPath.cs
- FormParameter.cs
- ToolZoneDesigner.cs
- UIElement.cs
- FusionWrap.cs
- TextTreeRootNode.cs
- EpmContentSerializerBase.cs
- WebBaseEventKeyComparer.cs
- EventMappingSettings.cs
- AssociationTypeEmitter.cs
- ComponentRenameEvent.cs
- HostingPreferredMapPath.cs
- DataTemplate.cs
- XmlRawWriterWrapper.cs
- QilUnary.cs
- ManagementObjectCollection.cs
- XmlTextReaderImplHelpers.cs
- WebRequestModulesSection.cs
- BaseDataBoundControlDesigner.cs
- BuilderPropertyEntry.cs
- LayoutDump.cs
- BitmapEncoder.cs
- StreamSecurityUpgradeAcceptorBase.cs
- SmiEventSink_DeferedProcessing.cs
- GraphicsContext.cs
- DiscoveryServerProtocol.cs
- DataGridViewTopLeftHeaderCell.cs
- AnnotationAuthorChangedEventArgs.cs
- SqlBuffer.cs
- StructureChangedEventArgs.cs
- BuilderPropertyEntry.cs
- CompilationRelaxations.cs
- FieldTemplateUserControl.cs
- WSDualHttpBindingElement.cs
- HttpCapabilitiesBase.cs
- SHA256.cs
- InternalException.cs
- SrgsSubset.cs
- TableRow.cs
- IisTraceListener.cs
- Enum.cs
- TlsSspiNegotiation.cs
- TokenFactoryBase.cs
- SmtpFailedRecipientException.cs
- ElementsClipboardData.cs
- StateWorkerRequest.cs
- Utils.cs
- FrameworkTemplate.cs
- DataGridColumnsPage.cs
- WebPartConnectionsConfigureVerb.cs
- EntitySetBaseCollection.cs
- OdbcReferenceCollection.cs
- DynamicQueryableWrapper.cs