# OutlineNode

## Content

# Class: OutlineNode

Defines the outline node within PDF document.

## Extends

- [`ObjectBase`](ObjectBase)

## Constructors

### Constructor

```ts
new OutlineNode(
   om, 
   title?, 
   action?, 
   expanded?): OutlineNode;
```

Initialize a new instance of the OutlineNode class.

#### Parameters

##### om

[`ObjectManager`](ObjectManager)

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

##### title?

`string`

The title of OutlineNode.

##### action?

  \| [`DestinationProperties`](../type-aliases/DestinationProperties)
  \| [`ActionProperties`](../type-aliases/ActionProperties)
  \| [`DestinationBase`](DestinationBase)
  \| [`ActionBase`](ActionBase)

The action which should be performed or destination defining the new document view.

##### expanded?

`boolean`

Indicates whether the node should be expanded.

#### Returns

`OutlineNode`

#### Overrides

```ts
ObjectBase.constructor
```

### Constructor

```ts
new OutlineNode(
   title?, 
   action?, 
   expanded?): OutlineNode;
```

Initialize a new instance of the OutlineNode class.

#### Parameters

##### title?

`string`

The title of OutlineNode.

##### action?

  \| [`DestinationProperties`](../type-aliases/DestinationProperties)
  \| [`ActionProperties`](../type-aliases/ActionProperties)
  \| [`DestinationBase`](DestinationBase)
  \| [`ActionBase`](ActionBase)

The action which should be performed or destination defining the new document view.

##### expanded?

`boolean`

Indicates whether the node should be expanded.

#### Returns

`OutlineNode`

#### Overrides

```ts
ObjectBase.constructor
```

## Accessors

### action

#### Get Signature

```ts
get action(): ActionBase;
```

Gets or sets the [ActionBase](ActionBase) to be performed when this OutlineNode is activated.
If both 'dest' and 'action' are specified,
the viewer application will determine the behavior, which may be unpredictable.
For consistent results, specify only one.

##### Returns

[`ActionBase`](ActionBase)

#### Set Signature

```ts
set action(value): void;
```

Gets or sets the [ActionBase](ActionBase) to be performed when this OutlineNode is activated.
If both 'dest' and 'action' are specified,
the viewer application will determine the behavior, which may be unpredictable.
For consistent results, specify only one.

##### Parameters

###### value

  \| [`ActionProperties`](../type-aliases/ActionProperties)
  \| [`ActionBase`](ActionBase)

##### Returns

`void`

***

### children

#### Get Signature

```ts
get children(): OutlineNodeCollection;
```

Gets the [OutlineNodeCollection](OutlineNodeCollection) collection containing child nodes.

##### Returns

[`OutlineNodeCollection`](OutlineNodeCollection)

***

### dest

#### Get Signature

```ts
get dest(): DestinationBase;
```

Gets or sets the [DestinationBase](DestinationBase) to be displayed when this OutlineNode is activated.
If both 'dest' and 'action' are specified,
the viewer application will determine the behavior, which may be unpredictable.
For consistent results, specify only one.

##### Returns

[`DestinationBase`](DestinationBase)

#### Set Signature

```ts
set dest(value): void;
```

Gets or sets the [DestinationBase](DestinationBase) to be displayed when this OutlineNode is activated.
If both 'dest' and 'action' are specified,
the viewer application will determine the behavior, which may be unpredictable.
For consistent results, specify only one.

##### Parameters

###### value

  \| [`DestinationProperties`](../type-aliases/DestinationProperties)
  \| [`DestinationBase`](DestinationBase)

##### Returns

`void`

***

### doc

#### Get Signature

```ts
get doc(): PdfDocument;
```

Gets the [PdfDocument](PdfDocument) owning this object.

##### Returns

[`PdfDocument`](PdfDocument)

***

### expanded

#### Get Signature

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

Gets or sets a value indicating whether this OutlineNode expanded and its child nodes are visible.

##### Returns

`boolean`

#### Set Signature

```ts
set expanded(value): void;
```

Gets or sets a value indicating whether this OutlineNode expanded and its child nodes are visible.

##### Parameters

###### value

`boolean`

##### Returns

`void`

***

### hasChildren

#### Get Signature

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

Gets a value indicating whether [children](#children) collection is not empty.

##### Returns

`boolean`

***

### id

#### Get Signature

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

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

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

***

### om

#### Get Signature

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

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

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

***

### owner

#### Get Signature

```ts
get owner(): OutlineNodeCollection;
```

Gets the [OutlineNodeCollection](OutlineNodeCollection) collection containing this object.

##### Returns

[`OutlineNodeCollection`](OutlineNodeCollection)

***

### parent

#### Get Signature

```ts
get parent(): OutlineNode;
```

Gets the parent OutlineNode.

##### Returns

`OutlineNode`

***

### textColor

#### Get Signature

```ts
get textColor(): Color;
```

Gets or sets the text color of the outline node.

##### Returns

[`Color`](../type-aliases/Color)

#### Set Signature

```ts
set textColor(value): void;
```

Gets or sets the text color of the outline node.

##### Parameters

###### value

[`Color`](../type-aliases/Color)

##### Returns

`void`

***

### textStyle

#### Get Signature

```ts
get textStyle(): OutlineNodeFontStyle;
```

Gets or sets the text style of the outline node.

##### Returns

[`OutlineNodeFontStyle`](../enumerations/OutlineNodeFontStyle)

#### Set Signature

```ts
set textStyle(value): void;
```

Gets or sets the text style of the outline node.

##### Parameters

###### value

[`OutlineNodeFontStyle`](../enumerations/OutlineNodeFontStyle)

##### Returns

`void`

***

### title

#### Get Signature

```ts
get title(): string;
```

Gets or sets the title of the outline node.

##### Returns

`string`

#### Set Signature

```ts
set title(value): void;
```

Gets or sets the title of the outline node.

##### Parameters

###### value

`string`

##### Returns

`void`

## Methods

### free()

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

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

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`free`](ObjectBase#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

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