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
- SerializationAttributes.cs
- RSAPKCS1SignatureFormatter.cs
- DataTableMapping.cs
- ToolStripPanelRenderEventArgs.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- DPTypeDescriptorContext.cs
- ConditionalDesigner.cs
- StateMachineSubscriptionManager.cs
- NetTcpBinding.cs
- KeySplineConverter.cs
- SchemaImporterExtension.cs
- FunctionCommandText.cs
- BitmapEffectDrawingContextWalker.cs
- SqlExpander.cs
- FrameworkElementFactory.cs
- PathSegmentCollection.cs
- KeySplineConverter.cs
- BufferBuilder.cs
- XmlSerializerNamespaces.cs
- StateDesigner.LayoutSelectionGlyph.cs
- ThreadStateException.cs
- Image.cs
- Geometry3D.cs
- SqlClientMetaDataCollectionNames.cs
- InputGestureCollection.cs
- WorkflowQueueInfo.cs
- MultiViewDesigner.cs
- SingleObjectCollection.cs
- Processor.cs
- RawUIStateInputReport.cs
- Processor.cs
- UserControlParser.cs
- AsyncPostBackErrorEventArgs.cs
- webbrowsersite.cs
- PasswordDeriveBytes.cs
- ScrollChrome.cs
- PrintPreviewControl.cs
- COM2ExtendedTypeConverter.cs
- HttpServerVarsCollection.cs
- InstancePersistenceContext.cs
- WebPartUserCapability.cs
- NamespaceList.cs
- StrongTypingException.cs
- EventMappingSettingsCollection.cs
- BindUriHelper.cs
- XPathDocumentNavigator.cs
- CharEntityEncoderFallback.cs
- ComponentEvent.cs
- HierarchicalDataSourceConverter.cs
- DescendantBaseQuery.cs
- Vector3DCollectionConverter.cs
- InternalResources.cs
- SqlFactory.cs
- XmlNamespaceManager.cs
- StoreAnnotationsMap.cs
- PagerSettings.cs
- ObjectReferenceStack.cs
- GroupBoxRenderer.cs
- NativeMethods.cs
- RectAnimationUsingKeyFrames.cs
- OdbcParameter.cs
- ByteStack.cs
- DecoderReplacementFallback.cs
- XmlSchemaSet.cs
- WinCategoryAttribute.cs
- WebControlToolBoxItem.cs
- NullRuntimeConfig.cs
- Message.cs
- ListView.cs
- FormViewRow.cs
- RepeatButton.cs
- FrameworkElementFactory.cs
- LateBoundBitmapDecoder.cs
- CustomTypeDescriptor.cs
- Expressions.cs
- SvcMapFileSerializer.cs
- X509Certificate2Collection.cs
- storagemappingitemcollection.viewdictionary.cs
- PerfCounterSection.cs
- DiagnosticTraceSource.cs
- CheckBoxPopupAdapter.cs
- Bidi.cs
- OperationExecutionFault.cs
- MaskInputRejectedEventArgs.cs
- XmlAnyElementAttributes.cs
- Privilege.cs
- CharacterBufferReference.cs
- ExpressionParser.cs
- GenericPrincipal.cs
- TaskHelper.cs
- TrackBarRenderer.cs
- ThemeDictionaryExtension.cs
- NumberSubstitution.cs
- ToolStripDropTargetManager.cs
- QueryTask.cs
- Normalization.cs
- DownloadProgressEventArgs.cs
- SymbolPair.cs
- SetUserLanguageRequest.cs
- SafeTimerHandle.cs