Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Framework / MS / Internal / Annotations / Anchoring / SelectionProcessor.cs / 1 / SelectionProcessor.cs
//------------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
// Description:
// SelectionProcessor is an abstract class defining the API for
// creating and processing selections in the annotation framework.
// SelectionProcessors are responsible for creating locator parts representing
// a selection and for creating selections based on a locator part.
// Spec: http://team/sites/ag/Specifications/Anchoring%20Namespace%20Spec.doc
//
// History:
// 12/01/2002: magedz: Created - based on architectural discussions and design
// by axelk, rruiz, magedz
// 04/01/2003: rruiz: Updated file as part of integrating into working system
// 07/21/2003: rruiz: Ported to WCP tree.
// 08/18/2003: rruiz: Updated to Anchoring Namespace spec.
// 05/07/2004: ssimova: Removed Xpath expressions
// 01/07/2004: rruiz: Removed LocatorManager property.
//
//-----------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Annotations;
using System.Windows.Media;
using MS.Utility;
using System.Xml;
namespace MS.Internal.Annotations.Anchoring
{
///
/// SelectionProcessor is an abstract class defining the API for
/// creating and processing selections in the annotation framework.
/// SelectionProcessors are responsible for creating locator parts representing
/// a selection and for creating selections based on a locator part.
///
internal abstract class SelectionProcessor
{
//-----------------------------------------------------
//
// Constructors
//
//-----------------------------------------------------
#region Constructors
///
/// Creates an instance of SelectionProcessor.
///
protected SelectionProcessor()
{
}
#endregion Constructors
//------------------------------------------------------
//
// Public Methods
//
//-----------------------------------------------------
#region Public Methods
///
/// Merges the two selections into one, if possible.
///
/// selection to merge
/// other selection to merge
/// new selection that contains the data from both
/// selection1 and selection2
/// true if the selections were merged, false otherwise
///
/// selection1 or selection2 are
/// null
public abstract bool MergeSelections(Object selection1, Object selection2, out Object newSelection);
///
/// Gets the tree elements spanned by the selection.
///
/// the selection to examine
/// a list of elements spanned by the selection; never returns
/// null
/// selection is null
/// selection is of wrong type
public abstract IList GetSelectedNodes(Object selection);
///
/// Gets the parent element of this selection.
///
/// the selection to examine
/// the parent element of the selection; can be null
/// selection is null
/// selection is of wrong type
public abstract UIElement GetParent(Object selection);
///
/// Gets the anchor point for the selection
///
/// the selection to examine
/// the anchor point of the selection; can be null
/// selection is null
/// selection is of wrong type
public abstract Point GetAnchorPoint(Object selection);
///
/// Creates one or more locator parts representing the portion
/// of 'startNode' spanned by 'selection'.
///
/// the selection that is being processed
/// the node the locator parts should be in the
/// context of
/// one or more locator parts representing the portion of 'startNode' spanned
/// by 'selection'
/// startNode or selection is null
/// startNode is not a DependencyObject or
/// selection is of the wrong type
public abstract IList GenerateLocatorParts(Object selection, DependencyObject startNode);
///
/// Creates a selection object spanning the portion of 'startNode'
/// specified by 'locatorPart'.
///
/// locator part specifying data to be spanned
/// the node to be spanned by the created
/// selection
/// describes the level of resolution reached when resolving the locator part
/// a selection spanning the portion of 'startNode' specified by
/// 'locatorPart'
/// locatorPart or startNode are
/// null
/// locatorPart is of the incorrect type
public abstract Object ResolveLocatorPart(ContentLocatorPart locatorPart, DependencyObject startNode, out AttachmentLevel attachmentLevel);
///
/// Returns a list of XmlQualifiedNames representing the
/// the locator parts this processor can resolve/generate.
///
public abstract XmlQualifiedName[] GetLocatorPartTypes();
#endregion Public Methods
//------------------------------------------------------
//
// Public Operators
//
//------------------------------------------------------
//-----------------------------------------------------
//
// Public Properties
//
//------------------------------------------------------
//-----------------------------------------------------
//
// Public Events
//
//-----------------------------------------------------
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
// Description:
// SelectionProcessor is an abstract class defining the API for
// creating and processing selections in the annotation framework.
// SelectionProcessors are responsible for creating locator parts representing
// a selection and for creating selections based on a locator part.
// Spec: http://team/sites/ag/Specifications/Anchoring%20Namespace%20Spec.doc
//
// History:
// 12/01/2002: magedz: Created - based on architectural discussions and design
// by axelk, rruiz, magedz
// 04/01/2003: rruiz: Updated file as part of integrating into working system
// 07/21/2003: rruiz: Ported to WCP tree.
// 08/18/2003: rruiz: Updated to Anchoring Namespace spec.
// 05/07/2004: ssimova: Removed Xpath expressions
// 01/07/2004: rruiz: Removed LocatorManager property.
//
//-----------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Annotations;
using System.Windows.Media;
using MS.Utility;
using System.Xml;
namespace MS.Internal.Annotations.Anchoring
{
///
/// SelectionProcessor is an abstract class defining the API for
/// creating and processing selections in the annotation framework.
/// SelectionProcessors are responsible for creating locator parts representing
/// a selection and for creating selections based on a locator part.
///
internal abstract class SelectionProcessor
{
//-----------------------------------------------------
//
// Constructors
//
//-----------------------------------------------------
#region Constructors
///
/// Creates an instance of SelectionProcessor.
///
protected SelectionProcessor()
{
}
#endregion Constructors
//------------------------------------------------------
//
// Public Methods
//
//-----------------------------------------------------
#region Public Methods
///
/// Merges the two selections into one, if possible.
///
/// selection to merge
/// other selection to merge
/// new selection that contains the data from both
/// selection1 and selection2
/// true if the selections were merged, false otherwise
///
/// selection1 or selection2 are
/// null
public abstract bool MergeSelections(Object selection1, Object selection2, out Object newSelection);
///
/// Gets the tree elements spanned by the selection.
///
/// the selection to examine
/// a list of elements spanned by the selection; never returns
/// null
/// selection is null
/// selection is of wrong type
public abstract IList GetSelectedNodes(Object selection);
///
/// Gets the parent element of this selection.
///
/// the selection to examine
/// the parent element of the selection; can be null
/// selection is null
/// selection is of wrong type
public abstract UIElement GetParent(Object selection);
///
/// Gets the anchor point for the selection
///
/// the selection to examine
/// the anchor point of the selection; can be null
/// selection is null
/// selection is of wrong type
public abstract Point GetAnchorPoint(Object selection);
///
/// Creates one or more locator parts representing the portion
/// of 'startNode' spanned by 'selection'.
///
/// the selection that is being processed
/// the node the locator parts should be in the
/// context of
/// one or more locator parts representing the portion of 'startNode' spanned
/// by 'selection'
/// startNode or selection is null
/// startNode is not a DependencyObject or
/// selection is of the wrong type
public abstract IList GenerateLocatorParts(Object selection, DependencyObject startNode);
///
/// Creates a selection object spanning the portion of 'startNode'
/// specified by 'locatorPart'.
///
/// locator part specifying data to be spanned
/// the node to be spanned by the created
/// selection
/// describes the level of resolution reached when resolving the locator part
/// a selection spanning the portion of 'startNode' specified by
/// 'locatorPart'
/// locatorPart or startNode are
/// null
/// locatorPart is of the incorrect type
public abstract Object ResolveLocatorPart(ContentLocatorPart locatorPart, DependencyObject startNode, out AttachmentLevel attachmentLevel);
///
/// Returns a list of XmlQualifiedNames representing the
/// the locator parts this processor can resolve/generate.
///
public abstract XmlQualifiedName[] GetLocatorPartTypes();
#endregion Public Methods
//------------------------------------------------------
//
// Public Operators
//
//------------------------------------------------------
//-----------------------------------------------------
//
// Public Properties
//
//------------------------------------------------------
//-----------------------------------------------------
//
// Public Events
//
//-----------------------------------------------------
}
}
// 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
- ProcessManager.cs
- IntPtr.cs
- _KerberosClient.cs
- ManagementBaseObject.cs
- IdentityReference.cs
- XamlPoint3DCollectionSerializer.cs
- UrlPath.cs
- EdmScalarPropertyAttribute.cs
- XNodeValidator.cs
- BadImageFormatException.cs
- ConnectAlgorithms.cs
- ReadWriteSpinLock.cs
- CorePropertiesFilter.cs
- DocumentAutomationPeer.cs
- CodePropertyReferenceExpression.cs
- XmlExtensionFunction.cs
- CodeVariableDeclarationStatement.cs
- TextOnlyOutput.cs
- DataGridAutomationPeer.cs
- WebServiceParameterData.cs
- DependentList.cs
- OdbcErrorCollection.cs
- latinshape.cs
- StdValidatorsAndConverters.cs
- SafeFileMappingHandle.cs
- BoundPropertyEntry.cs
- Line.cs
- PeerToPeerException.cs
- SerialPinChanges.cs
- DataControlCommands.cs
- DetailsViewUpdatedEventArgs.cs
- StandardToolWindows.cs
- PrintControllerWithStatusDialog.cs
- ListenerElementsCollection.cs
- X509ThumbprintKeyIdentifierClause.cs
- FontStyleConverter.cs
- XsltConvert.cs
- MessageBox.cs
- ExeConfigurationFileMap.cs
- IIS7WorkerRequest.cs
- Point.cs
- ConstrainedGroup.cs
- BaseTemplateCodeDomTreeGenerator.cs
- GeneralTransform3DTo2D.cs
- PageRequestManager.cs
- HttpModuleAction.cs
- DataColumn.cs
- BuildTopDownAttribute.cs
- baseaxisquery.cs
- RootBuilder.cs
- ProviderCommandInfoUtils.cs
- Timeline.cs
- EnumUnknown.cs
- ClientScriptManagerWrapper.cs
- BaseContextMenu.cs
- DateTimeFormatInfoScanner.cs
- GetPageCompletedEventArgs.cs
- ProcessManager.cs
- FocusManager.cs
- XhtmlConformanceSection.cs
- MetadataItemCollectionFactory.cs
- SecureEnvironment.cs
- As.cs
- AppDomainAttributes.cs
- ProfilePropertySettingsCollection.cs
- TCEAdapterGenerator.cs
- RemotingServices.cs
- TreeNodeStyleCollection.cs
- securitymgrsite.cs
- OAVariantLib.cs
- MenuAutoFormat.cs
- BinaryCommonClasses.cs
- DataListComponentEditor.cs
- SinglePageViewer.cs
- XmlDataSourceNodeDescriptor.cs
- SortFieldComparer.cs
- JapaneseCalendar.cs
- ErrorFormatter.cs
- ConfigurationElement.cs
- WaitHandleCannotBeOpenedException.cs
- RoleGroup.cs
- SQLInt64Storage.cs
- TiffBitmapDecoder.cs
- Converter.cs
- SafeNativeMethodsOther.cs
- EventSinkHelperWriter.cs
- EventInfo.cs
- SerializerDescriptor.cs
- FixedPageAutomationPeer.cs
- SecUtil.cs
- JsonReaderDelegator.cs
- LocalizabilityAttribute.cs
- StringArrayConverter.cs
- ConvertEvent.cs
- CommonXSendMessage.cs
- HttpStreamMessageEncoderFactory.cs
- ListenUriMode.cs
- MemoryRecordBuffer.cs
- SourceChangedEventArgs.cs
- AnimatedTypeHelpers.cs