メインコンテンツへスキップ

Documentation Index

Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt

Use this file to discover all available pages before exploring further.

Visual Components は、Windows 版 FRE に実装されています。
Component Synchronizer は、Visual Components で発生するさまざまなイベントに自動的に応答する特別なコンポーネントです。複数の Visual Components を Synchronizer に接続すると、それらを 1 つのアプリケーションとして動作させることができます。 接続されているコンポーネントすべてを Component Synchronizer で使用する必要はなく、必要なものだけを接続できます。たとえば、Image Viewer は ImageViewer プロパティを介して、Text Editor は TextEditor プロパティを介して接続できます。 Component Synchronizer にはユーザーインターフェイスがありません。また、Visual Components の内部機能は使用せず、各コンポーネントの COM API のみを使用します。Component Synchronizer は以下のように動作します。

コンポーネントがAPIを通じてSynchronizerに接続されている場合

コンポーネントまたはオブジェクトがComponent Synchronizerに接続されている場合:
この場合、IComponentSynchronizer::ImageViewer propertyに指定の ImageViewer オブジェクトが設定され、続いて以下の操作が実行されます:
property設定値
True
IComponentSynchronizer::Document 内で IComponentSynchronizer::PageIndex インデックスに対応するページ
この場合、IComponentSynchronizer::ZoomViewer propertyに指定の ZoomViewer オブジェクトが設定され、続いて以下の操作が実行されます:
property設定値
True
IComponentSynchronizer::Document 内で IComponentSynchronizer::PageIndex インデックスに対応するページ
この場合、IComponentSynchronizer::TextEditor propertyに指定の TextEditor オブジェクトが設定され、続いて以下の操作が実行されます:
property設定値
SynthesisParamsForDocument propertyの値 ( IComponentSynchronizer::DocumentProcessingParams オブジェクト)
IComponentSynchronizer::Document 内で IComponentSynchronizer::PageIndex インデックスに対応するページ
この場合、IComponentSynchronizer::TextValidator propertyに指定の TextValidator オブジェクトが設定され、続いて以下の操作が実行されます:
property設定値
SynthesisParamsForDocument propertyの値 ( IComponentSynchronizer::DocumentProcessingParams オブジェクト)
In this case, the IComponentSynchronizer::DocumentViewer property is set to the specified DocumentViewer object, and then the following operations are performed:
The propertyIs set to
The ページ in the IComponentSynchronizer::Document with the IComponentSynchronizer::PageIndex index
In this case, the IComponentSynchronizer::Document property is set to the specified FRDocument object, and then the following operations are performed:
The propertyIs set to



The first ページ in the IComponentSynchronizer::Document
0

In this case, the IComponentSynchronizer::DocumentProcessingParams property is set to the specified DocumentProcessingParams object, and then the following operations are performed:
The propertyIs set to



The value of the SynthesisParamsForDocument property of the IComponentSynchronizer::DocumentProcessingParams object
In this case, the IComponentSynchronizer::PageIndex property is set to the specified value, and then the following operations are performed:
The propertyIs set to



The ページ in the IComponentSynchronizer::Document with the IComponentSynchronizer::PageIndex index

接続されたコンポーネントがイベントを発生させた場合

