The Labs \ Source Viewer \ SSCLI \ System.ComponentModel.Design \ ISelectionService

  1. //------------------------------------------------------------------------------
  2. // <copyright file="ISelectionService.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. /*
  16. */
  17. namespace System.ComponentModel.Design
  18. {
  19.     using System.Diagnostics;
  20.     using System;
  21.     using System.Collections;
  22.     using System.ComponentModel;
  23.     using Microsoft.Win32;
  24.    
  25.     /// <devdoc>
  26.     /// <para>
  27.     /// Provides an interface for a designer to select components.
  28.     /// </para>
  29.     /// </devdoc>
  30.     [System.Runtime.InteropServices.ComVisible(true)]
  31.     public interface ISelectionService
  32.     {
  33.        
  34.         /// <devdoc>
  35.         /// <para>
  36.         /// Gets the object that is currently the primary selection.
  37.         /// </para>
  38.         /// </devdoc>
  39.         object PrimarySelection {
  40.             get;
  41.         }
  42.        
  43.         /// <devdoc>
  44.         /// <para>
  45.         /// Gets the count of selected objects.
  46.         /// </para>
  47.         /// </devdoc>
  48.         int SelectionCount {
  49.             get;
  50.         }
  51.        
  52.         /// <devdoc>
  53.         /// <para>
  54.         /// Adds a <see cref='System.ComponentModel.Design.ISelectionService.SelectionChanged'/> event handler to the selection service.
  55.         /// </para>
  56.         /// </devdoc>
  57.         event EventHandler SelectionChanged;
  58.        
  59.         /// <devdoc>
  60.         /// <para>
  61.         /// Adds an event handler to the selection service.
  62.         /// </para>
  63.         /// </devdoc>
  64.         event EventHandler SelectionChanging;
  65.        
  66.         /// <devdoc>
  67.         /// <para>Gets a value indicating whether the component is currently selected.</para>
  68.         /// </devdoc>
  69.        
  70.         bool GetComponentSelected(object component);
  71.        
  72.         /// <devdoc>
  73.         /// <para>
  74.         /// Gets a collection of components that are currently part of the user's selection.
  75.         /// </para>
  76.         /// </devdoc>
  77.         ICollection GetSelectedComponents();
  78.        
  79.         /// <devdoc>
  80.         /// <para>
  81.         /// Sets the currently selected set of components.
  82.         /// </para>
  83.         /// </devdoc>
  84.         void SetSelectedComponents(ICollection components);
  85.        
  86.         /// <devdoc>
  87.         /// <para>
  88.         /// Sets the currently selected set of components to those with the specified selection type within the specified array of components.
  89.         /// </para>
  90.         /// </devdoc>
  91.         void SetSelectedComponents(ICollection components, SelectionTypes selectionType);
  92.     }
  93. }

Developer Fusion