AfrFoundation CATFrmEditor
Usage: you must use this class as is. You should never derive it.
public class CATFrmEditor
Base class for a document editor.
Role: The document editor is a kind of controller that federates
all the objects that provide the interactive behavior to the document,
that knows all the windows in which the document is displayed, and
that holds the current availability state of all the commands of the
document's workshop and current workbench using its own set of
command headers.
Multi-Document editing is managed by having several editors, that
will be switched when current window is changed.
- See also:
-
Constructor and Destructor Index
- o
~CATFrmEditor()
-
Method Index
- o
CATDeclareCBEvent(EDITOR_CLOSE_ENDED)
- Event sent when the editor is closed.
- o
CATDeclareCBEvent(UIACTIVEOBJECT_CHANGED)
- Event sent when an ui-activable object is activated.
- o
CATDeclareCBEvent(UIACTIVEOBJECT_CHANGECOMPLETED)
- Event sent after the ui-activable object has changed.
- o
GetCSO()
- Returns the Current Selection of Objects.
- o
GetCommandSelector()
- Returns the command selector created by the editor.
- o
GetCompass(int)
- Returns the compass.
- o
GetCurrentEditor()
- Returns the current activated editor.
- o
GetEditedContents()
- Returns a handle on the edited data.
- o
GetFurtiveISO()
- Returns the Furtive Interactive Set of Objects.
- o
GetHSO()
- Returns the Highlighted Set of Objects.
- o
GetISO()
- Returns the Interactive Set of Objects.
- o
GetPSO()
- Returns the Preselected Set of Objets.
- o
GetUIActiveObject()
- Returns the current UI-activated element.
- o
GetWindowCount()
- Returns the number of window of the editor.
- o
Release()
- Release method overloaded from
- o
SetActivePath(CATPathElement*,CATBoolean)
- Activates an element of the given path.
- o
UnsetRepeatedCommand()
- Unsets the repeated command .
Constructor and Destructor
o ~CATFrmEditor
public virtual ~CATFrmEditor( | ) |
-
Methods
o CATDeclareCBEvent
public CATDeclareCBEvent( | | ) |
-
Event sent when the editor is closed.
Role:
this event is sent by the CATFrmLayout.
Sample of callback:
::AddCallback(this,
CATFrmLayout::GetCurrentLayout(),
CATFrmEditor::EDITOR_CLOSE_ENDED(),
(CATSubscriberMethod)&MyClass::MyCBMethod,
NULL);
o CATDeclareCBEvent
public CATDeclareCBEvent( | | ) |
-
Event sent when an ui-activable object is activated.
Role:
this event is sent by the CATFrmLayout.
Sample of callback:
::AddCallback(this,
CATFrmLayout::GetCurrentLayout(),
CATFrmEditor::UIACTIVEOBJECT_CHANGED(),
(CATSubscriberMethod)&MyClass::MyCBMethod,
NULL);
o CATDeclareCBEvent
public CATDeclareCBEvent( | | ) |
-
Event sent after the ui-activable object has changed.
Role:
this event is sent by the CATFrmEditor which owns the ui-activable object.
The difference with UIACTIVEOBJECT_CHANGED is this one is sent
after all the notifications are sent after the ui-activable object has been changed.
Sample of callback:
::AddCallback(this,
,
CATFrmEditor::UIACTIVEOBJECT_CHANGECOMPLETED(),
(CATSubscriberMethod)&MyClass::MyCBMethod,
NULL);
o GetCSO
-
Returns the Current Selection of Objects.
Lifecycle rules deviation: No AddRef is performed
on the returned value.
- See also:
-
o GetCommandSelector
public GetCommandSelector( | ) |
-
Returns the command selector created by the editor.
Role:This command selector receives all the notifications
from the graphic representation. You use it in the AttachTo method
method of the
.
o GetCompass
public GetCompass( | const | iCompassVersion | = 0) |
-
Returns the compass.
- Parameters:
-
- iCompassVersion
- The compass version number.
Legal values: Parameter must be left to default value.
- Returns:
- A pointer to an object that implements the CATI3DCompass interface.
Lifecycle rules deviation:This method does not AddRef the
returned pointer.
- See also:
-
o GetCurrentEditor
public static GetCurrentEditor( | ) |
-
Returns the current activated editor.
Role: This method must be carrefully used.
If your are in any method of a CATStateCommand, use the GetEditor() method
of CATStateCommand (inherited from CATDialogAgent), to have the
current editor.
If you a are in a CATCommand, use GetCurrentEditor only in the constructor. Keep
a pointer on it, and use this pointer in all methods of the command.
Legal values: The returned value may be null if
no editor is currently activated.
Lifecycle rules deviation: No AddRef is performed
on the returned value.
o GetEditedContents
public GetEditedContents( | ) |
-
Returns a handle on the edited data.
Role: The edited data should give access to the model root object controlled by the editor.
The CATFrmEditor class has no knowledge of model management, it only keeps this pointer.
Each CATFrmEditor instance sets this pointer and gives the model knowledge to the pointed object.
If this object is a PLM component, it should implement
behaviors.
If this object is a PLM component set, it should implement
behaviors.
Lifecycle rules deviation: No AddRef is performed on the returned value.
o GetFurtiveISO
-
Returns the Furtive Interactive Set of Objects.
Role: Objects added to the Furtive Interactive
Set of Objects are displayed in XOR mode.
Lifecycle rules deviation: No AddRef is performed
on the returned value.
- See also:
-
o GetHSO
-
Returns the Highlighted Set of Objects.
Lifecycle rules deviation: No AddRef is performed
on the returned value.
- See also:
-
o GetISO
-
Returns the Interactive Set of Objects.
Lifecycle rules deviation: No AddRef is performed
on the returned value.
- See also:
-
o GetPSO
-
Returns the Preselected Set of Objets.
Lifecycle rules deviation: No AddRef is performed
on the returned value.
- See also:
-
o GetUIActiveObject
public virtual GetUIActiveObject( | ) |
-
Returns the current UI-activated element.
Lifecycle rules deviation: No AddRef is performed
on the returned value.
- See also:
-
o GetWindowCount
-
Returns the number of window of the editor.
o Release
-
Release method overloaded from
.
- See also:
-
o SetActivePath
public virtual SetActivePath( | | iPathElement, |
| | iObjectEdition | =TRUE) |
-
Activates an element of the given path.
Role: Actives the workshop of the first UI activable element
found from the leaf of the path iPathElement.
- Parameters:
-
- iPathElement
- A pointer to the path to UI activate.
- iObjectEdition
-
- TRUE if the path change corresponds to an object edition.
After the edition, all the actions done during this edition
will be committed in one action. This is important for undo/redo.
- FALSE if the path change does not correspond to an object edition.
The actions done after calling SetActivePath will be considered as separate undo/redo steps.
- Returns:
- Returns S_OK on success. On failure, it returns one of the following
error codes :
- SAP_INVALID_ARG if the given argument is invalid (null)
- SAP_REFUSED_BY_SITE if one of the
object of the given path returned 0 on a call to its
method
- SAP_OBJECT_IN_USE if one of the
object of the given path is already ui-active in an other editor
- SAP_NO_LICENSE if there is no license for one of the
object's implementation of the given path
- See also:
-
o UnsetRepeatedCommand
public UnsetRepeatedCommand( | ) |
-
Unsets the repeated command .
Role:When the end user double clicks on an icon in a toolbar,
the command is set in repeat mode. It means that when the command is canceled,
the command is relaunched by the editor. This method enables a command
to unset this repeat mode. It can be useful when the end user clicks on a Close
Button or a Cancel Button to unset the repeat mode.
This object is included in the file: CATFrmEditor.h
If needed, your Imakefile.mk should include the module: CATAfrFoundation
Copyright © 1999-2015, Dassault Systèmes. All rights reserved.