接続された Image Viewer のイベント:
Image Viewer で OnMouseButtonUp イベントが発生すると、Component Synchronizer は次の操作を実行します。
if( mouseButton == MBU_LeftButton && ZoomViewer != 0 ) {
 int documentX = 0;
 int documentY = 0;
 ImageViewer->ScreenToDocument( x, y, &documentX, &documentY );
 ZoomViewer->CenterOnDocumentPoint( documentX, documentY );
}
Image Viewer で OnBlockSelectionChanged イベントが発生すると、Component Synchronizer は次の操作を実行します。
if( selected == VARIANT_TRUE ) {
 if( textEditor != 0 ) {
  textEditor->ShowBlock( blockIndex, NotFound );
 }
}
Image Viewer で OnTableCellsSelected イベントが発生すると、Component Synchronizer は選択されたブロックのインデックスと右下のセルのインデックスを指定して、TextEditor オブジェクトの ShowBlock メソッドを呼び出します。
Image Viewer で OnAfterDblClick イベントが発生すると、Component Synchronizer は次の操作を実行します。
if( textEditor != 0 ) {
 textEditor->ActivateOn( blockIndex, x, y );
}
Image Viewer で OnActivePageChanged イベントが発生し、ComponentSynchronizer オブジェクトの ZoomViewer、TextEditor、DocumentViewer の各プロパティがすでに設定されている場合、対応するコンポーネントの FRPage または ActivePage プロパティが、文書の指定されたページに設定されます。
Image Viewer で OnSelectTool イベントが発生すると、Component Synchronizer は次の操作を実行します。
if( ZoomViewer == 0 ) {
 return;
}
IFRPagePtr curPage;
ZoomViewer->get_FRPage( &curPage );
if( curPage != 0 ) {
 ZoomViewer->put_ActiveTool( selectedTool );
}
Image Viewer で OnOptionsChanged イベントが発生し、ComponentSynchronizer オブジェクトの ZoomViewer、DocumentViewer、TextEditor、TextValidator の各プロパティがすでに設定されている場合、ZoomViewer、DocumentViewer、TextEditor、TextValidator の各オブジェクトの UpdateOptions メソッドが呼び出されます。
接続された Zoom Viewer のイベント:
Zoom Viewer で OnVisibleDocumentAreaChange イベントが発生すると、Component Synchronizer は次の操作を実行します。
if( ImageViewer != 0 ) {
 ImageViewer->put_ZoomRect( visibleRect );
 if( isInFocus ) {
  ImageViewer->ShowDocumentArea( visibleRect );
 }
}
Zoom Viewer で OnBlockSelectionChanged イベントが発生すると、Component Synchronizer は次の操作を実行します。
if( selected == VARIANT_TRUE ) {
 if( textEditor != 0 ) {
  textEditor->ShowBlock( blockIndex, NotFound );
 }
}
Zoom Viewer で OnTableCellsSelected イベントが発生すると、Component Synchronizer は選択されたブロックのインデックスと右下のセルのインデックスを指定して、TextEditor オブジェクトの ShowBlock メソッドを呼び出します。
Zoom Viewer が OnAfterDblClick イベントを発生させると、Component Synchronizer は次の処理を実行します。
if( textEditor != 0 ) {
 textEditor->ActivateOn( blockIndex, x, y );
}
Zoom Viewer が OnActivePageChanged イベントを発生させ、かつ ComponentSynchronizer object の ImageViewer、TextEditor、DocumentViewer プロパティがすでに設定されている場合、対応する component の FRPage または ActivePage プロパティが、Document の指定されたページに設定されます。
Zoom Viewer が OnSelectTool イベントを発生させると、Component Synchronizer は次の処理を実行します。
if( ImageViewer == 0 ) {
 return;
}
IFRPagePtr curPage;
ImageViewer->get_FRPage( &curPage );
if( curPage != 0 ) {
 ImageViewer->put_ActiveTool( selectedTool );
}
Zoom Viewer が OnOptionsChanged イベントを発生させ、かつ ComponentSynchronizer object の ImageViewer、DocumentViewer、TextEditor、TextValidator プロパティがすでに設定されている場合、ImageViewer、DocumentViewer、TextEditor、TextValidator objects の UpdateOptions メソッドが呼び出されます。
接続された Document Viewer のイベント:
Document Viewer が OnActivePageChanged イベントを発生させ、かつ ComponentSynchronizer object の ImageViewer、ZoomViewer、TextEditor プロパティがすでに設定されている場合、対応する component の FRPage プロパティが、Document の指定されたページに設定されます。
Document Viewer が OnDocumentChanged イベントを発生させ、かつ ComponentSynchronizer object の ImageViewer、ZoomViewer、TextEditor、TextValidator プロパティがすでに設定されている場合:
  • TextValidator object の FRDocument プロパティが新しい Document に設定されます
  • ImageViewer、ZoomViewer、TextEditor objects の FRPage プロパティと DocumentViewer object の ActivePage プロパティが、新しい Document の最初のページに設定されます
