All Frameworks Class Hierarchy This Framework Previous Next Indexes
ApplicationFrame Class CATFrmEditor
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---System.CATEventSubscriber
|
+---System.CATCommand
|
+---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:
- CATFrmObjectEditor
Constructor and Destructor Index
- o
~CATFrmEditor()
-
Method Index
- o
CATDeclareCBEvent(EDITOR_CLOSE_ENDED)
- Event sent when the editor is closed.
- o
CATDeclareCBEvent(UIACTIVEOBJECT_CHANGECOMPLETED)
- Event sent after the ui-activable object has changed.
- o
CATDeclareCBEvent(UIACTIVEOBJECT_CHANGED)
- Event sent when an ui-activable object is activated.
- 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
GetDocument()
- Returns the document associated to the editor.
- 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
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( | EDITOR_CLOSE_ENDED | ) |
-
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( | UIACTIVEOBJECT_CHANGECOMPLETED | ) |
-
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 CATDeclareCBEvent
public CATDeclareCBEvent( | UIACTIVEOBJECT_CHANGED | ) |
-
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 GetCSO
-
Returns the Current Selection of Objects.
Lifecycle rules deviation: No AddRef is performed
on the returned value.
- See also:
- CATCSO
o 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
CATVisManager .
o GetCompass
-
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:
- CATI3DCompass
o 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 GetDocument
-
Returns the document associated to the editor.
Lifecycle rules deviation: No AddRef is performed
on the returned value.
- See also:
- CATDocument
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:
- CATISO
o GetHSO
-
Returns the Highlighted Set of Objects.
Lifecycle rules deviation: No AddRef is performed
on the returned value.
- See also:
- CATHSO
o GetISO
-
Returns the Interactive Set of Objects.
Lifecycle rules deviation: No AddRef is performed
on the returned value.
- See also:
- CATISO
o GetPSO
-
Returns the Preselected Set of Objets.
Lifecycle rules deviation: No AddRef is performed
on the returned value.
- See also:
- CATPSO
o GetUIActiveObject
-
Returns the current UI-activated element.
Lifecycle rules deviation: No AddRef is performed
on the returned value.
- See also:
- CATIUIActivate
o GetWindowCount
public virtual int GetWindowCount( | ) |
-
Returns the number of window of the editor.
o SetActivePath
-
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.
- See also:
- CATIUIActivate
- 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 on of the following
error codes :
- SAP_INVALID_ARG if the given argument is invalid (null)
- SAP_REFUSED_BY_SITE if one of the
CATInPlaceSite object of the given path returned 0 on a call to its
CATInPlaceSite.CanInPlaceActivate method
- SAP_OBJECT_IN_USE if one of the
CATIUIActivate 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
CATIUIActivate object's implementation of the given path
o UnsetRepeatedCommand
public void 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: CATApplicationFrame