All Frameworks Class Hierarchy This Framework Previous Next Indexes
ApplicationFrame Class CATApplicationFrame
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---System.CATEventSubscriber
|
+---CATApplicationFrame
Usage: you must use this class as is. You should never derive it.
public class CATApplicationFrame
Class representing the application main window model.
Role: An application frame is a specialized window which
allows to start commands and perform standard interactions. The
CATApplicationFrame class corresponds to the model of
this window. The CATApplicationFrame class is also able
to create workshops and workbenches since workshop and workbench
factories are defined as its data extensions.
Constructor and Destructor Index
- o
~CATApplicationFrame()
-
Method Index
- o
GetApplicationDocument()
- Returns the application document.
- o
GetCurrentWorkbench()
- Returns the internal name of the current workbench.
- o
GetCurrentWorkshop()
- Returns the internal name of the current workshop.
- o
GetFrame()
- Retrieves a pointer to the application frame.
- o
GetMainWindow()
- Returns the main window.
- o
HidePalette(CATString&)
- Hides a toolbar.
- o
SetBusyCursor()
- Changes the cursor mouse into a busy cursor.
- o
SetMessage(MessageType,CATUnicodeString&)
- Displays a message in the status bar.
- o
ShowPalette(CATString&)
- Displays a toolbar.
Enumerated Type Index
- o
MessageType
- Type of message to displays in the status bar.
Constructor and Destructor
o ~CATApplicationFrame
public virtual ~CATApplicationFrame( | ) |
-
Methods
o GetApplicationDocument
-
Returns the application document.
Role: This method returns the document of the application. Refer to the
GetMainWindow method for its usage.
- Returns:
- The application document.
Lifecycle rules deviation: This method doesn't AddRef the
returned value.
o GetCurrentWorkbench
-
Returns the internal name of the current workbench.
- Returns:
- a CATString
o GetCurrentWorkshop
-
Returns the internal name of the current workshop.
- Returns:
- a CATString
o GetFrame
-
Retrieves a pointer to the application frame.
- Returns:
- The application frame pointer.
Lifecycle rules deviation: This method doesn't AddRef the
returned value.
o GetMainWindow
-
Returns the main window.
Role: This method returns:
- If no document is open: the only one CATApplicationDocument instance. The
instance that you retrieve also with the
GetApplicationDocument method
- Otherwise: a dialog object dedicated to the current
CATFrmEditor. This dialog object is an invisible dialog object which contains all the dialog objects related to
the document: all its windows and all its dialog boxes. Thanks to this object,
the application can hide/deactivate all the dialog objects when the document
loses the focus.
It enables you mainly to find a parent for your dialog box:
- If you create a dialog box which is document's independent, use the
GetApplicationDocument method; your dialog box will be always visible. For example, if you create a dialog box inside a command launched from the General workshop
addin (
CATIAfrGeneralWksAddin ) you will use the GetApplicationDocument method
- If you create a dialog box which is in relationship with a document, use this
method. In generally, the commands associated with a document use this method.
- Returns:
- A dialog object.
Lifecycle rules deviation: This method doesn't AddRef the
returned value.
o HidePalette
public void HidePalette( | const CATString& | iPaletteName) |
-
Hides a toolbar.
- Parameters:
-
- iPaletteName
- The name of the toolbar to set invisible. This name is third argument of the
NewAccess macro.
NewAccess(CATCmdContainer, pMyTlb, iPaletteName);
o SetBusyCursor
public static void SetBusyCursor( | ) |
-
Changes the cursor mouse into a busy cursor.
Role: Use this method to indicate that
your application is busy. This method calls the
SetBusyCursor method of the
CATInteractiveApplication class.
o SetMessage
-
Displays a message in the status bar.
- Parameters:
-
- iMessageType
- The message type.
Legal values: The parameter must
be set to CATApplicationFrame::Information.
- iMessage
- The message.
o ShowPalette
public void ShowPalette( | const CATString& | iPaletteName) |
-
Displays a toolbar.
- Parameters:
-
- iPaletteName
- The name of the toolbar to set visible. This name is third argument of the
NewAccess macro.
NewAccess(CATCmdContainer, pMyTlb, iPaletteName);
Enumerated Types
o MessageType
-
enum MessageType {
Information,
Prompt,
MultiDocumentPrompt,
ShortPrompt,
LogMessage
}
Type of message to displays in the status bar.
- Parameters:
-
- Information
- Simple text.
- Prompt
- Internal usage.
- MultiDocumentPrompt
- Internal usage.
- ShortPrompt
- Internal usage.
- LogMessage
- Internal usage.
This object is included in the file: CATApplicationFrame.h
If needed, your Imakefile.mk should include the module: CATApplicationFrame