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
- WinCategoryAttribute.cs
- RequestResizeEvent.cs
- DesignerCategoryAttribute.cs
- Switch.cs
- BufferedGraphicsContext.cs
- XmlFormatReaderGenerator.cs
- GPPOINTF.cs
- TypeHelpers.cs
- ping.cs
- WebMessageEncodingElement.cs
- EasingKeyFrames.cs
- ScriptRef.cs
- SystemIPv4InterfaceProperties.cs
- DataGridPreparingCellForEditEventArgs.cs
- OracleString.cs
- CompiledQueryCacheEntry.cs
- SqlDataReaderSmi.cs
- PropertyEmitter.cs
- BitmapSizeOptions.cs
- SQLBinary.cs
- HtmlTableRowCollection.cs
- CodeVariableDeclarationStatement.cs
- Size.cs
- CounterSetInstance.cs
- StringUtil.cs
- LinqDataSourceInsertEventArgs.cs
- ConvertEvent.cs
- OleDbParameter.cs
- DefaultAsyncDataDispatcher.cs
- FlowSwitch.cs
- SerializationException.cs
- HtmlValidatorAdapter.cs
- BufferedReadStream.cs
- ContractListAdapter.cs
- ExtentJoinTreeNode.cs
- Clipboard.cs
- NullRuntimeConfig.cs
- CodeNamespaceImport.cs
- ImageClickEventArgs.cs
- DataGridViewBand.cs
- DecoderFallbackWithFailureFlag.cs
- DataControlLinkButton.cs
- TreeWalkHelper.cs
- SQLGuid.cs
- XNodeValidator.cs
- ResizeGrip.cs
- BuildResultCache.cs
- DrawingCollection.cs
- Update.cs
- CommandHelpers.cs
- AsyncContentLoadedEventArgs.cs
- _StreamFramer.cs
- ColumnMapVisitor.cs
- MatrixAnimationUsingPath.cs
- PrivacyNoticeBindingElementImporter.cs
- InputLanguageProfileNotifySink.cs
- MasterPageBuildProvider.cs
- ScriptControl.cs
- Configuration.cs
- MediaSystem.cs
- EntitySqlQueryCacheEntry.cs
- EventLogEntry.cs
- EntitySet.cs
- DefaultObjectMappingItemCollection.cs
- HtmlTextArea.cs
- WaitHandleCannotBeOpenedException.cs
- DispatcherExceptionEventArgs.cs
- DrawingCollection.cs
- httpapplicationstate.cs
- SoapClientMessage.cs
- WebServiceMethodData.cs
- ValueUtilsSmi.cs
- BamlStream.cs
- BinaryObjectWriter.cs
- BitmapEffectInputData.cs
- ReachDocumentSequenceSerializerAsync.cs
- FileDetails.cs
- DataListItemCollection.cs
- ValidationPropertyAttribute.cs
- ContentControl.cs
- DataServiceExpressionVisitor.cs
- DurableEnlistmentState.cs
- ScriptMethodAttribute.cs
- SqlInfoMessageEvent.cs
- EllipticalNodeOperations.cs
- WhitespaceRuleLookup.cs
- RadioButton.cs
- WindowsFormsLinkLabel.cs
- ArgIterator.cs
- XmlReflectionMember.cs
- PersistenceTypeAttribute.cs
- TextRenderer.cs
- MessageDroppedTraceRecord.cs
- SetMemberBinder.cs
- TransformerTypeCollection.cs
- NativeCppClassAttribute.cs
- HttpInputStream.cs
- Helpers.cs
- Byte.cs
- InstallerTypeAttribute.cs