Activate

ActivateDocument, GetOpenedDocumentList, NextOpenedDocument, PrevOpenedDocument, ShowOpenedDocument

ActivateDocument

Description 

 ActivateDocument(
   char *OpenedDocumentName
);

This function displays a certain document from a list of opened documents.

Parameters

char *OpenedDocumentName

Name of the opened document.

See Also 
PrevOpenedDocument, NextOpenedDocument

GetOpenedDocumentList

Description 

 GetOpenedDocumentList(
   char *OpenedDocumentList,
   int  MaxItems,
   int  MaxPath
);

This function writes the list of opened documents. The list is written to the OpenedDocumentList buffer, each document having length of MaxPath. If MaxItems is lower than number of opened documents, the functions returns the number of documents and list is not filled.

Parameters

char *OpenedDocumentList

Buffer that is filled with the document names. The size of the buffer must be at least MaxItems*MaxPath.

int MaxItems

Capacity of the OpenedDocumentList buffer.

int MaxPath

Size of each item in the OpenedDocumentList.

Return Values

Returns the number of documents written to the buffer. If the number of opened documents is higher than MaxItems, the function fails and returns the required number of items as the negative value.

int num, i;
char docs[6240]; // 24 * MAX_FILE_NAME
num = GetOpenedDocumentList(docs, 24, MAX_FILE_NAME);
if (num < 0)
WaitText(0, "Error occured!");
for (i = 0; i < num; ++i)
{
ActivateDocument(docs + (i * MAX_FILE_NAME));
ComplementColor();
Wait(1.0);
}
NextOpenedDocument

This function runs the Window > Next command.

Description 

 NextOpenedDocument(
   int  OpenedDocument
);

This function displays the opened image previous to the current one in the list of opened documents (Window menu).

Parameters

int OpenedDocument

Index, indicating which document will be displayed.

Note

This function is typically called from the Next command (Window menu).

See Also 
PrevOpenedDocument

PrevOpenedDocument

This function runs the Window > Previous command.

Description 

 PrevOpenedDocument(
   int  OpenedDocument
);

This function displays the opened image next to the current one in the list of opened documents (Window menu).

Parameters

int OpenedDocument

Index, indicating which document will be displayed.

Note

This function is typically called from the Previous command (Window menu).

See Also 
NextOpenedDocument

ShowOpenedDocument

This function runs the Window > [Opened file] command.

Description 

 ShowOpenedDocument(
   int  OpenedDocument
);

This function displays a certain document from a list of opened documents.

Parameters

int OpenedDocument

Index, indicating which document will be displayed.

See Also 
NextOpenedDocument, PrevOpenedDocument, ActivateDocument