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

パスワードで保護されているエディット コントロール。

ReadOnly 64

読み取り専用オブジェクト。

Selectable 2097152

選択を受け付けることのできるオブジェクト。

Selected 2

選択されているオブジェクト。

SelfVoicing 524288

オブジェクトまたは子が、TTS (text-to-speech) を使用して、それ自体の情報を音声通知します。 この状態のオブジェクトがフォーカスを取得したときは、それ自体がオブジェクト情報を自動的に音声通知します。そのため、音声ベースのユーザー補助機能は、この情報を通知する必要がありません。

Sizeable 131072

サイズ変更が可能なオブジェクト。

Traversed 8388608

以前に選択されたことのあるリンク オブジェクト。

Unavailable 1

利用できないオブジェクト。

Valid 1073741823

有効なオブジェクト。 このプロパティは、.NET Framework 2.0 では非推奨です。

次のコード例は、アクセシビリティ対応のグラフ コントロールを作成し、クラスをControl.ControlAccessibleObject使用してAccessibleObjectアクセシビリティ対応の情報を公開する方法を示しています。 コントロールは、凡例と共に 2 つの曲線をプロットします。 この 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

注釈

アクセス可能なオブジェクトは、これらの状態の 1 つ以上に関連付けることができます。

適用対象

こちらもご覧ください