SystemUI


Supported with:
  • Engine
  • ArcGIS for Desktop Basic
  • ArcGIS for Desktop Standard
  • ArcGIS for Desktop Advanced
  • Server
Library dependencies: System

Additional library information: Contents, Object Model Diagram

The SystemUI library contains the interface definitions for user interface (UI) components that can be extended within ArcGIS. These include the ICommand, ITool, and IToolControl interfaces. Developers use these interfaces to extend either the ArcGIS for Desktop applications or the UI components utilized by the developer components within ArcGIS Engine. The objects contained in this library are utility objects that simplify some UI developments.
Developers do not extend this library but can extend ArcGIS for Desktop by implementing interfaces contained in this library.
The SystemUI library contains some diverse objects with unrelated functionality.

See the following sections for more information about this namespace:

Operations

An operation is an action, or group of actions, that can be undone or redone. You can implement IOperation to make an object that performs actions that are capable of undo and redo. You are only likely to call members of IOperation if you are implementing undo and redo for a stand-alone application.
An application can implement an operation stack to provide undo and redo facilities. As you perform operations, they are added to the stack; then you can use undo and redo in the application to manipulate the stack to undo or redo the operations.
ArcMap has an operation stack that can be obtained with the IMxDocument.OperationStack property. ArcMap’s buttons and tools wrap their actions in an operation and add the operations to the stack.
The following code example uses the operation stack to undo a previous operation. It assumes that you already have the m_application variable as a reference to the Application object in your .NET custom component.
[C#]
//ESRI.ArcGIS.Framework.IApplication m_application.

private void Undo()
{
    ESRI.ArcGIS.ArcMapUI.IMxDocument mxDocument = (ESRI.ArcGIS.ArcMapUI.IMxDocument)
        m_application.Document;
    ESRI.ArcGIS.SystemUI.IOperationStack operationStack = mxDocument.OperationStack;
    operationStack.Undo();
}
[VB.NET]
Public Sub Undo()
    Dim pMxDoc As IMxDocument
    Set pMxDoc = ThisDocument
    pMxDoc.OperationStack.Undo
End Sub
Depending on your scenario, there are different methodologies for creating an operation and adding it to the operation stack. If your tool edits features and rows, you can use IEditor.StartOperation and IEditor.StopOperation and the actions in between will be automatically added to the operation stack as a single operation. Stopping an edit session clears the operation stack. If you are outside an edit session and updating a geodatabase directly, calls to IWorkspaceEdit.StartEditOperation and StopEditOperation will not automatically add anything to ArcMap’s operation stack since these interfaces are independent of ArcMap. For other actions, on graphic elements for example, you need to create a custom operation object that implements IOperation. The operation is executed and loaded onto the stack with a call to IOperationStack.Do.
Outside the context of ArcGIS applications such as ArcMap, you can add undo and redo capability by using the ControlsOperationStack class. Usually, you cocreate this class in conjunction with ToolbarControl and add undo and redo buttons that manipulate the operation stack via IOperationStack.

Command and tool hosts

The CommandHost and ToolHost objects are used when developing with the ArcGIS C++ application programming interface (API). This enables commands and tools to be developed for UNIX platforms. A tool host holds C++ tool implementations in a toolbar. A command host holds C++ command implementations in a toolbar.