All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

InteractiveInterfaces Interface CATIIniInteractiveSession

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---CATIIniInteractiveSession
 

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATIIniInteractiveSession

Interface to handle documents or to exit during an interactive session.
Role:This interface contains main methods of the File/Menu of the menubar. You can create,open,save,close documents or exit of the session.
This interface must be used during an interactive session because each method impacts the windows which visualize documents or closes the frame of the session.
In a batch, or if you want handle documents without window, you must use methods included in CATDocumentServices .
This interface is implemented by the session, to retrieve a pointer, use the GetPtrSession method.


Method Index


o Close(CATIEditor*)
Closes a given document and closes all theirs windows.
o Exit()
Exits from the session.
o New(CATUnicodeString&,CATIEditor**)
Creates a document of a given type and opens a window to visualize it.
o NewFrom(CATUnicodeString&,CATIEditor**)
Creates a new document from one and opens window to visualize it.
o Open(CATUnicodeString&,CATBoolean,CATIEditor**)
Opens a document and opens a window to visualize it.
o Save(CATIEditor*)
Saves a given document.
o SaveAs(CATUnicodeString&,CATIEditor*,CATUnicodeString&)
Saves an opened document under an another name.

Methods


o Close
public virtual HRESULT Close(CATIEditor* iDocumentToClose= NULL) = 0
Closes a given document and closes all theirs windows.
Parameters:
iDocumentToClose
If iDocumentToClose is NULL, the default value, the current document is closed, otherwise the given document is closed.
Returns:
S_OK if the document opened in a window is closed otherwise E_FAIL.
o Exit
public virtual HRESULT Exit()= 0
Exits from the session.
Returns:
E_FAIL if the session is not interactive otherwise S_OK.
o New
public virtual HRESULT New( const CATUnicodeString& iDocumentType,
CATIEditor** oIEditorDocument)= 0
Creates a document of a given type and opens a window to visualize it.
Parameters:
iDocumentType
String to define kind of document to create.
The string is the one which appears in the panel File/New.
oIEditorDocument
CATIEditor interface pointer.
Returns:
S_OK if a new window with an empty document is opened otherwise E_FAIL.
o NewFrom
public virtual HRESULT NewFrom( const CATUnicodeString& iNewCompleteName,
CATIEditor** oIEditorDocument)= 0
Creates a new document from one and opens window to visualize it.
Role:The
Parameters:
iNewCompleteName
New Complete access name to the document to open ( path + name of the document ). The new document is created from this document.
oIEditorDocument
CATIEditor interface pointer.
Returns:
S_OK if a new document (not empty) is opened in a window otherwise E_FAIL.
o Open
public virtual HRESULT Open( const CATUnicodeString& iCompleteName,
const CATBoolean iFlagRead,
CATIEditor** oIEditorDocument)= 0
Opens a document and opens a window to visualize it.
Parameters:
iCompleteName
Complete access name to the document to open ( path + name of the document ).
iFlagRead
TRUE
: The document is opened in read only
FALSE
: The document is opened in readwrite
oIEditorDocument
CATIEditor interface pointer.
Returns:
S_OK if the document is opened in a window otherwise E_FAIL.
o Save
public virtual HRESULT Save(CATIEditor* iDocumentToSave= NULL) = 0
Saves a given document.
NoteThis is the unic method of this interface without impact on the frame.
Parameters:
iDocumentToSave
If iDocumentToSave is NULL, the default value, the current document is saved, otherwise the given document is saved.
Returns:
S_OK if the document opened in a window is saved otherwise E_FAIL.
o SaveAs
public virtual HRESULT SaveAs( const CATUnicodeString& iCompleteName,
CATIEditor* iDocumentToSave= NULL ,
const CATUnicodeString& iFormat="") = 0
Saves an opened document under an another name.
Note:All windows of the concerned document have the new name of the document.
Parameters:
iCompleteName
Complete access name of the document ( path + name of the document ).
iDocumentToSave
If iDocumentToSave is NULL, the default value, the current document is saved otherwise the given document is saved.
iFormat
To save the document with a specific format.(recognized by iDoc).
Returns:
S_OK if the document opened in a window is saved otherwise E_FAIL.

This object is included in the file: CATIIniInteractiveSession.h
If needed, your Imakefile.mk should include the module: CATInteractiveInterfaces

Copyright © 2003, Dassault Systèmes. All rights reserved.