Document Viewer が OnOptionsChanged イベントを発生させ、かつ ComponentSynchronizer object の ImageViewer、ZoomViewer、TextEditor、TextValidator プロパティがすでに設定されている場合、ImageViewer、ZoomViewer、TextEditor、TextValidator objects の UpdateOptions メソッドが呼び出されます。
接続された Text Editor のイベント:
Text Editor が OnEditorBlockChanged イベントを発生させると、ComponentSynchronizer は次の処理を実行します。
  1. ComponentSynchronizer object の ImageViewer、ZoomViewer プロパティがすでに設定されている場合、指定された block に対して、ImageViewer object と ZoomViewer object の SetSelectedBlocksIndices メソッドが呼び出されます。
  2. それがテーブルブロックの場合、選択されたセルに対して、ImageViewer object と ZoomViewer object の SetSelectedCells メソッドが呼び出されます。
  3. 次に、ImageViewer object と ZoomViewer object の ShowDocumentArea メソッドが呼び出されます。
Text Editor が OnSymbolSelected イベントを発生させると、Component Synchronizer は次の処理を実行します。
if( ZoomViewer != 0 ) {
 ZoomViewer->put_SymbolRect( symbolRect );
}
if( ImageViewer != 0 ) {
 ImageViewer->ShowDocumentArea( symbolRect );
}
if( ZoomViewer != 0 ) {
 ZoomViewer->ShowDocumentArea( symbolRect );
}
Text Editor で OnActivePageChanged イベントが発生し、Component Synchronizer オブジェクトの ImageViewer、ZoomViewer、DocumentViewer の各プロパティがすでに設定されている場合、対応するコンポーネントの FRPage または ActivePage プロパティが、文書内の指定されたページに設定されます。
Text Editor で OnOptionsChanged イベントが発生し、Component Synchronizer オブジェクトの ImageViewer、ZoomViewer、DocumentViewer、TextValidator の各プロパティがすでに設定されている場合、ImageViewer、ZoomViewer、DocumentViewer、TextValidator オブジェクトの UpdateOptions メソッドが呼び出されます。
接続されている Text Validator のイベント:
Text Validator で OnSymbolSelected イベントが発生すると、Component Synchronizer は次の処理を実行します:
if( ZoomViewer != 0 ) {
 ZoomViewer->put_SymbolRect( symbolRectangle );
}
Text Validator で OnSelectionChanged イベントが発生すると、Component Synchronizer は次の処理を実行します:
int symbolPos;
IEditorPosition* nextPosition;
position->get_Symbol( &symbolPos );
nextPosition->put_Symbol( symbolPos + length );
if( textEditor != 0 ) {
 textEditor->SetSelection( position, nextPosition );
}
Text Validator で OnActivePageChanged イベントが発生し、Component Synchronizer オブジェクトの ImageViewer、ZoomViewer、TextEditor、DocumentViewer の各プロパティがすでに設定されている場合、対応するコンポーネントの FRPage または ActivePage プロパティが、文書内の指定されたページに設定されます。
Text Validator で OnDocumentChanged イベントが発生し、Component Synchronizer オブジェクトの ImageViewer、ZoomViewer、TextEditor、DocumentViewer の各プロパティがすでに設定されている場合:
  • DocumentViewer オブジェクトの FRDocument プロパティが新しい文書に設定されます
  • ImageViewer、ZoomViewer、TextEditor オブジェクトの FRPage プロパティと、DocumentViewer オブジェクトの ActivePage プロパティが、新しい文書の最初のページに設定されます。
Text Validator で OnOptionsChanged イベントが発生し、Component Synchronizer オブジェクトの ImageViewer、ZoomViewer、TextEditor、DocumentViewer の各プロパティがすでに設定されている場合、ImageViewer、ZoomViewer、TextEditor、DocumentViewer オブジェクトの UpdateOptions メソッドが呼び出されます。

関連項目

ComponentSynchronizer