All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

ApplicationFrame Class CATFrmWindow

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---System.CATEventSubscriber
        |
        +---System.CATCommand
          |
          +---Dialog.CATDialog
            |
            +---Dialog.CATDlgWindow
              |
              +---Dialog.CATDlgDialog
                |
                +---CATFrmWindow
 

Usage: you can derive this class.


public class CATFrmWindow

Class to provid a working area to visualize application data.
Role: Allows to display and manipulate application data. This basic class will be derived by application to display the application's specific data. See also: CATFrmNavigGraphicWindow, CATFrmGraphAnd3DWindow and CATFrmGraphAnd2DWindow.


Constructor and Destructor Index


o CATFrmWindow(CATString&,CATFrmEditor*)
Constructs a CATFrmWindow.
o ~CATFrmWindow()

Method Index


o CATDeclareCBEvent(WINDOW_ACTIVATED)
Event sent when the window is activated.
o CATDeclareCBEvent(WINDOW_DEACTIVATED)
Event sent when the window is deactivated.
o CATDeclareCBEvent(WINDOW_DELETED)
Event sent when the window is deleted.
o DeleteWindow()
Close the window.
o DuplicateWindow()
Creates and returns a new window of the same document.
o GetBaseName()
Returns the name of window.
o GetCurrentCamera()
Retrieves the current viewpoint of the window.
o GetEditor()
Returns the document editor.
o GetViewer()
Returns the viewer created in the window.
o GetViewerFrame()
Returns the frame in wich the viewer will be attached.
o SetBaseName(CATUnicodeString&)
Changes the name of window.
o SetCurrentCamera(CATICamera*)
Changes the viewpoint of the window.
o SetViewer(CATViewer*)
Changes the current viewer of the window.

Constructor and Destructor


o CATFrmWindow
public CATFrmWindow( const CATString& iWindowTag,
CATFrmEditor* iEditor= NULL)
Constructs a CATFrmWindow.
Parameters:
iWindowTag
The window name. This name is the base of displayed window title.
iEditor
The editor of the document.
o ~CATFrmWindow
public virtual ~CATFrmWindow()

Methods


o CATDeclareCBEvent
public CATDeclareCBEvent(WINDOW_ACTIVATED )
Event sent when the window is activated.
Role:
this event is sent by the CATFrmLayout.
Sample of callback:
 ::AddCallback(this,
              CATFrmLayout::GetCurrentLayout(),
	           CATFrmWindow::WINDOW_ACTIVATED(),
	           (CATSubscriberMethod)&MyClass::MyCBMethod,
	           NULL);
 
o CATDeclareCBEvent
public CATDeclareCBEvent(WINDOW_DEACTIVATED )
Event sent when the window is deactivated.
Role:
this event is sent by the CATFrmLayout.
Sample of callback:
 ::AddCallback(this,
              CATFrmLayout::GetCurrentLayout(),
	           CATFrmWindow::WINDOW_DEACTIVATED(),
	           (CATSubscriberMethod)&MyClass::MyCBMethod,
	           NULL);
 
o CATDeclareCBEvent
public CATDeclareCBEvent(WINDOW_DELETED )
Event sent when the window is deleted.
Role:
this event is sent by the CATFrmLayout.
Sample of callback:
 ::AddCallback(this,
              CATFrmLayout::GetCurrentLayout(),
	           CATFrmWindow::WINDOW_DELETED(),
	           (CATSubscriberMethod)&MyClass::MyCBMethod,
	           NULL);
 
o DeleteWindow
public virtual void DeleteWindow()
Close the window.
o DuplicateWindow
public virtual CATFrmWindow * DuplicateWindow()
Creates and returns a new window of the same document.
o GetBaseName
public CATUnicodeString & GetBaseName()
Returns the name of window.
o GetCurrentCamera
public virtual CATICamera * GetCurrentCamera()
Retrieves the current viewpoint of the window.
Role:See the SetCurrentCamera method.
Returns:
The current viewpoint. This pointeur must be released after usage.
o GetEditor
public virtual CATFrmEditor * GetEditor()
Returns the document editor.
o GetViewer
public virtual CATViewer * GetViewer()
Returns the viewer created in the window.
o GetViewerFrame
public virtual CATDlgFrame * GetViewerFrame()
Returns the frame in wich the viewer will be attached.
o SetBaseName
public virtual void SetBaseName( const CATUnicodeString& iWindowName)
Changes the name of window.
Parameters:
iWindowName
The new name of window.
o SetCurrentCamera
public virtual void SetCurrentCamera(CATICamera* iCamera)
Changes the viewpoint of the window.
 Example to handle the camera:

   CATICamera *pICamera = NULL ;
   pICamera = myWindow->GetCurrentCamera();

   // Modify the camera 
   pICamera->....... 

   myWindow->SetCurrentCamera(pICamera);

   pICamera->Release();
   pICamera = NULL ;
 
Parameters:
iCamera
This Camera contains the new viewpoint.
o SetViewer
public virtual void SetViewer(CATViewer* iViewer)
Changes the current viewer of the window.
Parameters:
iViewer
The new current viewer.

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

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