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
- Activator.cs
- Section.cs
- SerializationAttributes.cs
- HtmlTableCellCollection.cs
- SystemEvents.cs
- ToolBarOverflowPanel.cs
- TransactionChannel.cs
- complextypematerializer.cs
- DataSourceDesigner.cs
- ReachNamespaceInfo.cs
- ColorContext.cs
- RegexStringValidator.cs
- WaitHandle.cs
- dtdvalidator.cs
- PrintingPermissionAttribute.cs
- StyleCollection.cs
- _DisconnectOverlappedAsyncResult.cs
- BaseConfigurationRecord.cs
- SafeCryptoHandles.cs
- DragEventArgs.cs
- OLEDB_Enum.cs
- QuadraticBezierSegment.cs
- SQLGuidStorage.cs
- MarshalDirectiveException.cs
- PipelineModuleStepContainer.cs
- DbParameterCollectionHelper.cs
- ActivitySurrogateSelector.cs
- SemanticResultKey.cs
- HtmlWindow.cs
- SmiMetaData.cs
- PackWebRequest.cs
- TextParaLineResult.cs
- AnnotationResourceCollection.cs
- MachineKeySection.cs
- UIElementPropertyUndoUnit.cs
- TemplateNameScope.cs
- IConvertible.cs
- KeyPullup.cs
- UserControlCodeDomTreeGenerator.cs
- HorizontalAlignConverter.cs
- ConfigXmlComment.cs
- SafeFileMappingHandle.cs
- MulticastIPAddressInformationCollection.cs
- XmlValueConverter.cs
- CodeAccessPermission.cs
- PointLightBase.cs
- CalendarTable.cs
- InheritablePropertyChangeInfo.cs
- DataSourceHelper.cs
- RotateTransform.cs
- SR.cs
- TreeNodeClickEventArgs.cs
- PassportIdentity.cs
- AlphabeticalEnumConverter.cs
- filewebrequest.cs
- CodeLabeledStatement.cs
- TiffBitmapDecoder.cs
- ThemeDictionaryExtension.cs
- Page.cs
- InvalidEnumArgumentException.cs
- DescendantQuery.cs
- RTLAwareMessageBox.cs
- Parsers.cs
- ConfigurationPropertyAttribute.cs
- regiisutil.cs
- TypeResolver.cs
- ConnectionManagementElement.cs
- DuplexSecurityProtocolFactory.cs
- AutomationIdentifierGuids.cs
- ScriptReferenceEventArgs.cs
- EdmToObjectNamespaceMap.cs
- DataTableMapping.cs
- querybuilder.cs
- SignedInfo.cs
- ViewStateModeByIdAttribute.cs
- CodeChecksumPragma.cs
- UxThemeWrapper.cs
- InheritanceRules.cs
- WebPartActionVerb.cs
- Knowncolors.cs
- FileDialogPermission.cs
- XmlSchemaValidator.cs
- WorkflowTimerService.cs
- NamespaceQuery.cs
- BitmapEffectCollection.cs
- GridViewSelectEventArgs.cs
- SecureStringHasher.cs
- Tuple.cs
- CompilerError.cs
- FocusManager.cs
- RequiredAttributeAttribute.cs
- DictionaryEntry.cs
- SQLStringStorage.cs
- ToolbarAUtomationPeer.cs
- MultiTrigger.cs
- WizardDesigner.cs
- RealizationDrawingContextWalker.cs
- DesignerView.xaml.cs
- BufferCache.cs
- Hash.cs