# HousingLayoutPinFrameAPI (widget methods): World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/HousingLayoutPinFrameAPI

## Functions

### CanMove

```lua
moveRestriction = self:CanMove()
```

Returns:
- `moveRestriction`: HousingLayoutRestriction

### CanRemove

```lua
removalRestriction = self:CanRemove()
```

Returns:
- `removalRestriction`: HousingLayoutRestriction

### CanRotate

```lua
rotateRestriction = self:CanRotate()
```

Returns:
- `rotateRestriction`: HousingLayoutRestriction

### Drag

```lua
self:Drag(isAccessible)
```

Arguments:
- `isAccessible`: bool

### GetDoorConnectionInfo

```lua
connectionInfo = self:GetDoorConnectionInfo()
```

Returns:
- `connectionInfo`: DoorConnectionInfo, may be nil

### GetPinType

```lua
type = self:GetPinType()
```

Returns:
- `type`: HousingLayoutPinType

### GetRoomGUID

```lua
roomGUID = self:GetRoomGUID()
```

Returns:
- `roomGUID`: WOWGUID

### GetRoomName

```lua
name = self:GetRoomName()
```

Returns:
- `name`: cstring, may be nil

### IsAnyPartOfRoomSelected

```lua
isSelected = self:IsAnyPartOfRoomSelected()
```

Returns true if this pin's associated room, or anything attached to it, is selected. Ex: If pin is for a door, returns true if its room, or any other doors on that room, are selected

Returns:
- `isSelected`: bool

### IsConnectedToDraggingRoom

```lua
isConnectedToDraggingRoom = self:IsConnectedToDraggingRoom()
```

Returns:
- `isConnectedToDraggingRoom`: bool

### IsOccupiedDoor

```lua
isOccupied = self:IsOccupiedDoor()
```

Will be nil if pin is not a Door

Returns:
- `isOccupied`: bool, may be nil

### IsPartOfDraggingRoom

```lua
isPartOfDraggingRoom = self:IsPartOfDraggingRoom()
```

Returns:
- `isPartOfDraggingRoom`: bool

### IsSelected

```lua
isSelected = self:IsSelected()
```

Returns true if this pin's object is itself selected; See IsAnyPartOfRoomSelected for a broader Selected check

Returns:
- `isSelected`: bool

### IsValid

```lua
isValid = self:IsValid()
```

Returns:
- `isValid`: bool

### IsValidForSelectedFloorplan

```lua
isValid = self:IsValidForSelectedFloorplan()
```

Returns:
- `isValid`: bool

### Select

```lua
self:Select()
```

### SetUpdateCallback

```lua
self:SetUpdateCallback(cb)
```

Arguments:
- `cb`: PinUpdatedCallback

---
Make an addon with your AI: tell it "Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it."
