ホーム › UI.Accessibility › IUIAutomationTextRange
IUIAutomationTextRange
COMメソッド 18
vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。
vtbl 3 HRESULT Clone(IUIAutomationTextRange** clonedRange)
| clonedRange | IUIAutomationTextRange** | out | このテキスト範囲と同一の複製を受け取るインターフェイスポインタへのポインタである。 |
vtbl 4 HRESULT Compare(IUIAutomationTextRange* range, BOOL* areSame)
| range | IUIAutomationTextRange* | in | 比較対象のテキスト範囲へのポインタである。 |
| areSame | BOOL* | out | 2 つの範囲が同一かどうかを示す論理値を受け取るポインタである。 |
vtbl 5 HRESULT CompareEndpoints(TextPatternRangeEndpoint srcEndPoint, IUIAutomationTextRange* range, TextPatternRangeEndpoint targetEndPoint, INT* compValue)
| srcEndPoint | TextPatternRangeEndpoint | in | 比較元となるこの範囲の端点(開始または終了)を示す TextPatternRangeEndpoint 値を指定する。 |
| range | IUIAutomationTextRange* | in | 比較対象のテキスト範囲へのポインタである。 |
| targetEndPoint | TextPatternRangeEndpoint | in | 比較対象範囲の端点(開始または終了)を示す TextPatternRangeEndpoint 値を指定する。 |
| compValue | INT* | out | 2 つの端点の前後関係を示す値(負・0・正)を受け取るポインタである。 |
| textUnit | TextUnit | in | 範囲を拡張または収縮させる単位(文字・単語・行など)を示す TextUnit 値を指定する。 |
vtbl 7 HRESULT FindAttribute(UIA_TEXTATTRIBUTE_ID attr, VARIANT val, BOOL backward, IUIAutomationTextRange** found)
| attr | UIA_TEXTATTRIBUTE_ID | in | 検索対象のテキスト属性を識別する属性 ID を指定する。 |
| val | VARIANT | in | 一致条件とする属性値を格納した VARIANT である。 |
| backward | BOOL | in | 後方(範囲の末尾から先頭)に向けて検索するかどうかを指定する。 |
| found | IUIAutomationTextRange** | out | 指定属性値を持つ最初の部分範囲を受け取るインターフェイスポインタへのポインタである。見つからない場合は NULL が返る。 |
vtbl 8 HRESULT FindText(LPWSTR text, BOOL backward, BOOL ignoreCase, IUIAutomationTextRange** found)
| text | LPWSTR | in | 検索する文字列を指定する。 |
| backward | BOOL | in | 後方(範囲の末尾から先頭)に向けて検索するかどうかを指定する。 |
| ignoreCase | BOOL | in | 大文字と小文字を区別しないで検索するかどうかを指定する。 |
| found | IUIAutomationTextRange** | out | テキストが見つかった部分範囲を受け取るインターフェイスポインタへのポインタである。見つからない場合は NULL が返る。 |
vtbl 9 HRESULT GetAttributeValue(UIA_TEXTATTRIBUTE_ID attr, VARIANT* value)
| attr | UIA_TEXTATTRIBUTE_ID | in | 値を取得するテキスト属性を識別する属性 ID を指定する。 |
| value | VARIANT* | out | 取得した属性値を格納する VARIANT へのポインタである。 |
| boundingRects | SAFEARRAY** | out | 範囲の各行の外接矩形(left, top, width, height の並び)を格納した SAFEARRAY を受け取るポインタへのポインタである。 |
vtbl 11 HRESULT GetEnclosingElement(IUIAutomationElement** enclosingElement)
| enclosingElement | IUIAutomationElement** | out | このテキスト範囲を内包する最も内側の要素を受け取るインターフェイスポインタへのポインタである。 |
| maxLength | INT | in | 取得する最大文字数を指定する。-1 を指定すると範囲内の全テキストを取得する。 |
| text | LPWSTR* | out | 取得したテキスト文字列を受け取る文字列ポインタへのポインタである。 |
| unit | TextUnit | in | 範囲を移動させる単位を示す TextUnit 値を指定する。 |
| count | INT | in | 移動する単位数を指定する。負の値で後方へ移動する。 |
| moved | INT* | out | 実際に移動した単位数を受け取るポインタである。 |
vtbl 14 HRESULT MoveEndpointByUnit(TextPatternRangeEndpoint endpoint, TextUnit unit, INT count, INT* moved)
| endpoint | TextPatternRangeEndpoint | in | 移動させる端点(開始または終了)を示す TextPatternRangeEndpoint 値を指定する。 |
| unit | TextUnit | in | 端点を移動させる単位を示す TextUnit 値を指定する。 |
| count | INT | in | 移動する単位数を指定する。負の値で後方へ移動する。 |
| moved | INT* | out | 実際に移動した単位数を受け取るポインタである。 |
vtbl 15 HRESULT MoveEndpointByRange(TextPatternRangeEndpoint srcEndPoint, IUIAutomationTextRange* range, TextPatternRangeEndpoint targetEndPoint)
| srcEndPoint | TextPatternRangeEndpoint | in | 移動させるこの範囲の端点(開始または終了)を示す TextPatternRangeEndpoint 値を指定する。 |
| range | IUIAutomationTextRange* | in | 移動先の基準となるテキスト範囲へのポインタである。 |
| targetEndPoint | TextPatternRangeEndpoint | in | 移動先の基準範囲のどの端点に合わせるかを示す TextPatternRangeEndpoint 値を指定する。 |
vtbl 16 HRESULT Select()
vtbl 17 HRESULT AddToSelection()
vtbl 18 HRESULT RemoveFromSelection()
| alignToTop | BOOL | in | 範囲を表示領域の上端に揃えるか(TRUE)、下端に揃えるか(FALSE)を指定する。 |
vtbl 20 HRESULT GetChildren(IUIAutomationElementArray** children)
| children | IUIAutomationElementArray** | out | このテキスト範囲に含まれる子要素の集合を受け取る IUIAutomationElementArray へのポインタへのポインタである。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IUIAutomationTextRange "{A543CC6A-F4AE-494B-8239-C814481187A8}" #usecom global IUIAutomationTextRange IID_IUIAutomationTextRange "{}" #comfunc global IUIAutomationTextRange_Clone 3 sptr #comfunc global IUIAutomationTextRange_Compare 4 sptr,var #comfunc global IUIAutomationTextRange_CompareEndpoints 5 int,sptr,int,var #comfunc global IUIAutomationTextRange_ExpandToEnclosingUnit 6 int #comfunc global IUIAutomationTextRange_FindAttribute 7 int,int,int,sptr #comfunc global IUIAutomationTextRange_FindText 8 wstr,int,int,sptr #comfunc global IUIAutomationTextRange_GetAttributeValue 9 int,var #comfunc global IUIAutomationTextRange_GetBoundingRectangles 10 var #comfunc global IUIAutomationTextRange_GetEnclosingElement 11 sptr #comfunc global IUIAutomationTextRange_GetText 12 int,var #comfunc global IUIAutomationTextRange_Move 13 int,int,var #comfunc global IUIAutomationTextRange_MoveEndpointByUnit 14 int,int,int,var #comfunc global IUIAutomationTextRange_MoveEndpointByRange 15 int,sptr,int #comfunc global IUIAutomationTextRange_Select 16 #comfunc global IUIAutomationTextRange_AddToSelection 17 #comfunc global IUIAutomationTextRange_RemoveFromSelection 18 #comfunc global IUIAutomationTextRange_ScrollIntoView 19 int #comfunc global IUIAutomationTextRange_GetChildren 20 sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。#define global IID_IUIAutomationTextRange "{A543CC6A-F4AE-494B-8239-C814481187A8}" #usecom global IUIAutomationTextRange IID_IUIAutomationTextRange "{}" #comfunc global IUIAutomationTextRange_Clone 3 sptr #comfunc global IUIAutomationTextRange_Compare 4 sptr,sptr #comfunc global IUIAutomationTextRange_CompareEndpoints 5 int,sptr,int,sptr #comfunc global IUIAutomationTextRange_ExpandToEnclosingUnit 6 int #comfunc global IUIAutomationTextRange_FindAttribute 7 int,int,int,sptr #comfunc global IUIAutomationTextRange_FindText 8 wstr,int,int,sptr #comfunc global IUIAutomationTextRange_GetAttributeValue 9 int,sptr #comfunc global IUIAutomationTextRange_GetBoundingRectangles 10 sptr #comfunc global IUIAutomationTextRange_GetEnclosingElement 11 sptr #comfunc global IUIAutomationTextRange_GetText 12 int,sptr #comfunc global IUIAutomationTextRange_Move 13 int,int,sptr #comfunc global IUIAutomationTextRange_MoveEndpointByUnit 14 int,int,int,sptr #comfunc global IUIAutomationTextRange_MoveEndpointByRange 15 int,sptr,int #comfunc global IUIAutomationTextRange_Select 16 #comfunc global IUIAutomationTextRange_AddToSelection 17 #comfunc global IUIAutomationTextRange_RemoveFromSelection 18 #comfunc global IUIAutomationTextRange_ScrollIntoView 19 int #comfunc global IUIAutomationTextRange_GetChildren 20 sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。