# RemoteGoToAction Class

> A remote go-to action is an action that includes a RemoteDestination object.

- Product: Adobe PDF Library 21
- Language: Modern C++
- Version: 21.4.0
- HTML page: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteGoToAction
- Version index: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/llms.txt

```cpp
class RemoteGoToAction : Action
```

**Namespace:** `datalogics_interface`

**Inherits from:** [`Action`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md)

## Description

A remote go-to action is an action that includes a RemoteDestination object.

The action associated with this object, when selected, opens a separate PDF file, or opens a web page in a browser window.

**Uses types:** [`FileSpecification`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md), [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md), [`RemoteDestination`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteDestination.md)

## Constructors

### RemoteGoToAction

```cpp
datalogics_interface::RemoteGoToAction::RemoteGoToAction(FileSpecification &file_spec, RemoteDestination &remote_dest)
```

*constructor*

**Parameters**

- `file_spec` ([`FileSpecification &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md)): A FileSpecification containing the path to the remote document.
- `remote_dest` ([`RemoteDestination &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteDestination.md)): A RemoteDestination representing the destination to jump in the remote document.

General constructor.

The action's target will be the path referenced in the FileSpecification parameter. If the path is absolute, the target path will also be absolute. If the path is relative, the target path will also be relative.

Generally, the FileSpecification and RemoteDestination should be associated with the same Document, and this Document should be the same Document that contains the RemoteGoToAction. (All three objects, FileSpecification, RemoteDestination, and RemoteGoToAction, are associated with a Document at creation time, and the association cannot be changed.) The RemoteGoToAction will be associated with the same Document that the RemoteDestination parameter is associated with.

When creating the RemoteGoToAction, the FileSpecification and RemoteDestination given to the constructor must be associated with the same Document, or an exception will be thrown.

### RemoteGoToAction

```cpp
datalogics_interface::RemoteGoToAction::RemoteGoToAction(RemoteGoToAction &&) noexcept=default
```

*constructor*

**Parameters**

- (unnamed) ([`RemoteGoToAction &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteGoToAction.md))

### ~RemoteGoToAction

```cpp
datalogics_interface::RemoteGoToAction::~RemoteGoToAction() override
```

*destructor*

## Methods

### clear_file_specification

```cpp
void datalogics_interface::RemoteGoToAction::clear_file_specification()
```

**Returns:** `void`

Removes the file specification from this action.

### clear_remote_destination

```cpp
void datalogics_interface::RemoteGoToAction::clear_remote_destination()
```

**Returns:** `void`

Removes the remote destination from this action.

### get_file_specification

```cpp
std::unique_ptr< FileSpecification > datalogics_interface::RemoteGoToAction::get_file_specification() const
```

**Returns:** [`std::unique_ptr< FileSpecification >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md)

The FileSpecification associated with the RemoteGoToAction.

The FileSpecification for this action.

Generally, the FileSpecification should be associated with the same Document that contains the RemoteGoToAction. (Both FileSpecification and RemoteGoToAction are associated with a Document at creation time.)

### get_new_window

```cpp
bool datalogics_interface::RemoteGoToAction::get_new_window() const
```

**Returns:** `bool`

True if the destination document is set to open in a new window, false otherwise.

A flag specifying whether to open the destination document in a new window.

By default, this flag is not present.

If the action's FileSpecification is not a PDF, this flag is ignored.

### get_pdf_dict

```cpp
PDFDict datalogics_interface::Action::get_pdf_dict()
```

**Returns:** [`PDFDict`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFDict.md)

The underlying PDF dictionary for this Action.

Retrieve the PDFObject representation of this object.

### get_remote_destination

```cpp
std::unique_ptr< RemoteDestination > datalogics_interface::RemoteGoToAction::get_remote_destination() const
```

**Returns:** [`std::unique_ptr< RemoteDestination >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteDestination.md)

The RemoteDestination associated with the RemoteGoToAction.

The RemoteDestination for this action.

Generally, the RemoteDestination should be associated with the same Document that contains the RemoteGoToAction. (Both RemoteDestination and RemoteGoToAction are associated with a Document at creation time.)

### get_subtype

```cpp
std::string datalogics_interface::Action::get_subtype() const
```

**Returns:** `std::string`

The subtype string for this action, such as "GoTo", "URI", "Launch", or "GoToR".

The action's subtype.

### operator=

```cpp
RemoteGoToAction & datalogics_interface::RemoteGoToAction::operator=(RemoteGoToAction &&) noexcept=default
```

**Parameters**

- (unnamed) ([`RemoteGoToAction &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteGoToAction.md))

**Returns:** [`RemoteGoToAction &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteGoToAction.md)

### operator==

```cpp
bool datalogics_interface::Action::operator==(const Action &other) const
```

**Parameters**

- `other` ([`const Action &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Action.md))

**Returns:** `bool`

true if the two objects refer to the same action, false otherwise.

Determines whether this Action is equal to another.

Two Actions are considered equal if they refer to the same underlying PDF action object.

### set_file_specification

```cpp
void datalogics_interface::RemoteGoToAction::set_file_specification(const FileSpecification &file_spec)
```

**Parameters**

- `file_spec` ([`const FileSpecification &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/FileSpecification.md)): The FileSpecification to associate with the RemoteGoToAction.

**Returns:** `void`

The FileSpecification for this action.

Generally, the FileSpecification should be associated with the same Document that contains the RemoteGoToAction. (Both FileSpecification and RemoteGoToAction are associated with a Document at creation time.)

### set_new_window

```cpp
void datalogics_interface::RemoteGoToAction::set_new_window(bool new_window)
```

**Parameters**

- `new_window` (`bool`): The new value for the flag.

**Returns:** `void`

A flag specifying whether to open the destination document in a new window.

By default, this flag is not present.

If the action's FileSpecification is not a PDF, this flag is ignored.

### set_remote_destination

```cpp
void datalogics_interface::RemoteGoToAction::set_remote_destination(const RemoteDestination &remote_dest)
```

**Parameters**

- `remote_dest` ([`const RemoteDestination &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/RemoteDestination.md)): The RemoteDestination to associate with the RemoteGoToAction.

**Returns:** `void`

The RemoteDestination for this action.

Generally, the RemoteDestination should be associated with the same Document that contains the RemoteGoToAction. (Both RemoteDestination and RemoteGoToAction are associated with a Document at creation time.)

### to_string

```cpp
std::string datalogics_interface::Action::to_string() const
```

**Returns:** `std::string`

A string describing this Action.

Returns a string representation of this Action.

The string includes the action's subtype.

### try_as

```cpp
T * datalogics_interface::Action::try_as()
```

**Parameters**

- (unnamed) (`typename T`)

**Returns:** `T *`

Attempt to downcast this action to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match.

### try_as

```cpp
const T * datalogics_interface::Action::try_as() const
```

**Parameters**

- (unnamed) (`typename T`)

**Returns:** `const T *`

Const overload of try_as(). Returns a const pointer, or nullptr.
