# ActionHide

## Content

# Class: ActionHide

Represents an action that hides or shows one or more widget annotations.

## Extends

- [`ActionBase`](ActionBase)

## Constructors

### Constructor

```ts
new ActionHide(om): ActionHide;
```

Creates a new ActionHide.

#### Parameters

##### om

[`ObjectManager`](ObjectManager)

[ObjectManager](ObjectManager) that controls the lifetime of the ActionHide.

#### Returns

`ActionHide`

#### Overrides

```ts
ActionBase.constructor
```

### Constructor

```ts
new ActionHide(): ActionHide;
```

Creates a new ActionHide.

#### Returns

`ActionHide`

#### Overrides

```ts
ActionBase.constructor
```

## Accessors

### hide

#### Get Signature

```ts
get hide(): boolean;
```

Gets or sets a flag indicating whether to hide (true) or show (false) the linked annotations.
The default is true.

##### Returns

`boolean`

***

### id

#### Get Signature

```ts
get id(): number;
```

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

[`ActionBase`](ActionBase).[`id`](ActionBase#id)

***

### linkedObjects

#### Get Signature

```ts
get linkedObjects(): (string | WidgetAnnotation)[];
```

Gets the objects linked with this action as an array.
Each item is either a field name string or a [WidgetAnnotation](WidgetAnnotation) pointer.

##### Returns

(`string` \| [`WidgetAnnotation`](WidgetAnnotation))[]

***

### om

#### Get Signature

```ts
get om(): ObjectManager;
```

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

[`ActionBase`](ActionBase).[`om`](ActionBase#om)

## Methods

### addLinkedObject()

#### Call Signature

```ts
addLinkedObject(fieldName): void;
```

Adds a field name string to the linked objects collection.

##### Parameters

###### fieldName

`string`

##### Returns

`void`

#### Call Signature

```ts
addLinkedObject(annotation): void;
```

Adds a widget annotation to the linked objects collection.

##### Parameters

###### annotation

[`WidgetAnnotation`](WidgetAnnotation)

##### Returns

`void`

***

### clearLinkedObjects()

```ts
clearLinkedObjects(): void;
```

Clears all linked objects from the collection.

#### Returns

`void`

***

### free()

```ts
free(): void;
```

Detaches the object from the [ObjectManager](ObjectManager) and deallocates its memory, if possible.

#### Returns

`void`

#### Inherited from

[`ActionBase`](ActionBase).[`free`](ActionBase#free)

***

### rebind()

```ts
rebind(omTo): void;
```

Rebinds the object from the current [ObjectManager](ObjectManager) to the specified one.

#### Parameters

##### omTo

[`ObjectManager`](ObjectManager)

The new [ObjectManager](ObjectManager) for the object.

#### Returns

`void`

#### Inherited from

[`ActionBase`](ActionBase).[`rebind`](ActionBase#rebind)
