AccessibleStates 열거형

정의

액세스 가능 개체에 사용할 수 있는 상태를 나타내는 값을 지정합니다.

이 열거형은 멤버 값의 비트 조합을 지원합니다.

public enum class AccessibleStates
[System.Flags]
public enum AccessibleStates
[<System.Flags>]
type AccessibleStates = 
Public Enum AccessibleStates
상속
AccessibleStates
특성

필드

AlertHigh 268435456

사용자에게 즉시 통보되어야 할 중요한 정보입니다. 예를 들어, 배터리가 소모되어 위험한 상태가 되면 배터리 수준 표시기가 이 상태로 변경될 수 있습니다. 이 경우, 시각 장애인용 유틸리티는 해당 정보를 사용자에게 즉시 알릴 수 있으며 화면 확대 프로그램에서 화면을 스크롤하여 배터리 표시기를 표시할 수 있습니다. 이 상태는 사용자가 계속하기 전에 완료되어야 하는 프롬프트나 작업에도 적합합니다.

AlertLow 67108864

사용자에게 중요하지 않을 수 있는 우선 순위가 낮은 정보입니다.

AlertMedium 134217728

사용자에게 즉시 전달될 필요가 없는 중요한 정보입니다. 예를 들어, 배터리 수준 표시기가 낮은 수준에 도달하기 시작하면 중간 수준의 경고가 발생될 수 있습니다. 시각 장애인용 유틸리티는 소리를 내 중요한 정보가 있다는 것을 알릴 수 있지만 실제로 사용자의 작업을 방해하지는 않습니다. 따라서 사용자는 선택한 시간에 경고 정보를 확인할 수 있습니다.

Animated 16384

모양이 빠르게 변경되거나 계속 변경되는 개체입니다. 경우에 따라 애니메이션되는 그래픽은 GraphicORAnimated로 정의되어야 합니다. 개체의 위치가 변경된다는 것을 나타내는 데 이 상태를 사용해서는 안 됩니다.

Busy 2048

현재 상태에서 입력을 받을 수 없는 컨트롤입니다.

Checked 16

선택된 상태의 확인란이 있는 개체입니다.

Collapsed 1024

개요 구조 또는 트리 구조에서 항목인 개체의 숨겨진 자식입니다.

Default 256

기본 단추 또는 메뉴 항목입니다.

Expanded 512

개요 구조 또는 트리 구조에서 항목인 개체의 표시된 자식입니다.

ExtSelectable 33554432

키보드 포커스가 있는 개체인 선택 앵커와 이 개체 사이의 모든 개체의 선택 상태는 앵커 개체의 선택 상태를 따릅니다. 앵커 개체가 선택되어 있지 않으면 모든 개체가 선택에서 제거되지만 앵커 개체가 선택되어 있으면 이 개체를 포함한 사이에 있는 모든 개체가 선택됩니다. 이 개체와 AddSelection 또는 RemoveSelection을 함께 사용하여 선택 상태를 설정할 수 있습니다. TakeFocus를 함께 사용하지 않는 한 이 상태로 인해 포커스나 앵커가 변경되지는 않습니다.

Floating 4096

부모 개체의 경계에 고정되지 않고 자동으로 부모 개체를 따라 이동되지 않는 개체입니다.

Focusable 1048576

키보드 포커스를 받을 수 있는 활성 창의 개체입니다.

Focused 4

키보드 포커스가 있는 개체입니다.

HasPopup 1073741824

개체를 호출하면 팝업 메뉴 또는 팝업 창이 표시됩니다.

HotTracked 128

마우스 포인터가 개체 위에 있으면 개체가 강조 표시되어 마우스에 즉시 반응하는 개체입니다.

Indeterminate 32

상태를 결정할 수 없는 3상 확인란 또는 도구 모음 단추입니다. 확인란은 선택되거나 선택되지 않은 상태가 아니며 제 3의 상태이거나 혼합된 상태입니다.

Invisible 32768

사용자에게 보이는 인터페이스가 없는 개체입니다.

Linked 4194304

선택된 적이 없는 링크된 개체입니다.

Marqueed 8192

스크롤되거나 이동하는 텍스트나 그래픽이 있는 개체입니다.

Mixed 32

상태를 결정할 수 없는 3상 확인란 또는 도구 모음 단추입니다. 확인란은 선택되거나 선택되지 않은 상태가 아니며 제 3의 상태이거나 혼합된 상태입니다.

