# PluginGui

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [LayerCollector](https://rapi.sleaze.dev/classes/LayerCollector.md), [GuiBase2d](https://rapi.sleaze.dev/classes/GuiBase2d.md), [GuiBase](https://rapi.sleaze.dev/classes/GuiBase.md), [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Subclasses: [DockWidgetPluginGui](https://rapi.sleaze.dev/classes/DockWidgetPluginGui.md), [QWidgetPluginGui](https://rapi.sleaze.dev/classes/QWidgetPluginGui.md)
- Tags: Not creatable, Not replicated
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/PluginGui/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/PluginGui

An abstract base class for GUIs that display `GuiObjects` in Roblox Studio widgets.

## Properties

### Plugin

```luau
PluginGui.Plugin: Plugin
```

- Tags: Hidden, Read only, Roblox script security, Read capabilities: UI

### Title

```luau
PluginGui.Title: string
```

- Tags: Read capabilities: UI

The title that is displayed above the contents of the [`PluginGui`](https://rapi.sleaze.dev/classes/PluginGui.md).

## Methods

### BindToClose

```luau
PluginGui:BindToClose(function: ((...any) -> ...any)? = nil)
```

- Tags: Capabilities: UI

Binds a function that runs when the user closes the [`PluginGui`](https://rapi.sleaze.dev/classes/PluginGui.md).

Parameters:

- `function`: The function to bind the close button to. If no function is specified then any previously specified function will be unbound.

### GetRelativeMousePosition

```luau
PluginGui:GetRelativeMousePosition(): Vector2
```

- Tags: Plugin security, Capabilities: UI

Returns the position of the mouse relative to the PluginGui.

Returns: The screen position of the mouse relative to the PluginGui in pixels.

### OverrideStudioAction

```luau
PluginGui:OverrideStudioAction(studioAction: Enum.StudioAction): StudioActionOverride
```

- Tags: Roblox script security, Capabilities: UI

## Events

### InputBegan

```luau
PluginGui.InputBegan: RBXScriptSignal<(input: InputObject, gameProcessedEvent: boolean)>
```

- Tags: Roblox script security, Capabilities: UI

### InputChanged

```luau
PluginGui.InputChanged: RBXScriptSignal<(input: InputObject, gameProcessedEvent: boolean)>
```

- Tags: Roblox script security, Capabilities: UI

### InputEnded

```luau
PluginGui.InputEnded: RBXScriptSignal<(input: InputObject, gameProcessedEvent: boolean)>
```

- Tags: Roblox script security, Capabilities: UI

### MouseEnter

```luau
PluginGui.MouseEnter: RBXScriptSignal<()>
```

- Tags: Roblox script security, Capabilities: UI

### MouseLeave

```luau
PluginGui.MouseLeave: RBXScriptSignal<()>
```

- Tags: Roblox script security, Capabilities: UI

### PluginDragDropped

```luau
PluginGui.PluginDragDropped: RBXScriptSignal<(dragData: { [string]: any })>
```

- Tags: Plugin security, Capabilities: UI

Fires when the user releases their mouse when hovering over a PluginGui during a drag operation started by [`Plugin:StartDrag()`](https://rapi.sleaze.dev/classes/Plugin.md).

### PluginDragEntered

```luau
PluginGui.PluginDragEntered: RBXScriptSignal<(dragData: { [string]: any })>
```

- Tags: Plugin security, Capabilities: UI

Fires when the user's mouse enters a PluginGui during a drag operation started by [`Plugin:StartDrag()`](https://rapi.sleaze.dev/classes/Plugin.md).

### PluginDragLeft

```luau
PluginGui.PluginDragLeft: RBXScriptSignal<(dragData: { [string]: any })>
```

- Tags: Plugin security, Capabilities: UI

Fires when the user's mouse leaves a PluginGui during a drag operation started by [`Plugin:StartDrag()`](https://rapi.sleaze.dev/classes/Plugin.md).

### PluginDragMoved

```luau
PluginGui.PluginDragMoved: RBXScriptSignal<(dragData: { [string]: any })>
```

- Tags: Plugin security, Capabilities: UI

Fires when the user's mouse moves within a PluginGui during a drag operation started by [`Plugin:StartDrag()`](https://rapi.sleaze.dev/classes/Plugin.md).

### PointerAction

```luau
PluginGui.PointerAction: RBXScriptSignal<(wheel: number, pan: Vector2, pinch: number, gameProcessedEvent: boolean)>
```

- Tags: Roblox script security, Capabilities: UI

### WindowFocused

```luau
PluginGui.WindowFocused: RBXScriptSignal<()>
```

- Tags: Plugin security, Capabilities: UI

Fires when the user begins interacting with the window of the PluginGui.

### WindowFocusReleased

```luau
PluginGui.WindowFocusReleased: RBXScriptSignal<()>
```

- Tags: Plugin security, Capabilities: UI

Fires when the user stops interacting with the window of the PluginGui.

## Inherited members

- From [LayerCollector](https://rapi.sleaze.dev/classes/LayerCollector.md): `Enabled`, `ResetOnSpawn`, `TabKeyboardNavigation`, `ZIndexBehavior`, `GetGuiObjectsAtPosition`, `GetLayoutNodeTree`
- From [GuiBase2d](https://rapi.sleaze.dev/classes/GuiBase2d.md): `AbsolutePosition`, `AbsoluteRotation`, `AbsoluteSize`, `ActiveQueryNames`, `ReplicatedInsertionOrder`, `ClippedRect`, `IsNotOccluded`, `RawRect2D`, `TotalGroupScale`, `AutoLocalize`, `RootLocalizationTable`, `Localize`, `SelectionBehaviorDown`, `SelectionBehaviorLeft`, `SelectionBehaviorRight`, `SelectionBehaviorUp`, `SelectionGroup`, `SelectionChanged`
- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