Moveable 262144

이동할 수 있는 개체입니다.

MultiSelectable 16777216

선택된 여러 항목을 적용할 수 있는 개체입니다.

None 0

상태가 없습니다.

Offscreen 65536

화면 표시가 없습니다. 사운드 개체나 경고 개체 또는 표시될 수 없는 숨겨진 창이 이 상태가 될 수 있습니다.

Pressed 8

눌려진 개체입니다.

Protected 536870912

암호로 보호된 edit 컨트롤입니다.

ReadOnly 64

읽기 전용 개체입니다.

Selectable 2097152

선택할 수 있는 개체입니다.

Selected 2

선택된 개체입니다.

SelfVoicing 524288

텍스트 음성 변환(TTS)을 사용하여 자신을 설명할 수 있는 개체나 자식 개체입니다. 이런 상태의 개체에 포커스가 있으면 개체가 자동으로 정보를 알리기 때문에 내게 필요한 옵션의 음성 기반 보조 기능에서 정보를 알려서는 안됩니다.

Sizeable 131072

크기를 조정할 수 있는 개체입니다.

Traversed 8388608

선택된 적이 있는 링크된 개체입니다.

Unavailable 1

사용할 수 없는 개체입니다.

Valid 1073741823

올바른 개체입니다. 이 속성은 .NET Framework 2.0에서 더 이상 사용되지 않습니다.

예제

다음 코드 예제에서는 내게 필요한 옵션 인식 차트를 만드는 방법을 보여 줍니다 컨트롤을 사용 하 여 AccessibleObjectControl.ControlAccessibleObject 액세스할 수 있는 정보를 노출 하는 클래스입니다. 컨트롤은 범례를 따라 두 곡선을 그립니다. 합니다 ChartControlAccessibleObject 클래스에서 파생 되는 ControlAccessibleObject에 사용 되는 CreateAccessibilityInstance 차트 컨트롤에 대 한 사용자 지정 액세스할 수 있는 정보를 제공 하는 방법입니다. 차트 범례는 기반으로 하는 실제 컨트롤이 아니라 차트 컨트롤 Control에 의해 그려지므로 기본 제공 액세스 가능한 정보가 포함되지 않습니다. 이 인해 합니다 ChartControlAccessibleObject 재정의 클래스를 GetChild 반환 하는 방법은 CurveLegendAccessibleObject 범례의 각 부분에 액세스할 수 있는 정보를 나타내는입니다. 인식 액세스할 수 있는 애플리케이션에서이 컨트롤을 사용 하는 경우 컨트롤이 필요한 액세스할 수 있는 정보를 제공할 수 있습니다.

이 코드 발췌에서는 속성과 AccessibleStates 함께 열거형을 사용하는 방법을 보여 줍니다 State . 참조 된 AccessibleObject 전체 코드 예제에 대 한 클래스 개요입니다.

// Inner class ChartControlAccessibleObject represents accessible information associated with the ChartControl.
// The ChartControlAccessibleObject is returned in the ChartControl::CreateAccessibilityInstance .
ref class ChartControlAccessibleObject: public ControlAccessibleObject
{
private:
   ChartControl^ chartControl;

public:
   ChartControlAccessibleObject( ChartControl^ ctrl )
      : ControlAccessibleObject( ctrl )
   {
      chartControl = ctrl;
   }


   property System::Windows::Forms::AccessibleRole Role 
   {

      // Gets the role for the Chart. This is used by accessibility programs.
      virtual System::Windows::Forms::AccessibleRole get() override
      {
         return ::AccessibleRole::Chart;
      }

   }

   property AccessibleStates State 
   {

      // Gets the state for the Chart. This is used by accessibility programs.
      virtual AccessibleStates get() override
      {
         return AccessibleStates::ReadOnly;
      }

   }

   // The CurveLegend objects are "child" controls in terms of accessibility so
   // return the number of ChartLengend objects.
   virtual int GetChildCount() override
   {
      return chartControl->Legends->Length;
   }


   // Gets the Accessibility object of the child CurveLegend idetified by index.
   virtual AccessibleObject^ GetChild( int index ) override
   {
      if ( index >= 0 && index < chartControl->Legends->Length )
      {
         return chartControl->Legends[ index ]->AccessibilityObject;
      }

      return nullptr;
   }


internal:

   // Helper function that is used by the CurveLegend's accessibility object
   // to navigate between sibiling controls. Specifically, this function is used in
   // the CurveLegend::CurveLegendAccessibleObject.Navigate function.
   AccessibleObject^ NavigateFromChild( CurveLegend::CurveLegendAccessibleObject^ child, AccessibleNavigation navdir )
   {
      switch ( navdir )
      {
         case AccessibleNavigation::Down:
         case AccessibleNavigation::Next:
            return GetChild( child->ID + 1 );

         case AccessibleNavigation::Up:
         case AccessibleNavigation::Previous:
            return GetChild( child->ID - 1 );
      }
      return nullptr;
   }


   // Helper function that is used by the CurveLegend's accessibility object
   // to select a specific CurveLegend control. Specifically, this function is used
   // in the CurveLegend::CurveLegendAccessibleObject.Select function.
   void SelectChild( CurveLegend::CurveLegendAccessibleObject^ child, AccessibleSelection selection )
   {
      int childID = child->ID;
      
      // Determine which selection action should occur, based on the
      // AccessibleSelection value.
      if ( (selection & AccessibleSelection::TakeSelection) != (AccessibleSelection)0 )
      {
         for ( int i = 0; i < chartControl->Legends->Length; i++ )
         {
            if ( i == childID )
            {
               chartControl->Legends[ i ]->Selected = true;
            }
            else
            {
               chartControl->Legends[ i ]->Selected = false;
            }

         }
         
         // AccessibleSelection->AddSelection means that the CurveLegend will be selected.
         if ( (selection & AccessibleSelection::AddSelection) != (AccessibleSelection)0 )
         {
            chartControl->Legends[ childID ]->Selected = true;
         }
         
         // AccessibleSelection->AddSelection means that the CurveLegend will be unselected.
         if ( (selection & AccessibleSelection::RemoveSelection) != (AccessibleSelection)0 )
         {
            chartControl->Legends[ childID ]->Selected = false;
         }
      }
   }

};

// class ChartControlAccessibleObject
// Inner class ChartControlAccessibleObject represents accessible information associated with the ChartControl.
// The ChartControlAccessibleObject is returned in the ChartControl.CreateAccessibilityInstance override.
public class ChartControlAccessibleObject : ControlAccessibleObject
{
    ChartControl chartControl;

    public ChartControlAccessibleObject(ChartControl ctrl) : base(ctrl) 
    {
        chartControl = ctrl;
    }

    // Gets the role for the Chart. This is used by accessibility programs.
    public override AccessibleRole Role
    {  
        get {
            return AccessibleRole.Chart;
        }
    }

    // Gets the state for the Chart. This is used by accessibility programs.
    public override AccessibleStates State
    {  
        get {                    
            return AccessibleStates.ReadOnly;
        }
    }

    // The CurveLegend objects are "child" controls in terms of accessibility so 
    // return the number of ChartLengend objects.
    public override int GetChildCount()
    {  
        return chartControl.Legends.Length;
    }

    // Gets the Accessibility object of the child CurveLegend idetified by index.
    public override AccessibleObject GetChild(int index)
    {  
        if (index >= 0 && index < chartControl.Legends.Length) {
            return chartControl.Legends[index].AccessibilityObject;
        }                
        return null;
    }

    // Helper function that is used by the CurveLegend's accessibility object
    // to navigate between sibiling controls. Specifically, this function is used in
    // the CurveLegend.CurveLegendAccessibleObject.Navigate function.
    internal AccessibleObject NavigateFromChild(CurveLegend.CurveLegendAccessibleObject child, 
                                                AccessibleNavigation navdir) 
    {  
        switch(navdir) {
            case AccessibleNavigation.Down:
            case AccessibleNavigation.Next:
                return GetChild(child.ID + 1);
                
            case AccessibleNavigation.Up:
            case AccessibleNavigation.Previous:
                return GetChild(child.ID - 1);                        
        }
        return null;
    }

    // Helper function that is used by the CurveLegend's accessibility object
    // to select a specific CurveLegend control. Specifically, this function is used
    // in the CurveLegend.CurveLegendAccessibleObject.Select function.
    internal void SelectChild(CurveLegend.CurveLegendAccessibleObject child, AccessibleSelection selection) 
    {   
        int childID = child.ID;

        // Determine which selection action should occur, based on the
        // AccessibleSelection value.
        if ((selection & AccessibleSelection.TakeSelection) != 0) {
            for(int i = 0; i < chartControl.Legends.Length; i++) {
                if (i == childID) {
                    chartControl.Legends[i].Selected = true;                        
                } else {
                    chartControl.Legends[i].Selected = false;
                }
            }

            // AccessibleSelection.AddSelection means that the CurveLegend will be selected.
            if ((selection & AccessibleSelection.AddSelection) != 0) {
                chartControl.Legends[childID].Selected = true;                        
            }

            // AccessibleSelection.AddSelection means that the CurveLegend will be unselected.
            if ((selection & AccessibleSelection.RemoveSelection) != 0) {
                chartControl.Legends[childID].Selected = false;                        
            }
        }            
    }
}
' Inner Class ChartControlAccessibleObject represents accessible information 
' associated with the ChartControl.
' The ChartControlAccessibleObject is returned in the         ' ChartControl.CreateAccessibilityInstance override.
Public Class ChartControlAccessibleObject
    Inherits Control.ControlAccessibleObject

    Private chartControl As ChartControl
    
    Public Sub New(ctrl As ChartControl)
        MyBase.New(ctrl)
        chartControl = ctrl
    End Sub
    
    ' Get the role for the Chart. This is used by accessibility programs.            
    Public Overrides ReadOnly Property Role() As AccessibleRole
        Get
            Return System.Windows.Forms.AccessibleRole.Chart
        End Get
    End Property
    
    ' Get the state for the Chart. This is used by accessibility programs.            
    Public Overrides ReadOnly Property State() As AccessibleStates
        Get
            Return AccessibleStates.ReadOnly
        End Get
    End Property                        
    
    ' The CurveLegend objects are "child" controls in terms of accessibility so 
    ' return the number of ChartLengend objects.            
    Public Overrides Function GetChildCount() As Integer
        Return chartControl.Legends.Length
    End Function 
    
    ' Get the Accessibility object of the child CurveLegend idetified by index.
    Public Overrides Function GetChild(index As Integer) As AccessibleObject
        If index >= 0 And index < chartControl.Legends.Length Then
            Return chartControl.Legends(index).AccessibilityObject
        End If
        Return Nothing
    End Function 
    
    ' Helper function that is used by the CurveLegend's accessibility object
    ' to navigate between sibiling controls. Specifically, this function is used in
    ' the CurveLegend.CurveLegendAccessibleObject.Navigate function.
    Friend Function NavigateFromChild(child As CurveLegend.CurveLegendAccessibleObject, _
                                    navdir As AccessibleNavigation) As AccessibleObject
        Select Case navdir
            Case AccessibleNavigation.Down, AccessibleNavigation.Next
                    Return GetChild(child.ID + 1)
            
            Case AccessibleNavigation.Up, AccessibleNavigation.Previous
                    Return GetChild(child.ID - 1)
        End Select
        Return Nothing
    End Function            

    ' Helper function that is used by the CurveLegend's accessibility object
    ' to select a specific CurveLegend control. Specifically, this function is used 
    ' in the CurveLegend.CurveLegendAccessibleObject.Select function.            
    Friend Sub SelectChild(child As CurveLegend.CurveLegendAccessibleObject, selection As AccessibleSelection)
        Dim childID As Integer = child.ID
        
        ' Determine which selection action should occur, based on the
        ' AccessibleSelection value.
        If (selection And AccessibleSelection.TakeSelection) <> 0 Then
            Dim i As Integer
            For i = 0 To chartControl.Legends.Length - 1
                If i = childID Then
                    chartControl.Legends(i).Selected = True
                Else
                    chartControl.Legends(i).Selected = False
                End If
            Next i
            
            ' AccessibleSelection.AddSelection means that the CurveLegend will be selected.
            If (selection And AccessibleSelection.AddSelection) <> 0 Then
                chartControl.Legends(childID).Selected = True
            End If

            ' AccessibleSelection.AddSelection means that the CurveLegend will be unselected.                    
            If (selection And AccessibleSelection.RemoveSelection) <> 0 Then
                chartControl.Legends(childID).Selected = False
            End If
        End If
    End Sub
End Class

설명

액세스 가능한 개체는 이러한 상태 중 하나 이상과 연결할 수 있습니다.

적용 대상

추가 정보